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

/* Modern Design Variables - Glassmorphic / Material Dark Theme */
:root {
    --bg-light: #08101E; /* Deeper space navy */
    --bg-white: rgba(17, 34, 54, 0.7); /* Frosted navy container background */
    --bg-card: rgba(22, 42, 66, 0.55); /* Lighter glass card background */
    --bg-sidebar: rgba(10, 20, 34, 0.85); /* Sidebar background */
    --border-color: rgba(59, 158, 232, 0.2); /* Translucent cyan-blue borders */
    --border-focus: #3B9EE8; /* Focused outline border */
    
    --primary: #1A6FBF; /* Vibrant blue accent */
    --primary-hover: #2988e2;
    --primary-gradient: linear-gradient(135deg, #1A6FBF 0%, #3B9EE8 100%);
    --primary-light: rgba(26, 111, 191, 0.2);
    --accent: #3B9EE8;
    
    --success: #10B981;
    --success-light: rgba(16, 185, 129, 0.15);
    --warning: #F59E0B;
    --warning-light: rgba(245, 158, 11, 0.15);
    --error: #EF4444;
    --error-light: rgba(239, 68, 68, 0.15);
    
    --text-main: #F3F4F6; /* Extremely legible cool light grey */
    --text-muted: #9CA3AF;
    --text-white: #ffffff;
    
    --scrollbar-thumb: #1F2937;
    --scrollbar-thumb-hover: #374151;

    /* Soft Premium Elevated Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(26, 111, 191, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(59, 158, 232, 0.08) 0%, transparent 45%);
    color: var(--text-main);
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

h1, h2, h3, h4, h5 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-white);
    font-weight: 700;
}

/* Layout Wrapper */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Glassmorphic Sidebar */
.sidebar {
    width: 270px;
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    padding: 30px 0 20px 0;
    position: fixed;
    height: 100vh;
    z-index: 100;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
    transition: var(--transition);
}

.sidebar-brand {
    padding: 0 24px 24px 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

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

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: var(--transition);
}

.sidebar-link:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.03);
    transform: translateX(4px);
}

.sidebar-link.active {
    color: var(--text-white);
    background: var(--primary-gradient);
    border-color: var(--border-color);
    box-shadow: 0 8px 20px rgba(26, 111, 191, 0.4);
    font-weight: 600;
}

.sidebar-footer {
    padding: 20px 24px 10px 24px;
    border-top: 1px solid var(--border-color);
}

/* Main Wrapper */
.main-wrapper {
    flex-grow: 1;
    margin-left: 270px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
}

/* Sticky Header */
.main-header {
    background: rgba(17, 34, 54, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.header-title h2 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Breadcrumb Styles */
.breadcrumb-container {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumb-item a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-item a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--text-main);
}

.breadcrumb-separator {
    color: rgba(59, 158, 232, 0.3);
}

/* Content Frame */
.content-body {
    padding: 35px;
    flex-grow: 1;
}

/* Clean Footer */
footer {
    padding: 24px 35px;
    border-top: 1px solid var(--border-color);
    background: rgba(17, 34, 54, 0.4);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Glass Cards (Material Elevated) */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    transition: var(--transition);
}

.glass-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(59, 158, 232, 0.35);
}

.card-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 15px;
}

.card-header-actions h2 {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Stat Capsules */
.badge {
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--primary-light);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 9999px;
    border: 1px solid rgba(59, 158, 232, 0.2);
}

/* Stats Container Grid */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 35px;
}

.stat-card {
    background: rgba(22, 42, 66, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
    background: rgba(22, 42, 66, 0.75);
}

.stat-icon {
    font-size: 1.8rem;
    background: var(--primary-gradient);
    color: var(--text-white);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 16px rgba(26, 111, 191, 0.35);
}

.stat-info .stat-value {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--text-white);
    font-family: 'Outfit', sans-serif;
    line-height: 1.2;
}

.stat-info .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* Modern Form Controls */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.form-control {
    width: 100%;
    background: rgba(13, 27, 42, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(59, 158, 232, 0.25);
    background: rgba(13, 27, 42, 0.95);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%239CA3AF' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    cursor: pointer;
}

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

/* Glassmorphic/Material Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 12px 22px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-white);
    border: 1px solid rgba(59, 158, 232, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 8px 24px rgba(26, 111, 191, 0.45);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(22, 42, 66, 0.5);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: var(--primary-light);
    border-color: var(--accent);
    color: var(--text-white);
}

.btn-success {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: var(--text-white);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
    filter: brightness(1.1);
}

.btn-danger {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: var(--text-white);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
    filter: brightness(1.1);
}

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

/* Premium Responsive Tables */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: rgba(17, 34, 54, 0.45);
    box-shadow: var(--shadow-sm);
}

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

th, td {
    padding: 18px 24px;
    font-size: 0.9rem;
    vertical-align: middle;
}

th {
    background: rgba(10, 20, 34, 0.7);
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-color);
}

td {
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

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

tr {
    transition: var(--transition);
}

tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.student-name {
    color: var(--text-white);
    font-weight: 600;
    font-size: 0.95rem;
}

.student-tag {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 4px;
}

.student-tag code {
    background: rgba(13, 27, 42, 0.6);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    color: var(--accent);
    border: 1px solid var(--border-color);
}

/* Modern Status Badge Capsules */
.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 9999px;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}

.status-completed {
    background: var(--success-light);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.25);
}

.status-pending {
    background: var(--warning-light);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.25);
}

/* Glassmorphic Modal Windows */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 10, 20, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: var(--transition);
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-card {
    background: rgba(17, 34, 54, 0.9);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: var(--radius-lg);
    width: 95%;
    max-width: 520px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.show .modal-card {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

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

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.6rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--error);
}

.modal-card form {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-right: 5px;
}

/* Toast Alerts */
.toast-container {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 380px;
    pointer-events: none;
}

.toast {
    background: rgba(17, 34, 54, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
}

.toast.show {
    transform: translateX(0);
}

.toast-icon {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.toast-success {
    border-left: 4px solid var(--success);
}
.toast-success .toast-icon {
    background: var(--success-light);
    color: var(--success);
}

.toast-error, .toast-danger {
    border-left: 4px solid var(--error);
}
.toast-error .toast-icon, .toast-danger .toast-icon {
    background: var(--error-light);
    color: var(--error);
}

.toast-content {
    flex-grow: 1;
    font-size: 0.9rem;
    font-weight: 500;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.toast-close:hover {
    color: var(--text-white);
}

/* Material Pagination Controls */
.pagination-wrapper {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
}

.page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    background: rgba(17, 34, 54, 0.4);
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.page-item .page-link:hover {
    border-color: var(--accent);
    color: var(--text-white);
    background: var(--primary-light);
}

.page-item.active .page-link {
    background: var(--primary-gradient);
    border-color: var(--border-focus);
    color: var(--text-white);
    box-shadow: 0 4px 12px rgba(26, 111, 191, 0.35);
}

.page-item.disabled .page-link {
    opacity: 0.35;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-muted);
    border-color: var(--border-color);
}

/* Glassmorphic Login / Auth Layout */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background-color: var(--bg-light);
    background-image: 
        radial-gradient(circle at 50% 25%, rgba(26, 111, 191, 0.15) 0%, transparent 60%);
}

.auth-card {
    background: rgba(17, 34, 54, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 420px;
    padding: 45px 40px;
    text-align: center;
    transition: var(--transition);
}

.auth-card:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border-color: rgba(59, 158, 232, 0.3);
}

.auth-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
}

.auth-logo img {
    max-height: 70px;
    width: auto;
    object-fit: contain;
}

.logo-fallback-icon {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-md);
    background: var(--primary-gradient);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 8px 24px rgba(26, 111, 191, 0.35);
    border: 1px solid rgba(59, 158, 232, 0.2);
}

.logo-fallback-small {
    background: var(--primary-gradient);
    color: var(--text-white);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Info notification banners */
.info-banner {
    background: rgba(26, 111, 191, 0.1);
    border: 1px solid rgba(59, 158, 232, 0.25);
    color: var(--text-main);
    padding: 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 25px;
}
.info-banner h4 {
    color: var(--accent);
    font-size: 1.05rem;
    margin-bottom: 8px;
}
.info-banner p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Modern Header user dropdown menu */
.header-user-dropdown {
    position: relative;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(22, 42, 66, 0.4);
    border: 1px solid var(--border-color);
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 9999px;
    transition: var(--transition);
}

.dropdown-trigger:hover {
    background: var(--primary-light);
    border-color: var(--accent);
}

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(26, 111, 191, 0.3);
}

.username-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-white);
}

.arrow-down {
    font-size: 0.6rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.header-user-dropdown.active .arrow-down {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: rgba(17, 34, 54, 0.95);
    backdrop-filter: blur(25px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 220px;
    display: none;
    flex-direction: column;
    padding: 8px 0;
    z-index: 1000;
    transform: translateY(-10px);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.header-user-dropdown.active .dropdown-menu {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}

.dropdown-header {
    padding: 12px 18px;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 6px;
}

.dropdown-item {
    padding: 10px 18px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-item:hover {
    background: var(--primary-light);
    color: var(--text-white);
}

.dropdown-item.logout-btn:hover {
    background: var(--error-light) !important;
    color: var(--error) !important;
}

/* Breadcrumbs (Glass style) */
.breadcrumb-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 24px;
    background: rgba(17, 34, 54, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
    font-size: 0.85rem;
}

.breadcrumb-item {
    font-weight: 500;
    display: flex;
    align-items: center;
}

.breadcrumb-item a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

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

.breadcrumb-item.active {
    color: var(--text-muted);
    font-weight: 600;
}

.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.15);
    font-weight: 400;
    user-select: none;
}

/* Spinner */
.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--text-white);
    animation: btn-spin 0.8s linear infinite;
    vertical-align: middle;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* RESPONSIVE DESIGN - Collapsible drawers and tables */
.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(22, 42, 66, 0.5);
    border: 1px solid var(--border-color);
    font-size: 1.25rem;
    color: var(--text-white);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    background: rgba(22, 42, 66, 0.8);
}

.sidebar-close-btn {
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: 1.8rem;
    color: var(--text-white);
    opacity: 0.7;
    cursor: pointer;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    opacity: 1;
}

@media (max-width: 991px) {
    .sidebar {
        left: -270px;
        top: 0;
        transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1100;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .main-wrapper {
        margin-left: 0;
        width: 100%;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .sidebar-close-btn {
        display: flex;
    }
    
    .main-header {
        padding: 10px 20px;
    }
    
    .content-body {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .header-title {
        display: none;
    }

    h1, h2, h3 {
        font-size: 1.25rem !important;
    }
    
    .card-header-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .card-header-actions .btn {
        width: 100%;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    /* Table transformations on small screens */
    th, td {
        padding: 12px 16px;
        font-size: 0.85rem;
    }
    
    .modal-card {
        padding: 20px;
        width: 90%;
        max-height: 80vh;
    }
    
    .auth-card {
        padding: 30px 20px;
    }
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 550;
    margin-bottom: 20px;
    text-align: left;
    border: 1px solid transparent;
}
.alert-error {
    background: var(--error-light);
    color: var(--error);
    border-color: rgba(239, 68, 68, 0.25);
}
.alert-success {
    background: var(--success-light);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.25);
}

