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

:root {
    --bg-main: #f0f4f8;
    --bg-sidebar: #111827;
    --bg-card: #ffffff;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --primary: #2563eb;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #0891b2;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --sidebar-width: 64px;
    --sidebar-expanded-width: 248px;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.07), 0 4px 16px rgba(0,0,0,0.04);
    
    /* Module Colors */
    --mod-penjualan: #16a34a;
    --mod-pembelian: #ea580c;
    --mod-persediaan: #7c3aed;
    --mod-bukubesar: #dc2626;
    --mod-kasbank: #0891b2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

body {
    background: #f0f4f8;
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    -webkit-font-smoothing: antialiased;
}

#root {
    height: 100%;
}

.app-container {
    display: flex;
    height: 100%;
    width: 100%;
}

/* Sidebar Slim (Accurate Style) */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 0;
    z-index: 100;
    transition: width 0.28s cubic-bezier(0.4,0,0.2,1);
    overflow: visible;
    scrollbar-width: none;
    box-shadow: 2px 0 16px rgba(0,0,0,0.18);
}

.sidebar::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.sidebar:hover {
    width: var(--sidebar-expanded-width);
}

.logo-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-bottom: 1.25rem;
    flex-shrink: 0;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-weight: 900;
    font-size: 1.25rem;
}

.logo-text {
    display: none;
    margin-left: 0.75rem;
    color: white;
    font-weight: 700;
    white-space: nowrap;
}

.sidebar:hover .logo-text {
    display: block;
}

.nav-links {
    width: 100%;
    list-style: none;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0.65rem 1.25rem;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-item i {
    min-width: 24px;
    display: flex;
    justify-content: center;
}

.nav-item span {
    display: none;
    margin-left: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.sidebar:hover .nav-item span {
    display: block;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-item.active {
    background: rgba(255,255,255,0.05);
    color: white;
    border-left: 4px solid var(--accent);
}

/* Module Specific Icon Colors on Hover/Active */
.nav-item[data-module="penjualan"]:hover i, .nav-item[data-module="penjualan"].active i { color: var(--mod-penjualan); }
.nav-item[data-module="pembelian"]:hover i, .nav-item[data-module="pembelian"].active i { color: var(--mod-pembelian); }
.nav-item[data-module="persediaan"]:hover i, .nav-item[data-module="persediaan"].active i { color: var(--mod-persediaan); }
.nav-item[data-module="bukubesar"]:hover i, .nav-item[data-module="bukubesar"].active i { color: var(--mod-bukubesar); }
.nav-item[data-module="kasbank"]:hover i, .nav-item[data-module="kasbank"].active i { color: var(--mod-kasbank); }

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Top Bar */
.topbar {
    height: 60px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
    z-index: 50;
    box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}

.search-box {
    width: 400px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #fcfcfc;
    outline: none;
}

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

.user-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.notification-bell {
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
}

/* Page Content */
.page-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem;
    background: #f0f4f8;
}

/* Cards */
.card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 1rem;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.2px;
}

/* Dashboard Gauge Styles */
.gauge-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.gauge-item {
    text-align: center;
    width: 200px;
}

.gauge-canvas-wrapper {
    position: relative;
    width: 180px;
    height: 100px;
    margin: 0 auto;
}

/* POS Interface (Accurate POS Style) */
.pos-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 0;
    height: calc(100vh - 60px);
    background: #f8fafc;
}

.pos-products {
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e5e7eb;
}

.pos-categories {
    background: white;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 1rem;
    overflow-x: auto;
}

.cat-btn {
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: white;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.cat-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.product-grid {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.prod-card {
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.85rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.18s ease;
}

.prod-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(37,99,235,0.12);
    border-color: var(--accent);
}

.prod-img {
    width: 100%;
    aspect-ratio: 1;
    background: #fcfcfc;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prod-name {
    font-size: 0.85rem;
    font-weight: 600;
    height: 2.4em;
    overflow: hidden;
}

.prod-price {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

/* POS Sidebar (Order Panel) */
.pos-order-panel {
    background: white;
    display: flex;
    flex-direction: column;
}

.order-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.order-summary {
    padding: 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #4b5563;
}

.total-row {
    font-size: 1.2rem;
    font-weight: 800;
    color: #111827;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #e5e7eb;
}

.pay-btn {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    margin-top: 1.25rem;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(37,99,235,0.3);
}

.pay-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 6px 20px rgba(37,99,235,0.4);
    transform: translateY(-1px);
}

/* Utility */
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }

/* Animation */
@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.animate-slide {
    animation: slideIn 0.3s ease-out;
}

/* --- Sales Module --- */
.sales-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.sales-table th {
    background: #f8f9fa;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-bottom: 2px solid #eee;
}

.sales-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #e6f7ff;
    color: #1890ff;
}

/* --- Receipt Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.receipt-paper {
    background: #fff;
    padding: 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.4;
    border: 1px solid #eee;
    margin-bottom: 1.5rem;
}

.receipt-header {
    text-align: center;
    margin-bottom: 1rem;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 1rem;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.receipt-footer {
    text-align: center;
    margin-top: 1rem;
    border-top: 1px dashed #ccc;
    padding-top: 1rem;
    font-size: 12px;
}

/* --- Print Rules --- */
@media print {
    @page {
        size: auto;
        margin: 10mm;
    }
    /* Hide everything by default */
    body * {
        visibility: hidden;
    }
    
    /* Make receipt paper, accurate invoice and their children visible */
    .receipt-paper, .receipt-paper *, .accurate-invoice, .accurate-invoice * {
        visibility: visible !important;
    }
    
    /* Reset layout properties of all ancestor containers so they don't clip */
    html, body, #root, .app-container, .main-content, .modal-overlay, .modal-content {
        visibility: visible !important;
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        position: static !important;
        display: block !important;
        width: auto !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
        border: none !important;
    }
    
    /* Style receipt paper and accurate invoice for actual page printing */
    .receipt-paper, .accurate-invoice {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: auto !important;
        border: none !important;
        box-shadow: none !important;
        background: #fff !important;
        margin: 0 !important;
        padding: 20px !important;
        font-size: 11pt !important;
        line-height: 1.4 !important;
    }

    /* Force tables to render cleanly in print */
    table {
        width: 100% !important;
        border-collapse: collapse !important;
        page-break-inside: auto;
    }
    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
    thead {
        display: table-header-group;
    }
    
    /* Hide elements with no-print class */
    .no-print, .no-print * {
        display: none !important;
    }
}

/* --- Sales Mobile-Style UI --- */
.sales-mobile-container {
    max-width: 520px;
    margin: 0 auto;
    background: #f0f4f8;
    min-height: calc(100vh - 60px);
    position: relative;
    border-radius: 0 0 16px 16px;
}

.sales-custom-header {
    background: linear-gradient(135deg, #0ea5e9, #3b82f6);
    color: white;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.mod-header-pembelian {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.mod-header-bukubesar {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.mod-header-kasbank {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.sales-custom-header::after,
.mod-header-pembelian::after,
.mod-header-bukubesar::after,
.mod-header-kasbank::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    top: -50px;
    right: -50px;
}

.sales-header-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.sales-branch-selector {
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.sales-section-title {
    padding: 1.25rem 1rem 0.5rem;
    font-weight: 600;
    color: #4b5563;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sales-see-all {
    color: #3b82f6;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
}

.sales-card-list {
    padding: 0 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sales-summary-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.sales-summary-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
}

.sales-summary-card.border-orange::before { background: #f97316; }
.sales-summary-card.border-yellow::before { background: #eab308; }
.sales-summary-card.border-red::before { background: #ef4444; }
.sales-summary-card.border-teal::before { background: #14b8a6; }
.sales-summary-card.border-gray::before { background: #d1d5db; }

.sales-card-left {
    padding-left: 0.5rem;
}

.sales-card-title {
    font-weight: 500;
    font-size: 1rem;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.sales-card-meta {
    font-size: 0.75rem;
    color: #9ca3af;
    display: flex;
    gap: 1rem;
}

.sales-card-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.sales-card-right {
    font-weight: 700;
    font-size: 1.1rem;
    color: #374151;
}

.sales-fab-button {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.4);
    cursor: pointer;
    border: none;
    transition: transform 0.2s;
}

.sales-fab-button:hover {
    transform: scale(1.05);
}

/* --- Login / Register View (Premium Redesign) --- */
@keyframes floatBlob {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1.04); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-page {
    display: flex;
    align-items: stretch;
    justify-content: center;
    min-height: 100vh;
    height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f2544 100%);
    position: relative;
    overflow: hidden;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

/* Decorative animated blobs */
.login-page::before,
.login-page::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    animation: floatBlob 8s ease-in-out infinite;
}
.login-page::before {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(56,189,248,0.25) 0%, transparent 70%);
    top: -80px;
    left: -80px;
}
.login-page::after {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(244,63,94,0.18) 0%, transparent 70%);
    bottom: -60px;
    right: -60px;
    animation-delay: -4s;
}

/* Left brand panel (hidden on small screens) */
.login-brand-panel {
    display: none;
}
@media (min-width: 960px) {
    .login-brand-panel {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        flex: 1;
        padding: 4rem 4rem;
        position: relative;
        z-index: 5;
        max-width: 520px;
    }
}
.login-brand-panel .brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 3rem;
}
.login-brand-panel .brand-icon {
    width: 44px;
    height: 44px;
    background: #f43f5e;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 900;
    color: white;
    font-family: serif;
    box-shadow: 0 4px 20px rgba(244,63,94,0.4);
}
.login-brand-panel .brand-name {
    color: white;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.login-brand-panel h2 {
    color: white;
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin-bottom: 1.25rem;
}
.login-brand-panel p {
    color: rgba(255,255,255,0.65);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 360px;
    margin-bottom: 2.5rem;
}
.login-brand-features {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.login-brand-features .feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
}
.login-brand-features .feature-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f43f5e;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(244,63,94,0.6);
}

/* Right card wrapper */
.login-card-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 1.5rem;
    position: relative;
    z-index: 10;
    overflow-y: auto;
}

/* The card itself */
.login-card {
    background: rgba(255,255,255,0.97);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem 2.25rem 2rem;
    border-radius: 20px;
    box-shadow: 0 32px 64px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.08);
    position: relative;
    animation: fadeInUp 0.5s ease-out both;
    backdrop-filter: blur(12px);
}

.accurate-login {
    /* no extra overrides needed */
}

.language-selector {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid #e5e7eb;
    padding: 0.3rem 0.65rem;
    border-radius: 8px;
    background: #f9fafb;
    z-index: 2;
}

.language-selector img {
    border-radius: 3px;
    width: 18px;
}

.language-selector select {
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.82rem;
    color: #4b5563;
    cursor: pointer;
    appearance: none;
    padding-right: 1.4rem;
    background-image: url('data:image/svg+xml;utf8,<svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="%234b5563" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg>');
    background-repeat: no-repeat;
    background-position: right center;
}

.login-logo {
    text-align: center;
    margin-bottom: 1.75rem;
    margin-top: 1.5rem;
}

.login-logo h1 {
    font-size: 1.7rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px !important;
    color: #1f2937 !important;
}

.login-logo h2 {
    font-size: 1.05rem !important;
    color: #374151 !important;
    font-weight: 600 !important;
    margin-bottom: 0.35rem !important;
}

.login-logo p {
    font-size: 0.875rem !important;
    color: #6b7280 !important;
}

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

.login-form-group label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.82rem;
    color: #374151;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.login-input-wrapper {
    position: relative;
}

.login-input-wrapper input {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    outline: none;
    font-size: 0.92rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: #1f2937;
    background: #f9fafb;
    box-sizing: border-box;
}

.login-input-wrapper input:focus {
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.password-toggle {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
}

.password-toggle:hover {
    color: #4b5563;
}

.login-forgot {
    text-align: right;
    margin-top: 0.4rem;
}

.login-forgot a {
    color: #0284c7;
    font-size: 0.8rem;
    text-decoration: none;
    font-weight: 500;
}
.login-forgot a:hover {
    text-decoration: underline;
}

.btn-login-accurate {
    width: 100%;
    padding: 0.82rem;
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.97rem;
    cursor: pointer;
    margin-top: 0.85rem;
    transition: all 0.2s;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 14px rgba(244,63,94,0.35);
}

.btn-login-accurate:hover {
    background: linear-gradient(135deg, #e11d48, #be123c);
    box-shadow: 0 6px 20px rgba(244,63,94,0.45);
    transform: translateY(-1px);
}
.btn-login-accurate:active {
    transform: translateY(0);
}

.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.25rem 0;
    color: #9ca3af;
    font-size: 0.8rem;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.login-divider:not(:empty)::before { margin-right: .65em; }
.login-divider:not(:empty)::after  { margin-left:  .65em; }

.btn-google-accurate {
    width: 100%;
    padding: 0.72rem;
    background: white;
    color: #374151;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.btn-google-accurate:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.login-footer {
    text-align: center;
    margin-top: 1.4rem;
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.6;
}

.login-footer a {
    color: #e11d48;
    text-decoration: none;
    font-weight: 700;
}
.login-footer a:hover {
    text-decoration: underline;
}

.login-version {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    color: rgba(255,255,255,0.3);
    font-size: 0.72rem;
    z-index: 20;
    pointer-events: none;
}

/* --- Company Selection View --- */
.company-selection-page {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #0f2544 100%);
    min-height: 100vh;
    padding-top: 1rem;
    font-family: 'Inter', sans-serif;
}

.company-selection-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0.5rem 1.5rem;
    margin-bottom: 2rem;
}

.company-selection-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    font-weight: 600;
    color: #fff;
}

.company-search-container {
    max-width: 500px;
    margin: 0 auto;
}

.company-search-box {
    background: rgba(255,255,255,0.97);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    overflow: hidden;
    position: relative;
    border-left: 5px solid #2563eb;
}

.company-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.company-search-header h2 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin: 0;
    font-weight: 600;
}

.company-search-add-btn {
    background: #0ea5e9; /* Light blue accent */
    color: white;
    border: none;
    width: 40px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.company-search-add-btn:hover {
    background: #0284c7;
}

.company-search-input-wrapper {
    padding: 1rem 1.5rem;
    position: relative;
}

.company-search-input-wrapper input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    outline: none;
    font-size: 0.95rem;
}

.company-search-input-wrapper i {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.company-list {
    max-width: 500px;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.company-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid transparent;
}

.company-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
    border-color: #10b981;
}

.company-card-top {
    padding: 2rem;
    text-align: center;
    position: relative;
}

.company-card-top .info-icon {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: #64748b;
}

.company-card-top .shield-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #cbd5e1;
}

.company-logo-circle {
    width: 96px;
    height: 96px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 24px rgba(37,99,235,0.35);
    font-size: 2rem;
    font-weight: 800;
}

.company-badge {
    background: #eff6ff;
    color: #2563eb;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    display: inline-block;
}

.company-card-bottom {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: white;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

/* --- Settings Popover --- */
.settings-popover-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99;
}

.settings-popover {
    position: absolute;
    left: 100%;
    margin-left: 12px;
    top: 0;
    width: 340px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
    padding: 1rem;
    z-index: 1001;
    cursor: default;
    animation: popoverFadeIn 0.2s ease-out forwards;
    transform-origin: left center;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #c1c8d0 transparent;
}

.settings-popover::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 20px; /* Align to the middle of nav-item */
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: white;
    rotate: 45deg;
    border-left: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    border-radius: 0 0 0 2px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.settings-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.settings-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

.popover-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 0.5rem 0.25rem 0.25rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.25rem;
}

.popover-wide {
    width: 680px !important; /* Widened to fit 4-column grids nicely */
}

.popover-extra-wide {
    width: 840px !important; /* Widened to fit 5-column grids nicely */
}

.settings-grid-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.5rem 0.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.3rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
}

.settings-grid-item:hover {
    border-color: var(--accent);
    background: #eff6ff;
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.1);
}

.settings-grid-item i {
    color: var(--accent);
}

.settings-grid-item span {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    white-space: normal;
    word-break: keep-all; /* Do not split words like Syarat/Karyawan/Pengiriman */
    overflow-wrap: break-word;
    text-align: center;
}

/* Penjualan Grid Item Colors */
.grid-item-green { background: #eefbee; border-color: #c3e6c3; color: #2d8a2d; }
.grid-item-green i { color: #2d8a2d; }
.grid-item-green:hover { background: #e2f5e2; border-color: #8ccf8c; color: #1f6b1f; box-shadow: 0 4px 10px rgba(45, 138, 45, 0.15); }

.grid-item-blue { background: #eef5ff; border-color: #c2dbfe; color: #2d68b3; }
.grid-item-blue i { color: #2d68b3; }
.grid-item-blue:hover { background: #e0edff; border-color: #92bbf5; color: #1f4f8e; box-shadow: 0 4px 10px rgba(45, 104, 179, 0.15); }

.grid-item-orange { background: #fff5eb; border-color: #ffd4a8; color: #c06500; }
.grid-item-orange i { color: #c06500; }
.grid-item-orange:hover { background: #ffede0; border-color: #ffb870; color: #a35500; box-shadow: 0 4px 10px rgba(192, 101, 0, 0.15); }

.grid-item-purple { background: #f7efff; border-color: #e1c7fe; color: #762fbd; }
.grid-item-purple i { color: #762fbd; }
.grid-item-purple:hover { background: #f1e2ff; border-color: #c89cff; color: #5a2095; box-shadow: 0 4px 10px rgba(118, 47, 189, 0.15); }

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

@keyframes popoverFadeIn {
    from { opacity: 0; transform: translateY(-50%) translateX(-15px); }
    to   { opacity: 1; transform: translateY(-50%) translateX(0); }
}

/* =====================================================
   LOGIN & REGISTER PAGE — FULL STYLES
   ===================================================== */

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

@keyframes blobFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-page {
    min-height: 100vh;
    display: flex;
    background: #0f172a;
    position: relative;
    overflow: hidden;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

/* Floating blobs background */
.login-page::before,
.login-page::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
}
.login-page::before {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #e11d48, #9f1239);
    top: -100px; left: -100px;
    animation: blobFloat 8s ease-in-out infinite;
}
.login-page::after {
    width: 400px; height: 400px;
    background: radial-gradient(circle, #1d4ed8, #0f172a);
    bottom: -80px; right: 40%;
    animation: blobFloat 10s ease-in-out infinite reverse;
}

/* ── LEFT BRAND PANEL ── */
.login-brand-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 3.5rem;
    color: white;
    position: relative;
    z-index: 1;
}
.login-brand-panel .brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2.5rem;
}
.login-brand-panel .brand-icon {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, #f43f5e, #9f1239);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 1.3rem; font-family: serif;
    box-shadow: 0 6px 20px rgba(244,63,94,0.45);
}
.login-brand-panel .brand-name {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
}
.login-brand-panel h2 {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    color: #fff;
}
.login-brand-panel > p {
    font-size: 1rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.7;
    max-width: 360px;
    margin-bottom: 2.5rem;
}
.login-brand-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.93rem;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
}
.feature-dot {
    width: 8px; height: 8px;
    background: #f43f5e;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(244,63,94,0.6);
}

/* ── RIGHT CARD WRAPPER ── */
.login-card-wrapper {
    width: 480px;
    min-width: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 2rem 2rem 1.5rem;
    position: relative;
    z-index: 1;
}

/* ── CARD ── */
.login-card.accurate-login {
    width: 100%;
    background: rgba(255,255,255,0.97);
    border-radius: 20px;
    padding: 1.75rem 1.75rem 1.5rem;
    box-shadow: 0 25px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.08);
    animation: cardIn 0.45s cubic-bezier(0.22,1,0.36,1) both;
    max-height: 95vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #f43f5e #f1f5f9;
}
.login-card.accurate-login::-webkit-scrollbar { width: 4px; }
.login-card.accurate-login::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 4px; }
.login-card.accurate-login::-webkit-scrollbar-thumb { background: #f43f5e; border-radius: 4px; }

/* ── TAB SWITCHER ── */
.login-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 1rem;
    gap: 4px;
}
.login-tab {
    flex: 1;
    padding: 0.6rem 0.5rem;
    border: none;
    border-radius: 9px;
    background: transparent;
    font-size: 0.88rem;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}
.login-tab:hover { color: #475569; }
.login-tab.active {
    background: #ffffff;
    color: #e11d48;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ── LANGUAGE SELECTOR ── */
.language-selector {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: #64748b;
}
.language-selector select {
    border: none;
    background: transparent;
    font-size: 0.8rem;
    color: #64748b;
    cursor: pointer;
    outline: none;
}

/* ── FORM GROUPS ── */
.login-form-group {
    margin-bottom: 0.9rem;
}
.login-form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.35rem;
    letter-spacing: 0.01em;
}
.login-input-wrapper {
    position: relative;
}
.login-input-wrapper input,
.login-input-wrapper select {
    width: 100%;
    padding: 0.68rem 0.9rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #1e293b;
    background: #f9fafb;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}
.login-input-wrapper input:focus,
.login-input-wrapper select:focus {
    border-color: #e11d48;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(225,29,72,0.1);
}
.login-input-wrapper input::placeholder { color: #b0bec5; }

/* Password toggle */
.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}
.password-toggle:hover { color: #e11d48; }

/* Forgot link */
.login-forgot {
    text-align: right;
    margin-top: 0.3rem;
}
.login-forgot a, .login-footer a {
    color: #e11d48;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}
.login-forgot a:hover, .login-footer a:hover { text-decoration: underline; }

/* ── MAIN BUTTON ── */
.btn-login-accurate {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 14px rgba(225,29,72,0.4);
    transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    margin-top: 0.25rem;
}
.btn-login-accurate:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(225,29,72,0.5);
    filter: brightness(1.05);
}
.btn-login-accurate:active { transform: translateY(0); }

/* ── DIVIDER ── */
.login-divider {
    text-align: center;
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0.9rem 0;
    position: relative;
}
.login-divider::before, .login-divider::after {
    content: '';
    position: absolute;
    top: 50%; width: calc(50% - 60px);
    height: 1px;
    background: #e5e7eb;
}
.login-divider::before { left: 0; }
.login-divider::after  { right: 0; }

/* ── GOOGLE BUTTON ── */
.btn-google-accurate {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0.72rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}
.btn-google-accurate:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

/* ── FOOTER TEXT ── */
.login-footer {
    text-align: center;
    font-size: 0.82rem;
    color: #6b7280;
    margin-top: 1rem;
    line-height: 1.6;
}

/* ── VERSION TAG ── */
.login-version {
    position: fixed;
    bottom: 12px;
    right: 16px;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.3);
    z-index: 10;
    pointer-events: none;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .login-brand-panel { display: none; }
    .login-card-wrapper {
        width: 100%;
        min-width: unset;
        padding: 1.5rem 1rem;
    }
    .login-card.accurate-login {
        max-height: 100vh;
    }
}
@media (max-width: 480px) {
    .login-card.accurate-login { padding: 1.25rem 1rem 1rem; }
    .login-brand-panel h2 { font-size: 2rem; }
}

/* =========================================
   SIDEBAR POPOVER MENUS
   ========================================= */

.settings-popover-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1000;
}

.settings-popover {
    position: absolute;
    left: 100%;
    margin-left: 12px;
    top: 0;
    width: 340px; /* Increased from 280px */
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
    padding: 1rem;
    z-index: 1001;
    cursor: default;
    animation: popoverFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: left center;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden; /* Prevent horizontal scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #c1c8d0 transparent;
}

.settings-popover.popover-wide {
    width: 680px; /* Increased from 580px to fit 4-column grids nicely */
}

.settings-popover.popover-extra-wide {
    width: 840px; /* Increased from 720px */
}

@keyframes popoverFadeIn {
    0% { opacity: 0; transform: scaleX(0.95) translateX(-10px); }
    100% { opacity: 1; transform: scaleX(1) translateX(0); }
}

.popover-section-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.popover-section-label:first-child {
    margin-top: 0;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.settings-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.settings-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.settings-grid:last-child,
.settings-grid-4:last-child,
.settings-grid-5:last-child {
    margin-bottom: 0;
}

.settings-grid-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.settings-grid-item:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

.settings-grid-item svg {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.settings-grid-item span {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    white-space: normal;
    word-break: keep-all; /* Do not split words like Syarat/Karyawan/Pengiriman */
    overflow-wrap: break-word;
    text-align: center;
}

.grid-item-blue:hover { border-color: #bfdbfe; }
.grid-item-blue svg { color: #3b82f6; }

.grid-item-green:hover { border-color: #bbf7d0; }
.grid-item-green svg { color: #22c55e; }

.grid-item-orange:hover { border-color: #fed7aa; }
.grid-item-orange svg { color: #f97316; }

.grid-item-purple:hover { border-color: #e9d5ff; }
.grid-item-purple svg { color: #a855f7; }

/* =========================================
   POS LAYOUT
   ========================================= */
.pos-layout {
    display: flex;
    gap: 1.5rem;
    height: calc(100vh - 120px);
}

.pos-products {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pos-categories {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}

.pos-categories::-webkit-scrollbar {
    display: none;
}

.cat-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid var(--border);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all 0.2s;
}

.cat-btn.active {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    overflow-y: auto;
    padding-right: 0.5rem;
    padding-bottom: 2rem;
}

.prod-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.prod-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

.prod-img {
    width: 64px;
    height: 64px;
    background: #f8fafc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    color: var(--accent);
}

.prod-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prod-price {
    font-weight: 700;
    color: var(--accent);
    font-size: 0.9rem;
    margin-top: auto;
}

.pos-order-panel {
    width: 320px;
    background: #ffffff;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.order-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.order-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.order-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.order-summary {
    padding: 1rem;
    background: #f8fafc;
    border-top: 1px solid var(--border);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.summary-row.total-row {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
}

.pay-btn {
    width: 100%;
    padding: 1rem;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: opacity 0.2s;
}

.pay-btn:hover {
    opacity: 0.9;
}

/* =====================================================
   ACCURATE 2026 PREMIUM MINIMALIST DASHBOARD STYLES
   ===================================================== */
.accurate-dashboard-wrapper {
    background-color: #f3f4f6;
    min-height: calc(100vh - 80px);
    padding: 0;
    margin: -1.5rem -1.5rem 0 -1.5rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Tab Bar */
.accurate-tabs-bar {
    display: flex;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding-left: 1.5rem;
    gap: 4px;
}

.accurate-tab {
    padding: 0.5rem 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #4b5563;
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-bottom: none;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    margin-top: 6px;
}

.accurate-tab.active {
    background-color: #e11d48; /* accurate logo red */
    color: #ffffff;
    border-color: #e11d48;
}

.accurate-tab-close {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-left: 4px;
}

.accurate-tab-close:hover {
    opacity: 1;
}

/* Toolbar below tabs */
.accurate-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1.5rem;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.accurate-btn-widget {
    background-color: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.accurate-btn-widget:hover {
    background-color: #1d4ed8;
}

.accurate-dropdown-select {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: #374151;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

/* Widgets Grid Layout */
.accurate-widgets-container {
    padding: 1.25rem 1.5rem 2rem 1.5rem;
}

.accurate-widgets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

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

@media (max-width: 768px) {
    .accurate-widgets-grid {
        grid-template-columns: 1fr;
    }
}

/* Widget Card */
.accurate-widget-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.accurate-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid #f3f4f6;
    background-color: #ffffff;
}

.accurate-widget-title-container {
    display: flex;
    flex-direction: column;
}

.accurate-widget-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #1f2937;
}

.accurate-widget-subtitle {
    font-size: 0.65rem;
    color: #9ca3af;
}

.accurate-widget-refresh {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    padding: 2px;
}

.accurate-widget-refresh:hover {
    color: #4b5563;
}

.accurate-widget-content {
    padding: 0.9rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Timeline Layout for activities */
.accurate-day-layout {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    align-items: flex-start;
}

.accurate-day-layout:last-child {
    margin-bottom: 0;
}

.accurate-day-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    text-align: center;
}

.accurate-day-number {
    font-size: 1.15rem;
    font-weight: 800;
    color: #111827;
    line-height: 1;
}

.accurate-day-month {
    font-size: 0.65rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    margin-top: 2px;
}

.accurate-day-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.accurate-activity-item {
    display: flex;
    gap: 8px;
    font-size: 0.72rem;
    line-height: 1.3;
}

.accurate-activity-time {
    font-weight: 700;
    color: #2563eb;
    flex-shrink: 0;
}

.accurate-activity-text {
    color: #4b5563;
    font-weight: 500;
}

/* Laba Rugi Donut Chart */
.accurate-donut-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.25rem 0;
}

.accurate-donut-chart-container {
    position: relative;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.accurate-donut-text {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.accurate-donut-percent {
    font-size: 1.05rem;
    font-weight: 800;
    color: #10b981;
    line-height: 1;
}

.accurate-donut-label {
    font-size: 0.6rem;
    color: #6b7280;
    font-weight: 600;
}

.accurate-donut-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.accurate-detail-item {
    display: flex;
    flex-direction: column;
}

.accurate-detail-label {
    font-size: 0.68rem;
    color: #6b7280;
    font-weight: 500;
}

.accurate-detail-val {
    font-size: 0.8rem;
    font-weight: 700;
    color: #1f2937;
}

.accurate-detail-val.green {
    color: #10b981;
}

/* Big Asset Widget */
.accurate-asset-title-sub {
    font-size: 0.72rem;
    color: #6b7280;
    font-weight: 500;
}

.accurate-asset-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: #111827;
    margin: 0.25rem 0 0.5rem 0;
}

.accurate-asset-badges {
    display: flex;
    gap: 8px;
}

.accurate-badge-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: #dcfce7;
    color: #15803d;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
}

/* Receivables & Payables Segmented Bars */
.accurate-stats-columns {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.accurate-stat-col {
    display: flex;
    flex-direction: column;
}

.accurate-stat-col-label {
    font-size: 0.68rem;
    color: #6b7280;
    font-weight: 500;
}

.accurate-stat-col-val {
    font-size: 0.88rem;
    font-weight: 800;
    color: #111827;
}

.accurate-segmented-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    background-color: #e5e7eb;
    margin-bottom: 0.75rem;
}

.accurate-segment-color {
    height: 100%;
}

.accurate-segment-color.green { background-color: #10b981; }
.accurate-segment-color.orange { background-color: #f97316; }
.accurate-segment-color.yellow { background-color: #eab308; }
.accurate-segment-color.red { background-color: #ef4444; }

.accurate-legend-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.accurate-legend-item-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
    color: #4b5563;
    font-weight: 500;
}

.accurate-legend-color-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.accurate-legend-color-dot.green { background-color: #10b981; }
.accurate-legend-color-dot.orange { background-color: #f97316; }
.accurate-legend-color-dot.yellow { background-color: #eab308; }
.accurate-legend-color-dot.red { background-color: #ef4444; }

.accurate-legend-item-pill span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   FINANCIAL REPORTS COMPONENT STYLES (Accurate Online / premium look)
   ========================================================================== */

.fin-premium-header {
    background: linear-gradient(135deg, #1e293b, #334155, #475569);
    padding: 3rem 1.5rem 5rem 1.5rem;
    color: #fff;
    border-radius: 0 0 32px 32px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}
.fin-premium-header::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
    pointer-events: none;
}
.fin-container {
    padding: 0 1.5rem;
    margin-top: -3.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    z-index: 10;
}
.fin-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    padding: 1.75rem;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.03), 0 8px 10px -6px rgba(0,0,0,0.03);
    transition: all 0.3s;
}
.fin-card:hover {
    box-shadow: 0 20px 35px -5px rgba(0,0,0,0.06);
}
.fin-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}
.fin-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    padding: 1.25rem;
    border-radius: 18px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
    transition: all 0.2s;
}
.fin-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.04);
}
.fin-btn-pill {
    padding: 0.6rem 1.2rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
}
.fin-btn-pill.active {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.2);
}
.fin-card-two-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}
.fin-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.fin-item-row:last-child {
    border-bottom: none;
}
.fin-progress-track {
    background-color: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
    display: flex;
}
.fin-progress-bar {
    height: 100%;
    transition: width 0.6s ease;
}

