* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #0f172a;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-500: #64748b;
    --gray-700: #334155;
    --gray-900: #0f172a;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--gray-700);
    background: var(--gray-50);
}

a { text-decoration: none; color: var(--primary); }
img { max-width: 100%; }
ul { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Top Bar */
.top-bar {
    background: var(--primary);
    color: #fff;
    font-size: 0.8rem;
    padding: 6px 0;
}
.top-bar-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.top-bar a { color: #fff !important; }
.top-bar a:hover { text-decoration: underline; }

/* Navbar */
.navbar {
    background: var(--secondary);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    color: #fff !important;
    font-size: 1.3rem;
    font-weight: 700;
    white-space: nowrap;
}

.logo-tag {
    color: var(--accent);
    font-size: 0.8rem;
    margin-left: -8px;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}
.mobile-close { display: none; }

.nav-links a {
    color: var(--gray-300);
    padding: 8px 14px;
    border-radius: var(--radius);
    transition: all 0.2s;
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
    text-align: center;
}

.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-primary { background: var(--primary); color: #fff !important; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff !important; }
.btn-warning { background: var(--warning); color: #fff !important; }
.btn-danger { background: var(--danger); color: #fff !important; }
.btn-outline { background: transparent; border: 1px solid var(--gray-300); color: var(--gray-700) !important; }
.btn-outline:hover { background: var(--gray-100); }
.btn-block { display: block; width: 100%; }
.btn-white { background: #fff; color: var(--primary) !important; }
.btn-white:hover { background: var(--gray-100); }
.btn-white-outline { background: transparent; border: 1px solid #fff; color: #fff !important; }
.btn-white-outline:hover { background: rgba(255,255,255,0.15); }
.btn-red { background: #fff; color: #dc2626 !important; }
.btn-red:hover { background: var(--gray-100); }

/* Cards */
.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-secondary { background: var(--gray-200); color: var(--gray-700); }

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.95rem;
    transition: border-color 0.2s;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

select.form-control {
    appearance: auto;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Tables */
.table-responsive { overflow-x: auto; }
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.table th {
    background: var(--gray-100);
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.table tr:hover { background: var(--gray-50); }

/* Grid */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* Stats Cards */
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-card .stat-label {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    padding: 80px 0;
    margin: 30px -20px 40px;
    border-radius: 0 0 16px 16px;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.hero p {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 30px;
}

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* Page Header */
.page-header {
    padding: 30px 0 20px;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 30px;
}

.page-header h1 {
    color: var(--gray-900);
    font-size: 1.8rem;
}

.page-header p {
    color: var(--gray-500);
    margin-top: 4px;
}

/* Test Card */
.test-card .test-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--success);
}

.test-card .test-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
}

.price-original {
    text-decoration: line-through;
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-right: 6px;
}

.price-offer {
    color: var(--success);
    font-weight: 700;
    font-size: 1.2rem;
}

.discount-badge {
    display: inline-block;
    background: var(--danger);
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.offer-banner {
    background: linear-gradient(135deg, #ef4444 0%, #f59e0b 100%);
    color: #fff;
    padding: 16px 24px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    text-align: center;
}

.offer-banner h3 {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.offer-banner p {
    font-size: 0.9rem;
    opacity: 0.95;
}

.offer-tag {
    background: #dc2626;
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 6px;
}

/* Footer */
.footer {
    background: var(--secondary);
    color: var(--gray-300);
    padding: 40px 0 0;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 30px;
}

.footer-col h3 { color: #fff; margin-bottom: 12px; }
.footer-col a { color: var(--gray-300); }
.footer-col a:hover { color: #fff; }
.footer-col li { margin-bottom: 6px; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 16px 0;
    text-align: center;
    font-size: 0.85rem;
}

/* Auth form */
.auth-container {
    max-width: 440px;
    margin: 40px auto;
}

.auth-container .card {
    padding: 32px;
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 24px;
    color: var(--gray-900);
}

.auth-links {
    text-align: center;
    margin-top: 16px;
    font-size: 0.9rem;
}

/* Sidebar layout for admin */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 0;
    min-height: calc(100vh - 64px);
}

.admin-sidebar {
    background: var(--secondary);
    padding: 20px 0;
}

.admin-sidebar a {
    display: block;
    color: var(--gray-300);
    padding: 10px 24px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.admin-sidebar a:hover, .admin-sidebar a.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
    border-left: 3px solid var(--accent);
}

.admin-content {
    padding: 24px;
    background: var(--gray-50);
}

/* Time slot grid */
.time-slot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.time-slot {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.time-slot:hover { border-color: var(--primary); color: var(--primary); }
.time-slot.selected { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Section */
.section { padding: 50px 0; }
.section-title {
    text-align: center;
    margin-bottom: 40px;
}
.section-title h2 {
    font-size: 1.8rem;
    color: var(--gray-900);
}
.section-title p {
    color: var(--gray-500);
    margin-top: 4px;
}

/* Proprietor Avatar */
.proprietor-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
    object-fit: cover;
}

/* Features */
.feature-card {
    text-align: center;
    padding: 30px 20px;
}
.feature-card .feature-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}
.feature-card h3 {
    margin-bottom: 8px;
    color: var(--gray-900);
}

/* Reviews */
.review-card { display: flex; flex-direction: column; }
.star-rating { color: #f59e0b; margin-bottom: 10px; }
.review-text { color: var(--gray-600); font-size: 0.95rem; line-height: 1.6; flex: 1; margin-bottom: 16px; }
.reviewer { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--gray-200); padding-top: 14px; }
.reviewer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.reviewer-name { font-weight: 600; color: var(--gray-900); font-size: 0.9rem; }
.reviewer-meta { color: var(--gray-500); font-size: 0.8rem; margin-top: 2px; }

/* Equipment */
.equipment-card { text-align: center; }
.equipment-icon { font-size: 3rem; margin-bottom: 12px; }
.equipment-card h3 { color: var(--gray-900); margin-bottom: 8px; }
.equipment-desc { color: var(--gray-500); font-size: 0.9rem; line-height: 1.6; margin-bottom: 14px; }
.equipment-tags { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .mobile-close { display: list-item; }
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: var(--secondary);
        flex-direction: column;
        padding: 20px;
        gap: 0;
        z-index: 1002;
        box-shadow: -4px 0 16px rgba(0,0,0,0.4);
        overflow-y: auto;
    }
    .nav-links.active { display: flex; }
    .nav-links li { width: 100%; }
    .nav-links a {
        display: block;
        padding: 12px 16px;
        color: var(--gray-300);
        border-radius: var(--radius);
    }
    .nav-links a:hover {
        background: rgba(255,255,255,0.1);
        color: #fff;
    }
    .nav-links .mobile-close {
        text-align: right;
        margin-bottom: 8px;
    }
    .nav-links .mobile-close a {
        display: inline-block;
        padding: 8px 14px;
        font-size: 1.3rem;
        font-weight: 700;
        color: #fff !important;
        cursor: pointer;
    }
    .nav-links .btn {
        text-align: center;
        margin-top: 4px;
    }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }
    .hero h1 { font-size: 1.8rem; }
    .time-slot-grid { grid-template-columns: repeat(3, 1fr); }
}
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
}
.nav-overlay.active {
    display: block;
}
