/* ==========================================================================
   SIKKHALAY INSTITUTE PORTAL — STUDENT ADMISSION MANAGEMENT CSS (ULTRA ADVANCED)
   World-class, responsive, high-aesthetic styling for admissions pipeline,
   Kanban board, Analytics, SMS Studio & Admit Cards.
   ========================================================================== */

:root {
    --adm-primary: #059669;
    --adm-primary-hover: #047857;
    --adm-primary-light: rgba(5, 150, 105, 0.12);
    --adm-accent: #10b981;
    --adm-gradient: linear-gradient(135deg, #065f46 0%, #059669 50%, #10b981 100%);
    --adm-glow: 0 0 25px rgba(16, 185, 129, 0.35);
    --adm-card-hover: 0 12px 30px -10px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] {
    --adm-card-hover: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
}


/* 2. ADVANCED KPI METRIC CARDS */
.adm-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    margin-bottom: 1.75rem;
}

.adm-metric-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg, 14px);
    padding: 1.25rem 1.3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.adm-metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    transition: background 0.3s ease;
}

.adm-metric-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--adm-card-hover);
    border-color: var(--brand-primary);
}

.adm-metric-card:hover::before {
    background: var(--adm-gradient);
}

.adm-metric-icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.adm-metric-info {
    flex: 1;
    min-width: 0;
}

.adm-metric-val {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.adm-metric-lbl {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.adm-metric-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #059669;
    margin-top: 3px;
}

/* 3. PIPELINE NAV BAR & VIEW MODE TOGGLES */
.adm-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.25rem;
    gap: 1rem;
    flex-wrap: wrap;
    background: var(--bg-surface);
    padding: 6px 14px 0 14px;
    border-radius: var(--radius-lg, 14px) var(--radius-lg, 14px) 0 0;
    box-shadow: var(--shadow-sm);
}

.adm-tabs-scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.adm-tabs-scroll::-webkit-scrollbar {
    display: none;
}

.adm-tab-pill {
    padding: 8px 14px;
    border-radius: var(--radius-md, 8px) var(--radius-md, 8px) 0 0;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 7px;
    position: relative;
    transition: all 0.2s ease;
}

.adm-tab-pill:hover {
    color: var(--text-main);
    background: var(--bg-elevated);
}

.adm-tab-pill.active {
    color: var(--brand-primary);
    background: var(--bg-body);
    border-bottom: 2.5px solid var(--brand-primary);
}

.adm-tab-badge {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    padding: 1px 7px;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--text-muted);
}

.adm-tab-pill.active .adm-tab-badge {
    background: rgba(5, 150, 105, 0.15);
    border-color: rgba(5, 150, 105, 0.35);
    color: var(--brand-primary);
}

.adm-view-controls {
    display: flex;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md, 8px);
    padding: 3px;
    gap: 3px;
    margin-bottom: 6px;
}

.adm-view-btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.adm-view-btn.active {
    background: var(--brand-primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.35);
}

/* 4. PIPELINE STAGE BADGES */
.stage-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: capitalize;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.stage-applied { background: rgba(59, 130, 246, 0.12); color: #2563eb; border: 1px solid rgba(59, 130, 246, 0.25); }
.stage-verified { background: rgba(16, 185, 129, 0.12); color: #059669; border: 1px solid rgba(16, 185, 129, 0.25); }
.stage-test_scheduled { background: rgba(139, 92, 246, 0.12); color: #7c3aed; border: 1px solid rgba(139, 92, 246, 0.25); }
.stage-selected { background: rgba(245, 158, 11, 0.15); color: #d97706; border: 1px solid rgba(245, 158, 11, 0.35); font-weight: 900; }
.stage-waiting { background: rgba(107, 114, 128, 0.12); color: #4b5563; border: 1px solid rgba(107, 114, 128, 0.25); }
.stage-admitted { background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.28)); color: #047857; border: 1px solid rgba(16, 185, 129, 0.45); font-weight: 900; }
.stage-rejected { background: rgba(239, 68, 68, 0.12); color: #dc2626; border: 1px solid rgba(239, 68, 68, 0.25); }

/* Quota Chips */
.quota-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}
.quota-general { background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border-color); }
.quota-ff { background: rgba(239, 68, 68, 0.12); color: #b91c1c; border: 1px solid rgba(239, 68, 68, 0.3); }
.quota-sibling { background: rgba(59, 130, 246, 0.12); color: #1d4ed8; border: 1px solid rgba(59, 130, 246, 0.3); }
.quota-teacher { background: rgba(168, 85, 247, 0.12); color: #7e22ce; border: 1px solid rgba(168, 85, 247, 0.3); }
.quota-catchment { background: rgba(16, 185, 129, 0.12); color: #15803d; border: 1px solid rgba(16, 185, 129, 0.3); }

/* 5. NEXT-GEN KANBAN BOARD */
.adm-kanban-board {
    display: grid;
    grid-template-columns: repeat(5, minmax(270px, 1fr));
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 20px;
    min-height: 560px;
    -webkit-overflow-scrolling: touch;
}

.adm-kanban-col {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg, 14px);
    display: flex;
    flex-direction: column;
    max-height: 75vh;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s;
}

.adm-kanban-col-head {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg, 14px) var(--radius-lg, 14px) 0 0;
}

.adm-kanban-col-title {
    font-size: 0.82rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text-main);
}

.adm-kanban-col-body {
    padding: 12px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.adm-kanban-card {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md, 10px);
    padding: 14px;
    cursor: grab;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.adm-kanban-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--adm-card-hover);
    border-color: var(--brand-primary);
}

.adm-kanban-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.adm-kanban-name {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.3;
}

.adm-kanban-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.74rem;
    color: var(--text-muted);
    margin: 6px 0;
}

.adm-kanban-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed var(--border-color);
    padding-top: 10px;
    margin-top: 10px;
}

/* 6. FLOATING BATCH ACTION BAR */
.adm-batch-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    background: #0f172a;
    color: #ffffff;
    padding: 12px 26px;
    border-radius: var(--radius-full);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    gap: 18px;
    z-index: 9999;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.adm-batch-bar.active {
    transform: translateX(-50%) translateY(0);
}

.adm-batch-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    padding: 7px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s ease;
}

.adm-batch-btn:hover {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    transform: translateY(-1px);
}

/* 8. ADMIT CARD OFFICIAL PRINT STYLES */
.admit-card-preview {
    background: #ffffff;
    color: #111827;
    border: 2px solid #065f46;
    border-radius: 10px;
    padding: 28px;
    max-width: 680px;
    margin: 0 auto;
    font-family: 'Inter', 'Hind Siliguri', sans-serif;
    position: relative;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}

.admit-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 70px;
    font-weight: 900;
    color: rgba(5, 150, 105, 0.05);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.admit-header {
    text-align: center;
    border-bottom: 2px solid #065f46;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.admit-grid {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 20px;
    align-items: start;
    margin-bottom: 16px;
}

.admit-info-table {
    width: 100%;
    border-collapse: collapse;
}

.admit-info-table td {
    padding: 5px 8px;
    font-size: 12.5px;
    vertical-align: middle;
}

.admit-info-table td:first-child {
    font-weight: 600;
    color: #4b5563;
    width: 38%;
}

.admit-info-table td:last-child {
    font-weight: 800;
    color: #111827;
}

.admit-photo-box {
    width: 110px;
    height: 125px;
    border: 1px dashed #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 6px;
    text-align: center;
    overflow: hidden;
}

.admit-instructions {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 11px;
    color: #166534;
    line-height: 1.5;
    margin-bottom: 20px;
}

.admit-footer-sign {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 25px;
}

.sign-line {
    border-top: 1px solid #4b5563;
    width: 150px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #374151;
    padding-top: 4px;
}

@media print {
    body * {
        visibility: hidden;
    }
    #admitCardModalContent, #admitCardModalContent * {
        visibility: visible;
    }
    #admitCardModalContent {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        box-shadow: none;
        border: none;
    }
    .no-print {
        display: none !important;
    }
}

/* 9. APPLICANT DOSSIER MODAL */
.dossier-grid {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 24px;
}

@media (max-width: 768px) {
    .dossier-grid {
        grid-template-columns: 1fr;
    }
}

.dossier-avatar-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg, 14px);
    padding: 18px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.dossier-section-title {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--brand-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 18px 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
}

/* 10. SMS TEMPLATE CHIPS */
.sms-template-chip {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.sms-template-chip:hover, .sms-template-chip.active {
    background: var(--brand-primary);
    color: #ffffff;
    border-color: var(--brand-primary);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.35);
}

/* ==========================================================================
   11. COMPREHENSIVE RESPONSIVE BREAKPOINTS (DESKTOP, TABLET & MOBILE)
   ========================================================================== */

/* Large Tablets & Small Laptops */
@media (max-width: 1200px) {
    .adm-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile Phones (Horizontal & Vertical) */
@media (max-width: 768px) {
    .adm-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 1.25rem;
    }

    .adm-metric-card {
        padding: 0.9rem 1rem;
        gap: 0.75rem;
    }

    .adm-metric-icon-wrap {
        width: 38px;
        height: 38px;
        font-size: 1.05rem;
        border-radius: 8px;
    }

    .adm-metric-val {
        font-size: 1.2rem;
    }

    .adm-metric-lbl {
        font-size: 0.65rem;
    }

    .adm-nav-bar {
        padding: 6px 8px 0 8px;
    }

    .adm-batch-bar {
        bottom: calc(var(--bottom-nav-height, 60px) + 14px);
        width: calc(100% - 24px);
        max-width: 440px;
        padding: 10px 16px;
        gap: 10px;
        justify-content: space-between;
    }

    .adm-batch-btn {
        padding: 6px 10px;
        font-size: 0.74rem;
    }
}

/* Small Screens */
@media (max-width: 480px) {
    .adm-kpi-grid {
        grid-template-columns: 1fr;
    }
}
