/* ============================================
   RW PoS - Professional UI Design V2
   Modern, Clean & Professional Interface
   ============================================ */

:root {
    /* Modern Color Palette */
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    
    /* Neutral Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #0f172a;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    
    /* Sidebar */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --sidebar-bg: #eef4fb;
    --sidebar-text: #17305d;
    --sidebar-hover: #dce8f7;
    --sidebar-active: var(--primary-color);
    
    /* Spacing */
    --header-height: 70px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Global Styles
   ============================================ */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

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

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

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

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

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #f4f8fd 0%, #eaf2fb 100%);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    z-index: 1000;
    overflow-y: auto;
    border-right: 1px solid rgba(23, 48, 93, 0.08);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition-base);
}

.sidebar.collapsed + .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* ============================================
   Sidebar Styles
   ============================================ */

.sidebar-header {
    padding: var(--spacing-lg) var(--spacing-md);
    border-bottom: 1px solid rgba(23, 48, 93, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--sidebar-text);
    font-size: 1.5rem;
    font-weight: 700;
    transition: all var(--transition-base);
}

.sidebar-brand-logo {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.sidebar-brand-logo-horizontal {
    width: 215px;
    max-height: 46px;
}

.sidebar-brand-logo-vertical {
    display: none;
    width: 58px;
    max-height: 68px;
}

.sidebar.collapsed .sidebar-brand-logo-horizontal {
    display: none;
}

.sidebar.collapsed .sidebar-brand-logo-vertical {
    display: block;
}

.sidebar-brand {
    transition: all var(--transition-fast);
}

.sidebar.collapsed .sidebar-brand {
    cursor: pointer;
    width: 100%;
    justify-content: center;
}

.sidebar.collapsed .sidebar-header {
    padding: var(--spacing-lg) 0.5rem;
}

.sidebar.collapsed .sidebar-brand:hover {
    background: var(--sidebar-hover);
    border-radius: var(--radius-md);
}

.sidebar-toggle {
    background: transparent;
    border: none;
    color: var(--sidebar-text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.sidebar.collapsed .sidebar-toggle {
    display: none;
}

.sidebar-toggle:hover {
    background: var(--sidebar-hover);
}

.sidebar-nav {
    padding: var(--spacing-md) 0;
}

.nav-section {
    margin-bottom: var(--spacing-lg);
}

.nav-section-title {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #5f7497;
    transition: all var(--transition-base);
}

.sidebar.collapsed .nav-section-title {
    opacity: 0;
    height: 0;
    padding: 0;
    overflow: hidden;
}

.nav-item {
    margin: 0.25rem var(--spacing-sm);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 0.75rem var(--spacing-md);
    color: var(--sidebar-text);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-weight: 500;
    position: relative;
}

.nav-link:hover {
    background: var(--sidebar-hover);
    color: #0f2550;
    transform: translateX(4px);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: var(--shadow-md);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: white;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.nav-link i {
    font-size: 1.25rem;
    min-width: 1.5rem;
    text-align: center;
}

.sidebar.collapsed .nav-link span {
    display: none;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 0.75rem;
}

/* Changelog Badge */
.changelog-badge {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-radius: 10px;
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    }
    50% {
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
    }
}

.sidebar.collapsed .changelog-badge {
    right: 0.5rem;
}

.nav-link {
    position: relative;
}

/* Admin/Dev Badge */
.nav-link.admin-link {
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.nav-link.admin-link:hover {
    background: rgba(251, 191, 36, 0.1);
    border-color: var(--warning-color);
}

/* ============================================
   Header/Topbar
   ============================================ */

.topbar {
    height: var(--header-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: visible;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    flex: 1;
    height: 100%;
}

/* Topbar Toast Notifications */
.topbar-toast-container {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
    align-items: center;
    height: 100%;
}

.topbar-toast {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    animation: slideInFromLeft 0.3s ease-out;
    margin: 0;
    height: auto;
    max-height: 40px;
    white-space: nowrap;
}

.topbar-toast i {
    font-size: 0.875rem;
    flex-shrink: 0;
}

.topbar-toast span {
    line-height: 1.2;
}

.topbar-toast .btn-close {
    padding: 0;
    width: 0.875rem;
    height: 0.875rem;
    font-size: 0.625rem;
    opacity: 0.6;
    flex-shrink: 0;
}

.topbar-toast .btn-close:hover {
    opacity: 1;
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.breadcrumb {
    display: flex;
    gap: var(--spacing-xs);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.topbar-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    position: relative;
}

/* Dropdown container */
.dropdown {
    position: relative;
}

.topbar-icon {
    position: relative;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.topbar-icon:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.topbar-language {
    padding: 0.5rem 0.75rem;
}

.language-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.topbar-icon:hover .language-text {
    color: var(--text-primary);
}

.topbar-icon .badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger-color);
    color: white;
    font-size: 0.625rem;
    padding: 0.25rem 0.375rem;
    border-radius: 999px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 0.5rem var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    outline: none;
    width: auto;
}

.user-menu:hover {
    box-shadow: var(--shadow-md);
}

.user-menu:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.user-menu .bi-chevron-down {
    transition: transform var(--transition-fast);
}

.user-menu[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   Cards
   ============================================ */

.card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-header {
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.card-header h5 {
    margin: 0;
}

.card-header .badge {
    font-weight: 500;
    white-space: nowrap;
}

.card-body {
    padding: var(--spacing-lg);
}

.card-footer {
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

/* Stats Cards */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.1));
    border-radius: 0 0 0 100%;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: var(--spacing-md);
}

.stat-icon.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; }
.stat-icon.green { background: linear-gradient(135deg, #10b981, #059669); color: white; }
.stat-icon.orange { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }
.stat-icon.purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: white; }
.stat-icon.red { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

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

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    margin-top: var(--spacing-xs);
}

.stat-change.positive {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.stat-change.negative {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: 0.625rem var(--spacing-md);
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

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

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
    color: white;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-primary);
}

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

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

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.875rem var(--spacing-lg);
    font-size: 1rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
}

/* ============================================
   Tables
   ============================================ */

.table-wrapper {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.table thead {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
}

.table thead th {
    padding: var(--spacing-md) var(--spacing-lg);
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.table tbody tr:hover {
    background: var(--bg-secondary);
}

.table tbody td {
    padding: var(--spacing-md) var(--spacing-lg);
    color: var(--text-secondary);
}

.table tbody tr:last-child {
    border-bottom: none;
}

/* ============================================
   Badges
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    line-height: 1;
}

.badge-primary { background: rgba(37, 99, 235, 0.1); color: var(--primary-color); }
.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--success-color); }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger-color); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning-color); }
.badge-info { background: rgba(6, 182, 212, 0.1); color: var(--info-color); }
.badge-secondary { background: var(--bg-secondary); color: var(--text-secondary); }

/* Large Store Badge in Topbar Center */
.badge-store-large {
    padding: 0.75rem 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    gap: 0.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
}

.badge-store-large i {
    font-size: 1.5rem;
}

.badge-store-large:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* ============================================
   Forms
   ============================================ */

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-control,
.form-select {
    width: 100%;
    padding: 0.625rem var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    background: var(--bg-primary);
    color: var(--text-primary);
}

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

.form-control::placeholder {
    color: var(--text-muted);
}

/* ============================================
   Alerts
   ============================================ */

.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    border: none;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-sm);
}

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

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

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

.alert-info {
    background: rgba(6, 182, 212, 0.1);
    color: #164e63;
    border-left: 4px solid var(--info-color);
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-out;
}

.slide-in {
    animation: slideIn 0.4s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

/* ============================================
   Page Content
   ============================================ */

.page-content {
    padding: var(--spacing-lg);
    min-height: calc(100vh - var(--header-height));
}

.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: -var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

/* ============================================
   Grid System
   ============================================ */

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 calc(var(--spacing-sm) * -1);
}

.col {
    padding: 0 var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* ============================================
   Utilities
   ============================================ */

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

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

.bg-primary { background: var(--primary-color) !important; }
.bg-secondary { background: var(--bg-secondary) !important; }
.bg-white { background: white !important; }

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }

.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.gap-2 { gap: var(--spacing-sm); }
.gap-3 { gap: var(--spacing-md); }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* ============================================
   Footer
   ============================================ */

.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-lg);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ============================================
   Tables Responsive Improvements
   ============================================ */

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-secondary);
    white-space: nowrap;
}

/* Scrollable table wrapper */
.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
}

.table-scroll::-webkit-scrollbar {
    height: 8px;
}

.table-scroll::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

.table-scroll::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.table-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Responsive table improvements */
@media (max-width: 768px) {
    .table th,
    .table td {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    /* Hide less important columns on mobile */
    .table .hide-mobile {
        display: none;
    }
    
    /* Make actions column sticky on right */
    .table .actions-col {
        position: sticky;
        right: 0;
        background: var(--bg-primary);
        box-shadow: -4px 0 8px rgba(0, 0, 0, 0.1);
    }
}

/* ============================================
   Loading States
   ============================================ */

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--border-color) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   Custom Scrollbar
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* ============================================
   Mobile Menu Button
   ============================================ */

.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--bg-secondary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

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

.mobile-menu-btn:active {
    transform: scale(0.95);
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
    backdrop-filter: blur(4px);
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ============================================
   Responsive Tables
   ============================================ */

.table-responsive-mobile {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

.table-responsive-mobile table {
    min-width: 600px;
}

/* Card-style table for mobile */
@media (max-width: 768px) {
    .table-card-mobile thead {
        display: none;
    }
    
    .table-card-mobile tbody tr {
        display: block;
        background: var(--bg-primary);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        margin-bottom: 1rem;
        padding: 1rem;
        box-shadow: var(--shadow-sm);
    }
    
    .table-card-mobile tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .table-card-mobile tbody td:last-child {
        border-bottom: none;
    }
    
    .table-card-mobile tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-secondary);
        flex-shrink: 0;
        margin-right: 1rem;
    }
}

/* ============================================
   Touch-friendly improvements
   ============================================ */

/* Minimum touch target size (44px) */
@media (pointer: coarse) {
    .btn,
    .nav-link,
    .dropdown-item,
    .form-control,
    .form-select,
    input[type="checkbox"],
    input[type="radio"] {
        min-height: 44px;
    }
    
    .btn-sm {
        min-height: 38px;
        padding: 0.5rem 1rem;
    }
    
    .dropdown-item {
        padding: 0.75rem 1rem;
    }
    
    /* Larger checkboxes and radios */
    input[type="checkbox"],
    input[type="radio"] {
        width: 22px;
        height: 22px;
    }
    
    .form-check-input {
        width: 22px;
        height: 22px;
    }
    
    /* Better spacing for form elements */
    .form-group,
    .mb-3 {
        margin-bottom: 1.25rem;
    }
}

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

@media (max-width: 1024px) {
    /* Show mobile menu button */
    .mobile-menu-btn {
        display: flex;
    }
    
    /* Show overlay on tablet/mobile */
    .sidebar-overlay {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
        box-shadow: var(--shadow-xl);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .topbar {
        padding: 0 var(--spacing-md);
    }
    
    /* Better topbar layout on tablet */
    .topbar-center {
        position: relative;
        left: auto;
        transform: none;
    }
    
    /* Hide toast container on small screens to avoid overflow */
    .topbar-toast-container {
        max-width: 300px;
        overflow: hidden;
    }
    
    .topbar-toast {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }
    
    .page-content {
        padding: var(--spacing-md);
    }
    
    .col-sm-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .stat-card {
        margin-bottom: var(--spacing-md);
    }
    
    .user-info {
        display: none;
    }
    
    /* Hide language text on small screens */
    .language-text {
        display: none;
    }
    
    /* Make store badge smaller on mobile */
    .badge-store-large {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    
    .badge-store-large i {
        font-size: 1.25rem;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    /* Topbar improvements for mobile */
    .topbar {
        padding: 0 var(--spacing-sm);
        gap: var(--spacing-xs);
    }
    
    .topbar-left {
        gap: var(--spacing-sm);
    }
    
    .topbar-right {
        gap: var(--spacing-xs);
    }
    
    /* Hide flash messages in topbar on mobile - show below instead */
    .topbar-toast-container {
        display: none;
    }
    
    /* User menu compact on mobile */
    .user-menu {
        padding: 0.375rem 0.5rem;
    }
    
    .user-menu .bi-chevron-down {
        display: none;
    }
    
    /* Cards full width on mobile */
    .card {
        border-radius: var(--radius-md);
    }
    
    .card-body {
        padding: var(--spacing-md);
    }
    
    /* Page header responsive */
    .page-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .page-header h2 {
        font-size: 1.5rem;
    }
    
    /* Action buttons stack on mobile */
    .action-buttons-grid {
        flex-direction: column;
        width: 100%;
    }
    
    /* Footer smaller on mobile */
    .footer {
        padding: var(--spacing-sm);
        font-size: 0.75rem;
    }
    
    /* Modal full screen on mobile */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-dialog-lg,
    .modal-dialog.modal-lg {
        max-width: calc(100% - 1rem);
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.25rem;
    }
    
    .breadcrumb {
        display: none;
    }
    
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Stack buttons vertically */
    .btn-group-mobile {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-group-mobile .btn {
        width: 100%;
    }
    
    /* Smaller padding overall */
    .page-content {
        padding: var(--spacing-sm);
    }
    
    .card-body {
        padding: var(--spacing-sm);
    }
    
    /* Even smaller store badge */
    .badge-store-large {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Topbar super compact */
    .topbar {
        height: 56px;
    }
    
    .mobile-menu-btn {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    /* Dropdown menus full width */
    .dropdown-menu {
        width: calc(100vw - 2rem);
        max-width: 300px;
    }
}

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

@media print {
    .sidebar,
    .topbar,
    .footer,
    .btn,
    .badge {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
    
    body {
        background: white;
    }
}

/* ============================================
   Dark Mode Support (Future)
   ============================================ */

@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here */
}

/* ============================================
   Bootstrap Compatibility
   ============================================ */

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1050;
    display: none;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    min-width: 220px;
    margin-top: 0.5rem;
    list-style: none;
}

.dropdown-menu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu-end {
    right: 0;
    left: auto;
}

.dropdown-item {
    padding: 0.75rem 1.25rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all var(--transition-fast);
    font-size: 0.95rem;
    border-left: 3px solid transparent;
}

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

.dropdown-item:hover {
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.1) 0%, rgba(52, 152, 219, 0.05) 100%);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    padding-left: 1.5rem;
}

.dropdown-item.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    font-weight: 600;
    border-left-color: white;
}

.dropdown-item.active:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
}

.dropdown-item.text-danger {
    color: var(--danger-color);
}

.dropdown-item.text-danger:hover {
    background: linear-gradient(90deg, rgba(231, 76, 60, 0.1) 0%, rgba(231, 76, 60, 0.05) 100%);
    color: var(--danger-color);
    border-left-color: var(--danger-color);
}

.dropdown-divider {
    height: 1px;
    margin: 0.5rem 0;
    background: var(--border-color);
    border: none;
    opacity: 0.3;
}

.btn-close {
    background: transparent;
    border: none;
    opacity: 0.5;
    cursor: pointer;
    padding: 0.5rem;
}

.btn-close:hover {
    opacity: 1;
}

/* Container Classes */
.container,
.container-fluid {
    width: 100%;
    padding-right: var(--spacing-md);
    padding-left: var(--spacing-md);
    margin-right: auto;
    margin-left: auto;
}

.container {
    max-width: 1200px;
}

/* Modal Backdrop (if needed) */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Bootstrap Spinner */
.spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

.spinner-border-sm {
    width: 0.75rem;
    height: 0.75rem;
    border-width: 0.2em;
}

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

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eef5fc 0%, #dbe9f8 45%, #c9ddf3 100%);
    padding: var(--spacing-lg);
    position: relative;
    overflow: hidden;
}

/* Animated background elements */
.login-wrapper::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    top: -250px;
    right: -250px;
    animation: float 8s ease-in-out infinite;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.18) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -200px;
    left: -200px;
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(30px) scale(1.05); }
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
    z-index: 1;
    animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-header {
    background: linear-gradient(135deg, #f8fbff, #e8f1fb);
    color: #17305d;
    padding: 3.5rem 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(23, 48, 93, 0.08);
}

.login-header::before {
    content: '';
    position: absolute;
    width: 300%;
    height: 300%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 20px,
        rgba(23, 48, 93, 0.025) 20px,
        rgba(23, 48, 93, 0.025) 40px
    );
    top: -100%;
    left: -100%;
    animation: shimmer 25s linear infinite;
}

@keyframes shimmer {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.login-header i {
    font-size: 4rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    color: white;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    animation: iconPulse 3s ease-in-out infinite;
}

.login-brand-logo {
    width: min(220px, 70%);
    height: auto;
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.18));
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.login-header h1 {
    color: #17305d;
    margin: 0;
    font-size: 2.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.login-header p {
    position: relative;
    z-index: 1;
    margin: 0.75rem 0 0 0;
    font-size: 1.05rem;
    color: rgba(23, 48, 93, 0.78);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.login-body {
    padding: 2.5rem;
    background: white;
}

.login-body .form-group {
    margin-bottom: 1.75rem;
}

.login-body .form-label {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.login-body .form-label i {
    color: #002868;
}

.login-body .form-control {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.875rem 1.125rem;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f8fafc;
}

.login-body .form-control:focus {
    border-color: #1b4588;
    background: white;
    box-shadow: 0 0 0 4px rgba(27, 69, 136, 0.1);
    transform: translateY(-1px);
}

.login-body .form-control::placeholder {
    color: #94a3b8;
}

.login-body .btn-primary {
    border-radius: 12px;
    padding: 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    background: linear-gradient(135deg, #002868, #1b4588);
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 40, 104, 0.3);
    position: relative;
    overflow: hidden;
}

.login-body .btn-primary::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;
}

.login-body .btn-primary:hover::before {
    left: 100%;
}

.login-body .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0, 40, 104, 0.4);
}

.login-body .btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 40, 104, 0.3);
}

.login-body .form-check-input {
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    width: 1.125rem;
    height: 1.125rem;
}

.login-body .form-check-input:checked {
    background-color: #002868;
    border-color: #002868;
}

.login-body .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 40, 104, 0.15);
}

.login-body .form-check-label {
    color: #475569;
    font-size: 0.95rem;
}

.login-footer {
    background: linear-gradient(to bottom, rgba(0, 40, 104, 0.03), rgba(0, 40, 104, 0.06));
    padding: 1.75rem;
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
    border-top: 1px solid rgba(0, 40, 104, 0.08);
}

.login-footer p {
    margin: 0 0 0.75rem 0;
    font-weight: 600;
    color: #475569;
}

.login-footer .btn-group {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.login-footer .btn-sm {
    border-radius: 0;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    transition: all 0.2s ease;
}

.login-footer .btn-primary {
    background: linear-gradient(135deg, #002868, #1b4588);
    color: white;
    box-shadow: none;
}

.login-footer .btn-outline-primary {
    background: white;
    color: #002868;
    border-left: 1px solid #e2e8f0;
}

.login-footer .btn-outline-primary:hover {
    background: #f1f5f9;
    color: #002868;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .login-card {
        max-width: 100%;
        margin: 0 1rem;
    }

    .sidebar-brand-logo-horizontal {
        width: 175px;
    }
    
    .login-header {
        padding: 2.5rem 1.5rem;
    }

    .login-brand-logo {
        width: min(180px, 64%);
    }
    
    .login-header h1 {
        font-size: 2rem;
    }
    
    .login-body {
        padding: 2rem 1.5rem;
    }
}

/* ========================================
   Dashboard Specific Styles
   ======================================== */

/* Store Cards */
.store-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.store-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.store-card .stat-icon {
    transition: all 0.3s ease;
}

.store-card:hover .stat-icon {
    transform: scale(1.1);
}

/* Store Cards - Unified Layout for All */
.stores-grid-layout {
    display: grid;
    grid-template-columns: 1fr; /* Default: 1 column for 1-3 stores */
    gap: 1.25rem;
    max-width: 900px;
    margin: 0 auto;
}

/* 2 columns for 4+ stores */
.stores-grid-layout:has(.store-card-large:nth-child(4)) {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
    gap: 1.5rem;
}

.store-card-large {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    padding: 1.75rem 2rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.store-card-large:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.store-card-large.store-active {
    border-color: var(--success-color);
    border-width: 2px;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.03) 0%, rgba(46, 204, 113, 0.08) 100%);
}

.store-card-large.store-active:hover {
    border-color: var(--success-color);
    box-shadow: 0 12px 28px rgba(46, 204, 113, 0.2);
}

.store-icon-large {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    box-shadow: 0 8px 16px rgba(52, 152, 219, 0.25);
    transition: all 0.3s ease;
}

.store-card-large:hover .store-icon-large {
    transform: scale(1.08) rotate(5deg);
}

.store-card-large.store-active .store-icon-large {
    background: linear-gradient(135deg, var(--success-color), #27ae60);
    box-shadow: 0 8px 16px rgba(46, 204, 113, 0.3);
}

.store-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.store-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.store-meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.store-code,
.store-location {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.store-code i,
.store-location i {
    font-size: 1rem;
    opacity: 0.7;
}

.store-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    width: fit-content;
    transition: all 0.2s ease;
}

.store-status.active {
    background: var(--success-color);
    color: white;
}

.store-status i {
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    /* Always 1 column on mobile */
    .stores-grid-layout,
    .stores-grid-layout:has(.store-card-large:nth-child(4)) {
        grid-template-columns: 1fr !important;
        max-width: 100%;
    }
    
    .store-card-large {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .store-icon-large {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .store-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .store-status {
        margin: 0 auto;
    }
}

/* Action Cards - Compact Professional Style */
.action-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-left: 4px solid;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    transition: width 0.3s ease;
}

.action-card:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: currentColor;
}

.action-card:hover::before {
    width: 100%;
    opacity: 0.05;
}

.action-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.75rem;
    transition: all 0.3s ease;
}

.action-card:hover .action-icon {
    transform: scale(1.1) rotate(-5deg);
}

.action-content {
    flex: 1;
    min-width: 0;
}

.action-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
}

.action-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.action-arrow {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.action-card:hover .action-arrow {
    background: currentColor;
    color: white;
    transform: translateX(4px);
}

/* Color Variants */
.action-card-purple {
    border-left-color: #667eea;
}

.action-card-purple::before {
    background: #667eea;
}

.action-card-purple .action-icon {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.action-card-green {
    border-left-color: #11998e;
}

.action-card-green::before {
    background: #11998e;
}

.action-card-green .action-icon {
    background: rgba(17, 153, 142, 0.1);
    color: #11998e;
}

.action-card-blue {
    border-left-color: #4facfe;
}

.action-card-blue::before {
    background: #4facfe;
}

.action-card-blue .action-icon {
    background: rgba(79, 172, 254, 0.1);
    color: #4facfe;
}

.action-card-orange {
    border-left-color: #fa709a;
}

.action-card-orange::before {
    background: #fa709a;
}

.action-card-orange .action-icon {
    background: rgba(250, 112, 154, 0.1);
    color: #fa709a;
}

.action-card-pink {
    border-left-color: #ff6b9d;
}

.action-card-pink::before {
    background: #ff6b9d;
}

.action-card-pink .action-icon {
    background: rgba(255, 107, 157, 0.1);
    color: #ff6b9d;
}

/* Responsive */
@media (max-width: 991px) {
    .action-card {
        padding: 1rem 1.25rem;
    }
    
    .action-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .action-title {
        font-size: 1rem;
    }
    
    .action-description {
        font-size: 0.8125rem;
    }
}

/* Alert improvements */
.alert {
    border-left: 4px solid;
    border-radius: var(--radius-md);
}

.alert-success {
    border-left-color: var(--success-color);
    background: rgba(46, 204, 113, 0.1);
}

.alert-warning {
    border-left-color: var(--warning-color);
    background: rgba(241, 196, 15, 0.1);
}

.alert-danger {
    border-left-color: var(--danger-color);
    background: rgba(231, 76, 60, 0.1);
}

.alert-info {
    border-left-color: var(--info-color);
    background: rgba(52, 152, 219, 0.1);
}

/* ========================================
   Toast Notifications (Flash Messages)
   ======================================== */

.toast-container {
    position: fixed !important;
    top: 90px !important;
    right: 24px !important;
    z-index: 9999 !important;
    pointer-events: none;
    max-width: 420px;
}

.toast-container .toast {
    pointer-events: all;
}

.toast {
    width: 100%;
    margin-bottom: 0.75rem;
    border-radius: 20px;
    border: none;
    animation: toastSlide 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

@keyframes toastSlide {
    0% {
        transform: translateX(450px) scale(0.9);
        opacity: 0;
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

/* Glass morphism background */
.toast.alert-success {
    background: rgba(16, 185, 129, 0.95);
    box-shadow: 
        0 20px 50px -12px rgba(16, 185, 129, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.toast.alert-warning {
    background: rgba(251, 146, 60, 0.95);
    box-shadow: 
        0 20px 50px -12px rgba(251, 146, 60, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.toast.alert-danger {
    background: rgba(239, 68, 68, 0.95);
    box-shadow: 
        0 20px 50px -12px rgba(239, 68, 68, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.toast.alert-info {
    background: rgba(59, 130, 246, 0.95);
    box-shadow: 
        0 20px 50px -12px rgba(59, 130, 246, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

/* Content styling */
.toast .d-flex {
    padding: 1rem 1.25rem !important;
    align-items: center;
    gap: 0.75rem;
}

.toast i {
    font-size: 1.5rem;
    color: white;
    opacity: 1;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.toast .flex-grow-1 {
    color: white;
    font-weight: 500;
    font-size: 0.9375rem;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0,0,0,0.15);
    flex: 1;
}

.toast .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.7;
    width: 20px;
    height: 20px;
    background-size: 12px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
}

.toast .btn-close:hover {
    opacity: 1;
    transform: scale(1.15);
}

/* Accent line at the bottom */
.toast::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.25);
    animation: toastProgress 5s linear;
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* Shimmer effect */
.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Hover effect */
.toast:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 25px 60px -15px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.toast:hover::after {
    animation-play-state: paused;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .toast-container {
        right: 12px;
        left: 12px;
        max-width: calc(100% - 24px);
    }
    
    .toast {
        width: 100%;
    }
}

/* ========================================
   Page Loading & Transitions
   ======================================== */

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05) 0%, rgba(155, 89, 182, 0.05) 100%);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.loading-spinner {
    text-align: center;
    position: relative;
}

/* Modern Spinner with Rings */
.modern-spinner {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-radius: 50%;
    animation: spin 2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring:nth-child(1) {
    border-top-color: var(--primary-color);
    animation-delay: -0.45s;
}

.spinner-ring:nth-child(2) {
    border-right-color: #9b59b6;
    animation-delay: -0.3s;
    width: 85%;
    height: 85%;
    top: 7.5%;
    left: 7.5%;
}

.spinner-ring:nth-child(3) {
    border-bottom-color: #3498db;
    animation-delay: -0.15s;
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
}

.spinner-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    color: var(--primary-color);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { 
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(0.95);
    }
    50% { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.loading-text {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 2rem;
    letter-spacing: 0.5px;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Page Fade In */
body.page-loading .app-wrapper,
body.page-loading .login-wrapper {
    opacity: 0;
}

body .app-wrapper,
body .login-wrapper {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Store Card Click Animation */
.store-card.loading {
    opacity: 0.5;
    pointer-events: none;
    transform: scale(0.98);
}


