/* ================================
   Base Layout
   ================================ */

:root {
    --jc-sidebar-bg: #101827;
    --jc-sidebar-bg-soft: #162238;
    --jc-sidebar-text: #dbe6f4;
    --jc-sidebar-muted: #8fa3bc;
    --jc-accent: #1f6feb;
    --jc-accent-soft: #eaf2ff;
    --jc-card-border: #e5e7eb;
    --jc-page-bg: #f5f7fb;
    --jc-dark-header: #111827;
    --jc-warning: #f59e0b;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: var(--jc-page-bg);
}

.page {
    display: flex;
}

main,
.content,
.page-content {
    background: var(--jc-page-bg);
}

/* ================================
   Sidebar / Nav
   ================================ */

.sidebar,
.sarmeda-sidebar {
    width: 230px;
    min-height: 100vh;
    padding: 1rem;
    background: linear-gradient(180deg, var(--jc-sidebar-bg), var(--jc-sidebar-bg-soft));
    color: var(--jc-sidebar-text);
}

    .sidebar .nav-link,
    .sarmeda-sidebar .nav-link {
        color: var(--jc-sidebar-text);
        border-radius: 10px;
        margin: 4px 10px;
        padding: 10px 14px;
        font-weight: 500;
        transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
    }

        .sidebar .nav-link:hover,
        .sarmeda-sidebar .nav-link:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #ffffff;
            transform: translateX(2px);
        }

        .sidebar .nav-link.active,
        .sarmeda-sidebar .nav-link.active {
            background: linear-gradient(90deg, #1f6feb, #2563eb);
            color: #ffffff;
            box-shadow: 0 8px 18px rgba(31, 111, 235, 0.25);
        }

    .sidebar .brand,
    .sarmeda-sidebar .brand {
        color: #ffffff;
        font-weight: 700;
    }

    .sidebar .logged-in,
    .sarmeda-sidebar .logged-in {
        color: var(--jc-sidebar-muted);
        font-size: 0.85rem;
    }

/* ================================
   Document / Print Layout
   ================================ */

.doc {
    background: white;
    padding: 24px;
    max-width: 980px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.muted {
    color: #64748b;
}

.small {
    font-size: 12px;
}

.addr {
    white-space: pre-wrap;
    margin-top: 8px;
}

.grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.section-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.lines {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

    .lines th {
        text-align: left;
        border-bottom: 2px solid #e5e7eb;
        padding: 8px 6px;
    }

    .lines td {
        border-bottom: 1px solid #f1f5f9;
        padding: 10px 6px;
        vertical-align: top;
    }

/* ================================
   Cards / Dashboard
   ================================ */

.card {
    border: 1px solid var(--jc-card-border);
    border-radius: 16px;
}

    .card.shadow-sm {
        box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06) !important;
    }

.card-header.bg-dark {
    background: var(--jc-dark-header) !important;
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
}

.dashboard-kpi,
.kpi-card {
    border: 0;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

    .dashboard-kpi .kpi-title,
    .kpi-card .kpi-title {
        color: #64748b;
        font-size: 0.9rem;
        font-weight: 600;
    }

    .dashboard-kpi .kpi-value,
    .kpi-card .kpi-value {
        font-size: 2rem;
        font-weight: 800;
        color: #0f172a;
    }

    .dashboard-kpi .kpi-subtitle,
    .kpi-card .kpi-subtitle {
        color: #94a3b8;
        font-size: 0.8rem;
    }

/* ================================
   Buttons
   ================================ */

.btn-primary {
    background: #0f766e;
    border-color: #0f766e;
}

    .btn-primary:hover {
        background: #0d5f59;
        border-color: #0d5f59;
    }

.btn-warning {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #111827;
}

.btn-outline-dark {
    border-color: #111827;
    color: #111827;
}

    .btn-outline-dark:hover {
        background: #111827;
        color: #ffffff;
    }

.badge.bg-warning,
.developer-badge {
    border-radius: 999px;
    font-weight: 700;
    padding: 6px 10px;
}

/* ================================
   Tables
   ================================ */

.table {
    background: #ffffff;
}

    .table thead th {
        color: #334155;
        font-size: 0.9rem;
        font-weight: 700;
        border-bottom: 1px solid #e5e7eb;
    }

    .table tbody td {
        vertical-align: middle;
    }

/* ================================
   Status Badges
   ================================ */

.badge-status {
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 700;
    font-size: 0.75rem;
}

.badge-open {
    background: #dbeafe;
    color: #1e40af;
}

.badge-scheduled {
    background: #e0f2fe;
    color: #0369a1;
}

.badge-assigned {
    background: #ede9fe;
    color: #5b21b6;
}

.badge-active {
    background: #dcfce7;
    color: #166534;
}

.badge-onsite {
    background: #fef3c7;
    color: #92400e;
}

.badge-awaiting {
    background: #fee2e2;
    color: #991b1b;
}

.badge-return {
    background: #ffedd5;
    color: #9a3412;
}

.badge-completed {
    background: #dcfce7;
    color: #166534;
}

.badge-closed {
    background: #e5e7eb;
    color: #374151;
}

.badge-cancelled {
    background: #f3f4f6;
    color: #6b7280;
}

/* ================================
   Print Only
   ================================ */

@media print {
    .no-print,
    .no-print * {
        display: none !important;
    }

    body {
        background: white !important;
    }

    main,
    .content,
    .container,
    .container-fluid {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .doc {
        border: none !important;
        padding: 0 !important;
        box-shadow: none !important;
    }
}
