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

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #e0e7ff;
    --secondary: #0f172a;
    --secondary-light: #1e293b;
    --accent: #f43f5e;
    --success: #10b981;
    --success-light: #d1fae5;
    --success-dark: #065f46;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --danger-dark: #991b1b;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --warning-dark: #92400e;
    --info: #0ea5e9;
    --info-light: #e0f2fe;
    --info-dark: #075985;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

a {
    color: inherit;
    text-decoration: none;
}

/* Auth Page Layout */
.login-split-page {
    background-color: var(--bg-main);
    height: 100vh;
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    overflow: hidden;
}

.login-split-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.login-left-pane {
    width: 45%;
    min-width: 480px;
    background-color: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    box-shadow: 10px 0 30px rgba(0,0,0,0.03);
    position: relative;
    z-index: 10;
    height: 100vh;
    overflow-y: auto;
}

.login-form-wrapper {
    width: 100%;
    max-width: 380px;
}

.auth-logo-left {
    text-align: center;
    margin-bottom: 35px;
}

.auth-logo-left img {
    height: 100px;
    width: auto;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05));
}

.auth-logo-left h2 {
    font-size: 26px;
    color: var(--secondary);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.auth-logo-left p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

.login-footer-text {
    margin-top: 30px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.login-left-pane .form-control:focus {
    border-color: var(--success);
    box-shadow: 0 0 0 4px var(--success-light);
}

.login-right-pane {
    width: 55%;
    background: linear-gradient(135deg, #047857 0%, #10b981 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.info-card-container {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: 45px;
    width: 100%;
    max-width: 580px;
    color: white;
    box-shadow: var(--shadow-xl);
    z-index: 5;
}

.info-card-header h1 {
    font-size: 28px;
    font-weight: 800;
    margin-top: 12px;
    margin-bottom: 12px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.info-card-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.info-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.workflow-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.step-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.1);
}

.step-content h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    color: white;
}

.step-content p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    line-height: 1.5;
}

.info-card-footer {
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    text-align: center;
}

.login-right-pane::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.login-right-pane::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -50px;
    left: -50px;
}

@media (max-width: 992px) {
    .login-split-page {
        height: auto;
        overflow-y: auto;
    }

    .login-split-container {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }
    
    .login-left-pane {
        width: 100%;
        min-width: 100%;
        height: auto;
        min-height: 100vh;
        padding: 30px 20px;
        overflow-y: visible;
    }
    
    .login-right-pane {
        display: none;
    }
}

/* Dashboard Core Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--secondary);
    color: white;
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 50;
    border-right: 1px solid var(--secondary-light);
    box-shadow: var(--shadow-lg);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand .logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-family: var(--font-heading);
    font-size: 20px;
}

.sidebar-brand h2 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.sidebar-brand h2 span {
    font-size: 11px;
    display: block;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 2px;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
}

.sidebar-menu li.active a,
.sidebar-menu a:hover {
    background-color: var(--secondary-light);
    color: white;
}

.sidebar-menu li.active a {
    border-left: 4px solid var(--primary);
    background-color: rgba(99, 102, 241, 0.15);
}

.sidebar-user {
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-user-info h4 {
    font-size: 14px;
    font-weight: 600;
}

.sidebar-user-info p {
    font-size: 12px;
    color: var(--text-muted);
}

.logout-btn {
    color: var(--accent);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.logout-btn:hover {
    color: #ff4d6d;
    transform: translateX(3px);
}

/* Main Panel */
.main-panel {
    flex: 1;
    margin-left: 280px;
    padding: 40px;
    min-width: 0; /* Prevents overflow in flexbox */
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-title h1 {
    font-size: 28px;
    color: var(--secondary);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.dashboard-title p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Grid & Cards */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.metric-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 4px;
}

.metric-card.primary::before { background-color: var(--primary); }
.metric-card.success::before { background-color: var(--success); }
.metric-card.warning::before { background-color: var(--warning); }
.metric-card.danger::before { background-color: var(--danger); }

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.metric-title {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.metric-card.primary .metric-icon { background-color: var(--primary-light); color: var(--primary-hover); }
.metric-card.success .metric-icon { background-color: var(--success-light); color: var(--success-dark); }
.metric-card.warning .metric-icon { background-color: var(--warning-light); color: var(--warning-dark); }
.metric-card.danger .metric-icon { background-color: var(--danger-light); color: var(--danger-dark); }

.metric-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--secondary);
    font-family: var(--font-heading);
}

.metric-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* UI Elements */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 30px;
    transition: var(--transition);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 18px;
    color: var(--secondary);
    font-weight: 600;
}

/* Table Style */
.table-wrapper {
    overflow-x: auto;
    margin: 0 -24px;
    padding: 0 24px;
}

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

th {
    padding: 14px 16px;
    background-color: var(--bg-main);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-main);
}

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

tr:hover td {
    background-color: rgba(99, 102, 241, 0.02);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-pending {
    background-color: var(--warning-light);
    color: var(--warning-dark);
}

.badge-approved {
    background-color: var(--success-light);
    color: var(--success-dark);
}

.badge-rejected {
    background-color: var(--danger-light);
    color: var(--danger-dark);
}

.badge-disbursed {
    background-color: var(--info-light);
    color: var(--info-dark);
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--secondary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background-color: #fff;
    color: var(--text-main);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Dynamic Item Form Table */
.items-table {
    margin-top: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.items-table table {
    background-color: #fff;
}

.items-table th {
    background-color: var(--bg-main);
}

.items-table td {
    padding: 12px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

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

.btn-success:hover {
    background-color: #0d9488;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-secondary {
    background-color: #f1f5f9;
    color: var(--text-main);
    border-color: var(--border);
}

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

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

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

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

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Submission details details */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.detail-item {
    background-color: var(--bg-main);
    padding: 16px;
    border-radius: var(--radius-md);
}

.detail-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.detail-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--secondary);
}

.alert {
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-success { background-color: var(--success-light); border-left: 4px solid var(--success); color: var(--success-dark); }
.alert-danger { background-color: var(--danger-light); border-left: 4px solid var(--danger); color: var(--danger-dark); }
.alert-warning { background-color: var(--warning-light); border-left: 4px solid var(--warning); color: var(--warning-dark); }
.alert-info { background-color: var(--info-light); border-left: 4px solid var(--info); color: var(--info-dark); }

/* Review section items modifications styling */
.rector-review-input {
    width: 80px;
    padding: 6px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    text-align: center;
    font-weight: 600;
}

.rector-review-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.rector-review-price-input {
    width: 130px;
    padding: 6px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-weight: 600;
    text-align: right;
}

.rector-review-price-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.action-bar {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.grand-total-row {
    background-color: var(--primary-light);
    font-weight: 700;
}

.grand-total-row td {
    color: var(--primary-hover);
    font-size: 16px;
}

/* Floating dynamic actions */
.dynamic-item-row td {
    border-bottom: 1px dashed var(--border);
}

.delete-row-btn {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    transition: var(--transition);
}

.delete-row-btn:hover {
    color: var(--danger-dark);
    transform: scale(1.1);
}

/* Custom Navigation Trigger */
.navbar-mobile {
    display: none;
    background-color: var(--secondary);
    color: white;
    padding: 16px 24px;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 60;
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        transition: var(--transition);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-panel {
        margin-left: 0;
        padding: 24px;
    }
    
    .navbar-mobile {
        display: flex;
    }
}
