/* ============================================
   LOAN FINANCE - UNIFIED PURPLE THEME
   Modern, responsive admin dashboard
   ============================================ */

/* CSS Variables - Unified Color Theme */
:root {
    /* Core Theme Colors - Purple/Violet Gradient Base */
    --theme-primary: #667eea;
    --theme-primary-dark: #5a67d8;
    --theme-primary-light: #7c3aed;
    --theme-secondary: #764ba2;
    --theme-accent: #8b5cf6;
    
    /* Gradient Definitions */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-primary-hover: linear-gradient(135deg, #5a67d8 0%, #6b4190 100%);
    --gradient-sidebar: linear-gradient(180deg, #667eea 0%, #764ba2 50%, #553c7a 100%);
    --gradient-card: linear-gradient(135deg, #667eea 0%, #8b5cf6 100%);
    
    /* UI Colors */
    --sidebar-width: 300px;
    --sidebar-bg: #553c7a;
    --sidebar-hover: rgba(255, 255, 255, 0.1);
    --sidebar-active: rgba(255, 255, 255, 0.2);
    --header-bg: #ffffff;
    --content-bg: #f8fafc;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    
    /* Status Colors */
    --primary: #667eea;
    --primary-light: #e0e7ff;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #06b6d4;
    --info-light: #cffafe;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-dark);
    background: var(--content-bg);
}

/* Layout Wrapper */
.admin-wrapper {
    display: block;
    min-height: 100vh;
}

/* Sidebar - Unified Purple Theme */
.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--gradient-sidebar);
    color: #fff;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.sidebar-nav {
    padding: 15px 0;
}

.sidebar-nav a {
    display: block;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: var(--sidebar-hover);
    color: #fff;
    border-left-color: var(--sidebar-active);
}

.sidebar-nav i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Main Content Area */
.admin-main {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
}

.admin-content {
    padding: 25px;
}

/* Mobile Header */
.mobile-header {
    display: none;
    background: var(--sidebar-bg);
    color: #fff;
    padding: 15px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
}

.mobile-header .btn-link {
    color: #fff;
    font-size: 20px;
}

.mobile-title {
    font-weight: 600;
    font-size: 16px;
}

/* Cards */
.card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: #f8f9fa;
    border-bottom: 2px solid var(--border-color);
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.table td {
    border-bottom: 1px solid var(--border-color);
    padding: 12px;
    vertical-align: middle;
}

.table tr:hover {
    background: #f8f9fa;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    background: var(--gradient-primary-hover);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
    transform: translateY(-1px);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
}

/* Forms */
.form-control {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 14px;
}

.form-control:focus {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 5px;
}

/* Alerts */
.alert {
    border-radius: 4px;
    padding: 12px 15px;
    margin-bottom: 15px;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.page-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

/* Stats Cards - Unified Purple Theme */
.stats-card {
    background: var(--gradient-primary);
    color: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.stats-card h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
}

.stats-card p {
    margin: 0;
    opacity: 0.9;
}

/* Responsive Breakpoints for 6" to 32" screens */

/* Small phones (6" - 320px to 375px) */
@media (max-width: 375px) {
    body { font-size: 13px; }
    .admin-content { padding: 10px; }
    .card-body { padding: 12px; }
    .table th, .table td { padding: 8px; font-size: 12px; }
    .btn { padding: 6px 10px; font-size: 12px; }
}

/* Phones (6"-7" - 376px to 480px) */
@media (min-width: 376px) and (max-width: 480px) {
    body { font-size: 14px; }
    .admin-content { padding: 12px; }
    .card-body { padding: 15px; }
    .table th, .table td { padding: 10px; }
}

/* Large phones / Small tablets (7"-8" - 481px to 600px) */
@media (min-width: 481px) and (max-width: 600px) {
    .admin-content { padding: 15px; }
    .card-body { padding: 18px; }
}

/* Tablets (9"-11" - 601px to 768px) */
@media (min-width: 601px) and (max-width: 768px) {
    .admin-content { padding: 20px; }
    .sidebar-brand h4 { font-size: 16px; }
}

/* Large tablets / Small laptops (12"-13" - 769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    :root { --sidebar-width: 260px; }
    .admin-content { padding: 22px; }
    .page-header h2 { font-size: 20px; }
}

/* Laptops (14"-15" - 1025px to 1366px) */
@media (min-width: 1025px) and (max-width: 1366px) {
    :root { --sidebar-width: 280px; }
    .admin-content { padding: 50px; }
    .page-header h2 { font-size: 22px; }
}

/* Desktops (16"-24" - 1367px to 1920px) */
@media (min-width: 1367px) and (max-width: 1920px) {
    :root { --sidebar-width: 300px; }
    .admin-content { padding: 30px; }
    .container { max-width: 1400px; }
}

/* Large monitors (24"-32" - 1921px and above) */
@media (min-width: 1921px) {
    :root { --sidebar-width: 320px; }
    body { font-size: 16px; }
    .admin-content { padding: 40px; }
    .container { max-width: 1600px; }
    .card-body { padding: 30px; }
    .table th, .table td { padding: 15px; }
    .btn { padding: 12px 24px; font-size: 16px; }
}

/* ============================================
   MOBILE MENU STYLES
   Full Navigation Overlay for Mobile & Tablet
   ============================================ */

/* Mobile Header */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    z-index: 1030;
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu-toggle {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.mobile-menu-toggle i {
    font-size: 24px;
}

.mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
}

.mobile-logo {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.mobile-title {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.mobile-user {
    display: flex;
    align-items: center;
}

.mobile-user .user-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

/* Mobile Sidebar Overlay */
.mobile-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1031;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* Mobile Sidebar */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    z-index: 1032;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mobile-sidebar.show {
    transform: translateX(0);
}

.mobile-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-sidebar-brand .brand-logo {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 700;
}

.mobile-sidebar-brand .brand-info {
    display: flex;
    flex-direction: column;
}

.mobile-sidebar-brand .brand-name {
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.mobile-sidebar-brand .brand-tagline {
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
}

.mobile-sidebar-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-sidebar-close i {
    font-size: 24px;
}

.mobile-sidebar-user {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 14px;
}

.mobile-sidebar-user .user-avatar-large {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.mobile-sidebar-user .user-info {
    display: flex;
    flex-direction: column;
}

.mobile-sidebar-user .user-name {
    color: white;
    font-size: 16px;
    font-weight: 600;
}

.mobile-sidebar-user .user-role {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.mobile-sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.mobile-sidebar-nav .nav-section {
    margin-bottom: 8px;
}

.mobile-sidebar-nav .nav-section-title {
    display: block;
    padding: 8px 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
}

.mobile-sidebar-nav .nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-sidebar-nav .nav-item {
    margin: 2px 0;
}

.mobile-sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.mobile-sidebar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: rgba(255, 255, 255, 0.3);
}

.mobile-sidebar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: white;
}

.mobile-sidebar-nav .nav-link i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.mobile-sidebar-nav .nav-link.active i {
    color: #a7f3d0;
}

.mobile-sidebar-nav .nav-badge {
    margin-left: auto;
    background: #fbbf24;
    color: #92400e;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
}

.mobile-sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

.mobile-sidebar-footer .language-switcher {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.mobile-sidebar-footer .lang-form {
    flex: 1;
}

.mobile-sidebar-footer .lang-btn {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-sidebar-footer .lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-sidebar-footer .lang-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: #059669;
    border-color: rgba(255, 255, 255, 0.9);
}

.mobile-sidebar-footer .logout-btn {
    width: 100%;
    padding: 12px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #fca5a5;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mobile-sidebar-footer .logout-btn:hover {
    background: rgba(239, 68, 68, 0.3);
}

.mobile-sidebar-footer .logout-btn i {
    font-size: 18px;
}

/* Mobile Layout (below 768px) */
@media (max-width: 767.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .admin-sidebar.show {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
        padding-top: 60px;
    }
    
    .mobile-header {
        display: flex;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ============================================
   UNIFIED PURPLE SIDEBAR NAVIGATION
   Modern, vibrant purple theme design
   ============================================ */

/* Sidebar Container - Purple Theme - FIXED */
.aquiry-sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    max-height: 100vh;
    background: var(--gradient-sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    box-shadow: 4px 0 20px rgba(102, 126, 234, 0.3);
    overflow: hidden;
}

/* Logo Header - Purple Theme */
.aquiry-sidebar .aquiry-sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
}

.aquiry-sidebar .aquiry-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.aquiry-sidebar .aquiry-logo {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 700;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.aquiry-sidebar .aquiry-brand-text {
    font-size: 20px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
}

/* User Profile Card - Green Theme */
.aquiry-sidebar .aquiry-user-profile {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 14px;
}

.aquiry-sidebar .aquiry-avatar {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.aquiry-sidebar .aquiry-user-info h6 {
    font-size: 15px;
    font-weight: 600;
    color: white;
    margin: 0 0 4px 0;
}

.aquiry-sidebar .aquiry-user-info span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

/* Navigation Menu - Green Theme - FIXED */
.aquiry-sidebar .aquiry-nav {
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(100vh - 190px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.55) rgba(255, 255, 255, 0.14);
    overscroll-behavior: contain;
}

.aquiry-sidebar .aquiry-nav-section {
    margin-bottom: 28px;
}

.aquiry-sidebar .aquiry-nav-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    padding: 0 12px;
    margin-bottom: 10px;
    display: block;
}

.aquiry-sidebar .aquiry-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aquiry-sidebar .aquiry-nav-list li {
    margin-bottom: 4px;
}

.aquiry-sidebar .aquiry-nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s ease;
    position: relative;
    min-height: 44px;
}

.aquiry-sidebar .aquiry-nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateX(4px);
}

.aquiry-sidebar .aquiry-nav-link.active {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.aquiry-sidebar .aquiry-nav-link i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.aquiry-sidebar .aquiry-nav-link.active i {
    color: #a7f3d0;
}

.aquiry-sidebar .aquiry-badge {
    margin-left: auto;
    background: #fbbf24;
    color: #92400e;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

/* Sidebar Footer - Green Theme */
.aquiry-sidebar .aquiry-sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

.aquiry-sidebar .aquiry-footer-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.aquiry-sidebar .aquiry-lang-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.2s ease;
}

.aquiry-sidebar .aquiry-lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.aquiry-sidebar .aquiry-lang-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: #059669;
    border-color: rgba(255, 255, 255, 0.9);
}

.aquiry-sidebar .aquiry-logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #fca5a5;
    cursor: pointer;
    transition: all 0.2s ease;
}

.aquiry-sidebar .aquiry-logout-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.4);
}

/* Scrollbar Styling */
.aquiry-sidebar .sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.aquiry-sidebar .sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.aquiry-sidebar .sidebar-nav::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}

.aquiry-sidebar .sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .aquiry-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .aquiry-sidebar.open {
        transform: translateX(0);
    }
}

/* ============================================
   CREATIVE SIDEBAR NAVIGATION STYLES
   ============================================ */

/* Creative Sidebar Container */
.creative-sidebar {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
}

/* Sidebar Header with Gradient */
.sidebar-header-creative {
    position: relative;
    padding: 30px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.sidebar-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.header-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}

.header-shape.shape-1 {
    width: 150px;
    height: 150px;
    top: -50px;
    right: -30px;
}

.header-shape.shape-2 {
    width: 100px;
    height: 100px;
    bottom: -30px;
    left: 20px;
}

.sidebar-brand-creative {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-icon {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.brand-text h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.brand-text span {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
}

/* Navigation Menu */
.sidebar-nav-creative {
    flex: 1;
    overflow-y: auto;
    padding: 20px 15px;
}

.nav-section {
    margin-bottom: 25px;
}

.section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    margin-bottom: 10px;
    padding-left: 10px;
}

.nav-items {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 10px;
    text-decoration: none;
    color: #475569;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.nav-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.nav-item:hover .item-icon {
    background: #e2e8f0;
}

.nav-item.active .item-icon {
    background: rgba(255,255,255,0.2);
}

.item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-title {
    font-size: 14px;
    font-weight: 500;
}

.item-desc {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

.nav-item.active .item-desc {
    color: rgba(255,255,255,0.8);
}

.item-badge {
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.item-arrow {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.nav-item:hover .item-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Sidebar Footer */
.sidebar-footer-creative {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.language-switcher {
    margin-bottom: 15px;
}

.switcher-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.language-options {
    display: flex;
    gap: 8px;
}

.lang-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.lang-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.logout-form {
    margin-top: 10px;
}

.logout-btn {
    width: 100%;
    padding: 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #fef2f2;
    border-color: #fecaca;
}

.logout-btn i {
    font-size: 18px;
}

/* Desktop sidebar always visible */
@media (min-width: 768px) {
    .aquiry-sidebar {
        transform: none !important;
    }

    .admin-main {
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
    }
}

/* Scrollbar Styling */
.aquiry-sidebar .aquiry-nav::-webkit-scrollbar,
.aquiry-nav::-webkit-scrollbar {
    width: 8px;
}

.aquiry-sidebar .aquiry-nav::-webkit-scrollbar-track,
.aquiry-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
}

.aquiry-sidebar .aquiry-nav::-webkit-scrollbar-thumb,
.aquiry-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.55);
    border-radius: 8px;
}

.aquiry-sidebar .aquiry-nav::-webkit-scrollbar-thumb:hover,
.aquiry-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.75);
}

.aquiry-nav::-webkit-scrollbar-corner {
    background: transparent;
}

.mobile-sidebar-nav::-webkit-scrollbar {
    width: 10px;
    -webkit-appearance: none;
}

.mobile-sidebar-nav::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    margin: 4px 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-sidebar-nav::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.5) 100%);
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.12);
    min-height: 48px;
}

.mobile-sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.65) 100%);
}

/* Mobile */
@media (max-width: 768px) {
    .aquiry-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .aquiry-sidebar.open {
        transform: translateX(0);
    }
}

/* ============================================
   MOPHY-STYLE FORM COMPONENTS
   Modern, clean form styling with purple theme
   ============================================ */

/* Form Card Container */
.form-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    margin-bottom: 24px;
}

.form-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 24px 28px;
    color: white;
    position: relative;
    overflow: hidden;
}

.form-card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.form-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-card-subtitle {
    font-size: 0.875rem;
    opacity: 0.9;
    margin: 8px 0 0 0;
    position: relative;
    z-index: 1;
}

.form-card-body {
    padding: 28px;
}

/* Form Group */
.form-group {
    margin-bottom: 24px;
}

.form-group:last-child {
    margin-bottom: 0;
}

/* Form Label */
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.form-label.required::after {
    content: '*';
    color: #ef4444;
    margin-left: 4px;
}

/* Form Input */
.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.5;
    color: #1f2937;
    background-color: #ffffff;
    background-clip: padding-box;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    transition: all 0.2s ease-in-out;
}

.form-control:focus {
    color: #1f2937;
    background-color: #ffffff;
    border-color: #667eea;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.form-control::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.form-control:disabled,
.form-control[readonly] {
    background-color: #f3f4f6;
    opacity: 1;
}

/* Input Sizes */
.form-control-lg {
    padding: 14px 18px;
    font-size: 1rem;
    border-radius: 12px;
}

.form-control-sm {
    padding: 8px 12px;
    font-size: 0.875rem;
    border-radius: 8px;
}

/* Select */
select.form-control {
    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='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 20px 20px;
    padding-right: 40px;
}

/* Textarea */
textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Input Group */
.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group > .form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.5;
    color: #6b7280;
    text-align: center;
    white-space: nowrap;
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 10px;
}

.input-group > .form-control:not(:first-child),
.input-group > .input-group-text:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group > .form-control:not(:last-child),
.input-group > .input-group-text:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.form-check-input[type="checkbox"],
.form-check-input[type="radio"] {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-check-input[type="radio"] {
    border-radius: 50%;
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5 10L9 14L15 6' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
}

.form-check-input:checked[type="radio"] {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='10' cy='10' r='5' fill='white'/%3e%3c/svg%3e");
}

.form-check-label {
    font-size: 0.9375rem;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.form-check-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-check-input:disabled + .form-check-label {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Switch Toggle */
.form-switch {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-switch .form-check-input {
    width: 44px;
    height: 24px;
    border-radius: 12px;
    position: relative;
    background-image: none;
    border: 2px solid #d1d5db;
}

.form-switch .form-check-input::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #9ca3af;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.form-switch .form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.form-switch .form-check-input:checked::before {
    left: 22px;
    background: white;
}

/* Form Row & Grid */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -12px;
    margin-left: -12px;
}

.form-row > .col,
.form-row > [class*="col-"] {
    padding-right: 12px;
    padding-left: 12px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

/* Form Actions */
.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 0 0 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 24px;
}

.form-actions-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-actions-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Help Text */
.form-text {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-top: 6px;
}

.form-text-primary {
    color: #667eea;
}

/* Valid/Invalid States */
.form-control.is-valid {
    border-color: #10b981;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%2310b981' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 10l4 4L15 6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
    padding-right: 40px;
}

.form-control.is-invalid {
    border-color: #ef4444;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23ef4444' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 6l8 8M14 6l-8 8'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
    padding-right: 40px;
}

.valid-feedback {
    color: #10b981;
    font-size: 0.8125rem;
    margin-top: 6px;
}

.invalid-feedback {
    color: #ef4444;
    font-size: 0.8125rem;
    margin-top: 6px;
}

/* File Input */
.form-file {
    position: relative;
}

.form-file-input {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 44px;
    margin: 0;
    opacity: 0;
}

.form-file-label {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1;
    height: 44px;
    padding: 10px 16px;
    font-weight: 400;
    line-height: 1.5;
    color: #6b7280;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    cursor: pointer;
}

.form-file-label::after {
    content: 'Browse';
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    padding: 6px 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
}

/* Form Divider */
.form-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.form-divider::before {
    margin-right: 16px;
}

.form-divider::after {
    margin-left: 16px;
}

/* Form Section */
.form-section {
    margin-bottom: 32px;
}

.form-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

/* ============================================
   ENHANCED RESPONSIVE DESIGN
   Mobile-First Approach with Breakpoint Optimization
   ============================================ */

/* Extra Small Devices (Phones, 320px - 374px) */
@media (max-width: 374px) {
    /* Base adjustments */
    html { font-size: 14px; }
    
    body { 
        font-size: 13px; 
        line-height: 1.4;
    }
    
    /* Content areas */
    .admin-content { 
        padding: 8px; 
        margin-top: 50px;
    }
    
    /* Cards */
    .card { 
        margin-bottom: 12px; 
        border-radius: 10px;
    }
    
    .card-body { 
        padding: 12px; 
    }
    
    .card-header {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    /* Tables - Make scrollable */
    .table-responsive {
        border: none;
        margin-bottom: 0;
    }
    
    .table {
        font-size: 11px;
    }
    
    .table th,
    .table td { 
        padding: 6px 8px; 
        white-space: nowrap;
    }
    
    /* Forms */
    .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 10px 12px;
        border-radius: 8px;
    }
    
    .form-label {
        font-size: 12px;
        margin-bottom: 4px;
    }
    
    .form-group {
        margin-bottom: 14px;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 16px;
        font-size: 13px;
        border-radius: 8px;
    }
    
    .btn-sm {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .btn-lg {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    /* Sidebar - Mobile overlay */
    .aquiry-sidebar {
        width: var(--sidebar-width);
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 9999;
    }
    
    .aquiry-sidebar.show {
        transform: translateX(0);
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    /* Mobile Header */
    .mobile-header {
        display: flex;
        align-items: center;
        padding: 10px 12px;
        height: 50px;
    }
    
    .mobile-header .btn-link {
        font-size: 20px;
        padding: 4px 8px;
    }
    
    /* Page Header */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 15px;
        padding-bottom: 12px;
    }
    
    .page-header h2 {
        font-size: 18px;
    }
    
    /* Dashboard Hero */
    .dashboard-hero-v2 {
        padding: 16px;
        margin-bottom: 16px;
        border-radius: 12px;
    }
    
    .welcome-text .greeting {
        font-size: 12px;
    }
    
    .welcome-text .user-name {
        font-size: 20px;
    }
    
    .date-time .date {
        font-size: 11px;
    }
    
    .date-time .time {
        font-size: 16px;
    }
    
    /* Stats Cards */
    .stats-grid-v2 {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 16px;
    }
    
    .stat-card-v2 {
        padding: 14px;
        border-radius: 10px;
    }
    
    .stat-icon {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }
    
    .stat-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .stat-trend {
        font-size: 10px;
    }
    
    /* Form Cards Mobile */
    .form-card {
        border-radius: 10px;
        margin-bottom: 16px;
    }
    
    .form-card-header {
        padding: 14px 16px;
    }
    
    .form-card-title {
        font-size: 15px;
    }
    
    .form-card-subtitle {
        font-size: 12px;
    }
    
    .form-card-body {
        padding: 16px;
    }
    
    /* Form Elements Mobile */
    .form-group {
        margin-bottom: 14px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 8px;
        padding-top: 16px;
        margin-top: 16px;
    }
    
    .form-actions-left,
    .form-actions-right {
        width: 100%;
        justify-content: stretch;
    }
    
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Input Groups Mobile */
    .input-group {
        flex-direction: column;
    }
    
    .input-group > .form-control,
    .input-group > .input-group-text {
        width: 100%;
        border-radius: 8px !important;
        margin-bottom: 4px;
    }
    
    /* Tables Mobile */
    .table-card {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-card .table {
        min-width: 600px;
    }
    
    /* Grid Mobile */
    .row {
        margin-left: -8px;
        margin-right: -8px;
    }
    
    .col,
    [class*="col-"] {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    /* Modal Mobile */
    .modal-dialog {
        margin: 8px;
    }
    
    .modal-content {
        border-radius: 12px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 14px;
    }
    
    /* Toast Notifications Mobile */
    .toast-container {
        left: 8px;
        right: 8px;
        top: 8px;
    }
    
    .toast {
        width: 100%;
        border-radius: 8px;
    }
}

/* Small Phones (375px - 480px) */
@media (min-width: 375px) and (max-width: 480px) {
    html { font-size: 15px; }
    
    .admin-content {
        padding: 12px;
    }
    
    .stats-grid-v2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-card-v2 {
        padding: 16px;
    }
    
    .form-card-body {
        padding: 18px;
    }
}

/* Tablets (481px - 767px) */
@media (min-width: 481px) and (max-width: 767.98px) {
    html { font-size: 15.5px; }
    
    .admin-content {
        padding: 18px;
        margin-left: 0;
    }
    
    /* Sidebar becomes overlay */
    .aquiry-sidebar {
        width: var(--sidebar-width);
        transform: translateX(-100%);
        z-index: 9999;
    }
    
    .aquiry-sidebar.show {
        transform: translateX(0);
    }
    
    /* Stats grid 2 columns */
    .stats-grid-v2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .stat-card-v2 {
        padding: 18px;
    }
    
    /* Dashboard hero */
    .dashboard-hero-v2 {
        padding: 24px;
    }
    
    .welcome-text .user-name {
        font-size: 26px;
    }
    
    /* Form cards */
    .form-card {
        margin-bottom: 20px;
    }
    
    .form-card-body {
        padding: 24px;
    }
    
    /* Tables */
    .table-card {
        overflow-x: auto;
    }
    
    /* Grid adjustments */
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .col,
    [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Modal adjustments */
    .modal-dialog {
        max-width: 90%;
        margin: 20px auto;
    }
}

/* Large Tablets / Small Laptops (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    :root { --sidebar-width: 260px; }
    
    .admin-content {
        padding: 24px;
    }
    
    .stats-grid-v2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
    
    /* Form grid adjustments */
    .form-row > .col,
    .form-row > [class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn,
    .form-control,
    .nav-link,
    .dropdown-item {
        min-height: 44px;
    }
    
    /* Remove hover effects */
    .btn:hover,
    .card:hover,
    .stat-card-v2:hover {
        transform: none;
    }
    
    /* Larger checkboxes and radios */
    .form-check-input {
        width: 22px;
        height: 22px;
    }
}

/* High DPI / Retina Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .form-control,
    .btn,
    .card {
        border-width: 0.5px;
    }
}

/* Print Styles */
@media print {
    .admin-sidebar,
    .mobile-header,
    .btn,
    .form-actions {
        display: none !important;
    }
    
    .admin-main {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    .card {
        border: 1px solid #ddd;
        break-inside: avoid;
    }
}

/* Dark Mode Support (System Preference) */
@media (prefers-color-scheme: dark) {
    /* Uncomment when dark mode is implemented */
    /*
    :root {
        --sidebar-bg: #1a1a2e;
        --content-bg: #16162a;
        --text-dark: #e0e0e0;
    }
    */
}

/* Reduced Motion Support (Accessibility) */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Landscape Mode Optimizations */
@media (max-height: 500px) and (orientation: landscape) {
    .mobile-header {
        position: relative;
    }
    
    .admin-content {
        margin-top: 0;
    }
    
    .stats-grid-v2 {
        grid-template-columns: repeat(4, 1fr);
    }
}
