:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #64748b;
    --accent: #0ea5e9;
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #0f172a;
    --text-light: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
header {
    background: var(--surface);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 1rem;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--background);
}

/* Status Steps */
.steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
}

.steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border);
    z-index: 0;
    transform: translateY(-50%);
}

.step {
    background: var(--surface);
    z-index: 1;
    padding: 0 1rem;
    text-align: center;
    position: relative;
}

.step-circle {
    width: 40px;
    height: 40px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s;
}

.step.active .step-circle {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.step.completed .step-circle {
    border-color: var(--success);
    background: var(--success);
    color: white;
}

.step-label {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

.step.active .step-label {
    color: var(--primary);
}

/* Table */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    font-weight: 600;
    color: var(--text-light);
    background: var(--background);
}

/* Utilities */
.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mt-4 {
    margin-top: 1rem;
}

.flex {
    display: flex;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Status Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-pending {
    background: #fef3c7;
    color: #d97706;
}

.badge-success {
    background: #d1fae5;
    color: #059669;
}

.badge-danger {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 1rem;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--background);
}

/* Status Steps */
.steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
}

.steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border);
    z-index: 0;
    transform: translateY(-50%);
}

.step {
    background: var(--surface);
    z-index: 1;
    padding: 0 1rem;
    text-align: center;
    position: relative;
}

.step-circle {
    width: 40px;
    height: 40px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s;
}

.step.active .step-circle {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.step.completed .step-circle {
    border-color: var(--success);
    background: var(--success);
    color: white;
}

/* Simple step highlight for status card */
.step.active {
    color: var(--primary);
    font-weight: 700;
    border-bottom: 2px solid var(--primary);
}

.step.current {
    color: #f97316;
    /* Orange */
    border-bottom-color: #f97316;
}

.step-label {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

.step.active .step-label {
    color: var(--primary);
}

/* Table */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    font-weight: 600;
    color: var(--text-light);
    background: var(--background);
}

/* Utilities */
.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mt-4 {
    margin-top: 1rem;
}

.flex {
    display: flex;
}

.gap-2 {
    gap: 0.5rem;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Status Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-pending {
    background: #fef3c7;
    color: #d97706;
}

.badge-success {
    background: #d1fae5;
    color: #059669;
}

.badge-danger {
    background: #fee2e2;
    color: #dc2626;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.open {
    display: flex;
}

.modal-content {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.hover-scale {
    transition: transform 0.2s;
    cursor: pointer;
}

.hover-scale:hover {
    transform: scale(1.02);
}

.card.active-filter {
    box-shadow: 0 0 0 3px var(--primary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

.toggle-container {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.toggle-container input[type="radio"] {
    display: none;
}

.toggle-btn {
    flex: 1;
    padding: 1rem;
    text-align: center;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    color: var(--text-light);
    background: var(--surface);
    position: relative;
    overflow: hidden;
}

.toggle-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.toggle-container input[type="radio"]:checked+.toggle-btn {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
}

.toggle-container input[type="radio"][value="no"]:checked+.toggle-btn {
    background: var(--secondary);
    border-color: var(--secondary);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.toggle-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.toggle-container input[type="radio"]:checked+.toggle-btn::after {
    width: 200%;
    height: 200%;
}

/* Extended Utilities (Tailwind-like) */
.p-2 {
    padding: 0.5rem;
}

.p-4 {
    padding: 1rem;
}

.p-5 {
    padding: 1.25rem;
}

.p-6 {
    padding: 1.5rem;
}

.pb-6 {
    padding-bottom: 1.5rem;
}

.pl-5 {
    padding-left: 1.25rem;
}

.pl-11 {
    padding-left: 2.75rem;
}

.pt-6 {
    padding-top: 1.5rem;
}

.px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.m-0 {
    margin: 0;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mr-1 {
    margin-right: 0.25rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.ml-2 {
    margin-left: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-6 {
    gap: 1.5rem;
}

.w-8 {
    width: 2rem;
}

.h-8 {
    height: 2rem;
}

.w-24 {
    width: 6rem;
}

.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.font-medium {
    font-weight: 500;
}

.font-bold {
    font-weight: 700;
}

.text-primary-dark {
    color: var(--primary-dark);
}

.text-blue-600 {
    color: #2563eb;
}

.text-yellow-800 {
    color: #854d0e;
}

.text-slate-600 {
    color: #475569;
}

.text-light {
    color: var(--text-light);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.bg-slate-50 {
    background-color: #f8fafc;
}

.bg-blue-100 {
    background-color: #dbeafe;
}

.bg-yellow-50 {
    background-color: #fefce8;
}

.border-0 {
    border-width: 0;
}

.border-b {
    border-bottom-width: 1px;
    border-style: solid;
    border-color: var(--border);
}

.border-t {
    border-top-width: 1px;
    border-style: solid;
    border-color: var(--border);
}

.border-yellow-100 {
    border-color: #fef9c3;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-full {
    border-radius: 9999px;
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.hover\:shadow-md:hover {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.hover\:shadow-xl:hover {
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.transform {
    transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.hover\:-translate-y-1:hover {
    transform: translateY(-0.25rem);
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.list-disc {
    list-style-type: disc;
}

.inline-block {
    display: inline-block;
}

.items-start {
    align-items: flex-start;
}

.justify-center {
    justify-content: center;
}

.detail-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: baseline;
}

.detail-label {
    color: var(--text-light);
    font-size: 0.875rem;
}

.detail-value {
    font-weight: 500;
    color: var(--text);
}

.text-right {
    text-align: right;
}

@media print {

    /* Hide non-printable elements */
    .sidebar,
    header,
    .search-container,
    .no-print,
    #dashboard-view,
    #sidebar-summary {
        display: none !important;
    }

    /* Reset layout for print */
    body {
        background: white;
        color: black;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }

    /* Card styling for print */
    .card {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
    }

    /* Grid layout adjustments */
    .grid-cols-2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    /* Ensure text is readable */
    .text-light {
        color: #666 !important;
    }

    /* Badges */
    .badge {
        border: 1px solid #ccc;
        background: none !important;
        color: black !important;
    }

    /* Section styling */
    .p-5 {
        padding: 1rem !important;
        border: 1px solid #eee !important;
        break-inside: avoid;
    }

    /* Typography */
    h3 {
        font-size: 24px !important;
        color: black !important;
    }

    h4 {
        font-size: 18px !important;
        color: black !important;
    }
}

@media print {
    @page {
        size: A4;
        margin: 1.5cm;
    }

    /* Hide non-printable elements */
    .sidebar,
    header,
    .search-container,
    .no-print,
    #dashboard-view,
    #sidebar-summary {
        display: none !important;
    }

    /* Reset layout for print */
    body {
        background: white;
        color: black;
        font-size: 12pt;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .container {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Card styling for print */
    .card {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin-bottom: 1cm !important;
    }

    /* Grid layout adjustments */
    .grid-cols-2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5cm;
    }

    /* Ensure text is readable */
    .text-light {
        color: #444 !important;
    }

    /* Badges */
    .badge {
        border: 1px solid #000;
        background: none !important;
        color: black !important;
        padding: 2px 8px;
    }

    /* Section styling */
    .p-5 {
        padding: 0.5cm !important;
        border: 1px solid #ccc !important;
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 0.5cm;
        background-color: #fff !important;
    }

    /* Typography */
    h3 {
        font-size: 18pt !important;
        color: black !important;
        margin-bottom: 0.5cm !important;
    }

    h4 {
        font-size: 14pt !important;
        color: black !important;
        margin-bottom: 0.2cm !important;
    }

    .detail-label {
        color: #444 !important;
        font-weight: 600;
    }

    .detail-value {
        color: #000 !important;
    }

    /* Header for print */
    .card>.flex.justify-between {
        border-bottom: 2px solid #000 !important;
        margin-bottom: 1cm !important;
        padding-bottom: 0.5cm !important;
    }
}

.hidden-print-block {
    display: none;
}

/* Border Utilities */
.border-0 {
    border: none !important;
}

.border-b {
    border-bottom: 1px solid var(--border);
}

.border-t {
    border-top: 1px solid var(--border);
}