/* ===================================
   SVIIT Institute ERP - Main Stylesheet
   Modern Professional Design with Mobile Optimization
   =================================== */

/* CSS Variables for Theme */
:root {
    /* Brand Colors */
    --primary-color: #FF0000;
    --primary-dark: #CC0000;
    --primary-light: #FF3333;
    --secondary-color: #0033FF;
    --secondary-dark: #0026CC;
    
    /* Neutral Colors */
    --dark: #1a1a2e;
    --dark-secondary: #16213e;
    --gray-dark: #2d3748;
    --gray: #4a5568;
    --gray-light: #718096;
    --gray-lighter: #cbd5e0;
    --gray-lightest: #e2e8f0;
    --white: #ffffff;
    --off-white: #f7fafc;
    
    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Spacing */
    --sidebar-width: 260px;
    --navbar-height: 70px;
    --mobile-bottom-nav-height: 60px;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* ===================================
   Base Styles & Reset
   =================================== */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--gray-dark);
    background-color: var(--off-white);
    overflow-x: hidden;
}

/* Better font rendering */
body, input, textarea, button {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   Typography
   =================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--dark);
    margin-bottom: 0.75rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

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

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

/* ===================================
   Layout Structure
   =================================== */

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--dark) 0%, var(--dark-secondary) 100%);
    color: var(--white);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: var(--shadow-xl);
    -webkit-overflow-scrolling: touch;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Firefox scrollbar */
.sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05);
}

/* Sidebar Header */
.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-logo {
    max-width: 160px;
    height: auto;
    margin-bottom: 0.75rem;
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.sidebar-tagline {
    font-size: 0.75rem;
    color: var(--secondary-color);
    font-weight: 600;
    margin-top: 0.25rem;
}

/* User Profile in Sidebar */
.sidebar-user {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    color: var(--gray-lighter);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Navigation Menu */
.sidebar-nav {
    padding: 1rem 0 calc(var(--mobile-bottom-nav-height) + 1rem) 0;
}

.nav-section-title {
    padding: 1rem 1.5rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-lighter);
    opacity: 0.7;
}

.nav-item {
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    color: rgba(255, 255, 255, 0.85);
    transition: var(--transition-fast);
    position: relative;
    gap: 1rem;
    font-size: 0.95rem;
}

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

.nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
}

.nav-link.active,
.nav-item.active .nav-link {
    background: linear-gradient(90deg, var(--primary-color), transparent);
    color: var(--white);
    font-weight: 600;
}

.nav-link.active::before,
.nav-item.active .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
}

.nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: var(--white);
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

/* Top Navbar */
.top-navbar {
    height: var(--navbar-height);
    background: var(--white);
    border-bottom: 1px solid var(--gray-lightest);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    min-width: 0;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-dark);
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition-fast);
}

.mobile-menu-toggle:hover {
    color: var(--primary-color);
}

.page-title-wrapper {
    flex: 1;
    min-width: 0;
}

.page-title-wrapper h1 {
    font-size: 1.5rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray);
    margin-top: 0.25rem;
    flex-wrap: wrap;
}

.breadcrumb-separator {
    color: var(--gray-lighter);
}

.breadcrumb a {
    color: var(--gray);
}

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

.navbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.navbar-search {
    position: relative;
    width: 300px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    pointer-events: none;
}

#global-search {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.75rem;
    border: 2px solid var(--gray-lightest);
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

#global-search:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.navbar-icons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    color: var(--gray-dark);
    transition: var(--transition-fast);
}

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

.icon-btn-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: var(--white);
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}

.navbar-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
}

.navbar-profile:hover {
    background: var(--off-white);
}

.navbar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--white);
    flex-shrink: 0;
}

.navbar-profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.navbar-profile-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.2;
}

.navbar-profile-role {
    font-size: 0.75rem;
    color: var(--gray);
    line-height: 1.2;
}

/* Profile Dropdown */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    min-width: 260px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-fast);
    z-index: 1000;
}

.navbar-profile.active .profile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--gray-lightest);
}

.profile-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.profile-email {
    font-size: 0.875rem;
    color: var(--gray);
}

.profile-dropdown-menu {
    list-style: none;
    padding: 0.5rem 0;
}

.profile-dropdown-item {
    list-style: none;
}

.profile-dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: var(--gray-dark);
    transition: var(--transition-fast);
    font-size: 0.9rem;
}

.profile-dropdown-link i {
    width: 18px;
    text-align: center;
    font-size: 1rem;
}

.profile-dropdown-link:hover {
    background: var(--off-white);
    color: var(--primary-color);
}

.profile-dropdown-link.danger {
    color: var(--danger);
}

.profile-dropdown-link.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.profile-dropdown-divider {
    height: 1px;
    background: var(--gray-lightest);
    margin: 0.5rem 0;
}

/* Content Container */
.content-container {
    flex: 1;
    padding: 2rem;
    max-width: 100%;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-lightest);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: var(--dark);
}

.card-body {
    padding: 1.5rem;
}

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

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition-fast);
    border-left: 4px solid var(--primary-color);
}

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

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

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

.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-change {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--danger);
}

/* Data Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table thead {
    background: var(--off-white);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--gray-dark);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--gray-lightest);
    white-space: nowrap;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-lightest);
    font-size: 0.95rem;
}

.data-table tbody tr {
    transition: var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--off-white);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.badge-info { background: rgba(59, 130, 246, 0.1); color: var(--info); }
.badge-secondary { background: var(--gray-lightest); color: var(--gray); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

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

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

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

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

.btn-sm {
    padding: 0.5rem 0.875rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border: 2px solid var(--gray-lightest);
    border-radius: var(--radius);
    transition: var(--transition-fast);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a5568' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

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

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-left-color: var(--success);
    color: #065f46;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: var(--danger);
    color: #991b1b;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: var(--warning);
    color: #92400e;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-left-color: var(--info);
    color: #1e40af;
}

/* ===================================
   Mobile Bottom Navigation
   =================================== */

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--mobile-bottom-nav-height);
    background: var(--white);
    border-top: 1px solid var(--gray-lightest);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    padding: 0;
}

.mobile-bottom-nav-container {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    height: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    text-decoration: none;
    color: var(--gray);
    transition: var(--transition-fast);
    position: relative;
    padding: 0.5rem 0.25rem;
}

.mobile-nav-item:hover,
.mobile-nav-item:active {
    background: var(--off-white);
}

.mobile-nav-item.active {
    color: var(--primary-color);
}

.mobile-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 0 0 3px 3px;
}

.mobile-nav-icon {
    font-size: 1.25rem;
    position: relative;
}

.mobile-nav-icon .icon-btn-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    font-size: 0.6rem;
    padding: 0.1rem 0.3rem;
    min-width: 16px;
}

.mobile-nav-label {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ===================================
   Login Page Styles
   =================================== */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-secondary) 100%);
    padding: 2rem;
}

.login-container {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    max-width: 1000px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.login-left {
    padding: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.login-logo {
    max-width: 180px;
    margin-bottom: 2rem;
}

.login-left h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.login-right {
    padding: 3rem;
}

.login-form h3 {
    margin-bottom: 2rem;
}

/* ===================================
   Responsive Design
   =================================== */

/* Tablet Landscape */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .navbar-search {
        width: 200px;
    }
    
    /* Show mobile bottom nav */
    .mobile-bottom-nav {
        display: block;
    }
    
    /* Add padding to content to prevent overlap with bottom nav */
    .content-container {
        padding-bottom: calc(var(--mobile-bottom-nav-height) + 2rem);
    }
    
    /* Backdrop overlay */
    body.sidebar-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
}

/* Mobile - Large */
@media (max-width: 768px) {
    :root {
        --navbar-height: 60px;
    }
    
    .content-container {
        padding: 1rem;
        padding-bottom: calc(var(--mobile-bottom-nav-height) + 1rem);
    }
    
    .top-navbar {
        padding: 0 1rem;
        height: var(--navbar-height);
    }
    
    .navbar-search {
        display: none;
    }
    
    .page-title-wrapper h1 {
        font-size: 1.25rem;
    }
    
    .breadcrumb {
        font-size: 0.75rem;
    }
    
    /* Hide some navbar items on mobile */
    .navbar-icons .icon-btn:not([data-tooltip="Notifications"]) {
        display: none;
    }
    
    .navbar-profile-info {
        display: none !important;
    }
    
    .navbar-profile .fa-chevron-down {
        display: none !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-value {
        font-size: 1.875rem;
    }
    
    .login-container {
        grid-template-columns: 1fr;
    }
    
    .login-left {
        display: none;
    }
    
    /* Stack two-column layouts on mobile */
    div[style*="grid-template-columns: 2fr 1fr"],
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Card adjustments */
    .card-header {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Make tables more mobile friendly */
    .table-responsive {
        margin: 0 -1rem;
        padding: 0 1rem;
    }
    
    .data-table {
        font-size: 0.85rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }
    
    /* Buttons */
    .btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
    
    /* Form groups */
    .form-group {
        margin-bottom: 1rem;
    }
}

/* Mobile - Small */
@media (max-width: 480px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.125rem; }
    
    .content-container {
        padding: 0.75rem;
        padding-bottom: calc(var(--mobile-bottom-nav-height) + 0.75rem);
    }
    
    .card {
        margin-bottom: 1rem;
        border-radius: var(--radius);
    }
    
    .card-header {
        padding: 0.875rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 0.875rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .data-table {
        font-size: 0.75rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem 0.25rem;
    }
    
    .btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.875rem;
    }
    
    /* Mobile nav labels smaller */
    .mobile-nav-label {
        font-size: 0.65rem;
    }
    
    /* Alerts */
    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* Landscape phone */
@media (max-width: 768px) and (orientation: landscape) {
    .mobile-bottom-nav {
        height: 50px;
    }
    
    .mobile-nav-icon {
        font-size: 1.1rem;
    }
    
    .mobile-nav-label {
        display: none;
    }
    
    .content-container {
        padding-bottom: calc(50px + 1rem);
    }
}

/* ===================================
   Utility Classes
   =================================== */

/* Prevent body scroll when sidebar is open on mobile */
body.sidebar-open {
    overflow: hidden;
}

body.sidebar-open::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mt-4 { margin-top: 2rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.mb-4 { margin-bottom: 2rem !important; }

.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.text-muted { color: var(--gray); }
.text-primary { color: var(--primary-color); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.fw-normal { font-weight: 400; }

.d-none { display: none !important; }
.d-md-block { display: block !important; }

@media (max-width: 768px) {
    .d-md-block { display: none !important; }
    .d-md-none { display: block !important; }
}

/* ===================================
   Print Styles
   =================================== */

@media print {
    .sidebar,
    .top-navbar,
    .mobile-bottom-nav,
    .btn,
    .icon-btn {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .content-container {
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
}