/* KodlaStok Global CSS - Premium Dark Theme & Layout System */

:root {
    --bg-main: #0a0d1a;
    --bg-card: #12172a;
    --bg-input: #1b2138;
    --border-color: #222d4a;
    
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-glow: rgba(99, 102, 241, 0.35);
    
    --secondary: #a855f7;
    --secondary-glow: rgba(168, 85, 247, 0.25);
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.2);
    
    --danger: #f43f5e;
    --danger-glow: rgba(244, 63, 94, 0.2);
    
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.2);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dark: #0f172a;
    
    --sidebar-width: 260px;
    --navbar-height: 70px;
    --transition-speed: 0.25s;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 30px;
}

/* Light Theme Variables Override */
body.light-theme {
    --bg-main: #f1f5f9;
    --bg-card: #ffffff;
    --bg-input: #f8fafc;
    --border-color: #cbd5e1;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --primary-glow: rgba(99, 102, 241, 0.15);
    --secondary-glow: rgba(168, 85, 247, 0.12);
}

/* Theme Toggle Button Styles */
.theme-toggle-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all var(--transition-speed) ease;
}

.theme-toggle-btn:hover {
    background-color: var(--bg-input);
    border-color: var(--primary-light);
    color: var(--primary-light);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Layout System */
.app-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar Styling (Desktop) */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: all var(--transition-speed) ease;
}

.sidebar-header {
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
}

.brand {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-menu {
    list-style: none;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.sidebar-menu-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-speed) ease;
}

.sidebar-menu-item a i {
    font-size: 18px;
}

.sidebar-menu-item.active a,
.sidebar-menu-item a:hover {
    color: var(--text-main);
    background-color: var(--bg-input);
}

.sidebar-menu-item.active a {
    background: linear-gradient(135deg, var(--primary) 0%, rgba(99, 102, 241, 0.4) 100%);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    padding: 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding-bottom: 100px; /* Mobile navigation buffer */
}

/* Top Navbar (Action header) */
.top-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.page-title h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.page-title p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Mobile Bottom Navigation (Hidden on desktop) */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    z-index: 999;
    padding: 10px 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
}

.mobile-nav-menu {
    display: flex;
    justify-content: space-around;
    list-style: none;
    align-items: center;
}

.mobile-nav-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}

.mobile-nav-item a i {
    font-size: 20px;
}

.mobile-nav-item.active a,
.mobile-nav-item a:hover {
    color: var(--primary-light);
}

/* Dashboard Summary Cards & Stats Grid */
.summary-grid,
.stats-grid,
.grid-cards {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    margin-bottom: 24px !important;
    width: 100% !important;
}

.stats-grid-4 {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    margin-bottom: 24px !important;
    width: 100% !important;
}

@media (max-width: 1200px) {
    .summary-grid,
    .stats-grid,
    .stats-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    .summary-grid,
    .stats-grid,
    .stats-grid-4 {
        grid-template-columns: 1fr;
    }
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 255, 255, 0.02);
    border-color: var(--primary-light);
}

.card.primary-card::before { background: var(--primary); }
.card.secondary-card::before { background: var(--secondary); }
.card.success-card::before { background: var(--success); }
.card.danger-card::before { background: var(--danger); }
.card.warning-card::before { background: var(--warning); }

.card-info h3 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-info .value {
    font-size: 26px;
    font-weight: 700;
}

.card-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.primary-card .card-icon { background-color: rgba(99, 102, 241, 0.15); color: var(--primary-light); }
.secondary-card .card-icon { background-color: rgba(168, 85, 247, 0.15); color: var(--secondary); }
.success-card .card-icon { background-color: rgba(16, 185, 129, 0.15); color: var(--success); }
.danger-card .card-icon { background-color: rgba(244, 63, 94, 0.15); color: var(--danger); }
.warning-card .card-icon { background-color: rgba(245, 158, 11, 0.15); color: var(--warning); }

/* Stat Card System (Modern Rich KPI Box) */
.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.18);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

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

.stat-info,
.stat-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
    min-width: 0;
}

.stat-info h3,
.stat-details span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.stat-info .value,
.stat-details h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.25;
    word-break: break-word;
    margin: 0;
}

.stat-info small,
.stat-details small {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}

/* Graphs and Content Split */
.content-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.glass-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.box-header h2 {
    font-size: 18px;
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-md);
    background-color: var(--bg-input);
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn:hover {
    background-color: var(--border-color);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    box-shadow: 0 4px 15px var(--success-glow);
}

.btn-success:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 10px var(--primary-glow);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 13, 26, 0.7);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    animation: modalShow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

@keyframes modalShow {
    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;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--text-main);
}

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* Tables & Lists */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.custom-table th {
    background-color: rgba(27, 33, 56, 0.5);
    padding: 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.custom-table td {
    padding: 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.custom-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.01);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success { background-color: rgba(16, 185, 129, 0.15); color: var(--success); }
.badge-danger { background-color: rgba(244, 63, 94, 0.15); color: var(--danger); }
.badge-warning { background-color: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge-primary { background-color: rgba(99, 102, 241, 0.15); color: var(--primary-light); }

/* Custom Product Image Styling */
.table-product-img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

/* Search Bar Wrapper */
.search-filter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-box-wrapper {
    position: relative;
    flex-grow: 1;
    max-width: 400px;
}

.search-box-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box-wrapper input {
    padding-left: 44px;
}

/* Barcode Scanner Box */
.scanner-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    background-color: rgba(0, 0, 0, 0.3);
}

#reader {
    width: 100%;
}

#reader__scan_region {
    background: transparent !important;
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border: 40px solid rgba(10, 13, 26, 0.6);
    pointer-events: none;
    z-index: 5;
}

.scanner-laser {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--danger);
    box-shadow: 0 0 10px var(--danger);
    animation: laserScan 2s linear infinite;
    z-index: 6;
}

@keyframes laserScan {
    0% { top: 40px; }
    50% { top: calc(100% - 40px); }
    100% { top: 40px; }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    min-width: 300px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    border-left: 4px solid var(--primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.success { border-left-color: var(--success); }
.toast.danger { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

/* QR Code & Barcode print layout styling */
.barcode-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    color: #000;
    margin-top: 10px;
}

.barcode-item svg {
    max-width: 100%;
}

/* Sales Cart styling */
.cart-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-input);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.cart-item-info h4 {
    font-size: 14px;
    margin-bottom: 4px;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-item-qty button {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background-color: var(--border-color);
    color: var(--text-main);
    cursor: pointer;
}

.cart-item-qty button:hover {
    background-color: var(--primary);
}

.cart-total-section {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .content-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none; /* Hide sidebar on mobile */
    }
    
    .mobile-nav {
        display: block; /* Show bottom navigation */
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
        padding-bottom: 100px;
    }
    
    .top-navbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .top-navbar .btn {
        width: 100%;
        justify-content: center;
    }
    
    .search-filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box-wrapper {
        max-width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* AI Chat Assistant Styles */
.ai-chat-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    box-shadow: 0 8px 24px var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
}

.ai-chat-trigger:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 30px rgba(168, 85, 247, 0.5);
}

.ai-chat-window {
    position: fixed;
    bottom: 105px;
    right: 30px;
    width: 380px;
    height: 500px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    z-index: 9998;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: chatShow 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(20px);
}

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

.ai-chat-header {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 15px;
}

.ai-chat-title i {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 18px;
}

.ai-chat-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s;
}

.ai-chat-close:hover {
    color: var(--text-main);
}

.ai-chat-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.chat-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.5;
}

.chat-bubble.assistant {
    background-color: var(--bg-input);
    color: var(--text-main);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-color);
}

.chat-bubble.user {
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.ai-chat-input-area {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.ai-chat-input-area input {
    flex-grow: 1;
    border-radius: 20px;
}

.ai-chat-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ai-chat-send:hover {
    background-color: var(--primary-light);
    transform: scale(1.05);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background-color: var(--bg-input);
    border-radius: 16px;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-color);
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: var(--text-muted);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* ========================================================
   MODERN TABLE & DATA PRESENTATION SYSTEM
   ======================================================== */
.table-responsive,
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
}

table,
.custom-table,
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
    margin: 0;
}

.custom-table thead th,
.data-table thead th,
table thead th {
    background-color: rgba(27, 33, 56, 0.75);
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.custom-table thead th:first-child,
.data-table thead th:first-child {
    border-top-left-radius: var(--radius-sm);
}

.custom-table thead th:last-child,
.data-table thead th:last-child {
    border-top-right-radius: var(--radius-sm);
}

.custom-table tbody td,
.data-table tbody td,
table tbody td {
    padding: 15px 18px;
    border-bottom: 1px solid rgba(34, 45, 74, 0.55);
    font-size: 13.5px;
    color: var(--text-main);
    vertical-align: middle;
    transition: background-color 0.15s ease;
}

.custom-table tbody tr:hover td,
.data-table tbody tr:hover td,
table tbody tr:hover td {
    background-color: rgba(99, 102, 241, 0.05);
}

.custom-table tbody tr:last-child td,
.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Badges System */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    line-height: 1;
    white-space: nowrap;
    background: var(--bg-input);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.badge-primary {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.35);
}

.badge-secondary {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.35);
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-danger,
.badge-error {
    background: rgba(244, 63, 94, 0.15);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.35);
}

.badge-dark {
    background: var(--bg-input);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

/* Action Button Groups */
.table-actions,
.action-btns {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 13px;
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-icon:hover {
    border-color: var(--primary-light);
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.12);
    transform: translateY(-1px);
}

.btn-icon.danger:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(244, 63, 94, 0.12);
}

.btn-icon.success:hover {
    border-color: var(--success);
    color: var(--success);
    background: rgba(16, 185, 129, 0.12);
}

/* ========================================================
   YAZDIRMA (PRINT) STİLLERİ
   ======================================================== */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }

    .sidebar,
    .top-navbar,
    .tab-btn,
    .btn,
    .toast-container,
    .modal-overlay:not(#saleDetailModal),
    form {
        display: none !important;
    }

    .app-container {
        display: block !important;
    }

    .main-content {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }

    .glass-box {
        background: transparent !important;
        border: 1px solid #cbd5e1 !important;
        box-shadow: none !important;
        color: #000000 !important;
        padding: 12px !important;
        page-break-inside: avoid;
    }

    .data-table,
    .custom-table {
        width: 100% !important;
        color: #000000 !important;
        border-collapse: collapse !important;
    }

    .data-table th,
    .custom-table th {
        background: #f1f5f9 !important;
        color: #000000 !important;
        border: 1px solid #cbd5e1 !important;
    }

    .data-table td,
    .custom-table td {
        color: #000000 !important;
        border: 1px solid #e2e8f0 !important;
    }
}


