/* ============================================
   ABSENSI QR - PREMIUM THEME SYSTEM
   Modern, Elegant, Dynamic Design
   ============================================ */

/* CSS Variables - Color Palette */
:root {
    /* Primary Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-warning: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-danger: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    --gradient-info: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-dark: linear-gradient(135deg, #232526 0%, #414345 100%);

    /* Sidebar Gradient */
    --sidebar-gradient: linear-gradient(180deg, #1a1c2e 0%, #16213e 50%, #0f3460 100%);

    /* Background */
    --bg-main: #f0f2f5;
    --bg-card: rgba(255, 255, 255, 0.95);

    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    /* Accent Colors */
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;

    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.4);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================
   BASE STYLES
   ============================================ */
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5a6fd6, #6a4190);
}

/* ============================================
   GLASSMORPHISM COMPONENTS
   ============================================ */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-card-solid {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-lg);
}

/* ============================================
   PREMIUM SIDEBAR STYLES
   ============================================ */
.sidebar-premium {
    background: var(--sidebar-gradient);
    height: 100vh !important;
    max-height: 100vh !important;
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    z-index: 1000;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15);
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.sidebar-premium>nav {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: 0 !important;
    /* Trick untuk force scroll */
    overflow-y: scroll !important;
    overflow-x: hidden !important;
    padding: 15px 0 30px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.4) rgba(255, 255, 255, 0.1);
}

/* Custom scrollbar untuk sidebar */
.sidebar-premium>nav::-webkit-scrollbar {
    width: 10px;
}

.sidebar-premium>nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.sidebar-premium>nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.sidebar-premium>nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.6);
    background-clip: padding-box;
}

.sidebar-brand {
    flex: 0 0 auto !important;
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 12px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    padding: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-brand-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    margin: 0;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav-item {
    display: block;
    padding: 14px 22px;
    margin: 4px 12px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.sidebar-nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.3) 0%, transparent 100%);
    transition: var(--transition-normal);
    border-radius: var(--radius-md);
}

.sidebar-nav-item:hover,
.sidebar-nav-item.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.sidebar-nav-item:hover::before,
.sidebar-nav-item.active::before {
    width: 100%;
}

.sidebar-nav-item.active {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.4) 0%, rgba(118, 75, 162, 0.2) 100%);
    border-left: 3px solid #667eea;
}

.sidebar-nav-item i {
    width: 24px;
    margin-right: 12px;
    font-size: 1.1rem;
    transition: var(--transition-fast);
}

.sidebar-nav-item:hover i {
    transform: scale(1.2);
}

.sidebar-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.4);
    padding: 15px 22px 8px;
    margin-top: 10px;
}

.sidebar-logout {
    color: #f87171 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
    padding-top: 20px;
}

.sidebar-logout:hover {
    background: rgba(248, 113, 113, 0.15) !important;
}

/* ============================================
   PREMIUM STAT CARDS
   ============================================ */
.stat-card {
    position: relative;
    border-radius: var(--radius-lg);
    padding: 24px;
    color: #fff;
    overflow: hidden;
    transition: var(--transition-normal);
    cursor: pointer;
    border: none;
    min-height: 140px;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    transition: var(--transition-slow);
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.stat-card:hover::before {
    transform: translate(20%, 20%);
}

.stat-card-primary {
    background: var(--gradient-primary);
}

.stat-card-success {
    background: var(--gradient-success);
}

.stat-card-warning {
    background: var(--gradient-warning);
}

.stat-card-danger {
    background: var(--gradient-danger);
}

.stat-card-info {
    background: var(--gradient-info);
}

.stat-card-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 4rem;
    opacity: 0.2;
    transition: var(--transition-normal);
}

.stat-card:hover .stat-card-icon {
    opacity: 0.35;
    transform: translateY(-50%) scale(1.1) rotate(-5deg);
}

.stat-card-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.stat-card-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-card-hint {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Number Counter Animation */
.counter-animate {
    animation: countUp 1s ease-out forwards;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   PREMIUM TABLE STYLES
   ============================================ */
.table-premium {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table-premium thead {
    background: var(--gradient-primary);
    color: #fff;
}

.table-premium thead th {
    border: none;
    padding: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.table-premium tbody tr {
    transition: var(--transition-fast);
}

.table-premium tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
    transform: scale(1.01);
}

.table-premium tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    border-color: #f1f5f9;
}

/* ============================================
   PREMIUM BUTTONS
   ============================================ */
.btn-premium {
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: var(--transition-normal);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: var(--transition-slow);
}

.btn-premium:hover::before {
    left: 100%;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-premium-primary {
    background: var(--gradient-primary);
    color: #fff;
}

.btn-premium-success {
    background: var(--gradient-success);
    color: #fff;
}

.btn-premium-danger {
    background: var(--gradient-danger);
    color: #fff;
}

/* ============================================
   PREMIUM FORM CONTROLS
   ============================================ */
.form-control-premium {
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 14px 18px;
    transition: var(--transition-normal);
    font-size: 0.95rem;
}

.form-control-premium:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

/* ============================================
   LIVE CLOCK WIDGET
   ============================================ */
.live-clock {
    background: var(--gradient-primary);
    color: #fff;
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-md);
}

.live-clock i {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ============================================
   GREETING SECTION
   ============================================ */
.greeting-section {
    margin-bottom: 30px;
}

.greeting-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.greeting-subtext {
    color: var(--text-secondary);
    font-size: 1rem;
}

.greeting-emoji {
    font-size: 2rem;
    margin-left: 10px;
    animation: wave 2.5s infinite;
    display: inline-block;
}

@keyframes wave {

    0%,
    100% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(14deg);
    }

    20% {
        transform: rotate(-8deg);
    }

    30% {
        transform: rotate(14deg);
    }

    40% {
        transform: rotate(-4deg);
    }

    50% {
        transform: rotate(10deg);
    }

    60%,
    100% {
        transform: rotate(0deg);
    }
}

/* ============================================
   CHART CONTAINERS
   ============================================ */
.chart-container {
    position: relative;
    height: 300px;
    padding: 20px;
}

.chart-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-title i {
    color: var(--accent-purple);
}

/* ============================================
   ACTIVITY FEED
   ============================================ */
.activity-feed {
    max-height: 350px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f1f5f9;
    transition: var(--transition-fast);
}

.activity-item:hover {
    background: rgba(102, 126, 234, 0.05);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.activity-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.activity-badge {
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

/* ============================================
   CIRCULAR PROGRESS
   ============================================ */
.progress-ring {
    position: relative;
    width: 120px;
    height: 120px;
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.5s ease;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.progress-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-ring-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.progress-ring-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   QUICK ACTIONS
   ============================================ */
.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 15px;
    border-radius: var(--radius-lg);
    background: #fff;
    border: 2px solid #f1f5f9;
    transition: var(--transition-normal);
    text-decoration: none;
    color: var(--text-primary);
}

.quick-action-btn:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    color: #667eea;
}

.quick-action-btn i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #667eea;
}

.quick-action-btn span {
    font-weight: 600;
    font-size: 0.85rem;
}

/* ============================================
   LOGIN PAGE STYLES
   ============================================ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(-45deg, #667eea, #764ba2, #11998e, #38ef7d);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    padding: 20px;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    padding: 50px 40px;
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: block;
    border: 4px solid rgba(102, 126, 234, 0.2);
    padding: 3px;
    background: #fff;
}

.login-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 35px;
    font-size: 0.95rem;
}

.login-input-group {
    position: relative;
    margin-bottom: 25px;
}

.login-input-group i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.login-input-group input {
    width: 100%;
    padding: 16px 18px 16px 50px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition-normal);
}

.login-input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.login-input-group input:focus+i,
.login-input-group input:focus~i {
    color: #667eea;
}

.password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.password-toggle:hover {
    color: #667eea;
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.35);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-btn .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.login-btn.loading .spinner {
    display: inline-block;
    margin-right: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   MODAL PREMIUM
   ============================================ */
.modal-premium .modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.modal-premium .modal-header {
    background: var(--gradient-primary);
    color: #fff;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 20px 25px;
}

.modal-premium .modal-title {
    font-weight: 700;
}

.modal-premium .btn-close {
    filter: invert(1);
}

/* ============================================
   RESPONSIVE - CONTENT OFFSET FOR SIDEBAR
   ============================================ */
.main-content-wrapper {
    margin-left: 260px;
    min-height: 100vh;
    transition: var(--transition-normal);
}

/* ============================================
   RESPONSIVE - TABLET (max-width: 991px)
   ============================================ */
@media (max-width: 991.98px) {
    .sidebar-premium {
        transform: translateX(-100%);
    }

    .sidebar-premium.show {
        transform: translateX(0);
    }

    .main-content-wrapper {
        margin-left: 0;
    }

    /* Stat Cards - Tablet */
    .stat-card {
        padding: 20px;
        min-height: 120px;
    }

    .stat-card-value {
        font-size: 2rem;
    }

    .stat-card-icon {
        font-size: 3rem;
        right: 15px;
    }

    /* Quick Actions - Tablet */
    .quick-action-btn {
        padding: 20px 10px;
    }

    .quick-action-btn i {
        font-size: 1.6rem;
    }

    /* Activity Feed - Tablet */
    .activity-feed {
        max-height: 300px;
    }

    /* Chart Container - Tablet */
    .chart-container {
        height: 250px;
        padding: 15px;
    }
}

/* ============================================
   RESPONSIVE - MOBILE (max-width: 767px)
   ============================================ */
@media (max-width: 767.98px) {

    /* Body adjustments */
    body {
        font-size: 14px;
    }

    /* Main content padding */
    .main-content-wrapper .p-4 {
        padding: 15px !important;
    }

    /* Navbar - Mobile */
    .navbar {
        padding: 10px 15px !important;
    }

    .navbar .container-fluid {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .navbar-brand {
        font-size: 0.9rem !important;
    }

    .navbar-brand img {
        width: 28px !important;
        height: 28px !important;
    }

    /* Live Clock - Hide on mobile */
    .live-clock {
        display: none !important;
    }

    /* Date Badge - Hide on mobile */
    .badge.bg-light.d-none.d-md-block {
        display: none !important;
    }

    /* User Dropdown - Mobile */
    .dropdown-menu {
        min-width: 180px !important;
    }

    /* Stat Cards - Mobile */
    .stat-card {
        padding: 15px;
        min-height: 100px;
        border-radius: var(--radius-md);
    }

    .stat-card-value {
        font-size: 1.6rem;
        margin-bottom: 5px;
    }

    .stat-card-label {
        font-size: 0.75rem;
        margin-bottom: 5px;
    }

    .stat-card-hint {
        font-size: 0.7rem;
    }

    .stat-card-icon {
        font-size: 2.5rem;
        right: 10px;
        opacity: 0.15;
    }

    /* Quick Actions - Mobile */
    .quick-action-btn {
        padding: 15px 10px;
        border-radius: var(--radius-md);
    }

    .quick-action-btn i {
        font-size: 1.4rem;
        margin-bottom: 8px;
    }

    .quick-action-btn span {
        font-size: 0.75rem;
    }

    /* Glass Cards - Mobile */
    .glass-card-solid {
        border-radius: var(--radius-md);
    }

    .card-header,
    .card-body {
        padding: 15px !important;
    }

    /* Chart - Mobile */
    .chart-container {
        height: 200px;
        padding: 10px;
    }

    .chart-title {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    /* Activity Feed - Mobile */
    .activity-feed {
        max-height: 250px;
    }

    .activity-item {
        padding: 12px;
    }

    .activity-avatar {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
        margin-right: 12px;
    }

    .activity-name {
        font-size: 0.9rem;
    }

    .activity-time {
        font-size: 0.75rem;
    }

    .activity-badge {
        padding: 4px 10px;
        font-size: 0.7rem;
    }

    /* Tables - Mobile */
    .table-responsive {
        margin: 0 -15px;
        padding: 0 15px;
    }

    .table th,
    .table td {
        padding: 10px 8px !important;
        font-size: 0.85rem;
    }

    .table-premium thead th {
        padding: 12px 8px;
        font-size: 0.8rem;
    }

    /* Premium Buttons - Mobile */
    .btn-premium {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    /* Form Controls - Mobile */
    .form-control-premium {
        padding: 12px 15px;
        font-size: 16px;
        /* Prevent zoom on iOS */
    }

    /* Modals - Mobile */
    .modal-dialog {
        margin: 10px;
    }

    .modal-premium .modal-header {
        padding: 15px 20px;
    }

    .modal-body {
        padding: 15px !important;
    }

    /* Greeting - Mobile */
    .greeting-text {
        font-size: 1.4rem;
    }

    .greeting-subtext {
        font-size: 0.9rem;
    }

    .greeting-emoji {
        font-size: 1.5rem;
    }

    /* Progress Ring - Mobile */
    .progress-ring {
        width: 100px;
        height: 100px;
    }

    .progress-ring-value {
        font-size: 1.4rem;
    }

    /* Row gaps - Mobile */
    .row.g-3 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }

    .row.g-4 {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 1rem;
    }

    /* QR Scanner Area - Mobile */
    #preview,
    #reader,
    video {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Alert boxes - Mobile */
    .alert {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    /* Badges - Mobile */
    .badge {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
}

/* ============================================
   RESPONSIVE - SMALL MOBILE (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {

    /* Main content padding */
    .main-content-wrapper .p-4 {
        padding: 10px !important;
    }

    /* Stat Cards - Small Mobile */
    .stat-card {
        padding: 12px;
        min-height: 85px;
    }

    .stat-card-value {
        font-size: 1.4rem;
    }

    .stat-card-label {
        font-size: 0.7rem;
    }

    .stat-card-hint {
        display: none;
        /* Hide on very small screens */
    }

    .stat-card-icon {
        font-size: 2rem;
        right: 8px;
    }

    /* Quick Actions - Small Mobile */
    .quick-action-btn {
        padding: 12px 8px;
    }

    .quick-action-btn i {
        font-size: 1.2rem;
        margin-bottom: 6px;
    }

    .quick-action-btn span {
        font-size: 0.7rem;
    }

    /* Cards - Small Mobile */
    .card-header,
    .card-body {
        padding: 12px !important;
    }

    /* Activity - Small Mobile */
    .activity-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
        margin-right: 10px;
    }

    .activity-name {
        font-size: 0.85rem;
    }

    .activity-badge {
        padding: 3px 8px;
        font-size: 0.65rem;
    }

    /* Tables - Small Mobile */
    .table th,
    .table td {
        padding: 8px 6px !important;
        font-size: 0.8rem;
    }

    /* Hide some columns on very small screens */
    .table .d-none-xs {
        display: none !important;
    }

    /* Buttons - Small Mobile */
    .btn {
        padding: 8px 15px;
        font-size: 0.85rem;
    }

    .btn-sm {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    /* Row gaps - Small Mobile */
    .row.g-3 {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.5rem;
    }
}

/* ============================================
   RESPONSIVE - EXTRA SMALL (max-width: 360px)
   ============================================ */
@media (max-width: 360px) {
    .stat-card {
        padding: 10px;
        min-height: 75px;
    }

    .stat-card-value {
        font-size: 1.2rem;
    }

    .stat-card-label {
        font-size: 0.65rem;
    }

    .stat-card-icon {
        display: none;
    }

    .quick-action-btn span {
        font-size: 0.65rem;
    }

    .navbar-brand span {
        font-size: 0.8rem !important;
    }
}

/* ============================================
   MOBILE SIDEBAR STYLES
   ============================================ */
.sidebar-mobile {
    background: var(--sidebar-gradient);
    padding-top: 0;
}

.sidebar-mobile .sidebar-brand {
    padding: 20px 15px;
}

.sidebar-mobile .sidebar-brand-logo {
    width: 50px;
    height: 50px;
}

.sidebar-mobile .sidebar-brand-text {
    font-size: 1.1rem;
}

.sidebar-mobile .sidebar-nav-item {
    padding: 12px 18px;
    margin: 3px 10px;
    font-size: 0.95rem;
}

.sidebar-mobile .sidebar-section-title {
    font-size: 0.65rem;
    padding: 12px 18px 6px;
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

.bounce-in {
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    from {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        transform: scale(1.05);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scan Success Animation */
.scan-success-animation {
    animation: successPop 0.5s ease-out;
}

@keyframes successPop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Confetti Container */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--gradient-primary) !important;
}

.bg-gradient-success {
    background: var(--gradient-success) !important;
}

.bg-gradient-warning {
    background: var(--gradient-warning) !important;
}

.bg-gradient-danger {
    background: var(--gradient-danger) !important;
}

.bg-gradient-info {
    background: var(--gradient-info) !important;
}

.shadow-glow {
    box-shadow: var(--shadow-glow) !important;
}

.shadow-premium {
    box-shadow: var(--shadow-xl) !important;
}

.rounded-premium {
    border-radius: var(--radius-lg) !important;
}

.rounded-full {
    border-radius: var(--radius-full) !important;
}

/* Touch-friendly utilities */
.touch-action-none {
    touch-action: none;
}

.touch-friendly {
    min-height: 44px;
    min-width: 44px;
}

/* Safe area support for notched phones */
@supports (padding: max(0px)) {
    .main-content-wrapper {
        padding-bottom: max(15px, env(safe-area-inset-bottom));
    }
}

/* Print styles */
@media print {

    .sidebar-premium,
    .sidebar-mobile,
    .navbar,
    .quick-action-btn,
    .btn {
        display: none !important;
    }

    .main-content-wrapper {
        margin-left: 0 !important;
    }
}