/* SkillBasis - Modern SaaS Custom Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --primary-light: #EEF2FF;
    --secondary: #64748B;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #06B6D4;
    
    --dark-bg: #0F172A;
    --sidebar-bg: #1E293B;
    --sidebar-text: #94A3B8;
    --sidebar-active: #ffffff;
    --sidebar-active-bg: #312E81;

    --card-bg: #ffffff;
    --card-border: #E2E8F0;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --bg-main: #F8FAFC;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
}

/* App Wrapper Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar Styling */
.app-sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    z-index: 1000;
}

.sidebar-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    color: #ffffff;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.brand-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
    margin: 0;
}

.sidebar-menu {
    padding: 1rem 0.75rem;
    flex-grow: 1;
    overflow-y: auto;
}

.menu-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: #64748B;
    padding: 0.75rem 0.75rem 0.35rem 0.75rem;
}

.nav-link-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.nav-link-item:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.06);
}

.nav-link-item.active {
    color: #ffffff;
    background: linear-gradient(90deg, #4F46E5, #6366F1);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.nav-link-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* Main Content Area */
.app-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-header {
    height: 64px;
    background-color: #ffffff;
    border-bottom: 1px solid var(--card-border);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 900;
}

.header-search {
    width: 320px;
}

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

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3B82F6, #1D4ED8);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

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

/* Cards & Widgets */
.stat-card {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.stat-icon.primary { background-color: #EEF2FF; color: #4F46E5; }
.stat-icon.success { background-color: #ECFDF5; color: #10B981; }
.stat-icon.warning { background-color: #FFFBEB; color: #F59E0B; }
.stat-icon.info { background-color: #ECFEFF; color: #06B6D4; }

.stat-value {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-top: 0.25rem;
}

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

/* Table Styling */
.table-card {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-custom {
    margin-bottom: 0;
}

.table-custom th {
    background-color: #F8FAFC;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--card-border);
}

.table-custom td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    color: var(--text-primary);
    font-size: 0.9rem;
    border-bottom: 1px solid #F1F5F9;
}

/* Custom Badges */
.badge-role {
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-super_admin { background-color: #FEE2E2; color: #991B1B; }
.badge-admin { background-color: #FEF3C7; color: #92400E; }
.badge-teacher { background-color: #E0E7FF; color: #3730A3; }
.badge-student { background-color: #D1FAE5; color: #065F46; }
.badge-parent { background-color: #CFFAFE; color: #155E75; }

/* Status Badges */
.badge-status {
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-status.active, .badge-status.paid, .badge-status.present, .badge-status.valid, .badge-status.converted {
    background-color: #DCFCE7;
    color: #166534;
}

.badge-status.pending, .badge-status.partial, .badge-status.late, .badge-status.follow_up, .badge-status.interested {
    background-color: #FEF9C3;
    color: #854D0E;
}

.badge-status.overdue, .badge-status.absent, .badge-status.cancelled, .badge-status.closed {
    background-color: #FEE2E2;
    color: #991B1B;
}

/* Receipt Print View */
@media print {
    .app-sidebar, .app-header, .btn-no-print {
        display: none !important;
    }
    .app-content {
        margin: 0 !important;
        padding: 0 !important;
    }
    .printable-receipt {
        border: none !important;
        box-shadow: none !important;
    }
}
