@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    /* Theme Colors (Deep Indigo Premium Palette) */
    --color-primary: #6366f1;
    --color-primary-dark: #4f46e5;
    --color-primary-light: #e0e7ff;
    --color-bg-base: #f8fafc;
    --color-bg-card: #ffffff;
    --color-text-main: #0f172a;
    --color-text-muted: #64748b;
    --color-border: #e2e8f0;
    
    /* Accents */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #3b82f6;
    
    /* Shadow design tokens */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;
}

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

body {
    background-color: var(--color-bg-base);
    color: var(--color-text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-text-main);
}

/* ==========================================
   Public Form Styles (Admission & Enrollment)
   ========================================== */
.form-container {
    min-height: 100vh;
    padding: 3rem 1rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.form-wrapper {
    max-width: 880px;
    width: 100%;
    background: var(--color-bg-card);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

/* Premium Top Gradient Accent */
.form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
}

.header-section {
    text-align: center;
    margin-bottom: 3rem;
}

.header-section img.logo {
    height: 90px;
    margin-bottom: 1rem;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.header-section img.logo:hover {
    transform: scale(1.05);
}

.header-section h1 {
    font-size: 2.25rem;
    color: #1e1b4b;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.header-section p.tagline {
    color: var(--color-primary-dark);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.header-section p.subtitle {
    color: var(--color-text-muted);
    font-size: 1rem;
}

/* Form Sections */
.form-card {
    background: #f8fafc;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.section-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.75rem;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    background: var(--color-primary);
    color: #ffffff;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    margin-right: 0.75rem;
    font-family: var(--font-heading);
}

/* Form Fields */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .form-grid.grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    margin-bottom: 0.5rem;
}

.form-group label span.required {
    color: var(--color-danger);
    margin-left: 0.125rem;
}

.form-control {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    background-color: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-main);
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-control::placeholder {
    color: #94a3b8;
}

/* Checkbox & Radio styling */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #475569;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 0.25rem;
    accent-color: var(--color-primary);
    width: 1rem;
    height: 1rem;
}

/* Upload Fields */
.file-upload-wrapper {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    text-align: center;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.file-upload-wrapper:hover {
    border-color: var(--color-primary);
    background-color: #f5f3ff;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-text {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.file-upload-text strong {
    color: var(--color-primary);
}

/* Action Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-family: var(--font-heading);
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:disabled {
    background: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background-color: #f1f5f9;
    color: #334155;
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background-color: #e2e8f0;
}

/* Alert boxes */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid transparent;
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border-left-color: var(--color-danger);
}

.alert-success {
    background-color: #ecfdf5;
    color: #065f46;
    border-left-color: var(--color-success);
}

.alert-info {
    background-color: #eff6ff;
    color: #1e40af;
    border-left-color: var(--color-info);
}

/* Success details box */
.success-card {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    width: 4rem;
    height: 4rem;
    background: #d1fae5;
    color: var(--color-success);
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    text-align: left;
}

.details-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.95rem;
}

.details-table td strong {
    color: #334155;
}


/* ==========================================
   Admin Portal Layout
   ========================================== */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.admin-sidebar {
    width: 280px;
    background: #0f172a; /* Sleek Slate Dark */
    color: #f8fafc;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 2rem;
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-header h2 {
    font-size: 1.35rem;
    color: #ffffff;
    letter-spacing: -0.02em;
    font-family: var(--font-heading);
}

.sidebar-nav {
    flex-grow: 1;
    padding: 1.5rem 1rem;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.sidebar-link:hover {
    color: #ffffff;
    background: #1e293b;
}

.sidebar-link.active {
    color: #ffffff;
    background: var(--color-primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid #1e293b;
    background: #0b0f19;
}

.user-info {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}

.user-info strong {
    color: #ffffff;
}

/* Main Admin Panel */
.admin-main {
    margin-left: 280px;
    flex-grow: 1;
    padding: 2.5rem;
    background-color: #f8fafc;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.admin-header h1 {
    font-size: 1.75rem;
    color: #0f172a;
    letter-spacing: -0.02em;
}

/* Grid Dashboard Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease;
}

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

.stat-title {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    font-family: var(--font-heading);
}

/* Table Filters & Control Header */
.control-bar {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.search-input {
    flex-grow: 1;
    min-width: 200px;
}

.filter-select {
    min-width: 150px;
}

/* Premium Table Styling */
.table-wrapper {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

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

.admin-table th {
    background: #f1f5f9;
    padding: 0.875rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    border-bottom: 1px solid var(--color-border);
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.925rem;
    color: #334155;
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

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

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.775rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-new { background-color: #eff6ff; color: #1d4ed8; }
.badge-pending { background-color: #fef3c7; color: #b45309; }
.badge-paid { background-color: #ecfdf5; color: #047857; }
.badge-completed { background-color: #d1fae5; color: #065f46; }
.badge-overdue { background-color: #fee2e2; color: #b91c1c; }

/* Dialog/Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--color-bg-card);
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.25s ease;
}

.modal-overlay.open .modal-content {
    transform: translateY(0);
}

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

.modal-header h3 {
    font-size: 1.15rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-muted);
}

.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

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

/* Glassmorphic Login Layout */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    padding: 1.5rem;
}

.login-card {
    max-width: 420px;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

.login-card h1 {
    color: #ffffff;
    font-size: 1.85rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.login-card p {
    color: #94a3b8;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 2rem;
}

.login-card label {
    color: #e2e8f0;
}

.login-card .form-control {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.login-card .form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.login-card .btn-primary {
    background: var(--color-primary);
    width: 100%;
    margin-top: 1rem;
}
