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

:root {
    --bg-gradient: linear-gradient(135deg, #18181b 0%, #09090b 100%);
    --card-bg: rgba(39, 39, 42, 0.45);
    --card-border: rgba(255, 255, 255, 0.06);
    --text-primary: #f8fafc;
    --text-secondary: #a1a1aa;
    --accent-blue: #f7941e; /* Brand Orange */
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-purple: #ea580c; /* Deep Orange Accent */
    --accent-glow: rgba(247, 148, 30, 0.12);
    --input-bg: rgba(9, 9, 11, 0.6);
    --input-focus-border: #f7941e;
    --transition-speed: 0.25s;
}

/* Light Theme Variables */
body.light-theme {
    --bg-gradient: linear-gradient(135deg, #fafafa 0%, #f4f4f5 100%);
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(24, 24, 27, 0.08);
    --text-primary: #18181b;
    --text-secondary: #52525b;
    --accent-blue: #ea580c; /* High contrast orange for light mode */
    --accent-green: #059669;
    --accent-red: #dc2626;
    --accent-purple: #c2410c;
    --accent-glow: rgba(234, 88, 12, 0.08);
    --input-bg: rgba(255, 255, 255, 0.85);
    --input-focus-border: #ea580c;
}

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

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    transition: background 0.5s ease, color 0.3s ease;
}

/* App Container to prevent any horizontal overflow */
.app-container {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

/* Glassmorphism Background Elements */
.bg-glow-1, .bg-glow-2 {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    transition: background 0.5s ease;
}

.bg-glow-1 {
    background: rgba(247, 148, 30, 0.15); /* Brand Orange Glow */
    top: 15%;
    left: 20%;
}

body.light-theme .bg-glow-1 {
    background: rgba(247, 148, 30, 0.08);
}

.bg-glow-2 {
    background: rgba(234, 88, 12, 0.1);
    bottom: 15%;
    right: 20%;
}

body.light-theme .bg-glow-2 {
    background: rgba(234, 88, 12, 0.05);
}

/* Theme Toggle Button */
.theme-toggle-container {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10;
}

.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: all var(--transition-speed);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.light-theme .theme-toggle-btn {
    background: rgba(24, 24, 27, 0.05);
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

body.light-theme .theme-toggle-btn:hover {
    background: rgba(24, 24, 27, 0.1);
}

/* Glass Container / Card */
.glass-container {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35), 
                inset 0 1px 1px rgba(255, 255, 255, 0.05);
    animation: fadeIn 0.6s ease-out;
}

body.light-theme .glass-container {
    box-shadow: 0 15px 30px rgba(24, 24, 27, 0.06), 
                inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

/* Dashboard Container */
.dashboard-wrapper {
    width: 100%;
    max-width: 1100px;
    min-height: 85vh;
    background: var(--card-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45), 
                inset 0 1px 2px rgba(255, 255, 255, 0.05);
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

body.light-theme .dashboard-wrapper {
    box-shadow: 0 20px 50px rgba(24, 24, 27, 0.06), 
                inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

/* Navigation / Header */
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2.5rem;
    border-bottom: 1px solid var(--card-border);
    background: rgba(9, 9, 11, 0.2);
}

body.light-theme .dash-header {
    background: rgba(255, 255, 255, 0.4);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    color: white;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(247, 148, 30, 0.3);
}

.role-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.role-superuser {
    background: rgba(234, 88, 12, 0.15);
    color: var(--accent-purple);
    border: 1px solid rgba(234, 88, 12, 0.25);
}

body.light-theme .role-superuser {
    background: rgba(234, 88, 12, 0.1);
}

.role-admin {
    background: rgba(247, 148, 30, 0.15);
    color: var(--accent-blue);
    border: 1px solid rgba(247, 148, 30, 0.25);
}

body.light-theme .role-admin {
    background: rgba(234, 88, 12, 0.1);
}

/* Form Styles */
.form-title {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
    background: linear-gradient(to right, #fff 40%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-theme .form-title {
    background: linear-gradient(to right, #18181b 40%, #52525b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.25rem;
    position: relative;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    padding-left: 0.2rem;
}

.form-input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all var(--transition-speed);
}

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

/* Password eye toggle button */
.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-toggle-btn {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem;
    transition: color var(--transition-speed);
}

.password-toggle-btn:hover {
    color: var(--text-primary);
}

.btn {
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(247, 148, 30, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 6px 16px rgba(247, 148, 30, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
}

body.light-theme .btn-secondary {
    background: rgba(24, 24, 27, 0.05);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.light-theme .btn-secondary:hover {
    background: rgba(24, 24, 27, 0.09);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
}

body.light-theme .btn-danger {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: var(--accent-red);
}

.btn-danger:hover {
    background: var(--accent-red);
    color: white;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.25);
}

.alert {
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    font-size: 0.8rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-align: left;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.18);
    color: #f87171;
}

body.light-theme .alert-danger {
    background: rgba(220, 38, 38, 0.06);
    color: var(--accent-red);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.18);
    color: #34d399;
}

body.light-theme .alert-success {
    background: rgba(5, 150, 105, 0.06);
    color: var(--accent-green);
}

/* Dashboard Navigation Tabs */
.tabs-nav {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid var(--card-border);
    padding: 0 2.5rem;
    background: rgba(9, 9, 11, 0.15);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body.light-theme .tabs-nav {
    background: rgba(15, 23, 42, 0.02);
}

.tab-btn {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 1rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

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

.tab-btn.active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

/* Tab Panels */
.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-pane.active {
    display: block;
}

/* Dashboard Content */
.dash-content {
    flex: 1;
    padding: 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    max-width: 100%;
}

.welcome-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn 0.5s ease-out;
}

.welcome-title {
    font-size: 1.6rem;
    font-weight: 700;
}

.welcome-desc {
    color: var(--text-secondary);
    margin-top: 0.2rem;
    font-size: 0.9rem;
}

/* Cards & Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.stat-card {
    background: rgba(24, 24, 27, 0.25);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: all var(--transition-speed);
}

body.light-theme .stat-card {
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 12px rgba(24, 24, 27, 0.03);
}

.stat-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

body.light-theme .stat-card:hover {
    border-color: rgba(24, 24, 27, 0.15);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
}

.value-income { color: var(--accent-green); }
.value-expense { color: var(--accent-red); }
.value-profit { color: var(--accent-purple); }

/* Report / Table Section */
.report-section {
    background: rgba(24, 24, 27, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    max-width: 100%;
}

body.light-theme .report-section {
    background: rgba(255, 255, 255, 0.5);
}

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

.section-title {
    font-size: 1.15rem;
    font-weight: 600;
}

.table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
    min-width: 600px;
}

.data-table th, .data-table td {
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid var(--card-border);
}

.data-table th {
    background: rgba(24, 24, 27, 0.4);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

body.light-theme .data-table th {
    background: rgba(24, 24, 27, 0.04);
}

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

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.015);
}

body.light-theme .data-table tr:hover td {
    background: rgba(24, 24, 27, 0.01);
}

.type-pill {
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
}

.type-penjualan, .type-pemasukan {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-green);
}

.type-pengeluaran {
    background: rgba(239, 68, 68, 0.12);
    color: var(--accent-red);
}

/* Source Badges Colors */
.source-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.source-shopee {
    background: rgba(238, 77, 45, 0.12);
    color: #EE4D2D;
}

body.light-theme .source-shopee {
    background: rgba(238, 77, 45, 0.1);
    color: #d83d1e;
}

.source-tokopedia {
    background: rgba(3, 172, 14, 0.15);
    color: #03AC0E;
}

body.light-theme .source-tokopedia {
    background: rgba(3, 172, 14, 0.1);
    color: #028a0b;
}

.source-dashboard {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

body.light-theme .source-dashboard {
    background: rgba(109, 40, 217, 0.1);
    color: #6d28d9;
}


/* Operations Forms Layout */
.operations-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.date-selector-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.date-picker-container {
    background: rgba(9, 9, 11, 0.5);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all var(--transition-speed);
}

.date-picker-container:focus-within {
    border-color: var(--input-focus-border);
    box-shadow: 0 0 10px var(--accent-glow);
}

body.light-theme .date-picker-container {
    background: rgba(255, 255, 255, 0.85);
}

/* Make native calendar indicator visible in dark mode */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity var(--transition-speed);
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

body.light-theme input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0);
}
.form-grid-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    -webkit-overflow-scrolling: touch;
}

.form-grid-container {
    min-width: 950px;
    display: flex;
    flex-direction: column;
}

.form-grid-header {
    display: grid;
    grid-template-columns: 2fr repeat(8, 1fr) 1.2fr;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(24, 24, 27, 0.4);
    border-bottom: 1px solid var(--card-border);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}

body.light-theme .form-grid-header {
    background: rgba(15, 23, 42, 0.04);
}

.form-grid-header > div:first-child {
    text-align: left;
}

.form-grid-row {
    display: grid;
    grid-template-columns: 2fr repeat(8, 1fr) 1.2fr;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--card-border);
}

.form-grid-row:last-child {
    border-bottom: none;
}

.product-label-col {
    font-weight: 600;
    font-size: 0.85rem;
    text-align: left;
}

.form-grid-row .form-input {
    padding: 0.4rem 0.5rem;
    font-size: 0.85rem;
    text-align: center;
    border-radius: 8px;
}

/* Shopping Calculator Grid */
.calculator-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    align-items: start;
    width: 100%;
}

.calculator-results {
    background: rgba(247, 148, 30, 0.04);
    border: 1px solid rgba(247, 148, 30, 0.15);
    border-radius: 18px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: 0 10px 30px rgba(247, 148, 30, 0.02);
}

body.light-theme .calculator-results {
    background: rgba(234, 88, 12, 0.02);
    border: 1px solid rgba(234, 88, 12, 0.15);
}

.calc-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 0.75rem;
}

.calc-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.calc-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(24, 24, 27, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 10px;
}

body.light-theme .calc-item {
    background: rgba(255, 255, 255, 0.7);
}

.calc-item-name {
    font-weight: 600;
    font-size: 0.85rem;
}

.calc-item-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-blue);
}

/* Sales Input Wrapper (Scrollable on Mobile) */
.sales-grid-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    -webkit-overflow-scrolling: touch;
}

.sales-grid-container {
    min-width: 800px;
    display: flex;
    flex-direction: column;
}

.sales-grid-header {
    display: grid;
    grid-template-columns: 2fr repeat(6, 1fr);
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(24, 24, 27, 0.4);
    border-bottom: 1px solid var(--card-border);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}

body.light-theme .sales-grid-header {
    background: rgba(15, 23, 42, 0.04);
}

.sales-grid-header > div:first-child {
    text-align: left;
}

.sales-grid-row {
    display: grid;
    grid-template-columns: 2fr repeat(6, 1fr);
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--card-border);
}

.sales-grid-row:last-child {
    border-bottom: none;
}

/* Zebra striping and hover highlights for grid rows */
.form-grid-row:nth-child(even),
.sales-grid-row:nth-child(even) {
    background: rgba(255, 255, 255, 0.045);
}

body.light-theme .form-grid-row:nth-child(even),
body.light-theme .sales-grid-row:nth-child(even) {
    background: rgba(0, 0, 0, 0.035);
}

.form-grid-row:hover,
.sales-grid-row:hover {
    background: rgba(255, 255, 255, 0.09) !important;
}

body.light-theme .form-grid-row:hover,
body.light-theme .sales-grid-row:hover {
    background: rgba(0, 0, 0, 0.06) !important;
}



.sales-grid-row .form-input {
    padding: 0.4rem 0.5rem;
    font-size: 0.85rem;
    text-align: center;
    border-radius: 8px;
}

/* Checklist and Task Panels */
.list-panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
}

.checklist-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 0.5rem;
}

.checklist-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checklist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(24, 24, 27, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    transition: all var(--transition-speed);
}

body.light-theme .checklist-item {
    background: rgba(255, 255, 255, 0.5);
}

.checklist-item-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    flex: 1;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--text-secondary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed);
}

.checklist-item.done .checkbox-custom {
    border-color: var(--accent-green);
    background: var(--accent-green);
}

.checklist-item.done .checklist-text {
    text-decoration: line-through;
    color: var(--text-secondary);
}

/* Packaging Cards */
.packaging-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
    gap: 1.25rem;
    width: 100%;
}

.packaging-card {
    background: rgba(24, 24, 27, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

body.light-theme .packaging-card {
    background: rgba(255, 255, 255, 0.5);
}

.packaging-title {
    font-weight: 600;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 0.4rem;
}

.packaging-inputs {
    display: flex;
    gap: 0.5rem;
}

.packaging-inputs .form-group {
    margin-bottom: 0;
    flex: 1;
}

.packaging-inputs .form-input {
    padding: 0.4rem;
    font-size: 0.8rem;
    text-align: center;
}

/* Restricted view styling */
.restricted-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 1.5rem;
    text-align: center;
    background: rgba(24, 24, 27, 0.2);
    border: 1px dashed var(--card-border);
    border-radius: 16px;
    gap: 0.85rem;
    width: 100%;
}

body.light-theme .restricted-banner {
    background: rgba(24, 24, 27, 0.02);
}

.restricted-icon {
    font-size: 2.5rem;
    color: var(--text-secondary);
}

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

.restricted-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    max-width: 400px;
    line-height: 1.5;
}

/* Modal Styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 9, 11, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
    padding: 1rem;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    transform: scale(0.95);
    transition: transform var(--transition-speed) ease;
}

body.light-theme .modal-content {
    box-shadow: 0 20px 40px rgba(24, 24, 27, 0.15);
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

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

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
}

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

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.99); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVE DESIGN - MOBILE FIXES */
@media (max-width: 768px) {
    .app-container {
        padding: 0;
    }

    .glass-container {
        padding: 1.75rem 1.25rem;
        border-radius: 16px;
        width: 92%;
    }

    .dashboard-wrapper {
        border-radius: 0;
        min-height: 100vh;
        width: 100%;
        border: none;
        box-shadow: none;
    }

    .dash-header {
        flex-direction: column;
        gap: 1.25rem;
        padding: 1.25rem;
        align-items: center;
        text-align: center;
    }

    .user-profile {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .user-profile .btn {
        margin-left: 0 !important;
        width: 100%;
    }

    .tabs-nav {
        padding: 0 1.25rem;
    }

    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }

    .dash-content {
        padding: 1.25rem;
        gap: 1.5rem;
    }

    .welcome-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
        text-align: center;
    }

    .welcome-banner .btn {
        width: 100%;
        justify-content: center;
    }

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

    .stat-card {
        padding: 1.25rem;
    }

    .report-section {
        padding: 1.25rem;
        border-radius: 16px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    .data-table th, .data-table td {
        padding: 0.75rem 0.85rem;
        font-size: 0.8rem;
    }
    
    .restricted-banner {
        padding: 2.5rem 1rem;
        border-radius: 12px;
    }

    .calculator-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .list-panel-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Highlight styling for Stok Barang Yang Harus Dibeli table */
.bg-cyan-highlight {
    background: rgba(6, 182, 212, 0.12) !important;
}
.text-cyan-highlight {
    font-weight: 700;
    color: #22d3ee !important;
}
body.light-theme .text-cyan-highlight {
    color: #0891b2 !important;
}

.bg-red-highlight {
    background: rgba(239, 68, 68, 0.22) !important;
    color: #f87171 !important;
    font-weight: 700 !important;
}
body.light-theme .bg-red-highlight {
    background: rgba(220, 38, 38, 0.12) !important;
    color: #dc2626 !important;
}

.bg-field-filled {
    background: rgba(247, 148, 30, 0.15) !important;
}
.text-field-filled {
    color: #f7941e !important;
    font-weight: 700 !important;
}
body.light-theme .bg-field-filled {
    background: rgba(234, 88, 12, 0.1) !important;
}
body.light-theme .text-field-filled {
    color: #ea580c !important;
}

.shopping-item-done {
    text-decoration: line-through !important;
    color: #10b981 !important; /* Green color */
    font-weight: normal !important;
    opacity: 0.7;
}
body.light-theme .shopping-item-done {
    color: #059669 !important;
}

.shopping-item-filled-undone {
    color: #ef4444 !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}
.bg-field-undone {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.45) !important;
    font-weight: 700 !important;
}
body.light-theme .shopping-item-filled-undone {
    color: #dc2626 !important;
}
body.light-theme .bg-field-undone {
    background: rgba(220, 38, 38, 0.1) !important;
    color: #dc2626 !important;
    border: 1px solid rgba(220, 38, 38, 0.3) !important;
}

/* Frozen / Sticky First Column in Stock Harian grid */
.form-grid-header > div:first-child,
.product-label-col {
    position: sticky !important;
    left: 0 !important;
    z-index: 5 !important;
    background: #121214 !important; /* solid dark background */
    box-shadow: 3px 0 6px rgba(0,0,0,0.4) !important;
    padding-left: 0.5rem !important;
}

.form-grid-header > div:first-child {
    background: #1c1c1f !important; /* slightly lighter header bg */
    z-index: 6 !important;
}

body.light-theme .product-label-col {
    background: #ffffff !important;
    box-shadow: 3px 0 6px rgba(0,0,0,0.08) !important;
}

body.light-theme .form-grid-header > div:first-child {
    background: #e4e4e7 !important;
}

/* User Profile Dropdown Menu */
.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-trigger {
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.4rem 0.75rem;
    border-radius: 12px;
    gap: 0.5rem;
    outline: none;
    transition: background var(--transition-speed);
}

.profile-trigger:hover {
    background: rgba(255, 255, 255, 0.05);
}

body.light-theme .profile-trigger:hover {
    background: rgba(0, 0, 0, 0.05);
}

.profile-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    background: #18181b;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    min-width: 220px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 999;
    padding: 0.5rem;
    transform-origin: top right;
}

.profile-menu.show {
    display: block;
}

.dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #f4f4f5;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #fff !important;
}

body.light-theme .profile-menu {
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

body.light-theme .dropdown-item {
    color: #18181b;
}

body.light-theme .dropdown-item:hover {
    background: rgba(0, 0, 0, 0.04) !important;
    color: #000 !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .profile-info-desktop {
        display: none !important;
    }
    .profile-dropdown {
        position: relative !important;
    }
    .profile-trigger {
        padding: 0.2rem !important;
        gap: 0 !important;
    }
    .profile-trigger .chevron-icon {
        display: none !important;
    }
    .profile-menu {
        position: absolute !important;
        right: 0 !important;
        top: calc(100% + 0.25rem) !important;
        width: 180px !important;
        min-width: 180px !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
        background: #18181b !important;
    }
    body.light-theme .profile-menu {
        background: #ffffff !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
    }
}

/* Pagination styling */
.page-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.page-link.active {
    background: var(--accent-orange, #f7941e);
    color: #ffffff;
    border-color: var(--accent-orange, #f7941e);
    box-shadow: 0 0 10px rgba(247, 148, 30, 0.3);
}

body.light-theme .page-link {
    background: rgba(0, 0, 0, 0.02);
    color: #4b5563;
    border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .page-link:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #111827;
    border-color: rgba(0, 0, 0, 0.15);
}

body.light-theme .page-link.active {
    background: var(--accent-orange, #f7941e);
    color: #ffffff;
    border-color: var(--accent-orange, #f7941e);
}







