/* Custom Vanilla CSS Design System - Lovable Style */

:root {
    /* Color Palette */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #64748b;
    --success: #10b981;
    --success-bg: #d1fae5;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --dark: #0f172a;
    --light: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-700: #334155;
    --gray-800: #1e293b;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px 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);
    
    /* Borders & Radius */
    --border-color: #e2e8f0;
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Typography */
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Utilities */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-muted { color: var(--secondary); }
.text-primary { color: var(--primary); }
.text-white { color: #fff; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.w-full { width: 100%; }

/* Grid Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.sidebar {
    width: 260px;
    background-color: var(--dark);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.sidebar-header {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-header svg {
    width: 32px;
    height: 32px;
    fill: var(--primary);
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--gray-300);
    text-decoration: none;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    transition: all 0.2s;
    font-weight: 500;
    cursor: pointer;
}

.nav-link svg {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    fill: currentColor;
}

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

.main-content {
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    padding: 2rem;
    overflow-y: auto;
    height: 100vh;
}

.grid-row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
}

.col-12 { grid-column: span 12; }
.col-11 { grid-column: span 11; }
.col-10 { grid-column: span 10; }
.col-9 { grid-column: span 9; }
.col-8 { grid-column: span 8; }
.col-7 { grid-column: span 7; }
.col-6 { grid-column: span 6; }
.col-5 { grid-column: span 5; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }
.col-2 { grid-column: span 2; }
.col-1 { grid-column: span 1; }

.mobile-only { display: none; }

@media (max-width: 1024px) {
    .col-11, .col-10, .col-9, .col-8, .col-7, .col-6, .col-5, .col-4, .col-3, .col-2, .col-1 { grid-column: span 12; }
    .sidebar { position: fixed; transform: translateX(-100%); z-index: 50; }
    .sidebar.open { transform: translateX(0); }
    .mobile-only { display: inline-flex; }
}

/* Premium Cards */
.card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(248, 250, 252, 0.5);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 1.5rem;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.form-control, .form-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    background-color: #fff;
    font-family: inherit;
    font-size: 0.875rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn svg {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
    fill: currentColor;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-success {
    background-color: var(--success);
    color: #fff;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--gray-700);
}

.btn-outline:hover {
    background-color: var(--gray-100);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-warning { background-color: var(--warning-bg); color: #b45309; }
.badge-success { background-color: var(--success-bg); color: #047857; }
.badge-primary { background-color: #dbeafe; color: #1e40af; }
.badge-default { background-color: var(--gray-200); color: var(--gray-700); }

/* Custom Table */
.table-wrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th, .table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

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

.table tbody tr:hover {
    background-color: #f8fafc;
}

/* Custom Modal Dialog */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-dialog {
    background: #fff;
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.modal-overlay.show .modal-dialog {
    transform: scale(1);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-700);
}

.modal-close svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: var(--gray-100);
}

/* Custom Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 10200;
}

.toast {
    background: #fff;
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
    transform: translateX(0);
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

.toast-icon svg {
    width: 24px;
    height: 24px;
}

.toast.success .toast-icon svg { fill: var(--success); }
.toast.error .toast-icon svg { fill: var(--danger); }

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
}

.toast-message {
    font-size: 0.875rem;
    color: var(--secondary);
}

/* Login specific */
.login-wrapper {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
    padding: 2rem;
}

.login-card {
    width: 100%;
    max-width: 450px;
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
}

/* Data Stats Widget */
.stat-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Auth Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}
.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 1rem;
    font-weight: 500;
    color: var(--secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
}
.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Dashboard Header */
.dashboard-header {
    background: linear-gradient(to right, var(--dark), var(--primary));
    color: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
}

/* Alert Box inside Content */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

.alert svg { width: 20px; height: 20px; flex-shrink: 0; fill: currentColor; }


.print-page-break {
    border-top: 2px dashed var(--secondary);
    margin: 2rem 0;
    padding-top: 2rem;
    position: relative;
}
.print-page-break::after {
    content: 'Page Break (A4 Print)';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 0 10px;
    font-size: 0.75rem;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Print Media Rules */
@media print {
    @page {
        size: A4;
        margin: 12mm 15mm 12mm 15mm;
    }
    
    html, body {
        background: #fff !important;
        color: #000 !important;
        font-family: "Noto Sans Devanagari", "Segoe UI", Roboto, serif;
        font-size: 10.5pt;
        line-height: 1.45;
    }
    
    body * {
        visibility: hidden;
    }
    
    .print-area, .print-area * {
        visibility: visible;
    }
    
    .print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }

    .print-page-break {
        display: block !important;
        clear: both !important;
        break-before: page !important;
        page-break-before: always !important;
        border: none !important;
        margin: 0 !important;
        padding: 0 !important;
        height: 1px !important;
        visibility: hidden !important;
    }
    
    .print-page-break::after {
        display: none !important;
    }

    .no-print {
        display: none !important;
    }
    
    .print-title {
        font-size: 15pt;
        font-weight: bold;
        margin-bottom: 1.5rem;
        text-align: center;
        line-height: 1.4;
    }
    
    p {
        margin-bottom: 1rem;
        text-align: justify;
        line-height: 1.8;
    }
    
    ul, ol {
        margin-bottom: 1rem;
        padding-left: 2rem;
        line-height: 1.8;
    }
    
    .print-field {
        border-bottom: 1px solid #475569;
        padding: 0 4px;
        font-weight: bold;
        display: inline-block;
        min-width: 60px;
    }

    /* Bond Section Single Page Fit & Beautiful Layout */
    .bond-section {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        font-size: 10pt !important;
        line-height: 1.5 !important;
    }

    .bond-section h2.print-title {
        font-size: 14pt !important;
        margin-bottom: 4px !important;
        line-height: 1.3 !important;
    }

    .bond-section p {
        margin-bottom: 0.5rem !important;
        line-height: 1.5 !important;
        text-align: justify;
    }

    .bond-section table {
        width: 100% !important;
        margin: 6px 0 !important;
        font-size: 9.5pt !important;
        line-height: 1.45 !important;
    }

    .bond-signature-block {
        margin-top: 25px !important;
        display: flex !important;
        justify-content: flex-end !important;
        width: 100% !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .bond-signature-space {
        margin-bottom: 50px !important;
    }
}

/* Document Editor Styles */
.document-editor-container {
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    background: var(--gray-100);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.document-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.5rem;
    background: #fff;
    border-bottom: 1px solid var(--gray-300);
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
    position: sticky;
    top: 0;
    z-index: 10;
}
.editor-btn {
    background: transparent;
    border: 1px solid transparent;
    padding: 0.375rem 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--gray-700);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    min-width: 32px;
    height: 32px;
    transition: all 0.15s ease;
}
.editor-btn:hover {
    background-color: var(--gray-100);
    border-color: var(--gray-300);
    color: var(--dark);
}
.editor-btn.active {
    background-color: var(--gray-200);
    border-color: var(--gray-300);
    color: var(--primary);
}
.document-editor-body {
    background: #fff;
    width: 100%;
    max-width: 800px;
    margin: 1.5rem auto;
    min-height: 297mm;
    padding: 12mm 15mm 12mm 15mm;
    box-shadow: var(--shadow-md);
    outline: none;
    font-family: 'Noto Sans Devanagari', 'Segoe UI', Roboto, sans-serif;
    font-size: 10.5pt;
    line-height: 1.45;
    color: #000;
    border: 1px solid var(--gray-200);
    box-sizing: border-box;
    overflow-y: auto;
}
.document-editor-body p {
    margin-bottom: 0.4rem;
    text-align: justify;
}
.document-editor-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.8rem;
}
.document-editor-body th, .document-editor-body td {
    padding: 0.2rem 0.4rem;
    font-size: 10.5pt;
    vertical-align: top;
}
.document-editor-body ol, .document-editor-body ul {
    margin-bottom: 0.8rem;
    padding-left: 2rem;
}
.document-editor-body li {
    margin-bottom: 0.3rem;
}


/* ==========================================
   DIGITAL SIGNATURE (DSC) STYLING
   ========================================== */

/* Pulsing Status Dot */
.pulse-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.pulse-indicator.green {
    background-color: var(--success);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse-green 2s infinite;
}

.pulse-indicator.red {
    background-color: var(--danger);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: pulse-red 2s infinite;
}

@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes pulse-red {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Switch Toggle Styling */
.switch-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-toggle {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-300);
    transition: .4s;
    border-radius: 24px;
}

.slider-toggle:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider-toggle {
    background-color: var(--primary);
}

input:focus + .slider-toggle {
    box-shadow: 0 0 1px var(--primary);
}

input:checked + .slider-toggle:before {
    transform: translateX(20px);
}

/* Spinner Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Details Table inside DSC card */
.table-details td {
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.875rem;
}
.table-details tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   GRAPHICAL OPERATION PROGRESS LOADER & NOTIFICATION STYLING
   ========================================================================== */
.op-progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999999 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.op-progress-overlay.show {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.op-progress-card {
    background: #ffffff;
    width: 92%;
    max-width: 520px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.2);
    padding: 2rem 2.25rem;
    text-align: center;
    transform: scale(0.92) translateY(10px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.op-progress-overlay.show .op-progress-card {
    transform: scale(1) translateY(0);
}

.op-progress-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #2563eb, #7c3aed, #059669, #2563eb);
    background-size: 300% 100%;
    animation: gradientMove 2.5s linear infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 0%; }
}

.op-spinner-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.25rem auto;
}

.op-spinner-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #2563eb;
    border-right: 4px solid #7c3aed;
    animation: spin 1s cubic-bezier(0.55, 0.15, 0.45, 0.85) infinite;
}

.op-spinner-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    line-height: 1;
    animation: iconPulse 1.8s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.15); }
}

.op-progress-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.35rem;
    letter-spacing: -0.01em;
}

.op-progress-subtitle {
    font-size: 0.925rem;
    color: #475569;
    margin-bottom: 1.25rem;
    min-height: 1.4rem;
    font-weight: 500;
}

.op-progress-bar-container {
    background: #f1f5f9;
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 0.5rem;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);
}

.op-progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    background-size: 30px 30px;
    background-image: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.25) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0.25) 75%,
        transparent 75%,
        transparent
    );
    animation: progressStripes 1s linear infinite;
    border-radius: 999px;
    transition: width 0.4s ease-out, background 0.3s ease;
}

.op-progress-bar-fill.success {
    background-color: #10b981;
    background-image: none;
}

@keyframes progressStripes {
    0% { background-position: 0 0; }
    100% { background-position: 30px 0; }
}

.op-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.op-safety-banner {
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.8rem;
    color: #92400e;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 500;
}

.op-safety-banner svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: #b45309;
}

/* ==========================================================================
   60-SECOND VISUAL PROGRESS COUNTDOWN TIMER
   ========================================================================== */
.op-countdown-wrapper {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 1.15rem;
    text-align: left;
}

.op-countdown-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    margin-bottom: 6px;
}

.op-countdown-label {
    color: #475569;
    font-weight: 600;
}

.op-countdown-badge {
    background: #dbeafe;
    color: #1e40af;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 2px 10px;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    letter-spacing: 0.2px;
}

.op-countdown-track {
    background: #e2e8f0;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.op-countdown-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #10b981, #0284c7);
    border-radius: 999px;
    transition: width 1s linear, background 0.3s ease;
}

.op-countdown-bar.warning {
    background: linear-gradient(90deg, #f59e0b, #ef4444);
}

/* ==========================================================================
   UNIFIED ACCORDION & TOGGLE BUTTON STYLING ACROSS ALL LOGINS
   ========================================================================== */
.card-header.cursor-pointer {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 18px !important;
    user-select: none !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card-header.cursor-pointer:hover {
    filter: brightness(0.98);
}

/* Proper Button Design for Toggle View in All Logins */
.card-header.cursor-pointer .text-sm,
.card-header.cursor-pointer .badge,
.card-header.cursor-pointer .toggle-view-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    padding: 5px 14px !important;
    border-radius: 20px !important;
    background: #ffffff !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    letter-spacing: 0.2px !important;
    text-transform: none !important;
    white-space: nowrap !important;
}

.card-header.cursor-pointer:hover .text-sm,
.card-header.cursor-pointer:hover .badge,
.card-header.cursor-pointer:hover .toggle-view-btn {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08) !important;
}

/* ─── Approved State (Light Green Theme) ─── */
.card.is-approved,
.card-approved {
    background-color: #f0fdf4 !important;
    border: 1.5px solid #bbf7d0 !important;
}

.card.is-approved > .card-header,
.card-approved > .card-header {
    background-color: #dcfce7 !important;
    color: #166534 !important;
    border-bottom: 1px solid #bbf7d0 !important;
}

.card.is-approved > .card-header h4,
.card-approved > .card-header h4 {
    color: #166534 !important;
    font-weight: 700 !important;
}

.card.is-approved > .card-header .text-sm,
.card.is-approved > .card-header .badge,
.card.is-approved > .card-header .toggle-view-btn,
.card-approved > .card-header .text-sm,
.card-approved > .card-header .badge {
    background: #ffffff !important;
    color: #166534 !important;
    border: 1px solid #86efac !important;
    box-shadow: 0 1px 2px rgba(22, 101, 52, 0.08) !important;
}

.card.is-approved > .card-header:hover .text-sm,
.card.is-approved > .card-header:hover .badge,
.card.is-approved > .card-header:hover .toggle-view-btn,
.card-approved > .card-header:hover .text-sm,
.card-approved > .card-header:hover .badge {
    background: #f0fdf4 !important;
    border-color: #4ade80 !important;
}

/* ─── Rejected State (Light Red Theme) ─── */
.card.is-rejected,
.card-rejected {
    background-color: #fef2f2 !important;
    border: 1.5px solid #fecaca !important;
}

.card.is-rejected > .card-header,
.card-rejected > .card-header {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
    border-bottom: 1px solid #fecaca !important;
}

.card.is-rejected > .card-header h4,
.card-rejected > .card-header h4 {
    color: #991b1b !important;
    font-weight: 700 !important;
}

.card.is-rejected > .card-header .text-sm,
.card.is-rejected > .card-header .badge,
.card.is-rejected > .card-header .toggle-view-btn,
.card-rejected > .card-header .text-sm,
.card-rejected > .card-header .badge {
    background: #ffffff !important;
    color: #991b1b !important;
    border: 1px solid #fca5a5 !important;
    box-shadow: 0 1px 2px rgba(153, 27, 27, 0.08) !important;
}

.card.is-rejected > .card-header:hover .text-sm,
.card.is-rejected > .card-header:hover .badge,
.card.is-rejected > .card-header:hover .toggle-view-btn,
.card-rejected > .card-header:hover .text-sm,
.card-rejected > .card-header:hover .badge {
    background: #fef2f2 !important;
    border-color: #f87171 !important;
}

/* ==========================================================================
   OFFICIAL GOVERNMENT LANDING PORTAL - COLLECTOR OFFICE KOLHAPUR
   ========================================================================== */

.portal-home-wrapper {
    width: 100%;
    min-height: 100vh;
    background: #f8fafc;
    color: #1e293b;
    display: block;
}

.portal-home-wrapper.hidden,
#authSection.hidden {
    display: none !important;
}

.main-content.landing-mode,
.main-content:has(#authSection:not(.hidden)) {
    padding: 0 !important;
    height: auto !important;
    min-height: 100vh;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    overflow-y: visible !important;
}

html {
    scroll-behavior: smooth;
}

/* Sticky Portal Header & Navigation Container (Always visible across all sections) */
.portal-header-sticky-wrapper {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

/* Scroll Offset for all anchor targets so section headers land cleanly below the sticky header */
.portal-section-wrap,
.portal-hero-section,
#about-scheme,
#about-administration,
#workflow-stages,
#portal-stats,
#portal-verify,
#portal-top {
    scroll-margin-top: 185px;
}

/* Tricolor Top Bar */
.gov-tricolor-bar {
    height: 4px;
    background: linear-gradient(90deg, #ff9933 0%, #ff9933 33.3%, #ffffff 33.3%, #ffffff 66.6%, #138808 66.6%, #138808 100%);
    width: 100%;
}

/* Top Utility Bar */
.gov-top-utility {
    background: #0f172a;
    color: #cbd5e1;
    font-size: 0.8rem;
    padding: 0.4rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.gov-top-utility a {
    color: #e2e8f0;
    text-decoration: none;
    margin-left: 1rem;
    transition: color 0.2s;
}

.gov-top-utility a:hover {
    color: #38bdf8;
}

/* Main Portal Header */
.portal-main-header {
    background: #ffffff;
    border-bottom: 2px solid #e2e8f0;
    padding: 1rem 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.portal-header-content {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.portal-brand-block {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.gov-emblem-img {
    height: 65px;
    width: auto;
    object-fit: contain;
}

.portal-title-block h1 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f2b48;
    line-height: 1.25;
    margin: 0;
}

.portal-title-block h2 {
    font-size: 0.92rem;
    font-weight: 600;
    color: #c2410c;
    margin-top: 2px;
}

.portal-title-block p {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0;
}

/* Quick Navigation Links - Sticky */
.portal-nav-bar {
    background: #0f2b48;
    padding: 0 2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.portal-nav-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
}

.portal-nav-link {
    color: #ffffff;
    text-decoration: none;
    padding: 0.75rem 1.1rem;
    font-size: 0.88rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.portal-nav-link:hover,
.portal-nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    border-bottom-color: #f59e0b;
    color: #fef08a;
}

/* Hero Section */
.portal-hero-section {
    background: linear-gradient(135deg, #0b1e36 0%, #173b67 50%, #0f2b48 100%);
    color: #ffffff;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
}

.portal-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.15), transparent 45%),
                radial-gradient(circle at 20% 80%, rgba(56, 189, 248, 0.15), transparent 45%);
    pointer-events: none;
}

.portal-hero-container {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.25fr 0.95fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

@media (max-width: 968px) {
    .portal-hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.portal-hero-text h2 {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 1rem;
    color: #ffffff;
}

.portal-hero-text h2 span {
    color: #fbbf24;
}

.portal-hero-subtitle {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
}

.portal-feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.8rem;
}

.feature-pill {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.45rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.hero-legal-badge {
    background: rgba(245, 158, 11, 0.2);
    border-left: 4px solid #f59e0b;
    padding: 0.8rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #fef3c7;
    margin-bottom: 1.5rem;
    line-height: 1.45;
}

/* Redesigned Card Inside Hero */
.portal-hero-card-col .login-card {
    background: #ffffff;
    color: #1e293b;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.2);
    padding: 2rem;
    max-width: 440px;
    margin: 0 auto;
}

/* Sections General */
.portal-section-wrap {
    padding: 3.5rem 2rem;
}

.portal-section-wrap.alt-bg {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.portal-section-inner {
    max-width: 1300px;
    margin: 0 auto;
}

.section-head {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-tag {
    display: inline-block;
    background: #e0f2fe;
    color: #0284c7;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.section-sub {
    font-size: 0.95rem;
    color: #64748b;
    max-width: 700px;
    margin: 0 auto;
}

/* Collector Office Details Grid & Scheme Framework Grid */
.collector-details-grid,
.scheme-framework-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.collector-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid #e2e8f0;
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.collector-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.collector-card-header {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.75rem;
}

.collector-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.collector-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f2b48;
}

.taluka-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.8rem;
}

.taluka-tag {
    background: #f1f5f9;
    color: #334155;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
}

/* 6-Stage Workflow Grid */
.workflow-stages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.stage-step-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid #e2e8f0;
    padding: 1.5rem;
    position: relative;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid #0284c7;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stage-step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stage-number-badge {
    position: absolute;
    top: -14px;
    left: 20px;
    background: #0f2b48;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 2px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.stage-step-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: 0.3rem;
    margin-bottom: 0.5rem;
}

.stage-step-card p {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
}

.stage-officer-pill {
    display: inline-block;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.8rem;
}

/* Statistics Counter Grid */
.home-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.home-stat-box {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid #e2e8f0;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border-bottom: 4px solid #2563eb;
    transition: transform 0.2s;
}

.home-stat-box:hover {
    transform: translateY(-3px);
}

.home-stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.home-stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #0f2b48;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.home-stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
}

/* Public Order Verification Tool */
.public-verify-banner {
    background: linear-gradient(135deg, #1e3a8a 0%, #0f2b48 100%);
    color: #ffffff;
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    box-shadow: var(--shadow-lg);
}

.public-verify-text h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    color: #fbbf24;
}

.public-verify-text p {
    font-size: 0.95rem;
    color: #e2e8f0;
    max-width: 600px;
}

.public-verify-action {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.verify-field-block {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.verify-field-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.2px;
}

.verify-field-block input[type="text"] {
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius-md);
    border: 1.5px solid #cbd5e1;
    font-size: 0.92rem;
    width: 240px;
    outline: none;
    background: #ffffff;
    color: #0f172a;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.verify-field-block input[type="text"]:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

.verify-captcha-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.captcha-img-holder {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #ffffff;
    padding: 2px 4px;
    border-radius: var(--radius-md);
    border: 1.5px solid #cbd5e1;
}

.captcha-img-holder img {
    height: 38px;
    width: 140px;
    object-fit: contain;
    cursor: pointer;
    border-radius: 4px;
}

.btn-refresh-captcha {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    width: 32px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    color: #0f2b48;
    transition: background 0.2s, transform 0.2s;
}

.btn-refresh-captcha:hover {
    background: #e2e8f0;
    transform: rotate(45deg);
}

.verify-captcha-inline input[type="text"] {
    width: 140px !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    font-size: 1rem !important;
    text-align: center;
}

.verify-btn-block {
    display: flex;
    align-items: flex-end;
}

.btn-verify-action {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #0f172a;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 0.68rem 1.6rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    height: 42px;
}

.btn-verify-action:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #b45309 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

@media (max-width: 768px) {
    .public-verify-action {
        flex-direction: column;
        align-items: stretch;
    }
    .verify-field-block input[type="text"] {
        width: 100%;
    }
    .verify-captcha-inline {
        flex-wrap: wrap;
    }
    .verify-captcha-inline input[type="text"] {
        width: 100% !important;
    }
    .btn-verify-action {
        width: 100%;
    }
}

/* Visitor Counter Display */
.visitor-counter-bar {
    background: #0f172a;
    color: #ffffff;
    padding: 1.25rem 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.visitor-digits-wrap {
    display: inline-flex;
    gap: 3px;
    background: #000000;
    padding: 4px 6px;
    border-radius: 6px;
    border: 1px solid #334155;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.6);
}

.visitor-digit-slot {
    background: #1e293b;
    color: #22c55e;
    font-family: monospace, "Courier New", Courier;
    font-size: 1.15rem;
    font-weight: 800;
    width: 22px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    border: 1px solid rgba(255,255,255,0.08);
}

/* Government Portal Footer */
.portal-main-footer {
    background: #091322;
    color: #94a3b8;
    padding: 3rem 2rem 1.5rem 2rem;
    font-size: 0.85rem;
}

.portal-footer-grid {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 860px) {
    .portal-footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.footer-col h4 {
    color: #f8fafc;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border-bottom: 2px solid #3b82f6;
    display: inline-block;
    padding-bottom: 4px;
}

.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links-list li {
    margin-bottom: 0.5rem;
}

.footer-links-list a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links-list a:hover {
    color: #38bdf8;
}

.portal-footer-bottom {
    max-width: 1300px;
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.78rem;
}

/* Floating Scroll To Top / Home Button */
.btn-scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 9999px;
    padding: 10px 18px;
    font-size: 0.88rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.45), 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.btn-scroll-to-top:hover {
    background: linear-gradient(135deg, #0f2b48 0%, #1d4ed8 100%);
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(30, 58, 138, 0.55);
    color: #fbbf24;
}

.btn-scroll-to-top:active {
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════
   Advanced Authentication System Styles
   ═══════════════════════════════════════════════════════════════ */

/* Input with icon (left icon + optional right eye toggle) */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}
.input-with-icon .icon-slot {
    position: absolute;
    left: 12px;
    font-size: 1.1rem;
    z-index: 1;
    pointer-events: none;
    opacity: 0.7;
}
.input-with-icon .form-control {
    padding-left: 40px;
}
.input-with-icon.password-group .form-control {
    padding-right: 44px;
}

/* Eye toggle button for password visibility */
.btn-eye-toggle {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.15rem;
    padding: 4px 6px;
    opacity: 0.5;
    transition: opacity 0.2s;
    z-index: 1;
}
.btn-eye-toggle:hover {
    opacity: 1;
}

/* Captcha row layout */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.captcha-box {
    min-width: 160px;
    height: 44px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    overflow: hidden;
    flex-shrink: 0;
}
.captcha-box svg {
    display: block;
    width: 100%;
    height: 100%;
}
.captcha-input {
    flex: 1;
    min-width: 80px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
}
.btn-refresh-captcha {
    background: none;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
}
.btn-refresh-captcha:hover {
    background: #e2e8f0;
    transform: rotate(45deg);
}

/* Forgot password link */
.forgot-link {
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.forgot-link:hover {
    text-decoration: underline;
}

/* Auth submit button enhanced */
.btn-auth-submit {
    font-size: 1rem;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    letter-spacing: 0.03em;
}

/* d-flex utility overrides for auth label rows */
.d-flex {
    display: flex;
}
.justify-content-between {
    justify-content: space-between;
}
.align-items-center {
    align-items: center;
}
.font-semibold {
    font-weight: 600;
}
.mb-3 {
    margin-bottom: 0.75rem;
}
.mt-3 {
    margin-top: 0.75rem;
}
.mt-2 {
    margin-top: 0.5rem;
}
.font-bold {
    font-weight: 700;
}

/* 3-Tab Header inside Hero Card */
.tabs.tabs-three {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 1.25rem;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
}
.tabs.tabs-three .tab-btn {
    flex: 1;
    padding: 0.65rem 0.35rem;
    font-size: 0.84rem;
    font-weight: 600;
    text-align: center;
    border-radius: 6px;
    border: none;
    border-bottom: none;
    color: #64748b;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
}
.tabs.tabs-three .tab-btn:hover {
    color: #1e3a8a;
    background: rgba(255, 255, 255, 0.6);
}
.tabs.tabs-three .tab-btn.active {
    color: #1e3a8a;
    background: #ffffff;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Embedded Register Panel Animation & Spacing */
#registerPanel {
    animation: fadeInTab 0.25s ease-out;
}
#publicPanel {
    animation: fadeInTab 0.25s ease-out;
}
#officerPanel {
    animation: fadeInTab 0.25s ease-out;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   MOBILE-FIRST RESPONSIVE OPTIMIZATION - HOME PAGE & PORTAL LANDING
   ========================================================================== */

/* Prevent horizontal overflow globally */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

.portal-home-wrapper {
    overflow-x: hidden;
    max-width: 100%;
}

/* Medium Screens / Tablets (max-width: 968px) */
@media (max-width: 968px) {
    .portal-hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .portal-hero-card-col .login-card {
        max-width: 500px;
    }
}

/* Mobile & Small Tablets (max-width: 768px) */
@media (max-width: 768px) {
    /* 1. Header Adjustments */
    .gov-top-utility {
        display: none !important; /* Hide redundant utility bar on mobile to save vertical screen space */
    }

    .portal-main-header {
        padding: 0.5rem 0.85rem;
    }

    .portal-header-content {
        gap: 0.5rem;
        justify-content: flex-start;
        flex-wrap: nowrap;
        align-items: center;
    }

    .portal-brand-block {
        gap: 0.65rem;
        align-items: center;
        flex: 1;
        min-width: 0;
    }

    .gov-emblem-img {
        height: 44px !important;
        width: auto !important;
        flex-shrink: 0;
    }

    .portal-title-block {
        min-width: 0;
        flex: 1;
    }

    .portal-title-block h1 {
        font-size: 0.95rem;
        font-weight: 800;
        line-height: 1.2;
        color: #0f2b48;
        white-space: normal;
        margin: 0;
    }

    .portal-title-block h2 {
        font-size: 0.76rem;
        font-weight: 600;
        line-height: 1.2;
        color: #c2410c;
        margin-top: 1px;
        margin-bottom: 0;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .portal-title-block p {
        display: none; /* Hide verbose English subtitle on mobile header */
    }

    /* Hide the right-side security badge block in header on mobile */
    .portal-header-content > div:last-child {
        display: none !important;
    }

    /* 2. Navigation Bar */
    .portal-nav-bar {
        padding: 0 0.5rem;
    }

    .portal-nav-inner {
        gap: 0.35rem;
        padding: 0.25rem 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .portal-nav-inner::-webkit-scrollbar {
        display: none;
    }

    .portal-nav-link {
        padding: 0.45rem 0.7rem;
        font-size: 0.78rem;
        font-weight: 600;
        white-space: nowrap;
    }

    /* 3. Scroll Margin Top for Anchors on Mobile */
    .portal-section-wrap,
    .portal-hero-section,
    #about-scheme,
    #about-administration,
    #workflow-stages,
    #portal-stats,
    #portal-verify,
    #portal-top {
        scroll-margin-top: 95px !important;
    }

    /* 4. Hero Section */
    .portal-hero-section {
        padding: 1.5rem 0.85rem;
    }

    .portal-hero-container {
        gap: 1.5rem;
    }

    .portal-hero-text h2 {
        font-size: 1.35rem;
        font-weight: 800;
        line-height: 1.3;
        margin-bottom: 0.65rem;
    }

    .portal-hero-subtitle {
        font-size: 0.88rem;
        line-height: 1.55;
        margin-bottom: 1rem;
    }

    .portal-feature-pills {
        gap: 0.35rem;
        margin-bottom: 1rem;
    }

    .feature-pill {
        padding: 0.32rem 0.6rem;
        font-size: 0.74rem;
    }

    .hero-legal-badge {
        padding: 0.65rem 0.75rem;
        font-size: 0.78rem;
        line-height: 1.4;
        margin-bottom: 1.25rem;
    }

    /* 5. Login Card inside Hero */
    .portal-hero-card-col .login-card {
        padding: 1.25rem 0.85rem !important;
        max-width: 100% !important;
        border-radius: var(--radius-lg);
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    }

    .portal-hero-card-col .login-card .text-center.mb-4 img {
        height: 46px !important;
    }

    .portal-hero-card-col .login-card .text-center.mb-4 h3 {
        font-size: 1.1rem;
    }

    .tabs.tabs-three {
        margin-bottom: 1rem;
        padding: 3px;
        gap: 3px;
    }

    .tabs.tabs-three .tab-btn {
        font-size: 0.78rem;
        padding: 0.5rem 0.2rem;
        line-height: 1.2;
    }

    /* 6. Form Controls & Captcha */
    .form-group.mb-3 {
        margin-bottom: 0.65rem;
    }

    .form-label {
        font-size: 0.82rem;
    }

    .input-with-icon .form-control {
        font-size: 0.88rem;
        padding-top: 0.55rem;
        padding-bottom: 0.55rem;
    }

    .captcha-row {
        gap: 6px;
    }

    .captcha-box {
        min-width: 125px;
        max-width: 140px;
        height: 38px;
    }

    .btn-refresh-captcha {
        width: 34px;
        height: 38px;
        font-size: 1rem;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .captcha-input {
        min-width: 70px;
        height: 38px;
        font-size: 0.9rem;
        padding: 0.35rem;
    }

    .btn-auth-submit {
        padding: 0.65rem 1rem;
        font-size: 0.92rem;
    }

    /* 7. Content Sections & Headings */
    .portal-section-wrap {
        padding: 1.75rem 0.85rem;
    }

    .section-head {
        margin-bottom: 1.5rem;
    }

    .section-title {
        font-size: 1.35rem;
        line-height: 1.3;
    }

    .section-sub {
        font-size: 0.84rem;
        line-height: 1.5;
    }

    /* 8. Responsive Grids - 1 Column on Mobile */
    .collector-details-grid,
    .scheme-framework-grid,
    .workflow-stages-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .collector-card {
        padding: 1.15rem 0.85rem;
    }

    .scheme-framework-grid > div {
        padding: 1.25rem 0.85rem !important;
    }

    .taluka-tag-list {
        gap: 0.3rem;
    }

    .taluka-tag {
        font-size: 0.72rem;
        padding: 0.2rem 0.45rem;
    }

    .stage-step-card {
        padding: 1.25rem 0.85rem;
    }

    /* 9. Statistics Counters */
    .home-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .home-stat-box {
        padding: 1rem 0.5rem;
    }

    .home-stat-icon {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }

    .home-stat-number {
        font-size: 1.5rem;
    }

    .home-stat-label {
        font-size: 0.74rem;
    }

    /* 10. Public Verification Tool */
    .public-verify-banner {
        padding: 1.25rem 0.85rem !important;
        gap: 1.25rem;
        border-radius: var(--radius-lg);
    }

    .public-verify-text h3 {
        font-size: 1.15rem;
        line-height: 1.3;
    }

    .public-verify-text p {
        font-size: 0.84rem;
        line-height: 1.5;
    }

    .public-verify-action {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .verify-field-block {
        width: 100%;
    }

    .verify-field-block input[type="text"] {
        width: 100% !important;
        box-sizing: border-box;
    }

    .verify-captcha-inline {
        display: flex;
        gap: 6px;
        width: 100%;
    }

    .captcha-img-holder {
        flex-shrink: 0;
    }

    .captcha-img-holder img {
        width: 110px !important;
        height: 38px !important;
    }

    .verify-captcha-inline input[type="text"] {
        flex: 1;
        min-width: 60px;
        width: auto !important;
        height: 38px;
        font-size: 0.95rem !important;
    }

    .verify-btn-block {
        width: 100%;
    }

    .btn-verify-action {
        width: 100%;
        height: 42px;
        font-size: 0.92rem;
    }

    /* 11. Visitor Counter & Footer */
    .visitor-counter-bar {
        padding: 0.85rem 0.5rem;
        font-size: 0.82rem;
        gap: 0.5rem;
    }

    .visitor-digits-wrap {
        padding: 3px 5px;
    }

    .visitor-digit-slot {
        width: 18px;
        height: 24px;
        font-size: 0.95rem;
    }

    .portal-main-footer {
        padding: 2rem 0.85rem 1.25rem 0.85rem;
    }

    .portal-footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .portal-footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        padding-top: 1rem;
    }

    /* 12. Floating Scroll Button */
    .btn-scroll-to-top {
        bottom: 16px;
        right: 16px;
        padding: 7px 12px;
        font-size: 0.76rem;
    }
}

/* Extra Small Mobile Screens (max-width: 380px) */
@media (max-width: 380px) {
    .portal-title-block h1 {
        font-size: 0.86rem;
    }
    
    .portal-title-block h2 {
        font-size: 0.7rem;
    }

    .portal-hero-text h2 {
        font-size: 1.18rem;
    }

    .tabs.tabs-three .tab-btn {
        font-size: 0.72rem;
        padding: 0.45rem 0.1rem;
    }

    .captcha-box {
        min-width: 110px;
        max-width: 120px;
    }

    .home-stats-grid {
        grid-template-columns: 1fr !important;
    }
}

