/* Nexa Foundry - Professional Design System */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    
    --green-500: #22c55e;
    --green-600: #16a34a;
    
    --orange-500: #f97316;
    --orange-600: #ea580c;
    
    --red-500: #ef4444;
    --red-600: #dc2626;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--gray-900);
    color: var(--gray-100);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Navigation */
nav {
    background: rgba(23, 23, 23, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-800);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-50);
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.nav-link {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: all 150ms;
}

.nav-link:hover {
    color: var(--gray-100);
    background: rgba(255,255,255,0.05);
}

.nav-link.active {
    color: var(--gray-50);
    background: var(--gray-800);
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-50);
    margin-bottom: 0.25rem;
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--gray-400);
}

/* Cards */
.card {
    background: var(--gray-800);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-100);
}

.card-body {
    padding: 1.5rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--gray-800);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.5rem;
    padding: 1.25rem;
    transition: border-color 200ms;
}

.stat-card:hover {
    border-color: rgba(255,255,255,0.2);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--gray-400);
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--gray-50);
    line-height: 1;
}

.stat-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.5rem;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: rgba(255,255,255,0.02);
}

th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.875rem;
}

tr:hover {
    background: rgba(255,255,255,0.02);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-blue { background: rgba(59,130,246,0.2); color: var(--blue-500); }
.badge-green { background: rgba(34,197,94,0.2); color: var(--green-500); }
.badge-orange { background: rgba(249,115,22,0.2); color: var(--orange-500); }
.badge-gray { background: rgba(163,163,163,0.2); color: var(--gray-400); }

/* Button */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 150ms;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--blue-600);
    color: white;
}

.btn-primary:hover {
    background: var(--blue-500);
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--gray-100);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.05);
}

/* Form */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-300);
    margin-bottom: 0.5rem;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: var(--gray-800);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.375rem;
    color: var(--gray-100);
    font-size: 0.875rem;
    transition: all 150ms;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--blue-500);
}

.form-input::placeholder {
    color: var(--gray-600);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--gray-800);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Utilities */
.text-right { text-align: right; }
.text-center { text-align: center; }
.mb-2 { margin-bottom: 2rem; }

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        font-size: 16px; /* ??vite zoom iOS */
    }
    
    .container {
        padding: 1rem;
    }
    
    nav {
        position: relative;
    }
    
    .nav-container {
        padding: 0.75rem 1rem;
        flex-direction: row;
        justify-content: space-between;
    }
    
    .nav-brand {
        font-size: 0.9375rem;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--gray-900);
        border-top: 1px solid var(--gray-800);
        flex-direction: column;
        gap: 0;
        padding: 0.5rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    }
    
    .nav-links.show {
        display: flex;
    }
    
    .nav-link {
        font-size: 0.875rem;
        padding: 0.875rem;
        text-align: left;
        border-radius: 0.375rem;
    }
    
    .hamburger {
        display: block;
        width: 24px;
        height: 24px;
        cursor: pointer;
        position: relative;
    }
    
    .hamburger span {
        display: block;
        width: 100%;
        height: 2px;
        background: var(--gray-300);
        position: absolute;
        left: 0;
        transition: all 0.3s;
    }
    
    .hamburger span:nth-child(1) { top: 6px; }
    .hamburger span:nth-child(2) { top: 11px; }
    .hamburger span:nth-child(3) { top: 16px; }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-value {
        font-size: 1.75rem;
    }
    
    .card {
        border-radius: 0.5rem;
    }
    
    .card-header {
        padding: 1rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    table {
        font-size: 0.8125rem;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
    }
    
    th {
        font-size: 0.6875rem;
    }
    
    .modal-box, .modal-overlay .modal-box {
        width: 95%;
        padding: 2rem;
        max-width: none;
    }
    
    .qr-container {
        width: 160px;
        height: 160px;
    }
    
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .form-input, .form-select {
        padding: 0.75rem;
        font-size: 16px !important; /* ??vite zoom iOS */
    }
}


