/* Main Stylesheet for Optik Mitra */
/* Designed with Dark Mode by default and Light Mode toggle support */

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

:root {
    /* Color Palette - Dark Mode (Default) */
    --bg-primary: #0b0f19;
    --bg-secondary: #161e2f;
    --bg-card: rgba(22, 30, 47, 0.7);
    --bg-input: rgba(11, 15, 25, 0.6);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    
    --accent: #6366f1; /* Indigo */
    --accent-hover: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.25);
    
    --success: #10b981; /* Emerald */
    --success-glow: rgba(16, 185, 129, 0.2);
    --warning: #f59e0b; /* Amber */
    --danger: #ef4444; /* Rose */
    --danger-glow: rgba(239, 68, 68, 0.2);
    --info: #06b6d4; /* Cyan */
    
    --sidebar-width: 260px;
    --header-height: 70px;
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --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.2), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Mode Overrides */
body.light-theme {
    --bg-primary: #f1f5f9;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-input: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: rgba(15, 23, 42, 0.08);
    --border-hover: rgba(15, 23, 42, 0.15);
    
    --accent: #4f46e5;
    --accent-hover: #3730a3;
    --accent-glow: rgba(79, 70, 229, 0.15);
    
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.05), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Main Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

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

.sidebar.active {
    transform: translateX(0);
}

body.sidebar-open {
    overflow: hidden;
}

.app-container::before {
    content: '';
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0);
    pointer-events: none;
    transition: background-color 0.25s ease;
    z-index: 90;
}

body.sidebar-open .app-container::before {
    background-color: rgba(0, 0, 0, 0.45);
    pointer-events: auto;
}

.sidebar-logo {
    height: var(--header-height);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6 0%, var(--accent) 100%);
    color: #fff !important;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo img {
    max-height: 44px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    padding: 4px;
}

.sidebar-logo span {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.35);
}

.logo-preview {
    max-width: 240px;
    max-height: 120px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.08);
    padding: 8px;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    flex: 1;
}

.sidebar-menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: var(--transition);
}

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

body.light-theme .sidebar-menu-item a:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.sidebar-menu-item.active a {
    background-color: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

/* Main Content Area */
.main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    transition: var(--transition);
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
}

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

.theme-toggle, .notifications-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.theme-toggle:hover, .notifications-btn:hover {
    border-color: var(--border-hover);
    background-color: rgba(255, 255, 255, 0.02);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-secondary);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background-color: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-info {
    font-size: 13px;
}

.user-name {
    font-weight: 600;
    display: block;
}

.user-role {
    color: var(--text-secondary);
    display: block;
}

/* Page Content container */
.content-body {
    padding: 32px;
    flex: 1;
}

/* Cards & Grid Systems */
.grid {
    display: grid;
    gap: 24px;
    margin-bottom: 24px;
}

.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

.col-span-8 { grid-column: span 8 / span 8; }
.col-span-7 { grid-column: span 7 / span 7; }
.col-span-5 { grid-column: span 5 / span 5; }
.col-span-4 { grid-column: span 4 / span 4; }

@media (max-width: 1024px) {
    .grid-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-cols-12 { grid-template-columns: 1fr; }
    .col-span-8, .col-span-4, .col-span-5, .col-span-7 { grid-column: span 12 / span 12; }

    .sidebar {
        transform: translateX(-100%);
        box-shadow: 6px 0 24px rgba(0, 0, 0, 0.2);
        width: 280px;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-menu {
        padding-bottom: 80px;
    }

    .main-wrapper {
        margin-left: 0;
    }

    .main-header {
        padding: 0 20px;
    }

    .content-body {
        padding: 24px 20px 32px;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .header-right {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .header-left {
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .main-header {
        height: auto;
        padding: 12px 16px;
        align-items: flex-start;
    }

    .header-left, .header-right {
        width: 100%;
    }

    .header-right {
        justify-content: space-between;
    }

    .page-title {
        font-size: 18px;
    }

    .user-profile {
        display: none;
    }

    .content-body {
        padding: 20px 16px 30px;
    }

    .pos-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .pos-sidebar {
        max-height: none;
    }
}

@media (max-width: 640px) {
    .grid-cols-4 { grid-template-columns: 1fr; }
    .grid-cols-3 { grid-template-columns: 1fr; }
    .grid-cols-2 { grid-template-columns: 1fr; }

    .main-header {
        padding: 12px 14px;
    }

    .page-title {
        font-size: 16px;
    }

    .header-right {
        gap: 8px;
    }

    .sidebar {
        width: 100%;
        max-width: 320px;
    }

    .sidebar-menu-item a {
        padding: 12px 14px;
    }

    .sidebar-menu-item a span {
        white-space: normal;
    }

    .notification-badge {
        top: -3px;
        right: -3px;
        min-width: 16px;
        height: 16px;
        font-size: 10px;
    }

    .pos-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .login-card-container {
        padding: 20px 14px;
    }

    .login-card-container .card {
        padding: 20px;
    }

    .login-logo {
        font-size: 28px;
    }

    .login-subtitle {
        font-size: 13px;
    }
}

.card {
    background-color: var(--bg-card);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Summary Card Stats */
.stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-info .stat-value {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    margin: 4px 0;
}

.stat-info .stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background-color: var(--accent-glow);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-card.success .stat-icon { background-color: var(--success-glow); color: var(--success); }
.stat-card.danger .stat-icon { background-color: var(--danger-glow); color: var(--danger); }

/* Forms */
.form-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

input, select, textarea {
    width: 100%;
    padding: 10px 14px;
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

input:disabled, select:disabled, textarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--accent);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--border);
    color: var(--text-primary);
}

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

.btn-danger {
    background-color: var(--danger);
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #e11d48;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--danger-glow);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

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

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    table-layout: auto;
    min-width: 620px;
}

th {
    padding: 14px 16px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 14px;
    vertical-align: middle;
}

tr:hover td {
    background-color: rgba(255, 255, 255, 0.01);
}

body.light-theme tr:hover td {
    background-color: rgba(0, 0, 0, 0.01);
}

.report-summary-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.report-summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.report-summary-line:last-child {
    border-bottom: none;
}

.report-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background-color: rgba(16, 185, 129, 0.09);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-md);
    font-weight: 700;
    color: var(--success);
    margin-top: 10px;
}

.report-summary-note {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 10px;
}

@media (max-width: 768px) {
    table {
        min-width: 0;
    }

    th,
    td {
        padding: 12px 10px;
    }

    .report-summary-line,
    .report-summary-total {
        flex-direction: column;
        align-items: flex-start;
    }

    .report-summary-total {
        width: 100%;
    }
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success { background-color: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge-warning { background-color: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge-danger { background-color: rgba(239, 68, 68, 0.1); color: var(--danger); }
.badge-info { background-color: rgba(6, 182, 212, 0.1); color: var(--info); }
.badge-purple { background-color: rgba(168, 85, 247, 0.1); color: #a855f7; }

/* Notifications list */
.notification-item {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.notification-item.unread {
    background-color: rgba(99, 102, 241, 0.05);
}
.notification-text {
    font-size: 13px;
}
.notification-time {
    font-size: 11px;
    color: var(--text-muted);
}

/* Modal Popup */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: translateY(20px);
    transition: transform 0.2s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

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

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Point of Sale Layout */
.pos-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    height: calc(100vh - var(--header-height) - 64px);
}

.pos-catalog {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 16px;
    overflow: hidden;
}

@media (max-width: 1024px) {
    .pos-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .pos-sidebar {
        width: 100%;
        max-width: 100%;
    }

    .pos-catalog {
        height: auto;
    }
}

@media (max-width: 768px) {
    .pos-search-bar {
        flex-direction: column;
    }

    .pos-search-bar input {
        width: 100%;
    }

    .pos-categories {
        flex-wrap: wrap;
    }

    .pos-sidebar {
        min-height: auto;
    }

    .pos-cart-item {
        grid-template-columns: 1fr;
    }

    .pos-cart-item-right {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 10px;
    }

    .pos-cart-item-remove {
        margin-left: 0;
        margin-bottom: 0;
    }

    .pos-sidebar-actions {
        gap: 10px;
    }

    .pos-sidebar-actions .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .pos-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .pos-cart-item {
        padding: 12px;
    }

    .pos-sidebar-summary,
    .pos-sidebar-actions {
        padding: 14px;
    }

    .pos-sidebar-header {
        font-size: 15px;
        padding: 14px;
    }
}

.pos-search-bar {
    display: flex;
    gap: 12px;
}

.pos-categories {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    flex-shrink: 0;
}

.pos-cat-btn {
    padding: 8px 16px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
    transition: var(--transition);
}

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

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

.pos-product-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.pos-product-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.pos-product-img {
    width: 100%;
    height: 100px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    margin-bottom: 8px;
    background-color: var(--bg-primary);
}

.pos-product-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    height: 38px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.pos-product-sku {
    font-size: 11px;
    color: var(--text-muted);
}

.pos-product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 8px;
}

.pos-product-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
}

.pos-product-stock {
    font-size: 11px;
    color: var(--text-secondary);
}

/* POS Cart Sidebar */
.pos-sidebar {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.pos-sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 16px;
}

.pos-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pos-cart-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: var(--radius-md);
}

.pos-cart-item-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
}

.pos-cart-item-name {
    font-size: 13px;
    font-weight: 600;
}

.pos-cart-item-price {
    font-size: 12px;
    color: var(--text-secondary);
}

.pos-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.pos-qty-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.pos-qty-val {
    font-size: 13px;
    font-weight: 600;
}

.pos-cart-item-subtotal {
    font-weight: 600;
    font-size: 13px;
    text-align: right;
    align-self: center;
}

.pos-cart-item-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    margin-left: 8px;
    font-size: 14px;
}

.pos-sidebar-summary {
    padding: 16px;
    border-top: 1px solid var(--border);
    background-color: rgba(0, 0, 0, 0.05);
}

.pos-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.pos-summary-row.total {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    border-top: 1px solid var(--border);
    padding-top: 8px;
    margin-top: 8px;
}

.pos-sidebar-actions {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Struk (Receipt) Layout */
.receipt-container {
    width: 100%;
    max-width: 300px; /* Standard 80mm thermal width */
    margin: 0 auto;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #000000;
    background-color: #ffffff;
    padding: 20px 10px;
    line-height: 1.4;
}

.receipt-header {
    text-align: center;
    margin-bottom: 15px;
}

.receipt-header h3 {
    margin-bottom: 4px;
    font-size: 16px;
    font-weight: 700;
}

.receipt-divider {
    border-top: 1px dashed #000000;
    margin: 10px 0;
}

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

.receipt-items {
    margin: 10px 0;
}

.receipt-item-details {
    padding-left: 10px;
    color: #555;
}

.receipt-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 11px;
}

/* Prescription Print Layout */
.prescription-print-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background-color: #ffffff;
    color: #000000;
    padding: 40px;
    border: 1px solid #ddd;
    line-height: 1.5;
}

.presc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #000000;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.presc-logo-info h2 {
    margin-bottom: 4px;
}

.presc-grid {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.presc-grid th, .presc-grid td {
    border: 1px solid #000000;
    padding: 8px;
    text-align: center;
    color: #000000;
}

.presc-grid th {
    background-color: #f2f2f2;
    font-weight: bold;
    text-transform: none;
    font-size: 12px;
}

/* Alerts System */
.alert-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    background-color: var(--bg-secondary);
    border-left: 4px solid var(--accent);
    box-shadow: var(--shadow-xl);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.alert-toast.active {
    transform: translateY(0);
    opacity: 1;
}

.alert-toast.success { border-left-color: var(--success); }
.alert-toast.danger { border-left-color: var(--danger); }
.alert-toast.warning { border-left-color: var(--warning); }

/* Login Page Spec */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: var(--bg-primary);
}

.login-card {
    width: 100%;
    max-width: 420px;
}

/* Printing Mode CSS Overrides */
@media print {
    body {
        background-color: #ffffff !important;
        color: #000000 !important;
    }
    
    .sidebar, .main-header, .btn, .theme-toggle, .notifications-btn, .no-print {
        display: none !important;
    }
    
    .main-wrapper {
        margin-left: 0 !important;
    }
    
    .content-body {
        padding: 0 !important;
    }
    
    .receipt-container, .prescription-print-container {
        border: none !important;
        padding: 0 !important;
        box-shadow: none !important;
        margin: 0 !important;
        width: 100% !important;
    }
}
