/* Next-Gen Clean Enterprise Wide Portal UI Design System
   KUST Incubation Center (KIC) - Student Registration Portal
   Unified 2-Column Professional Dashboard Layout, Full-Width Responsiveness, & High-Contrast Light/Dark Aesthetics. */

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

:root {
    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Plus Jakarta Sans', var(--font-main);

    /* Ultra-Clean Modern Light Palette */
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-translucent: rgba(255, 255, 255, 0.9);
    --bg-card: #f8fafc;
    --bg-input: #ffffff;

    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --border-focus: #4f46e5;

    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --primary-glow: rgba(79, 70, 229, 0.18);

    --cyan-accent: #0284c7;
    --cyan-light: #e0f2fe;
    --purple-accent: #7e22ce;
    --purple-light: #faf5ff;
    --pink-accent: #db2777;
    --pink-light: #fce7f3;

    --success: #059669;
    --success-light: #ecfdf5;
    --warning: #d97706;
    --warning-light: #fffbeb;
    --danger: #dc2626;
    --danger-light: #fef2f2;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.04), 0 0 1px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 40px -10px rgba(79, 70, 229, 0.12);
    --shadow-glow: 0 10px 25px rgba(79, 70, 229, 0.3);
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Overrides */
[data-theme="dark"] {
    --bg-main: #0b0f19;
    --bg-surface: #111827;
    --bg-surface-translucent: rgba(17, 24, 39, 0.9);
    --bg-card: #1f2937;
    --bg-input: #0f172a;

    --border-color: #374151;
    --border-light: rgba(255, 255, 255, 0.08);
    --border-focus: #6366f1;

    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.15);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --shadow-card: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.07) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.07) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(236, 72, 153, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Background Subtle Dot Overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(99, 102, 241, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

/* Top Institutional Header Bar - Full Width */
.top-nav {
    background: var(--bg-surface-translucent);
    border-bottom: 1px solid var(--border-color);
    padding: 0.85rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-sm);
}

.top-nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.institution-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.institution-brand:hover {
    transform: translateX(2px);
}

.institution-logo {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.institution-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.institution-sub {
    font-size: 0.775rem;
    color: var(--text-secondary);
    display: block;
    font-weight: 500;
}

.top-nav-right {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.nav-status-badge {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    position: relative;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    border: 2px solid #10b981;
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0% { transform: scale(0.9); opacity: 1; }
    100% { transform: scale(2.2); opacity: 0; }
}

.theme-toggle-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.1rem;
}

.theme-toggle-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

/* Wide Page Application Layout */
.app-container {
    max-width: 1280px;
    margin: 2rem auto 4rem;
    padding: 0 1.5rem;
}

/* Wide Hero Header */
.hero-header-wide {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-content {
    max-width: 720px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #eef2ff 0%, #e0f2fe 100%);
    border: 1px solid #c7d2fe;
    color: #3730a3;
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    font-size: 0.775rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.25;
}

.hero-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.55;
    margin: 0;
}

.hero-highlights {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: flex-end;
}

@media (max-width: 991px) {
    .hero-highlights {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }
}

.highlight-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: #475569;
    font-weight: 600;
    background: var(--bg-card);
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
}

.highlight-pill i {
    color: var(--primary);
}

/* Unified 2-Column Professional Grid Layout */
.portal-grid-layout {
    display: grid;
    grid-template-columns: 390px 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 991px) {
    .portal-grid-layout {
        grid-template-columns: 1fr;
    }
}

/* Sidebar Guidelines & Payment Panel */
.sidebar-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 5.5rem;
}

.panel-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.panel-card:hover {
    border-color: #c7d2fe;
    box-shadow: var(--shadow-hover);
}

.panel-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border-light);
}

.panel-title i {
    color: var(--primary);
    font-size: 1.2rem;
}

/* Payment Info Grid Inside Sidebar */
.sidebar-payment-grid {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.payment-box {
    border-radius: var(--radius-md);
    padding: 0.95rem 1.1rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.payment-box.fee-box {
    background: #eef2ff;
    border-color: #c7d2fe;
}
.payment-box.fee-box .payment-label { color: #4338ca; }
.payment-box.fee-box .payment-val { color: #312e81; }

.payment-box.method-box {
    background: #f0f9ff;
    border-color: #bae6fd;
}
.payment-box.method-box .payment-label { color: #0369a1; }
.payment-box.method-box .payment-val { color: #075985; }

.payment-box.account-box {
    background: #ecfdf5;
    border-color: #a7f3d0;
}
.payment-box.account-box .payment-label { color: #047857; }
.payment-box.account-box .payment-val { color: #065f46; }

.payment-box.title-box {
    background: #fffbeb;
    border-color: #fde68a;
}
.payment-box.title-box .payment-label { color: #b45309; }
.payment-box.title-box .payment-val { color: #78350f; }

.payment-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.payment-val {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.copy-btn {
    background: #ffffff;
    border: 1px solid #a7f3d0;
    color: #047857;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.copy-btn:hover {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
}

/* Sidebar Dept Badges */
.dept-chip-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dept-chip {
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.825rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.dept-chip.cs { background: #eef2ff; border-color: #c7d2fe; color: #4338ca; }
.dept-chip.math { background: #ecfeff; border-color: #a5f3fc; color: #0891b2; }
.dept-chip.eng { background: #faf5ff; border-color: #e9d5ff; color: #7e22ce; }
.dept-chip.biz { background: #fffbeb; border-color: #fef08a; color: #b45309; }

/* Sidebar Quotas */
.quota-item-sidebar {
    margin-bottom: 1rem;
}

.quota-item-sidebar:last-child {
    margin-bottom: 0;
}

.capacity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.825rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
}

.capacity-progress {
    height: 9px;
    background: var(--border-color);
    border-radius: 50px;
    overflow: hidden;
}

.capacity-bar {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5 0%, #06b6d4 100%);
    border-radius: 50px;
    transition: width 0.6s ease;
}

.capacity-bar.full {
    background: linear-gradient(90deg, #dc2626 0%, #f43f5e 100%);
}

/* Sidebar Timeline Steps */
.sidebar-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.t-step-mini {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.t-icon-mini {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.t-title-mini {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-primary);
}

.t-desc-mini {
    font-size: 0.775rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Main Form Panel - Right Side */
.main-form-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: var(--transition);
}

.form-header-bar {
    padding: 1.5rem 2rem;
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-card) 100%);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-header-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-header-title i {
    color: var(--primary);
    font-size: 1.4rem;
}

.form-body-content {
    padding: 2.25rem;
}

/* Form Sections */
.form-section-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4f46e5;
    margin-bottom: 1.35rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--primary-light);
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.req-star {
    color: #dc2626;
    margin-left: 2px;
}

/* Icon Input Wrapper Group */
.input-group-custom {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group-custom .input-icon {
    position: absolute;
    left: 1rem;
    color: #64748b;
    font-size: 1.1rem;
    pointer-events: none;
    transition: var(--transition);
}

.input-group-custom .form-control,
.input-group-custom .form-select {
    padding-left: 2.8rem;
}

.input-group-custom:focus-within .input-icon {
    color: var(--primary);
}

.form-control, .form-select {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 0.8rem 1.1rem;
    font-size: 0.95rem;
    font-family: var(--font-main);
    transition: var(--transition);
    width: 100%;
    box-shadow: var(--shadow-sm);
}

.form-control:focus, .form-select:focus {
    background-color: var(--bg-surface);
    border-color: var(--border-focus);
    color: var(--text-primary);
    outline: none;
    box-shadow: 0 0 0 4px var(--primary-glow);
}

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

.form-select option {
    background-color: var(--bg-surface);
    color: var(--text-primary);
    padding: 0.5rem;
}

.form-hint {
    font-size: 0.785rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

/* Upload Dropzone */
.upload-dropzone {
    border: 2px dashed #a5b4fc;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 2.5rem 1.5rem;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
}

.upload-dropzone:hover, .upload-dropzone.drag-over {
    border-color: var(--primary);
    background: var(--primary-light);
}

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

.upload-icn {
    font-size: 2.75rem;
    color: var(--primary);
    margin-bottom: 0.6rem;
    display: inline-block;
    transition: var(--transition);
}

.upload-dropzone:hover .upload-icn {
    transform: translateY(-3px) scale(1.05);
}

.upload-heading {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.025rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

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

/* Upload Preview Tile */
.file-preview-card {
    display: none;
    align-items: center;
    gap: 1.1rem;
    background: var(--bg-surface);
    border: 1px solid #c7d2fe;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-top: 1.25rem;
    box-shadow: var(--shadow-card);
}

.file-preview-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.file-preview-details {
    flex-grow: 1;
    overflow: hidden;
}

.file-preview-filename {
    font-family: var(--font-heading);
    font-size: 0.925rem;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.btn-remove-file {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.825rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-remove-file:hover {
    background: #dc2626;
    color: #fff;
}

/* Submit Action Button */
.btn-submit-action {
    width: 100%;
    background: linear-gradient(135deg, #4f46e5 0%, #2563eb 50%, #06b6d4 100%);
    background-size: 200% auto;
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    padding: 1.15rem 1.75rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-submit-action:hover:not(:disabled) {
    background-position: right center;
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.45);
    transform: translateY(-2px);
}

.btn-submit-action:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    box-shadow: none;
}

/* Alert Banner */
.alert-banner {
    display: none;
    border-radius: var(--radius-md);
    padding: 1.1rem 1.35rem;
    margin-bottom: 1.75rem;
    font-size: 0.925rem;
    line-height: 1.5;
}

.alert-banner-danger { background: var(--danger-light); border: 1px solid #fca5a5; color: #991b1b; }
.alert-banner-warning { background: var(--warning-light); border: 1px solid #fde68a; color: #92400e; }
.alert-banner-info { background: var(--cyan-light); border: 1px solid #bae6fd; color: #075985; }

/* Modal Content */
.modal-content-enterprise {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.receipt-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed var(--border-color);
    margin-bottom: 1.5rem;
}

.receipt-icon {
    width: 76px;
    height: 76px;
    background: #ecfdf5;
    border: 2px solid #a7f3d0;
    color: #059669;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.1rem;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
}

.receipt-ref-badge {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    color: #4338ca;
    padding: 0.35rem 0.9rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: var(--font-heading);
    font-weight: 800;
    display: inline-block;
    margin-top: 0.6rem;
}

.footer-text {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 3.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}
