:root {
    --primary: #4361ee;
    --primary-dark: #3a0ca3;
    --primary-light: #4895ef;
    --secondary: #7209b7;
    --success: #4cc9f0;
    --success-dark: #3a86ff;
    --danger: #f72585;
    --danger-dark: #b5179e;
    --warning: #f8961e;
    --warning-dark: #f3722c;
    --info: #4895ef;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 30px 80px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 2rem;
}

.loading-logo i {
    font-size: 3rem;
    background: linear-gradient(135deg, #fff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-logo h2 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-screen p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Header Styles */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--dark);
    padding: 1rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo i {
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--dark);
}

.user-avatar i {
    font-size: 1.2rem;
    color: var(--primary);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), var(--danger-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(247, 37, 133, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(247, 37, 133, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), var(--success-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(76, 201, 240, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 201, 240, 0.4);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    gap: 6px;
}

/* Alert Styles */
.alert {
    padding: 16px 20px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1.5rem;
    border: none;
    box-shadow: var(--shadow);
    animation: slideInDown 0.5s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    border-left: 4px solid #ffc107;
}

/* Login Form Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 450px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.3);
}

.login-logo i {
    font-size: 2.5rem;
    color: white;
}

.login-header h2 {
    color: var(--dark);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--gray);
    font-size: 1rem;
}

.login-form-content {
    margin-bottom: 2rem;
}

.login-btn {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    margin-top: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--light-gray);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.form-text {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 4px;
}

/* Login Help */
.login-help {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--light);
    border-radius: var(--border-radius-sm);
    border-left: 4px solid var(--primary);
}

.login-help h4 {
    margin-bottom: 1rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.credentials-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.credential-item {
    padding: 0.75rem;
    background: white;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--light-gray);
    font-size: 0.9rem;
}

/* Dashboard Styles */
.dashboard {
    padding: 2rem 0;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.welcome-section h2 {
    color: white;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.welcome-section p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

.dashboard-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.stat-icon.primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.stat-icon.success {
    background: linear-gradient(135deg, var(--success), var(--success-dark));
}

.stat-icon.warning {
    background: linear-gradient(135deg, var(--warning), var(--warning-dark));
}

.stat-icon.danger {
    background: linear-gradient(135deg, var(--danger), var(--danger-dark));
}

.stat-info {
    flex: 1;
}

.stat-info h3 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    color: var(--dark);
    font-weight: 700;
}

.stat-info p {
    color: var(--gray);
    font-size: 1rem;
    font-weight: 500;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #28a745;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

.quick-stat {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.quick-stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.quick-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
}

.quick-stat-icon.low-stock {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
}

.quick-stat-icon.out-of-stock {
    background: linear-gradient(135deg, #dc3545, #e83e8c);
}

.quick-stat-info h4 {
    font-size: 1.5rem;
    margin-bottom: 4px;
    color: var(--dark);
    font-weight: 700;
}

.quick-stat-info p {
    color: var(--gray);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Tabs Navigation */
.tabs-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 0;
}

.tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    flex: 1;
    min-width: 160px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--gray);
    white-space: nowrap;
    position: relative;
}

.tab.active {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
    background: rgba(67, 97, 238, 0.05);
}

.tab:hover:not(.active) {
    background: rgba(67, 97, 238, 0.05);
    color: var(--primary);
}

.tab-badge {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

/* Tab Content */
.tab-content {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.table-header h3 {
    color: var(--dark);
    font-size: 1.5rem;
    font-weight: 600;
}

.table-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: var(--gray);
    z-index: 1;
}

.search-box input {
    padding: 10px 12px 10px 36px;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    width: 250px;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.table-count {
    background: var(--primary);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.table-actions {
    display: flex;
    gap: 10px;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: relative;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
    background: white;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

th, td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

th {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
    white-space: nowrap;
}

tr {
    transition: var(--transition);
}

tr:hover {
    background: rgba(67, 97, 238, 0.03);
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Product Image */
.product-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--light-gray);
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-image:hover img {
    transform: scale(1.1);
}

/* Category Tag */
.category-tag {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Status Styles */
.status-in-stock, 
.status-active, 
.status-completed { 
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-block;
}

.status-low-stock { 
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: white;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-block;
}

.status-out-of-stock,
.status-inactive { 
    background: linear-gradient(135deg, #dc3545, #e83e8c);
    color: white;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-block;
}

.status-discontinued { 
    background: linear-gradient(135deg, #6c757d, #868e96);
    color: white;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-block;
}

/* Stock Badges */
.stock-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.8rem;
    display: inline-block;
}

.stock-high {
    background: #d4edda;
    color: #155724;
}

.stock-low {
    background: #fff3cd;
    color: #856404;
}

.stock-out {
    background: #f8d7da;
    color: #721c24;
}

/* Role Badges */
.role-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    color: white;
    display: inline-block;
}

.role-admin {
    background: linear-gradient(135deg, var(--danger), var(--danger-dark));
}

.role-seller {
    background: linear-gradient(135deg, var(--success), var(--success-dark));
}

.role-user {
    background: linear-gradient(135deg, var(--warning), var(--warning-dark));
}

/* Current User Badge */
.current-user-badge {
    background: var(--primary);
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 4px;
}

/* User Avatar */
.user-avatar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar i {
    color: var(--primary);
    font-size: 1.1rem;
}

/* Rating Styles */
.rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.rating-stars .fa-star {
    color: #ddd;
    font-size: 0.9rem;
}

.rating-stars .fa-star.active {
    color: #ffc107;
}

.rating-value {
    font-size: 0.85rem;
    color: var(--gray);
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.category-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
    border-left: 4px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(67, 97, 238, 0.05), transparent);
    transition: left 0.5s;
}

.category-card:hover::before {
    left: 100%;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.category-info {
    flex: 1;
}

.category-info h4 {
    color: var(--dark);
    margin-bottom: 4px;
    font-weight: 600;
}

.category-info p {
    color: var(--gray);
    font-size: 0.9rem;
}

.category-actions {
    display: flex;
    gap: 6px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.text-center {
    text-align: center;
}

/* Form Styles */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 1.5rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.form-actions .btn {
    min-width: 120px;
    justify-content: center;
}

/* Current Image Preview */
.current-image {
    padding: 10px;
    background: var(--light);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--light-gray);
    margin-top: 10px;
}

.current-image img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 5px;
    display: block;
    margin-top: 8px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from { 
        opacity: 0; 
        transform: translateY(-30px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--light-gray);
}

.modal-header h3 {
    color: var(--dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--gray);
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.close-modal:hover {
    background: var(--light-gray);
    color: var(--dark);
}

.text-muted {
    color: var(--gray) !important;
    font-style: italic;
}

/* Loading States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-right-color: transparent;
    animation: spin 1s linear infinite;
}

/* Form Validation */
.form-control.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.success {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }

    .welcome-section {
        text-align: center;
    }

    .dashboard-actions {
        justify-content: stretch;
    }

    .dashboard-actions .btn {
        flex: 1;
        min-width: auto;
    }

    .stats-cards {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 1.5rem;
    }

    .tab-content {
        padding: 1.5rem;
    }

    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .action-buttons {
        flex-direction: column;
    }

    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box input {
        width: 100%;
    }

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 12px 8px;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .tab {
        min-width: 140px;
    }
}

@media (max-width: 480px) {
    .login-form {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .dashboard-header h2 {
        font-size: 1.8rem;
    }

    .stat-card {
        padding: 1.2rem;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .logo i {
        font-size: 1.8rem;
    }

    .tabs-container {
        border-radius: 12px 12px 0 0;
    }

    .tab {
        min-width: 120px;
        padding: 1rem 0.8rem;
        font-size: 0.85rem;
    }

    .tab i {
        display: none;
    }

    .modal-content {
        padding: 1.2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    .modal,
    .tabs,
    .dashboard-header .btn,
    .action-buttons {
        display: none !important;
    }

    .tab-content {
        display: block !important;
        box-shadow: none;
        background: white;
    }

    .stat-card {
        break-inside: avoid;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --light: #1a1a1a;
        --dark: #f8f9fa;
        --light-gray: #2d2d2d;
        --gray: #adb5bd;
    }
}