* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f7fb;
    color: #1f2937;
}

body {
    line-height: 1.5;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

.topbar {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.brand {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}

.nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.nav a {
    padding: 10px 14px;
    border-radius: 10px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}

.nav a:hover {
    background: #dbeafe;
    text-decoration: none;
}

.hero {
    padding: 40px 0 20px;
}

.hero-card {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.18);
}

.hero-card h1 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 32px;
}

.hero-card p {
    margin: 0;
    font-size: 17px;
    opacity: 0.95;
}

.grid {
    display: grid;
    gap: 20px;
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.card {
    background: #ffffff;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    border: 1px solid #eef2f7;
}

.card h2,
.card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #111827;
}

.card p {
    margin: 0 0 12px;
    color: #4b5563;
}

.btn,
button {
    display: inline-block;
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    background: #2563eb;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn:hover,
button:hover {
    background: #1d4ed8;
    text-decoration: none;
}

.btn-secondary {
    background: #e5e7eb;
    color: #111827;
}

.btn-secondary:hover {
    background: #d1d5db;
}

.form-card {
    max-width: 520px;
    margin: 30px auto;
}

.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    color: #374151;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    background: #fff;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-weight: 600;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.dashboard-title {
    margin: 24px 0 16px;
    font-size: 28px;
    color: #111827;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-box {
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    border: 1px solid #eef2f7;
}

.stat-box strong {
    display: block;
    font-size: 28px;
    color: #111827;
}

.stat-box span {
    color: #6b7280;
    font-size: 14px;
}

.list-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.list-links a {
    display: block;
    padding: 14px 16px;
    border-radius: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #111827;
    font-weight: 600;
}

.list-links a:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    text-decoration: none;
}

.center-text {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .grid-3,
    .grid-2,
    .stats {
        grid-template-columns: 1fr 1fr;
    }

    .hero-card h1 {
        font-size: 26px;
    }
}

@media (max-width: 640px) {
    .topbar-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .nav {
        width: 100%;
        flex-direction: column;
    }

    .nav a {
        text-align: center;
    }

    .grid-3,
    .grid-2,
    .stats {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 20px;
    }

    .hero-card {
        padding: 22px;
        border-radius: 16px;
    }

    .hero-card h1 {
        font-size: 24px;
    }

    .container {
        padding: 14px;
    }

    .card,
    .stat-box {
        padding: 18px;
    }

.form-wide {
    max-width: 100%;
}

.action-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.checkbox-row {
    margin-top: 8px;
}

.check-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.check-label input {
    width: auto;
    margin: 0;
}

.service-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.service-item {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
    background: #f9fafb;
}

.service-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.service-meta {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    color: #374151;
    font-size: 14px;
}

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-muted {
    background: #e5e7eb;
    color: #374151;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1d4ed8;
}

.schedule-days {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.schedule-day-card {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
    background: #f9fafb;
}

.schedule-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

@media (max-width: 640px) {
    .service-top,
    .schedule-day-header,
    .action-row {
        flex-direction: column;
        align-items: stretch;
    }

    .action-row .btn,
    .action-row button {
        width: 100%;
        text-align: center;
    }
}

.company-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.search-form .form-group {
    margin-bottom: 0;
}

.search-button-wrap {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.slot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.slot-item {
    display: block;
    cursor: pointer;
}

.slot-item input {
    display: none;
}

.slot-item span {
    display: block;
    text-align: center;
    padding: 12px;
    border-radius: 12px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    font-weight: 700;
}

.slot-item input:checked + span {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

@media (max-width: 900px) {
    .slot-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .slot-grid {
        grid-template-columns: 1fr;
    }
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 700;
    cursor: pointer;
}

.btn-danger:hover {
    background: #b91c1c;
}

.nav-toggle {
    display: none;
    border: none;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
}

.nav-toggle:hover {
    background: #1d4ed8;
}

@media (max-width: 768px) {
    .topbar-inner {
        flex-wrap: wrap;
        align-items: center;
    }

    .nav-toggle {
        display: inline-block;
        margin-left: auto;
    }

    .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 10px;
        margin-top: 14px;
    }

    .nav.nav-open {
        display: flex;
    }

    .nav a {
        width: 100%;
        text-align: center;
    }
}
}