/* LogiTrack Pro CSS Style Sheet */

/* Variables and Tokens */
:root {
    --bg-primary: #f8fafc;       /* Slate 50 */
    --bg-secondary: #ffffff;     /* White navigation */
    --bg-card: #ffffff;          /* White cards */
    --border-color: #e2e8f0;     /* Slate 200 */
    --border-hover: #cbd5e1;     /* Slate 300 */
    
    --text-primary: #0f172a;     /* Slate 900 */
    --text-secondary: #475569;   /* Slate 600 */
    --text-muted: #94a3b8;       /* Slate 400 */
    
    --primary: #0284c7;         /* Royal Sky Blue */
    --primary-glow: rgba(2, 132, 199, 0.1);
    --secondary: #4f46e5;       /* Royal Indigo */
    
    --excel-header-bg: #f1f5f9;
    --upload-border: rgba(2, 132, 199, 0.3);
    --upload-bg: rgba(2, 132, 199, 0.02);
    
    /* Courier Colors */
    --color-xpressbees: #f97316;     /* Orange */
    --color-shadowfax: #0d9488;      /* Teal */
    
    /* Status Colors */
    --status-not-picked: #0ea5e9;     /* Sky Blue */
    --status-in-transit: #d97706;     /* Amber */
    --status-out-delivery: #7c3aed;   /* Purple */
    --status-delivered: #059669;      /* Emerald Green */
    --status-rto: #dc2626;            /* Rose Red */
    
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --card-shadow: 0 4px 18px -4px rgba(0, 0, 0, 0.08);
    --transition-speed: 0.25s;
    --border-radius: 12px;
}

body.dark-mode {
    --bg-primary: #0b0f19;       /* Obsidian Black */
    --bg-secondary: #111827;     /* Slate 900 */
    --bg-card: #1f2937;          /* Slate 800 */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.18);
    
    --text-primary: #f3f4f6;     /* Light Gray */
    --text-secondary: #9ca3af;   /* Muted Gray */
    --text-muted: #6b7280;       /* Slate 500 */
    
    --primary: #00f2fe;          /* Cyberpunk Cyan */
    --primary-glow: rgba(0, 242, 254, 0.15);
    --secondary: #a855f7;        /* Neon Purple */
    
    --excel-header-bg: #1f2937;
    --upload-border: rgba(0, 242, 254, 0.3);
    --upload-bg: rgba(0, 242, 254, 0.04);
    
    /* Courier Colors */
    --color-xpressbees: #fb923c;
    --color-shadowfax: #2dd4bf;
    
    /* Status Colors */
    --status-not-picked: #38bdf8;
    --status-in-transit: #fbbf24;
    --status-out-delivery: #a78bfa;
    --status-delivered: #34d399;
    --status-rto: #f87171;
    
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

html, body {
    height: 100%;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: #1f2937;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #374151;
}

/* Layout Framework */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100vw;
    position: relative;
}

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

.sidebar-brand {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.brand-icon {
    color: var(--primary);
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 0 6px var(--primary));
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.accent-text {
    color: var(--primary);
    text-shadow: 0 0 8px var(--primary-glow);
}

.sidebar-nav {
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}

.nav-item i {
    width: 20px;
    height: 20px;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.nav-item.active {
    background-color: var(--primary-glow);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.1);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot.green {
    background-color: var(--status-delivered);
    box-shadow: 0 0 8px var(--status-delivered);
}

.dot.pulse {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% {
        transform: scale(0.9);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
        box-shadow: 0 0 12px var(--status-delivered);
    }
    100% {
        transform: scale(0.9);
        opacity: 0.6;
    }
}

.status-text {
    font-weight: 500;
    color: var(--text-secondary);
}

/* Main Workspace */
.main-content {
    margin-left: 260px;
    flex-grow: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-speed) ease;
}

/* Navbar */
.navbar {
    height: 70px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px;
}

.navbar h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.date-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background-color: rgba(255, 255, 255, 0.03);
    padding: 8px 14px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
}

.date-display i {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.notifications-btn {
    position: relative;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-primary);
    transition: background-color var(--transition-speed) ease;
}

.notifications-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.notifications-btn i {
    width: 18px;
    height: 18px;
}

.notifications-btn .badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: var(--primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-primary);
}

/* Notifications Dropdown */
.notifications-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    width: 320px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    display: none;
    z-index: 120;
    max-height: 400px;
    flex-direction: column;
    overflow: hidden;
}

.notifications-dropdown.show {
    display: flex;
}

.dropdown-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
}

.clear-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
}

.clear-btn:hover {
    text-decoration: underline;
}

.dropdown-body {
    overflow-y: auto;
    flex-grow: 1;
}

.empty-log-msg {
    padding: 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.log-item {
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
    line-height: 1.4;
    transition: background-color var(--transition-speed) ease;
}

.log-item:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.log-time {
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.log-text {
    color: var(--text-secondary);
}

/* Dashboard Body Content */
.dashboard-body {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 100%;
    width: 100%;
}

/* Premium Card Styles */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 24px;
    transition: transform var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

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

/* Uploader Section */
.upload-section {
    padding: 32px;
    border: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(248, 250, 252, 0.5) 100%);
    position: relative;
    overflow: hidden;
}

.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.upload-info h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.upload-info p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.upload-dropzone {
    border: 2px dashed var(--upload-border);
    background-color: var(--upload-bg);
    border-radius: var(--border-radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-speed) ease;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
    border-color: var(--primary);
    background-color: var(--primary-glow);
    box-shadow: 0 0 20px var(--primary-glow);
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: var(--primary);
    margin-bottom: 16px;
    filter: drop-shadow(0 0 4px var(--primary-glow));
}

.upload-dropzone h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.upload-dropzone p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.browse-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
}

.upload-limits {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.file-input-hidden {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Stats Counter Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 16px;
    border-radius: var(--border-radius);
    min-width: 0;
}

.stat-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-wrapper i {
    width: 24px;
    height: 24px;
}

/* Colors for icon wrappers */
.stat-icon-wrapper.blue {
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--status-not-picked);
}
.stat-icon-wrapper.orange {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--status-in-transit);
}
.stat-icon-wrapper.purple {
    background-color: rgba(167, 139, 250, 0.1);
    color: var(--status-out-delivery);
}
.stat-icon-wrapper.green {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--status-delivered);
}
.stat-icon-wrapper.red {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--status-rto);
}
.stat-icon-wrapper.gold {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.2) 0%, rgba(202, 138, 4, 0.2) 100%);
    color: #eab308;
    filter: drop-shadow(0 0 4px rgba(234,179,8,0.2));
}

.stat-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
}

.highlight-card {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.08) 0%, rgba(79, 70, 229, 0.04) 100%);
    border: 1px solid rgba(2, 132, 199, 0.2);
    position: relative;
    overflow: hidden;
}

.highlight-card::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    top: -50px;
    right: -50px;
    pointer-events: none;
}

.text-light {
    color: var(--text-primary);
}

.text-glow {
    text-shadow: 0 0 10px rgba(254, 240, 138, 0.2);
}

.stat-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Charts Section */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 24px;
}

.chart-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chart-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.chart-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.chart-wrapper {
    position: relative;
    height: 280px;
    width: 100%;
}

/* Controls & Filters Panel */
.controls-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-bar {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

.search-bar input {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 14px 16px 14px 48px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.95rem;
    transition: all var(--transition-speed) ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-item label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.filter-item select, .filter-item input {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--transition-speed) ease;
}

.filter-item select:focus, .filter-item input:focus {
    border-color: var(--primary);
}

.controls-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    margin-top: 4px;
}

/* Button UI */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

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

.btn-primary:hover {
    background-color: #4f46e5;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.actions-right {
    display: flex;
    gap: 12px;
}

/* Data Table Styles */
.table-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-title-group h2 {
    font-size: 1.15rem;
    font-weight: 700;
}

.count-tag {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 20px;
}

.table-options {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.table-options select {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 10px;
    color: var(--text-primary);
    font-family: var(--font-family);
    outline: none;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

#orders-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

#orders-table th, #orders-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.address-cell {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

#orders-table th {
    font-weight: 600;
    color: var(--text-secondary);
    background-color: rgba(0, 0, 0, 0.01);
}

#orders-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: color var(--transition-speed) ease;
}

#orders-table th.sortable:hover {
    color: var(--text-primary);
}

.sort-icon {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-left: 4px;
    opacity: 0.6;
}

#orders-table tbody tr {
    transition: background-color var(--transition-speed) ease;
}

#orders-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.015);
}

/* Badges styling */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

select.badge-status {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    text-align: center;
    text-align-last: center;
    border: 1px solid rgba(0, 0, 0, 0.08);
    outline: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

select.badge-status option {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    text-transform: none;
    font-weight: 500;
    font-size: 0.85rem;
}

.badge-status.not-picked-up {
    background-color: rgba(56, 189, 248, 0.08);
    color: var(--status-not-picked);
    border: 1px solid rgba(56, 189, 248, 0.15);
}

.badge-status.in-transit {
    background-color: rgba(245, 158, 11, 0.08);
    color: var(--status-in-transit);
    border: 1px solid rgba(245, 158, 11, 0.15);
}

.badge-status.out-for-delivery {
    background-color: rgba(167, 139, 250, 0.08);
    color: var(--status-out-delivery);
    border: 1px solid rgba(167, 139, 250, 0.15);
}

.badge-status.delivered {
    background-color: rgba(16, 185, 129, 0.08);
    color: var(--status-delivered);
    border: 1px solid rgba(16, 185, 129, 0.15);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.05);
}

.badge-status.rto {
    background-color: rgba(239, 68, 68, 0.08);
    color: var(--status-rto);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.badge-courier {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}

.badge-courier.xpressbees {
    background-color: rgba(249, 115, 22, 0.08);
    color: var(--color-xpressbees);
    border: 1px solid rgba(249, 115, 22, 0.15);
}

.badge-courier.shadowfax {
    background-color: rgba(20, 184, 166, 0.08);
    color: var(--color-shadowfax);
    border: 1px solid rgba(20, 184, 166, 0.15);
}

.action-icon-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all var(--transition-speed) ease;
}

.action-icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--primary);
}

.action-icon-btn i {
    width: 16px;
    height: 16px;
}

.action-icon-btn.track-link:hover {
    color: var(--status-delivered);
    background-color: rgba(16, 185, 129, 0.08);
}

.empty-table-state {
    text-align: center;
    padding: 60px 0 !important;
}

.empty-state-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
}

.empty-state-icon {
    width: 48px;
    height: 48px;
}

/* Table Pagination styling */
.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    margin-top: 8px;
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.pagination-buttons {
    display: flex;
    gap: 6px;
}

.pg-btn {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all var(--transition-speed) ease;
}

.pg-btn:hover {
    background-color: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

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

.pg-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pg-btn-wide {
    width: auto;
    padding: 0 12px;
}

/* Modals styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: #111827;
    border: 1px solid var(--border-hover);
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 600px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75);
    overflow: hidden;
    animation: modal-slide-up var(--transition-speed) ease;
}

@keyframes modal-slide-up {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color var(--transition-speed) ease;
}

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

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

/* Timeline Meta Grid */
.timeline-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.meta-value {
    font-size: 0.9rem;
    font-weight: 600;
}

.copyable {
    cursor: pointer;
    color: var(--primary);
    text-decoration: underline;
    text-decoration-style: dotted;
}

.copyable:hover {
    color: #818cf8;
}

.timeline-title-section {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

/* Vertical timeline milestones styles */
.vertical-timeline {
    position: relative;
    padding-left: 32px;
    margin-top: 10px;
}

.vertical-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 24px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -28px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    border: 2px solid var(--text-muted);
    z-index: 10;
    transition: all var(--transition-speed) ease;
}

.timeline-item.completed .timeline-marker {
    border-color: var(--primary);
    background-color: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
}

.timeline-item.active .timeline-marker {
    border-color: var(--status-delivered);
    background-color: var(--status-delivered);
    box-shadow: 0 0 10px var(--status-delivered);
}

.timeline-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.timeline-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.timeline-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Settings Form Styles */
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
}

.form-group select, .form-group input {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--transition-speed) ease;
}

.form-group select option {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.form-group select:focus, .form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
}

.form-help {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Custom checkbox container */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    user-select: none;
    line-height: 1.4;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 1px;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all var(--transition-speed) ease;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--border-hover);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.settings-actions {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.hidden {
    display: none !important;
}

/* Toast Notifications styling */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 320px;
    max-width: calc(100vw - 40px);
}

.toast {
    background-color: #1f2937;
    border: 1px solid var(--border-hover);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 14px 18px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--text-primary);
    animation: toast-slide-in var(--transition-speed) cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.toast.success {
    border-left-color: var(--status-delivered);
}

.toast.warning {
    border-left-color: var(--status-in-transit);
}

.toast.error {
    border-left-color: var(--status-rto);
}

@keyframes toast-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.toast.success .toast-icon { color: var(--status-delivered); }
.toast.warning .toast-icon { color: var(--status-in-transit); }
.toast.error .toast-icon { color: var(--status-rto); }

.toast-content {
    flex-grow: 1;
}

.toast-title {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
}

.toast-close:hover {
    color: var(--text-primary);
}

/* Responsive Grid Adapters */
@media (max-width: 1200px) {
    .charts-row {
        grid-template-columns: 1fr;
    }
    .upload-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .mobile-menu-btn {
        display: block;
    }
}

@media (max-width: 768px) {
    .dashboard-body {
        padding: 16px;
        gap: 16px;
    }
    .navbar {
        padding: 0 16px;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .controls-actions {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    .actions-right {
        width: 100%;
    }
    .actions-right button {
        flex-grow: 1;
    }
    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .table-options {
        align-self: flex-end;
    }
    .table-pagination {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .timeline-meta-grid {
        grid-template-columns: 1fr;
    }
}

/* Tab View visibility */
.tab-view {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.tab-view.hidden {
    display: none !important;
}

/* Copy-to-Clipboard pointers */
.copyable-badge {
    cursor: pointer;
    position: relative;
    transition: all var(--transition-speed) ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.copyable-badge:hover {
    color: var(--primary) !important;
    text-shadow: 0 0 8px rgba(0, 242, 254, 0.3);
}

.copy-icon-hover {
    opacity: 0;
    width: 12px;
    height: 12px;
    transition: opacity var(--transition-speed) ease;
}

.copyable-badge:hover .copy-icon-hover {
    opacity: 0.7;
}

/* Raw CSV Editor tab styles */
.csv-editor-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 500px;
}

.csv-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.csv-editor-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.csv-editor-actions {
    display: flex;
    gap: 10px;
}

.csv-editor-body {
    flex-grow: 1;
    display: flex;
}

#csv-database-textarea {
    width: 100%;
    min-height: 380px;
    background-color: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    color: #a78bfa; /* purple/violet tint raw text */
    font-family: 'Consolas', 'Fira Code', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    transition: all var(--transition-speed) ease;
}

#csv-database-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
}

.csv-editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.warning-alert-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--status-in-transit);
}

.warning-alert-text i {
    width: 16px;
    height: 16px;
}

/* Edit buttons inside status badge */
.badge-status {
    position: relative;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.badge-status:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.badge-status::after {
    content: ' ✎';
    font-size: 0.65rem;
    margin-left: 4px;
    opacity: 0.5;
    transition: opacity var(--transition-speed) ease;
}

.badge-status:hover::after {
    opacity: 1;
}

/* Excel Grid Spreadsheet styling */
.excel-grid-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 750px;
}

.excel-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    flex-wrap: wrap;
    gap: 16px;
}

.excel-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.excel-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.excel-sheet-container {
    overflow: auto;
    max-height: 680px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-secondary);
    position: relative;
}

.excel-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    font-family: 'Consolas', 'Fira Code', monospace;
    table-layout: fixed;
    min-width: 1300px; /* Force overflow scroll on narrow views */
}

/* Widths for specific Excel columns */
.excel-table th, .excel-table td {
    border: 1px solid var(--border-color);
    padding: 0;
    vertical-align: middle;
    position: relative;
}

/* Excel gray header cell looks */
.excel-table th {
    background-color: var(--excel-header-bg);
    color: var(--text-secondary);
    font-weight: 600;
    text-align: center;
    padding: 6px;
    font-size: 0.75rem;
    user-select: none;
}

.excel-alphabet-row th {
    font-size: 0.75rem;
    background-color: var(--excel-header-bg);
    color: var(--text-muted);
    border-bottom: none;
    height: 24px;
    padding: 2px;
}

.excel-label-row th {
    font-family: var(--font-family);
    font-size: 0.8rem;
    border-top: none;
    height: 32px;
}

/* Row numbers columns styling */
.excel-row-num-col {
    width: 45px;
    background-color: var(--excel-header-bg) !important;
    color: var(--text-muted) !important;
    text-align: center;
    font-weight: 700;
    font-size: 0.75rem;
    border-right: 2px solid var(--border-color) !important;
}

/* Excel spreadsheet input style */
.excel-cell-input {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    color: var(--text-primary);
    padding: 8px 12px;
    font-family: inherit;
    font-size: inherit;
    outline: none;
    transition: all 0.15s ease;
    box-sizing: border-box;
    display: block;
}

.excel-cell-input:focus {
    background-color: rgba(16, 124, 65, 0.08); /* Excel green tint */
    box-shadow: inset 0 0 0 2px #107c41; /* excel green border highlight */
}

/* Style specific to Select dropdowns inside Excel cells */
.excel-cell-select {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    color: var(--text-primary);
    padding: 6px 10px;
    font-family: inherit;
    font-size: inherit;
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
}

.excel-cell-select option {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.excel-cell-select:focus {
    background-color: rgba(16, 124, 65, 0.08);
    box-shadow: inset 0 0 0 2px #107c41;
}

/* Delete button column styling */
.excel-delete-btn {
    background: none;
    border: none;
    color: var(--status-rto);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 8px;
    transition: background-color var(--transition-speed) ease;
}

.excel-delete-btn:hover {
    background-color: rgba(239, 68, 68, 0.12);
}

.excel-delete-btn i {
    width: 16px;
    height: 16px;
}

/* Scrollbar tweaks inside grid */
.excel-sheet-container::-webkit-scrollbar-corner {
    background: rgba(0, 0, 0, 0.3);
}

.excel-accent-btn:hover {
    color: #107c41 !important;
    background-color: rgba(16, 124, 65, 0.05) !important;
    border-color: rgba(16, 124, 65, 0.3) !important;
}

/* Month tab styling */
.month-tab:hover {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-hover) !important;
}

.month-tab.active {
    background-color: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 4px 12px var(--primary-glow) !important;
}

/* Theme toggle button styling overrides */
.theme-toggle-btn:hover {
    background-color: rgba(0, 0, 0, 0.06) !important;
}
body.dark-mode .theme-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

/* Sidebar collapsed states for desktop collapse */
.app-container.sidebar-collapsed .sidebar {
    transform: translateX(-260px);
}
.app-container.sidebar-collapsed .main-content {
    margin-left: 0;
}

/* Sidebar toggle button hover styling */
.sidebar-toggle-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}
body.dark-mode .sidebar-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/* Compact Sidebar state overrides */
@media(min-width: 1024px) {
    .app-container.sidebar-compact .sidebar {
        width: 76px;
    }
    .app-container.sidebar-compact .main-content {
        margin-left: 76px;
    }
    .app-container.sidebar-compact .sidebar .brand-text,
    .app-container.sidebar-compact .sidebar .nav-text,
    .app-container.sidebar-compact .sidebar-footer span {
        display: none !important;
    }
    .app-container.sidebar-compact .sidebar .dropdown-arrow,
    .app-container.sidebar-compact .sidebar .nav-dropdown-content {
        display: none !important;
    }
    .app-container.sidebar-compact .sidebar .sidebar-brand {
        justify-content: center;
        padding: 24px 0;
    }
    .app-container.sidebar-compact .sidebar .nav-item {
        justify-content: center;
        padding: 12px 0;
    }
    .app-container.sidebar-compact .sidebar .sidebar-footer {
        padding: 20px 0;
        justify-content: center;
    }
}

/* Premium styled select dropdown box */
.premium-select-box {
    width: 100%;
    padding: 12px 40px 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color) !important;
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    font-family: inherit;
    outline: none;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    transition: all var(--transition-speed) ease;
}

.premium-select-box:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-glow) !important;
}

body.dark-mode .premium-select-box {
    background-color: var(--bg-card) !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f3f4f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
}

.premium-select-box option {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

/* Excel monthly tab active styles */
.excel-month-tab.active {
    background-color: #107c41 !important;
    color: #ffffff !important;
    border-color: #107c41 !important;
    box-shadow: 0 4px 12px rgba(16, 124, 65, 0.25) !important;
}
.excel-month-tab:hover {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-hover) !important;
}

/* Secure Lock Screen backdrop overlays */
.lock-screen-overlay.show {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.lock-screen-content input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 12px var(--primary-glow) !important;
}

/* Toggle Switch Slider Styling */
.switch-container input:checked + .slider {
    background-color: var(--primary) !important;
}
.switch-container .slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.switch-container input:checked + .slider::before {
    transform: translateX(24px);
}

.excel-lock-backdrop {
    background-color: rgba(255, 255, 255, 0.7);
}
body.dark-mode .excel-lock-backdrop {
    background-color: rgba(15, 23, 42, 0.85);
}

/* Custom Highlight Cards for Courier Charges & Profit */
.highlight-card-orange {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0.04) 100%);
    border: 1px solid rgba(245, 158, 11, 0.2) !important;
    position: relative;
    overflow: hidden;
}
.highlight-card-orange::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    top: -50px;
    right: -50px;
    pointer-events: none;
}

.highlight-card-green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.04) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
    position: relative;
    overflow: hidden;
}
.highlight-card-green::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    top: -50px;
    right: -50px;
    pointer-events: none;
}

.highlight-card-red {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(239, 68, 68, 0.04) 100%);
    border: 1px solid rgba(239, 68, 68, 0.25) !important;
    position: relative;
    overflow: hidden;
}
.highlight-card-red::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    top: -50px;
    right: -50px;
    pointer-events: none;
}

/* Shipping Rate Card widget styling */
.rate-card-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}
.rate-inputs-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.rate-input-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.rate-input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.rate-input-group input {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
}
.rate-input-group input:focus {
    border-color: var(--primary);
}

/* Lock Countdown Badge Styling */
.lock-countdown-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    background-color: rgba(239, 68, 68, 0.08);
    color: var(--status-rto);
    border: 1px solid rgba(239, 68, 68, 0.2);
    transition: all 0.3s ease;
}
body.dark-mode .lock-countdown-badge {
    background-color: rgba(248, 113, 113, 0.15);
    color: var(--status-rto);
    border-color: rgba(248, 113, 113, 0.25);
}

/* Refund Tab Panels */
.refund-tabs-row {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 24px;
    width: 100%;
}
.refund-tab-btn {
    background: none;
    border: 1px solid var(--border-color);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}
.refund-tab-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}
.refund-tab-btn.active {
    background-color: var(--primary-glow);
    color: var(--primary);
    border-color: var(--primary);
}

/* Refund Calculations Layout */
.refund-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 32px;
    width: 100%;
}
@media (max-width: 768px) {
    .refund-detail-grid {
        grid-template-columns: 1fr;
    }
}
.refund-breakdown-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 0.9rem;
}
.refund-breakdown-table tr {
    border-bottom: 1px solid var(--border-color);
}
.refund-breakdown-table tr:last-child {
    border-bottom: 2px solid var(--text-primary);
    font-weight: 700;
    font-size: 1.05rem;
}
.refund-breakdown-table td {
    padding: 12px 6px;
}
.refund-breakdown-table td:last-child {
    text-align: right;
}

/* GST status badges */
.gst-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}
.gst-badge.waived {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--status-delivered);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.gst-badge.charged {
    background-color: rgba(249, 115, 22, 0.1);
    color: var(--color-xpressbees);
    border: 1px solid rgba(249, 115, 22, 0.2);
}

/* QR Code Mockup container */
.qr-modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 24px;
}
.qr-wrapper {
    background-color: #ffffff;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}
.qr-wrapper svg {
    display: block;
}
.qr-utr-input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: monospace;
    text-align: center;
    letter-spacing: 0.05em;
    outline: none;
}
.qr-utr-input:focus {
    border-color: var(--primary);
}

/* Dynamic status controls buttons styling */
.btn-status-outline {
    background-color: transparent;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    transition: all 0.2s ease;
}
.btn-status-outline:hover {
    background-color: rgba(0,0,0,0.03) !important;
    color: var(--text-primary) !important;
}
.btn-status-active {
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    cursor: default;
}
.btn-status-active.approve {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
}
.btn-status-active.reject {
    background-color: #ef4444 !important;
    border-color: #ef4444 !important;
}
.btn-status-active.pending {
    background-color: #f59e0b !important;
    border-color: #f59e0b !important;
}

/* Sidebar Settings Dropdown Submenu styling */
.nav-dropdown {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.nav-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: all var(--transition-speed) ease;
    outline: none;
}
.nav-dropdown-btn:hover {
    background-color: rgba(0, 0, 0, 0.02);
    color: var(--text-primary);
}
.nav-dropdown-btn i {
    width: 20px;
    height: 20px;
}
.nav-dropdown-btn .dropdown-arrow {
    margin-left: auto;
    width: 16px;
    height: 16px;
    transition: transform var(--transition-speed) ease;
}
.nav-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}
.nav-dropdown-content {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding-left: 10px;
    margin-top: 4px;
    border-left: 2px solid var(--border-color);
    margin-left: 24px;
}
.nav-dropdown.open .nav-dropdown-content {
    display: flex;
}
.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}
.nav-dropdown-item i {
    width: 16px;
    height: 16px;
}
.nav-dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
    color: var(--text-primary);
}
.nav-dropdown-item.active {
    background-color: var(--primary-glow) !important;
    color: var(--primary) !important;
    border: 1px solid rgba(2, 132, 199, 0.15);
}

/* New Courier Badges */
.badge-courier.delhivery {
    background-color: rgba(224, 86, 36, 0.08) !important;
    color: #e05624 !important;
    border: 1px solid rgba(224, 86, 36, 0.2) !important;
}
.badge-courier.ekart {
    background-color: rgba(14, 116, 144, 0.08) !important;
    color: #0e7490 !important;
    border: 1px solid rgba(14, 116, 144, 0.2) !important;
}

/* Refund Approval Status Badges styling */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.status-badge.approved {
    background-color: rgba(16, 185, 129, 0.08) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
}
.status-badge.rejected {
    background-color: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
}
.status-badge.pending {
    background-color: rgba(245, 158, 11, 0.08) !important;
    color: #f59e0b !important;
    border: 1px solid rgba(245, 158, 11, 0.2) !important;
}
.status-badge.processing {
    background-color: rgba(2, 132, 199, 0.08) !important;
    color: #0284c7 !important;
    border: 1px solid rgba(2, 132, 199, 0.2) !important;
}
body.dark-mode .status-badge.processing {
    background-color: rgba(0, 242, 254, 0.08) !important;
    color: #00f2fe !important;
    border: 1px solid rgba(0, 242, 254, 0.2) !important;
}
.no-copy {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
.allow-copy {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}
.refund-image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}
.refund-image-gallery img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: transform var(--transition-speed), border-color var(--transition-speed);
}
.refund-image-gallery img:hover {
    transform: scale(1.08);
    border-color: var(--primary);
}
.refund-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background-color: rgba(0,0,0,0.01);
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    margin-top: 8px;
}
.refund-upload-zone:hover {
    border-color: var(--primary);
    background-color: var(--upload-bg);
}
.refund-upload-zone i {
    font-size: 24px;
    color: var(--text-muted);
    margin-bottom: 8px;
}



