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

:root {
    /* Brand Colors Extracted from Logo */
    --brand-navy: #1e2b58;
    /* Deep Blue from 'H' and 'S' */
    --brand-green: #00a651;
    /* Vibrant Green from 'A' */
    --brand-gradient: linear-gradient(135deg, #1e2b58 0%, #2563eb 100%);
    --accent-gradient: linear-gradient(135deg, #00a651 0%, #0ea5e9 100%);

    /* Neutral Palette */
    --bg-body: #f3f6f9;
    /* Cool light gray */
    --bg-surface: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --border-light: #e2e8f0;
    --border-focus: #3b82f6;

    /* Functional Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.text-danger {
    color: var(--danger) !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.6;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--brand-navy);
    font-weight: 700;
    line-height: 1.2;
}

/* --- Components --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--brand-navy);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: #151e3f;
    /* Darker navy */
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-accent {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-accent:hover {
    filter: brightness(110%);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--brand-navy);
    color: var(--brand-navy);
    background: white;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand-navy);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    font-size: 0.95rem;
    background: var(--bg-surface);
    transition: all 0.2s;
    color: var(--text-primary);
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-green);
    box-shadow: 0 0 0 4px rgba(0, 166, 81, 0.1);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

/* --- Layouts --- */

/* Auth Layout */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
    background: white;
}

.auth-sidebar {
    width: 40%;
    background: var(--bg-body);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    border-right: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

/* Decorative background pattern for auth sidebar */
.auth-sidebar::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(30, 43, 88, 0.03) 0%, transparent 70%);
    z-index: 0;
}

.auth-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 6rem;
    background: white;
}

.logo-container {
    margin-bottom: 3rem;
    z-index: 1;
}

.logo-img {
    height: 80px;
    /* Adjust based on logo aspect ratio */
    width: auto;
    display: block;
}

.auth-card {
    position: relative;
    z-index: 1;
    max-width: 440px;
    width: 100%;
}

.auth-title {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--brand-navy);
    letter-spacing: -0.02em;
}

.auth-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

/* Panel Layout */
.panel-layout {
    min-height: 100vh;
    background: var(--bg-body);
}

.panel-header {
    background: var(--bg-surface);
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border-light);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 0.5rem;
    margin-left: 3rem;
}

.nav-item {
    padding: 0.6rem 1.2rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-item:hover {
    background: #f1f5f9;
    color: var(--brand-navy);
}

.nav-item.active {
    background: rgba(30, 43, 88, 0.05);
    color: var(--brand-navy);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
    border-radius: 50px;
    background: white;
    border: 1px solid var(--border-light);
    padding-right: 1.2rem;
}

.avatar-circle {
    width: 36px;
    height: 36px;
    background: var(--brand-navy);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.panel-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Table Design */
.content-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.toolbar {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.search-wrapper {
    position: relative;
    width: 320px;
}

.search-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.8rem;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--brand-navy);
    box-shadow: 0 0 0 3px rgba(30, 43, 88, 0.1);
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-light);
    text-align: left;
}

.data-table td {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    vertical-align: middle;
    background: white;
    transition: background 0.2s;
}

.data-table tr:hover td {
    background: #f8fafc;
}

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

.code-badge {
    font-family: 'Courier New', monospace;
    background: #f1f5f9;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
}

.price-text {
    font-weight: 700;
    color: var(--brand-navy);
    font-size: 1rem;
}

/* Quantity Controls */
.qty-control {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
    box-shadow: var(--shadow-xs);
}

.qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f8fafc;
    border: none;
    color: var(--brand-navy);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.qty-btn:hover {
    background: #e2e8f0;
    color: var(--brand-navy);
}

.qty-btn:active {
    background: #cbd5e1;
}

.qty-input {
    width: 44px;
    height: 32px;
    border: none;
    border-left: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    text-align: center;
    font-weight: 600;
    color: var(--brand-navy);
    font-size: 0.95rem;
    background: white;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input:focus {
    outline: none;
    background: #f8fafc;
}

/* Modern Badge for Expiry */
.expiry-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-tertiary);
    background: #f1f5f9;
}

.expiry-badge.is-valid {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.product-row td {
    border-bottom: 1px solid #f1f5f9 !important;
}

.product-row:hover td {
    background-color: #f8fafc !important;
}

/* Floating Cart Bar Enhanced */
.cart-bar {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    width: 90%;
    max-width: 1000px;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 20px 50px rgba(30, 43, 88, 0.15) !important;
    padding: 1.25rem 2.5rem !important;
    border-radius: 24px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
}

.cart-bar.active {
    transform: translateX(-50%) translateY(0);
}

.cart-info {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.cart-total-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: block;
}

.cart-total-value {
    color: var(--brand-navy);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.term-badge {
    background: #fffbeb;
    color: #b45309;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #fcd34d;
}

/* Admin Login Specific */
.admin-bg {
    background: var(--brand-navy);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-card {
    background: white;
    padding: 3rem;
    border-radius: 24px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* File Upload */
.file-upload {
    border: 2px dashed var(--border-light);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
}

.file-upload.has-error {
    border-color: #ef4444;
    background: #fef2f2;
}

.file-upload:hover {
    border-color: var(--brand-green);
    background: #f0fdf4;
}

.file-upload i {
    font-size: 2rem;
    color: var(--brand-green);
    margin-bottom: 1rem;
}

.file-upload p {
    color: var(--text-secondary);
    font-weight: 500;
}

/* === UI Components: Toast & Loader === */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: 350px;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transform: translateX(120%);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    transform: translateX(0);
}

.toast-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

.toast-success .toast-icon {
    background: #d1fae5;
    color: #10b981;
}

.toast-error .toast-icon {
    background: #fee2e2;
    color: #ef4444;
}

.toast-warning .toast-icon {
    background: #fef3c7;
    color: #f59e0b;
}

.toast-info .toast-icon {
    background: #e0f2fe;
    color: #0ea5e9;
}

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

.toast-message {
    color: var(--text-primary);
    font-size: 0.925rem;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

/* Global Loader Overlay */
#global-loader {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#global-loader.show {
    opacity: 1;
    visibility: visible;
}

.loader-content {
    background: white;
    padding: 2.5rem;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 90%;
    width: 300px;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #f1f5f9;
    border-top: 4px solid var(--brand-navy);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* === HAMBURGER MENU === */

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--brand-navy);
    cursor: pointer;
    padding: 0.5rem;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: white;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

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

.close-menu-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav {
    padding: 1rem 0;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item:active {
    background: #f8fafc;
}

.mobile-nav-item.active {
    background: rgba(30, 43, 88, 0.05);
    color: var(--brand-navy);
    border-left: 3px solid var(--brand-navy);
}

.mobile-nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.mobile-menu-divider {
    height: 1px;
    background: var(--border-light);
    margin: 1rem 1.5rem;
}

.mobile-nav-item.logout {
    color: var(--danger);
}

/* === MODAL OVERLAY === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-overlay[style*="display:flex"] {
    display: flex !important;
}

.modal {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.modal h2 {
    color: var(--brand-navy);
    margin-bottom: 1rem;
}

.modal .form-group {
    margin-bottom: 1rem;
}

.modal .form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.modal .form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.modal .form-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* === RESPONSIVE & MOBILE STYLES === */

/* Utility Classes */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

/* Mobile Product Cards */
.mobile-product-container {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-card-mobile {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.product-header-mobile {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.product-name-mobile {
    font-weight: 600;
    color: var(--brand-navy);
    font-size: 0.95rem;
    line-height: 1.4;
}

.product-meta-mobile {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.price-text-mobile {
    font-weight: 700;
    color: var(--brand-navy);
    font-size: 1.1rem;
    white-space: nowrap;
}

.product-footer-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.qty-control-mobile {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.qty-btn-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #f8fafc;
    border: none;
    color: var(--brand-navy);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    -webkit-tap-highlight-color: transparent;
}

.qty-btn-mobile:active {
    background: #cbd5e1;
}

.qty-input-mobile {
    width: 60px;
    height: 44px;
    border: none;
    border-left: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    text-align: center;
    font-weight: 600;
    color: var(--brand-navy);
    font-size: 1rem;
    background: white;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
}

.qty-input-mobile::-webkit-outer-spin-button,
.qty-input-mobile::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.line-total-mobile {
    font-weight: 700;
    color: var(--brand-green);
    font-size: 1.1rem;
}

.line-total-mobile-empty {
    color: var(--text-tertiary);
    font-size: 1rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-warning {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fcd34d;
}

/* === MEDIA QUERIES === */

/* Tablet */
@media (max-width: 1024px) {
    .panel-content {
        padding: 1.5rem;
    }

    .toolbar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .search-wrapper {
        width: 100%;
    }

    .cart-bar {
        width: 95%;
        padding: 1rem 1.5rem;
    }

    .cart-info {
        gap: 1rem;
        flex-wrap: wrap;
    }
}

/* Mobile */
@media (max-width: 768px) {

    /* Hide desktop, show mobile */
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }

    /* Auth Pages */
    .auth-wrapper {
        flex-direction: column;
    }

    .auth-sidebar {
        width: 100%;
        padding: 2rem 1.5rem;
    }

    .auth-main {
        padding: 2rem 1.5rem;
    }

    .logo-img {
        height: 60px;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    /* Panel Header */
    .panel-header {
        height: 60px;
        padding: 0.75rem 1rem;
        flex-direction: row;
    }

    .header-brand {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .hamburger-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .header-logo {
        height: 32px;
    }

    .nav-menu {
        display: none;
        /* Hide desktop navigation */
    }

    .user-profile {
        padding: 0.4rem;
        padding-right: 0.8rem;
        gap: 0.5rem;
    }

    .user-details {
        display: none;
    }

    .avatar-circle {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .logout-btn {
        padding: 0.5rem !important;
        border-radius: 50% !important;
    }

    /* Panel Content */
    .panel-content {
        padding: 1rem;
    }

    .content-card {
        border-radius: 12px;
    }

    .toolbar {
        padding: 1rem;
    }

    .toolbar h2 {
        font-size: 1.1rem;
    }

    /* Mobile Product Cards */
    .mobile-product-container {
        padding: 0;
    }

    /* Cart Bar - Mobile Optimized */
    .cart-bar {
        bottom: 0;
        left: 0;
        transform: translateY(150%);
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .cart-bar.active {
        transform: translateY(0);
    }

    .cart-info {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        align-items: flex-start;
    }

    .term-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }

    .cart-total-value {
        font-size: 1.25rem;
    }

    .btn-accent {
        width: 100%;
        padding: 0.875rem;
        font-size: 0.95rem;
    }

    /* Toast */
    .toast {
        right: 1rem;
        left: 1rem;
        top: auto;
        bottom: 1rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {

    .auth-sidebar,
    .auth-main {
        padding: 1.5rem 1rem;
    }

    .auth-title {
        font-size: 1.25rem;
    }

    .logo-img {
        height: 50px;
    }

    .product-name-mobile {
        font-size: 0.9rem;
    }

    .price-text-mobile {
        font-size: 1rem;
    }

    .qty-btn-mobile {
        width: 40px;
        height: 40px;
    }

    .qty-input-mobile {
        width: 50px;
        height: 40px;
    }
}

/* === ORDERS & ACCOUNT PAGE STYLES === */

.page-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-title-bar h1 {
    font-size: 1.75rem;
}

.filter-group {
    display: flex;
    gap: 1rem;
}

/* Order Status Badges */
.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-delivered {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.status-shipping {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.order-id {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: var(--brand-navy);
    font-size: 0.9rem;
}

.btn-action {
    background: none;
    border: 1px solid var(--border-light);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: var(--brand-navy);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-action:hover {
    background: var(--brand-navy);
    color: white;
}

/* Mobile Order Cards */
.orders-mobile-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-card-mobile {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

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

.order-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.order-body-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.order-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.info-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Balance Summary Cards */
.balance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.balance-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.balance-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.balance-content {
    flex: 1;
}

.balance-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.balance-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-navy);
}

/* Transaction Styles */
.transaction-type {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.type-debit {
    background: #fef3c7;
    color: #92400e;
}

.type-credit {
    background: #d1fae5;
    color: #065f46;
}

.amount-debit {
    color: var(--danger);
    font-weight: 700;
}

.amount-credit {
    color: var(--success);
    font-weight: 700;
}

/* Mobile Transaction Cards */
.transactions-mobile-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

.transaction-card-mobile {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.transaction-header-mobile {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.transaction-date-mobile {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.transaction-body-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.transaction-description {
    color: var(--text-primary);
    font-size: 0.9rem;
}

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

.due-date {
    font-weight: 600;
    color: var(--warning-color);
}

@media (max-width: 768px) {
    .page-title-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

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

    .balance-value {
        font-size: 1.25rem;
    }
}

/* === Marka/Tedarikçi Başlık Satırları (Excel Tarzı Gruplama) === */
.brand-header-row {
    background: linear-gradient(135deg, var(--brand-navy) 0%, #2d3a6e 100%);
}

.brand-header-row td {
    padding: 0 !important;
    border: none !important;
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.025em;
}

.brand-header i {
    color: var(--brand-green);
    font-size: 1rem;
}

.brand-header span:first-of-type {
    text-transform: uppercase;
}

.brand-count {
    font-weight: 500;
    font-size: 0.8rem;
    opacity: 0.7;
    margin-left: auto;
}

/* Ürün satırları için hafif sol border - hangi markaya ait olduğunu gösterir */
.data-table tbody tr:not(.brand-header-row) {
    border-left: 3px solid transparent;
    transition: border-color 0.2s ease;
}

.data-table tbody tr:not(.brand-header-row):hover {
    border-left-color: var(--brand-green);
}

/* Marka başlığından sonraki ilk ürün satırı */
.brand-header-row+tr td {
    padding-top: 1rem !important;
}

@media (max-width: 768px) {
    .brand-header {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .brand-count {
        display: none;
    }
}