/* Google Fonts */
@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 {
    /* Color Palette */
    --color-bg-primary: #f8fafc;
    --color-bg-secondary: #ffffff;
    --color-text-main: #1e293b;
    --color-text-muted: #64748b;
    
    --color-primary: #059669; /* Emerald Green */
    --color-primary-hover: #047857;
    --color-primary-light: #ecfdf5;
    
    --color-secondary: #d97706; /* Amber Gold */
    --color-secondary-hover: #b45309;
    --color-secondary-light: #fef3c7;
    
    --color-danger: #ef4444;
    --color-danger-light: #fee2e2;
    --color-success: #10b981;
    --color-success-light: #d1fae5;
    --color-warning: #f59e0b;
    --color-info: #0ea5e9;
    
    /* Layout Variables */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 30px;
    
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 20px 25px -5px rgba(5, 150, 105, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-primary);
    color: var(--color-text-main);
    line-height: 1.6;
}

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

a {
    text-decoration: none;
    color: var(--color-primary);
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--color-primary-hover);
}

/* Authentication Page Layout */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f1f5f9 0%, #ecfdf5 100%);
    position: relative;
    overflow: hidden;
}

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

.auth-wrapper::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(217,119,6,0.05) 0%, rgba(255,255,255,0) 70%);
    bottom: -200px;
    left: -200px;
    border-radius: 50%;
}

.auth-card {
    background: var(--color-bg-secondary);
    border: 1px solid rgba(241, 245, 249, 0.8);
    box-shadow: var(--shadow-premium);
    width: 100%;
    max-width: 500px;
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    position: relative;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    font-size: 2rem;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
    font-weight: 800;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* Forms styling */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: var(--color-text-main);
    background-color: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--border-radius-md);
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

.form-error {
    color: var(--color-danger);
    font-size: 0.85rem;
    margin-top: 0.35rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.form-check-input {
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 4px;
    border: 1.5px solid #cbd5e1;
    accent-color: var(--color-primary);
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 0.95rem;
}

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

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.btn-secondary {
    background-color: #cbd5e1;
    color: #1e293b;
}

.btn-secondary:hover {
    background-color: #94a3b8;
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    border: 1.5px solid #cbd5e1;
    color: #475569;
}

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

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

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

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

.btn-warning:hover {
    background-color: #d97706;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Alert Boxes */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border: 1px solid transparent;
}

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

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

.alert-warning {
    background-color: var(--color-secondary-light);
    border-color: #fde68a;
    color: #92400e;
}

/* Layout Dashboard Admin/Tutor */
.layout-wrapper {
    min-height: 100vh;
    display: flex;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background-color: #0f172a;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

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

.sidebar-logo {
    width: 40px;
    height: 40px;
    background-color: var(--color-primary);
    color: white;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
}

.sidebar-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    color: white;
    font-size: 1.1rem;
    line-height: 1.2;
}

.sidebar-brand span {
    display: block;
    font-size: 0.75rem;
    color: var(--color-primary);
    font-weight: 500;
}

.sidebar-nav {
    flex: 1;
    padding: 2rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-md);
    color: #94a3b8;
    font-weight: 500;
    transition: var(--transition-smooth);
}

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

.sidebar-link.active {
    border-left: 4px solid var(--color-primary);
    padding-left: calc(1rem - 4px);
}

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

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #334155;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-info {
    overflow: hidden;
}

.user-name {
    display: block;
    color: #ffffff;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-role {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Main Content Area */
.main-content {
    margin-left: 280px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-header {
    background-color: var(--color-bg-secondary);
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
}

.main-title-section h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.main-title-section p {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.main-body {
    padding: 2rem;
    flex: 1;
}

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

.stat-card {
    background-color: var(--color-bg-secondary);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-smooth);
}

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

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.primary {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
}

.stat-icon.secondary {
    background-color: var(--color-secondary-light);
    color: var(--color-secondary);
}

.stat-icon.danger {
    background-color: var(--color-danger-light);
    color: var(--color-danger);
}

.stat-icon.warning {
    background-color: #fffbeb;
    color: var(--color-warning);
}

/* Dashboard Content Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

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

.card {
    background-color: var(--color-bg-secondary);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid #f1f5f9;
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Custom Table Design */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.table th {
    padding: 1rem 1.25rem;
    background-color: #f8fafc;
    color: #475569;
    font-weight: 600;
    border-bottom: 1px solid #cbd5e1;
}

.table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

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

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-draft {
    background-color: #e2e8f0;
    color: #475569;
}

.badge-pending {
    background-color: #fef3c7;
    color: #d97706;
}

.badge-approved {
    background-color: var(--color-success-light);
    color: #065f46;
}

.badge-rejected {
    background-color: var(--color-danger-light);
    color: #991b1b;
}

/* Wizard Multistep Styles */
.wizard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
    padding: 0 1rem;
}

.wizard-header::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 10%;
    right: 10%;
    height: 3px;
    background-color: #e2e8f0;
    z-index: 1;
}

.wizard-progress-bar {
    position: absolute;
    top: 25px;
    left: 10%;
    height: 3px;
    background-color: var(--color-primary);
    z-index: 2;
    transition: var(--transition-smooth);
}

.wizard-step-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 5;
    position: relative;
    cursor: pointer;
    flex: 1;
}

.wizard-step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 3px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--color-text-muted);
    font-size: 1.1rem;
    transition: var(--transition-smooth);
}

.wizard-step-label {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-align: center;
}

.wizard-step-node.active .wizard-step-circle {
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.15);
}

.wizard-step-node.active .wizard-step-label {
    color: var(--color-primary);
}

.wizard-step-node.completed .wizard-step-circle {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
}

.wizard-step-node.completed .wizard-step-label {
    color: var(--color-text-main);
}

/* File Upload Controls */
.file-upload-box {
    border: 2px dashed #cbd5e1;
    border-radius: var(--border-radius-md);
    padding: 2rem;
    text-align: center;
    background-color: #f8fafc;
    transition: var(--transition-smooth);
    position: relative;
    cursor: pointer;
}

.file-upload-box:hover {
    border-color: var(--color-primary);
    background-color: var(--color-primary-light);
}

.file-upload-icon {
    font-size: 2.5rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.file-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-selected-name {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-primary);
    font-weight: 500;
}

/* Modal and Utility Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-container {
    background-color: #ffffff;
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-premium);
    overflow: hidden;
}

/* Responsive elements */
@media (max-width: 768px) {
    .sidebar {
        display: none; /* simple sidebar toggle logic would be needed in JS for dynamic use */
    }
    .main-content {
        margin-left: 0;
    }
    .main-header {
        padding: 1rem;
    }
    .main-body {
        padding: 1rem;
    }
}

/* Custom Pagination Styling */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 1rem;
    font-family: var(--font-body);
}

.pagination-info {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.pagination-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination-link, .pagination-active, .pagination-disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    border: 1.5px solid #cbd5e1;
    background-color: #ffffff;
    color: var(--color-text-main);
    transition: var(--transition-smooth);
    cursor: pointer;
    text-decoration: none;
}

.pagination-link:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background-color: var(--color-primary-light);
}

.pagination-active {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
    cursor: default;
}

.pagination-active:hover {
    color: #ffffff;
    background-color: var(--color-primary);
}

.pagination-disabled {
    color: #94a3b8;
    background-color: #f8fafc;
    border-color: #e2e8f0;
    cursor: not-allowed;
}

.pagination-arrow svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}

@media (max-width: 640px) {
    .pagination-container {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
}
