/* Krabps Groups - Unified Theme */
/* Mobile-first, consistent black fonts, modern responsive design */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #000000; /* Always black text */
    background-color: #f8f9fa;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: #000000;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.1rem; }

p, span, div, li, td, th {
    color: #000000;
}

a {
    color: #000000;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Layout Components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

.section {
    padding: 2rem 0;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #ffffff;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header * {
    color: #ffffff !important;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.brand-logo {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.25rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.brand h1 {
    font-size: 1.75rem;
    margin: 0;
}

.brand .u-muted {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* Navigation */
.nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav a, .nav-link {
    color: #ffffff;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    text-align: center;
}

.nav a:hover, .nav-link:hover,
.nav a.active, .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Cards */
.card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #ffffff;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
}

.card-header * {
    color: #ffffff !important;
}

.card-body {
    padding: 0;
}

/* Forms */
.form-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    margin: 1rem auto;
    max-width: 600px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #000000;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 1rem;
    color: #000000;
    background-color: #ffffff;
    transition: all 0.3s ease;
    min-height: 44px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group input::placeholder {
    color: #6c757d;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-height: 44px;
    min-width: 120px;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    color: #ffffff;
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #000000 !important;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    color: #000000;
}

.table th {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #ffffff !important;
    font-weight: 600;
}

.table tr:hover {
    background-color: #f8f9fa;
}

/* Messages */
.message {
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    font-weight: 500;
    color: #000000;
}

.message.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.message.info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
}

.message.warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
}

/* Number Grids */
.number-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #007bff;
}

.number-btn {
    background: #ffffff;
    color: #000000;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    padding: 0.75rem 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.number-btn:hover {
    background: #007bff;
    color: #ffffff;
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.number-btn.selected {
    background: #007bff;
    color: #ffffff;
    border-color: #007bff;
}

.number-btn.sold {
    background: #dc3545;
    color: #ffffff;
    border-color: #dc3545;
    opacity: 0.7;
    cursor: not-allowed;
}

/* Footer */
footer {
    background: #343a40;
    color: #ffffff;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer * {
    color: #ffffff !important;
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.justify-center { justify-content: center; }
.align-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

.rounded { border-radius: 6px; }
.rounded-lg { border-radius: 12px; }
.shadow { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); }
.shadow-lg { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); }

/* Responsive Design */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 0.75rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    h5 { font-size: 1.1rem; }
    h6 { font-size: 1rem; }

    .brand {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .brand h1 {
        font-size: 1.5rem;
    }

    .nav {
        gap: 0.25rem;
    }

    .nav a, .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        min-width: 70px;
    }

    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .form-container {
        padding: 1.5rem;
        margin: 0.5rem;
    }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
        min-width: 100px;
    }

    .number-grid {
        grid-template-columns: repeat(auto-fit, minmax(45px, 1fr));
        gap: 0.375rem;
        padding: 0.75rem;
    }

    .number-btn {
        padding: 0.5rem 0.25rem;
        font-size: 0.875rem;
        min-height: 40px;
        min-width: 40px;
    }

    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 13px;
    }

    .container {
        padding: 0 0.5rem;
    }

    .brand-logo {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .brand h1 {
        font-size: 1.25rem;
    }

    .nav {
        gap: 0.125rem;
    }

    .nav a, .nav-link {
        padding: 0.5rem;
        font-size: 0.75rem;
        min-width: 60px;
        border-radius: 4px;
    }

    .form-container {
        padding: 1rem;
        margin: 0.25rem;
        border-radius: 8px;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
        min-width: 80px;
        min-height: 40px;
    }

    .number-grid {
        grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
        gap: 0.25rem;
        padding: 0.5rem;
    }

    .number-btn {
        padding: 0.375rem 0.125rem;
        font-size: 0.75rem;
        min-height: 36px;
        min-width: 36px;
    }

    .message {
        padding: 0.75rem;
        font-size: 0.875rem;
    }

    .card {
        padding: 0.75rem;
        border-radius: 8px;
    }

    .card-header {
        padding: 0.75rem;
        border-radius: 6px;
    }
}

/* Extra small devices */
@media (max-width: 320px) {
    html {
        font-size: 12px;
    }

    .nav a, .nav-link {
        padding: 0.375rem 0.25rem;
        font-size: 0.7rem;
        min-width: 50px;
    }

    .number-grid {
        grid-template-columns: repeat(auto-fit, minmax(35px, 1fr));
    }

    .number-btn {
        min-height: 32px;
        min-width: 32px;
        font-size: 0.7rem;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #f8f9fa; /* Keep light theme */
    }
}

/* Print styles */
@media print {
    * {
        color: #000000 !important;
        background: #ffffff !important;
    }
    
    .nav, .btn, footer {
        display: none !important;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for better accessibility */
*:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    * {
        color: #000000 !important;
    }
    
    .btn {
        border: 2px solid #000000;
    }
    
    .card {
        border: 2px solid #000000;
    }
}