@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ═══════════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════════ */
:root {
    --sidebar-bg: #102f31;
    --sidebar-active: #214f52;
    --sidebar-hover: rgba(255, 255, 255, 0.06);
    --bg-main: #eef5f4;
    --primary: #143638;
    --primary-soft: #e8f2f1;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --accent-amber: #f59e0b;
    --accent-blue: #2563eb;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --card-bg: #ffffff;
    --border: #e5eef0;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px rgba(15, 23, 42, 0.06);
}

/* ═══════════════════════════════════════════════
   RESET
   ═══════════════════════════════════════════════ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f6f8fb;
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ═══════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════ */
.sidebar {
    width: 84px;
    min-width: 84px;
    background: #203137;
    color: #fff;
    padding: 22px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    z-index: 100;
    border-radius: 0 26px 26px 0;
    box-shadow: 18px 0 46px rgba(15, 23, 42, 0.14);
    overflow: hidden;
    transition: width 0.24s ease, min-width 0.24s ease;
}

.sidebar:hover,
.sidebar:focus-within {
    width: 264px;
    min-width: 264px;
    align-items: stretch;
}

.brand {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: #ffffff;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 8px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 16px 26px rgba(15, 23, 42, 0.16);
    overflow: hidden;
    transition: width 0.24s ease, background 0.24s ease;
}

.sidebar:hover .brand,
.sidebar:focus-within .brand {
    width: 100%;
    background: #ffffff;
}

.brand img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex: 0 0 auto;
}

.brand span {
    min-width: 150px;
    width: 0;
    display: none;
    opacity: 0;
    color: #203137;
    white-space: nowrap;
    transition: opacity 0.18s ease;
}

.sidebar:hover .brand span,
.sidebar:focus-within .brand span {
    display: inline;
    width: auto;
    opacity: 1;
}

.nav-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.sidebar nav {
    width: 100%;
    flex: 1;
}

.nav-menu li {
    margin-bottom: 0;
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 15px;
    font-weight: 500;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    transition: all 0.25s;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar:hover .nav-link,
.sidebar:focus-within .nav-link {
    width: 100%;
    justify-content: flex-start;
    gap: 14px;
    padding: 0 14px;
}

.nav-link i,
.nav-link svg {
    width: 19px;
    height: 19px;
    min-width: 19px;
    flex: 0 0 19px;
    stroke: currentColor;
}

.nav-link span {
    position: static;
    transform: none;
    pointer-events: auto;
    width: 0;
    display: none;
    overflow: hidden;
    opacity: 0;
    background: transparent;
    color: #fff;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    transition: all 0.18s ease;
}

.sidebar:hover .nav-link span,
.sidebar:focus-within .nav-link span {
    display: inline;
    width: auto;
    opacity: 1;
}

.nav-link.active {
    background: var(--sidebar-active);
    color: #fff;
}

.nav-link:hover:not(.active) {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 14px;
    margin-top: auto;
}

.platform-note {
    width: 200px;
    margin: 0 0 12px 4px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 11px;
    line-height: 1.35;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.sidebar:hover .platform-note,
.sidebar:focus-within .platform-note {
    opacity: 1;
}

.sidebar-footer .nav-link {
    color: rgba(255, 255, 255, 0.5);
}

/* ═══════════════════════════════════════════════
   MAIN WRAPPER
   ═══════════════════════════════════════════════ */
.main-wrapper {
    margin-left: 84px;
    flex: 1;
    padding: 32px 44px 48px;
    min-height: 100vh;
    max-width: none;
}

/* ═══════════════════════════════════════════════
   HEADER ROW
   ═══════════════════════════════════════════════ */
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(229, 238, 240, 0.85);
    border-radius: 20px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(16px);
}

.search-container {
    background: #f7faf9;
    border: 1px solid #e5eef0;
    border-radius: 14px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(520px, 48vw);
}

.search-container input {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    font-size: 13px;
    color: var(--text-main);
}

.user-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 13px;
}

.avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #f7b733, #fc4a1a);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

/* ═══════════════════════════════════════════════
   WELCOME CARD
   ═══════════════════════════════════════════════ */
.welcome-card {
    background: var(--card-bg);
    padding: 24px 28px;
    border-radius: 22px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07);
    margin-bottom: 24px;
    border: 1px solid rgba(229, 238, 240, 0.7);
}

.dashboard-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.range-selector-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.quick-ranges {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: #f2f6f6;
    border: 1px solid #e1ecee;
    border-radius: 14px;
}

.quick-ranges a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 700;
}

.quick-ranges a.active,
.quick-ranges a:hover {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.range-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #fff;
    border: 1px solid #e1ecee;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045);
}

.range-select,
.range-date {
    width: auto;
    min-width: 138px;
    height: 40px;
    padding: 8px 12px;
    border-radius: 12px;
    font-weight: 700;
}

.custom-range-inputs {
    gap: 8px;
    align-items: center;
}

.custom-range-inputs span {
    color: var(--text-muted);
    font-weight: 800;
}

.range-apply {
    min-height: 40px;
    border-radius: 13px;
}

.period-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.period-card {
    background: #fff;
    border: 1px solid rgba(229, 238, 240, 0.85);
    border-radius: 18px;
    padding: 16px 18px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
    position: relative;
    overflow: hidden;
}

.period-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--primary);
}

.period-card:nth-child(1) {
    background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
}

.period-card:nth-child(1)::before {
    background: #22c55e;
}

.period-card:nth-child(2) {
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}

.period-card:nth-child(2)::before {
    background: #3b82f6;
}

.period-card:nth-child(3) {
    background: linear-gradient(135deg, #ffffff 0%, #f5f3ff 100%);
}

.period-card:nth-child(3)::before {
    background: #7c3aed;
}

.period-card:nth-child(4) {
    background: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%);
}

.period-card:nth-child(4)::before {
    background: #f97316;
}

.period-card span {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.period-card strong {
    display: block;
    margin-top: 8px;
    font-size: clamp(18px, 1.3vw, 24px);
}

.period-card small {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 11px;
}

.welcome-card h2 {
    font-size: 23px;
    font-weight: 700;
}

.welcome-card p {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 6px;
}

/* ═══════════════════════════════════════════════
   STAT CARDS
   ═══════════════════════════════════════════════ */
.revenue-layout {
    display: grid;
    grid-template-columns: minmax(320px, 1.3fr) minmax(320px, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.ops-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.channel-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    padding: 18px 20px;
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.055);
    border: 1px solid rgba(229, 238, 240, 0.75);
}

.stat-total {
    min-height: 142px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-total .stat-value {
    font-size: clamp(30px, 3vw, 46px);
}

.stat-label {
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 500;
    margin-bottom: 10px;
}

.stat-value {
    font-size: clamp(19px, 1.4vw, 25px);
    font-weight: 700;
    letter-spacing: 0;
}

.stat-trend {
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
}

.stat-subline {
    display: none;
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 8px;
    font-weight: 600;
    line-height: 1.4;
}

.trend-up {
    color: var(--accent-green);
}

.trend-down {
    color: var(--accent-red);
}

/* Stat Card Variations */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card.stat-primary {
    border-left: 5px solid var(--primary);
    background: linear-gradient(135deg, #ffffff 0%, #f4fbfa 100%);
}

.stat-card.stat-woocommerce {
    border-left: 5px solid #7c3aed;
    background: linear-gradient(to bottom right, #ffffff, #f5f3ff);
}
.stat-card.stat-woocommerce .stat-label {
    color: #6d28d9;
    font-weight: 700;
}

.stat-card.stat-trendyol {
    border-left: 5px solid #f97316;
    background: linear-gradient(to bottom right, #ffffff, #fffbeb);
}
.stat-card.stat-trendyol .stat-label {
    color: #b45309;
    font-weight: 700;
}

.stat-card.stat-hepsiburada {
    border-left: 5px solid #ef4444;
    background: linear-gradient(to bottom right, #ffffff, #fef2f2);
}
.stat-card.stat-hepsiburada .stat-label {
    color: #b91c1c;
    font-weight: 700;
}

.stat-card.stat-pending-box {
    border-left: 5px solid #f59e0b;
    background: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%);
}

.stat-card .stat-label {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 11px;
}

/* Channel-specific label colors */
.channel-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
}

.ch-woocommerce {
    background: #ede9fe;
    color: #6d28d9;
}

.ch-trendyol {
    background: #fef3c7;
    color: #b45309;
}

.ch-hepsiburada {
    background: #ffe4e6;
    color: #be123c;
}

/* ═══════════════════════════════════════════════
   ANALYTICS CARDS
   ═══════════════════════════════════════════════ */
.analytics-grid {
    display: grid;
    grid-template-columns: 1.05fr 1.1fr 1.1fr 0.9fr;
    gap: 18px;
    margin-bottom: 24px;
}

.analytics-card {
    background: #fff;
    border: 1px solid rgba(229, 238, 240, 0.9);
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.055);
    min-height: 190px;
}

.panel-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 18px;
}

.summary-panel {
    display: grid;
    gap: 12px;
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 14px;
    font-weight: 700;
}

.summary-row span {
    color: var(--text-muted);
    font-size: 12px;
}

.summary-row strong {
    font-size: 18px;
}

.summary-row.accent-blue {
    background: #eff6ff;
    color: #2563eb;
}

.summary-row.accent-green {
    background: #ecfdf5;
    color: #059669;
}

.summary-row.accent-orange {
    background: #fff7ed;
    color: #ea580c;
}

.donut-wrap {
    display: flex;
    align-items: center;
    gap: 22px;
}

.donut {
    position: relative;
    width: 118px;
    min-width: 118px;
    height: 118px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.donut::after {
    content: '';
    position: absolute;
    inset: 28px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.donut span {
    position: relative;
    z-index: 1;
    font-size: 24px;
    font-weight: 800;
}

.legend-list {
    display: grid;
    gap: 10px;
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.35;
}

.legend-list span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-list i {
    width: 9px;
    height: 9px;
    min-width: 9px;
    border-radius: 50%;
}

.focus-panel {
    background: linear-gradient(135deg, #203137 0%, #102f31 100%);
    color: #fff;
}

.focus-panel .panel-title {
    color: rgba(255, 255, 255, 0.86);
}

.focus-metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.focus-metric span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
    font-weight: 600;
}

.focus-metric strong {
    font-size: 26px;
}

.focus-note {
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 12px;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════
   DATA CARD (TABLE WRAPPER)
   ═══════════════════════════════════════════════ */
.data-card {
    background: var(--card-bg);
    padding: 26px 28px 16px;
    border-radius: 22px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.06);
    margin-bottom: 24px;
    border: 1px solid rgba(229, 238, 240, 0.9);
    overflow-x: auto;
}

.data-card h3 {
    color: var(--primary);
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 20px;
}

table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    table-layout: auto;
}

th {
    text-align: left;
    padding: 12px 14px;
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #fbfdfd;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 13px 14px;
    font-size: 13px;
    border-bottom: 1px solid #f4f6f7;
    vertical-align: middle;
}

tbody tr {
    transition: background 0.16s ease;
}

tbody tr:hover {
    background: #f7fbfb;
}

tr:last-child td {
    border-bottom: none;
}

/* ═══════════════════════════════════════════════
   STATUS BADGES
   ═══════════════════════════════════════════════ */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 600;
}

.badge-delivered,
.badge-completed {
    background: #dcfce7;
    color: #166534;
}

.badge-processing,
.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-shipped {
    background: #dbeafe;
    color: #1e40af;
}

.badge-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.badge-new {
    background: #e0e7ff;
    color: #3730a3;
}

/* ═══════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 12.5px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 20px rgba(20, 54, 56, 0.12);
}

.btn-primary:hover {
    background: #1e4d50;
}

.btn-ghost {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: #f0f5f5;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-icon:hover {
    color: var(--primary);
    background: #f0f5f5;
}

/* ═══════════════════════════════════════════════
   PROFESSIONAL OPERATION UI REFINEMENTS
   ═══════════════════════════════════════════════ */
.page-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.last-sync {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
}

.last-sync::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.filters-card {
    padding: 22px 24px !important;
    background: linear-gradient(180deg, #ffffff 0%, #fbfefe 100%);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, max-content));
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
}

.filters-grid > div {
    min-width: 140px;
}

.filters-grid .form-input {
    min-height: 44px;
}

.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.table-toolbar h3 {
    margin: 0;
}

.order-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bulk-actions {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 6px;
    background: #f7faf9;
    border: 1px solid #e1ecee;
    border-radius: 14px;
}

.bulk-actions.is-visible {
    display: flex;
}

.bulk-actions span {
    padding: 0 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
}

.order-row {
    cursor: pointer;
}

.order-row.is-expanded {
    background: #f8fbfb;
}

.order-detail-row {
    display: none;
}

.order-detail-row.is-open {
    display: table-row;
}

.order-detail-row td {
    padding: 0 14px 16px;
    background: #f8fbfb;
}

.order-detail-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    padding: 18px;
    border: 1px solid #e1ecee;
    border-radius: 16px;
    background: #fff;
}

.detail-block {
    min-width: 0;
}

.detail-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.detail-block strong {
    display: block;
    margin-bottom: 6px;
}

.detail-block p {
    color: var(--text-muted);
    font-size: 12.5px;
    line-height: 1.5;
}

.detail-items {
    display: grid;
    gap: 8px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f4f5;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item strong {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.35;
}

.detail-item span {
    flex: 0 0 auto;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.detail-manage {
    padding: 16px;
    border: 1px solid #e1ecee;
    border-radius: 16px;
    background: linear-gradient(180deg, #fbfefe 0%, #f6faf9 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045);
}

.detail-manage .form-label {
    margin-top: 12px;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.detail-manage .form-label:first-of-type {
    margin-top: 0;
}

.inline-save-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.inline-save-row .btn {
    min-height: 42px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.wc-complete-btn {
    color: #047857;
}

.wc-complete-btn:hover {
    color: #065f46;
    background: #ecfdf5;
}

.mini-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.mini-badge-live {
    background: #dcfce7;
    color: #166534;
}

.settings-panel {
    padding: 22px 24px !important;
}

.data-card > h3,
.settings-panel-header h3 {
    color: var(--primary);
}

.settings-panel-accent {
    background: linear-gradient(180deg, #ffffff 0%, #f7fbfa 100%);
}

.settings-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.settings-panel-header h3 {
    margin-bottom: 6px;
}

.settings-panel-header p {
    color: var(--text-muted);
    font-size: 13px;
}

.mono-input,
.cron-command {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}

.cron-command {
    background: #102f31;
    color: #e8f2f1;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 12px;
    overflow-x: auto;
    margin-top: 6px;
}

/* ═══════════════════════════════════════════════
   SYNC INDICATOR
   ═══════════════════════════════════════════════ */
.sync-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.sync-bar .last-sync {
    font-size: 12px;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════ */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 36px;
    background:
        radial-gradient(circle at 18% 18%, rgba(34, 197, 94, 0.18), transparent 28%),
        radial-gradient(circle at 82% 82%, rgba(59, 130, 246, 0.14), transparent 30%),
        linear-gradient(135deg, #102f31 0%, #173f42 46%, #eef5f4 46%, #f8fbfb 100%);
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 440px);
    width: min(1040px, 100%);
    min-height: 600px;
    border: 1px solid rgba(229, 238, 240, 0.45);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 34px 90px rgba(15, 23, 42, 0.22);
}

.login-panel {
    padding: 52px;
}

.login-intro {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    background:
        linear-gradient(160deg, rgba(16, 47, 49, 0.96), rgba(32, 49, 55, 0.94)),
        linear-gradient(135deg, #102f31, #256d70);
}

.login-intro::after {
    content: '';
    position: absolute;
    right: -90px;
    bottom: -90px;
    width: 240px;
    height: 240px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
}

.login-logo-mark {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.18);
    margin-bottom: 28px;
}

.login-logo-mark img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.login-eyebrow {
    color: rgba(255, 255, 255, 0.66);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.login-intro h1 {
    max-width: 460px;
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1.02;
    letter-spacing: 0;
    margin-bottom: 18px;
}

.login-intro p {
    max-width: 430px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 15px;
    line-height: 1.65;
}

.login-feature-list {
    display: grid;
    gap: 12px;
    margin-top: 34px;
}

.login-feature-list span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 700;
}

.login-feature-list svg {
    width: 18px;
    height: 18px;
    color: #22c55e;
}

.login-card {
    background: #fff;
    padding: 52px 44px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-brand {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-brand img {
    width: 46px;
    height: 46px;
    padding: 7px;
    border-radius: 16px;
    border: 1px solid #e1ecee;
    object-fit: contain;
}

.login-brand strong,
.login-brand span {
    display: block;
}

.login-brand span {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 30px;
}

.login-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 13px;
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 6px;
    margin-top: 16px;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    font-size: 13.5px;
    outline: none;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(20, 54, 56, 0.08);
}

.login-btn {
    width: 100%;
    margin-top: 28px;
    padding: 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.login-btn:hover {
    background: #1e4d50;
    transform: translateY(-1px);
}

.login-footer-note {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid #eef3f4;
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
}

/* ═══════════════════════════════════════════════
   FORMS (Settings, Users)
   ═══════════════════════════════════════════════ */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group.full {
    grid-column: 1 / -1;
}

/* Toggle Switch */
.toggle-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: #d1d5db;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.toggle.on {
    background: var(--accent-green);
}

.toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.toggle.on::after {
    transform: translateX(20px);
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .revenue-layout,
    .channel-stats-grid {
        grid-template-columns: 1fr;
    }

    .ops-mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .analytics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .period-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-hero,
    .header-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .search-container {
        width: 100%;
    }

    .range-selector-container,
    .range-form {
        justify-content: flex-start;
        width: 100%;
    }

    .order-detail-panel {
        grid-template-columns: 1fr;
    }

    .login-shell {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .login-intro {
        min-height: 360px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 64px;
        min-width: 64px;
        padding: 16px 8px;
        border-radius: 0 20px 20px 0;
    }

    .sidebar:hover,
    .sidebar:focus-within {
        width: 220px;
        min-width: 220px;
    }

    .brand {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        padding: 7px;
    }

    .brand img {
        width: 34px;
        height: 34px;
    }

    .nav-link {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .nav-link span {
        display: none;
    }

    .sidebar-footer {
        display: block;
    }

    .main-wrapper {
        margin-left: 64px;
        padding: 18px 14px 34px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .revenue-layout,
    .channel-stats-grid,
    .ops-mini-grid {
        grid-template-columns: 1fr;
    }

    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .period-grid {
        grid-template-columns: 1fr;
    }

    .donut-wrap {
        align-items: flex-start;
        flex-direction: column;
    }

    .search-container {
        width: 100%;
    }

    .dashboard-hero form {
        flex-wrap: wrap;
    }

    .quick-ranges,
    .range-form {
        width: 100%;
    }

    .quick-ranges {
        overflow-x: auto;
    }

    .range-select,
    .range-date {
        min-width: 0;
        width: 100%;
    }

    #customRangeInputs {
        flex-wrap: wrap;
        width: 100%;
    }

    .bulk-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .table-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .login-body {
        padding: 18px;
        background: linear-gradient(160deg, #102f31 0%, #173f42 42%, #f8fbfb 42%, #f8fbfb 100%);
    }

    .login-shell {
        border-radius: 24px;
    }

    .login-panel,
    .login-card {
        padding: 32px 24px;
    }

    .login-intro {
        min-height: auto;
    }

    .login-intro h1 {
        font-size: 34px;
    }
}
