/* Smart Admission Admin - institutional component fallback */
:root {
    --brand-50: #f0fdf4;
    --brand-100: #dcfce7;
    --brand-500: #16a34a;
    --brand-600: #15803d;
    --brand-700: #166534;
    --brand-800: #14532d;
    --untirta-navy: #05285e;
    --untirta-gold: #f2c94c;
    --untirta-canvas: #f6f8fb;
    --untirta-line: #d9e2ef;
    --sidebar: #05285e;
    --sidebar-hover: #0b3678;
    --sidebar-active: #ffffff;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--untirta-canvas);
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
    font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.75rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    transition: all 0.15s;
    cursor: pointer;
    border: none;
    text-decoration: none;
}
.btn:focus { outline: 2px solid transparent; outline-offset: 2px; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand-500); }
.btn-primary { background: var(--untirta-navy); color: #fff; }
.btn-primary:hover { background: var(--untirta-gold); color: var(--untirta-navy); }
.btn-secondary { border: 1px solid var(--untirta-line); background: #fff; color: #334155; }
.btn-secondary:hover { border-color: var(--untirta-gold); color: var(--untirta-navy); }
.btn-success { background: var(--brand-500); color: #fff; }
.btn-success:hover { background: var(--brand-700); }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-ghost { background: transparent; color: #475569; }
.btn-ghost:hover { background: #eef3f8; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.75rem; }

.input, .select {
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid var(--untirta-line);
    background: #fff;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    color: #1e293b;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.input:focus, .select:focus {
    border-color: var(--brand-500);
    outline: none;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}
.label { display: block; margin-bottom: 0.375rem; font-size: 0.875rem; font-weight: 600; color: #334155; }

.card { border-radius: 1rem; border: 1px solid var(--untirta-line); background: #fff; box-shadow: 0 8px 22px -18px rgba(5,40,94,0.35); }
.card-body { padding: 1.5rem; }

.table-wrap { overflow: hidden; border-radius: 1rem; border: 1px solid var(--untirta-line); background: #fff; box-shadow: 0 8px 22px -18px rgba(5,40,94,0.35); }
.table { min-width: 100%; border-collapse: collapse; }
.table thead { background: var(--untirta-canvas); }
.table th { padding: 0.75rem 1rem; text-align: left; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; }
.table td { padding: 0.875rem 1rem; font-size: 0.875rem; color: #334155; }
.table tbody tr { border-top: 1px solid #eef3f8; transition: background 0.15s; }
.table tbody tr:hover { background: #f8fbf9; }

.badge { display: inline-flex; align-items: center; border-radius: 9999px; padding: 0.125rem 0.625rem; font-size: 0.75rem; font-weight: 600; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-approved { background: #dcfce7; color: #166534; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-neutral { background: #f1f5f9; color: #334155; }
.badge-warning { background: #ffedd5; color: #9a3412; }

.sidebar-link {
    display: flex; align-items: center; gap: 0.75rem; border-radius: 0.75rem;
    padding: 0.625rem 0.75rem; font-size: 0.875rem; font-weight: 600;
    color: rgba(255,255,255,0.78); text-decoration: none; transition: all 0.15s;
}
.sidebar-link:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-link-active { background: #fff; color: var(--untirta-navy); }

.link { font-weight: 600; color: var(--untirta-navy); text-decoration: none; }
.link:hover { color: var(--brand-500); text-decoration: underline; }

.alert { margin-bottom: 1.5rem; display: flex; align-items: flex-start; gap: 0.75rem; border-radius: 1rem; border: 1px solid; padding: 0.75rem 1rem; font-size: 0.875rem; }
.alert-success { border-color: #bbf7d0; background: #f0fdf4; color: #14532d; }
.alert-error { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.alert-warning { border-color: #fde68a; background: #fffbeb; color: #78350f; }

.bg-sidebar { background-color: var(--sidebar) !important; }
.bg-brand-600 { background-color: var(--brand-600) !important; }
.bg-brand-50 { background-color: var(--brand-50) !important; }
.text-brand-600 { color: var(--brand-600) !important; }
.text-brand-100 { color: var(--brand-100) !important; }
.from-brand-800 { --tw-gradient-from: var(--brand-800); }
.to-brand-600 { --tw-gradient-to: var(--brand-600); }

/* Premium Unified Styling for Form Inputs, Dropdowns, Textareas, File fields and Checkboxes */
.form-input-premium {
    width: 100%;
    border-radius: 0.75rem;
    border: 1.5px solid var(--untirta-line);
    background-color: #ffffff;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #1e293b;
    box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.form-input-premium:hover {
    border-color: #cbd5e1;
}
.form-input-premium:focus {
    border-color: var(--untirta-gold) !important;
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(242, 201, 76, 0.25) !important;
}

.form-select-premium {
    width: 100%;
    border-radius: 0.75rem;
    border: 1.5px solid var(--untirta-line);
    background-color: #ffffff;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    font-size: 0.875rem;
    color: #1e293b;
    box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
}
.form-select-premium:hover {
    border-color: #cbd5e1;
}
.form-select-premium:focus {
    border-color: var(--untirta-gold) !important;
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(242, 201, 76, 0.25) !important;
}

.form-textarea-premium {
    width: 100%;
    border-radius: 0.75rem;
    border: 1.5px solid var(--untirta-line);
    background-color: #ffffff;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #1e293b;
    box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    resize: vertical;
}
.form-textarea-premium:hover {
    border-color: #cbd5e1;
}
.form-textarea-premium:focus {
    border-color: var(--untirta-gold) !important;
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(242, 201, 76, 0.25) !important;
}

.form-file-premium {
    width: 100%;
    border-radius: 0.75rem;
    border: 2px dashed rgba(5, 40, 94, 0.25);
    background-color: #f6f8fb;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #1e293b;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}
.form-file-premium:hover {
    border-color: var(--untirta-gold);
    background-color: rgba(242, 201, 76, 0.06);
}
.form-file-premium:focus {
    border-color: var(--untirta-gold) !important;
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(242, 201, 76, 0.25) !important;
}
.form-file-premium::-webkit-file-upload-button,
.form-file-premium::file-selector-button {
    margin-right: 0.75rem;
    border-radius: 0.5rem;
    border: 0;
    background-color: var(--untirta-navy);
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}
.form-file-premium:hover::-webkit-file-upload-button,
.form-file-premium:hover::file-selector-button {
    background-color: var(--untirta-gold);
    color: var(--untirta-navy);
}

.form-checkbox-premium {
    height: 1.125rem;
    width: 1.125rem;
    border-radius: 0.25rem;
    border: 1.5px solid var(--untirta-line);
    color: var(--untirta-gold);
    background-color: #ffffff;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}
.form-checkbox-premium:focus {
    --tw-ring-color: var(--untirta-gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(242, 201, 76, 0.4);
}

/* ── Sidebar tooltip (collapsed mode) ───────────────────────────────────── */
/* Applied via JS: sidebar gets data-collapsed="true" when in icon-only mode */
#sidebar[data-collapsed="true"] nav a[data-tooltip],
#sidebar[data-collapsed="true"] nav a[data-tooltip] {
    position: relative;
}

#sidebar[data-collapsed="true"] nav a[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    background-color: #05285E;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(5, 40, 94, 0.3);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    transform: translateY(-50%) translateX(-4px);
    z-index: 9999;
}

#sidebar[data-collapsed="true"] nav a[data-tooltip]::before {
    content: '';
    position: absolute;
    left: calc(100% + 6px);
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: #05285E;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 9999;
}

#sidebar[data-collapsed="true"] nav a[data-tooltip]:hover::after,
#sidebar[data-collapsed="true"] nav a[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}
