/* ============================================================ */
/* REPAIR SHOP PRO - COMPLETE STYLESHEET v5.0                   */
/* ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=DM+Mono:wght@400;500&display=swap');

/* --- CSS Variables --- */
:root {
    --primary: #4CAF50;
    --primary-dark: #388E3C;
    --primary-light: #A5D6A7;
    --primary-faint: #E8F5E9;
    --primary-glow: rgba(76, 175, 80, 0.14);
    
    --bg: #F0F4F0;
    --surface: #FFFFFF;
    --surface-2: #EAF0EA;
    --border: #D8E8D8;
    --border-2: #C0D8C0;
    
    --text: #17271A;
    --text-2: #3D5C40;
    --text-3: #6B8A6E;
    
    --danger: #E53935;
    --danger-bg: #FFEBEE;
    --warning: #F9A825;
    --warning-bg: #FFFDE7;
    --info: #1E88E5;
    --info-bg: #E3F2FD;
    --success: #43A047;
    --success-bg: #E8F5E9;
    --purple: #7B1FA2;
    --purple-bg: #F3E5F5;
    
    --sidebar-w: 260px;
    --topbar-h: 64px;
    --bottombar-h: 70px;
    
    --radius: 14px;
    --radius-sm: 9px;
    --radius-lg: 20px;
    
    --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    
    --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] {
    --bg: #0A160A;
    --surface: #111D11;
    --surface-2: #162216;
    --border: #1E321E;
    --border-2: #2A442A;
    --text: #E0EEE0;
    --text-2: #88B08A;
    --text-3: #527554;
    --danger-bg: #240F0F;
    --warning-bg: #201800;
    --info-bg: #081828;
    --success-bg: #0A180A;
    --primary-faint: #0E1C0E;
    --primary-glow: rgba(76, 175, 80, 0.18);
    --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.4);
    --shadow-md: 0 8px 32px rgba(0,0,0,0.6), 0 2px 8px rgba(0,0,0,0.4);
}

/* --- Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    transition: background var(--transition), color var(--transition);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* --- Animations --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* --- Layout --- */
.shell {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: transform var(--transition), box-shadow var(--transition);
}

.sb-logo {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 22px 18px 17px;
    border-bottom: 1px solid var(--border);
}

.sb-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 19px;
    box-shadow: 0 0 0 5px var(--primary-glow);
    transition: box-shadow var(--transition);
}

.sb-logo:hover .sb-icon {
    box-shadow: 0 0 0 9px var(--primary-glow);
}

.sb-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}

.sb-sub {
    font-size: 11px;
    color: var(--text-3);
    font-weight: 400;
}

.sb-nav {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
}

.nav-sec {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    padding: 14px 11px 5px;
}

.nav-a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 13px;
    border-radius: 10px;
    color: var(--text-2);
    font-size: 13.5px;
    font-weight: 500;
    transition: all var(--transition);
    margin-bottom: 2px;
    cursor: pointer;
}

.nav-a i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    transition: transform var(--transition);
}

.nav-a:hover {
    background: var(--primary-faint);
    color: var(--primary-dark);
    transform: translateX(4px);
}

.nav-a:hover i {
    transform: scale(1.15);
}

.nav-a.on {
    background: var(--primary-faint);
    color: var(--primary);
    font-weight: 700;
}

.nav-a.on i {
    color: var(--primary);
}

.sb-foot {
    padding: 10px;
    border-top: 1px solid var(--border);
}

.sb-foot .nav-a {
    color: var(--danger);
}

.sb-foot .nav-a:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

/* Topbar */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-w);
    right: 0;
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 28px;
    z-index: 100;
    transition: left var(--transition), background var(--transition);
}

.tb-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
    flex: 1;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    font-size: 20px;
    padding: 7px;
    border-radius: 9px;
    transition: background var(--transition);
}

.menu-btn:hover {
    background: var(--surface-2);
}

/* Main Content */
.main {
    margin-left: var(--sidebar-w);
    margin-top: var(--topbar-h);
    padding: 28px 32px;
    min-height: calc(100vh - var(--topbar-h));
    width: calc(100% - var(--sidebar-w));
    transition: margin var(--transition), width var(--transition);
    animation: fadeInUp 0.3s ease;
}

/* Theme Toggle */
.tbtn {
    width: 50px;
    height: 28px;
    border-radius: 14px;
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    cursor: pointer;
    position: relative;
    transition: all var(--transition);
}

.tbtn:hover {
    transform: scale(1.05);
}

.tbtn.dk {
    background: var(--primary);
    border-color: var(--primary);
}

.tthumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 5px rgba(0,0,0,0.25);
    transition: transform var(--transition-bounce);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.tbtn.dk .tthumb {
    transform: translateX(22px);
}

/* Bottom Navigation */
.bnav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottombar-h);
    background: var(--surface);
    border-top: 1px solid var(--border);
    z-index: 200;
    box-shadow: 0 -2px 18px rgba(0,0,0,0.08);
}

.bn-in {
    display: flex;
    height: 100%;
    padding: 0 4px;
}

.bn-a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-3);
    font-size: 9.5px;
    font-weight: 700;
    background: none;
    border: none;
    border-radius: 11px;
    margin: 5px 2px;
    cursor: pointer;
    transition: all var(--transition);
}

.bn-a i {
    font-size: 18px;
    transition: transform var(--transition);
}

.bn-a:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.bn-a.on {
    color: var(--primary);
}

.bn-a.on i {
    transform: scale(1.1);
}

.bn-dot {
    display: none;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary);
    margin: 0 auto -3px;
}

.bn-a.on .bn-dot {
    display: block;
}

/* FAB */
.fab {
    display: none;
    position: fixed;
    bottom: calc(var(--bottombar-h) + 14px);
    right: 18px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 5px 22px var(--primary-glow);
    border: none;
    cursor: pointer;
    z-index: 180;
    transition: all var(--transition-bounce);
    text-decoration: none;
    animation: scaleIn 0.3s ease;
}

.fab:hover {
    background: var(--primary-dark);
    transform: scale(1.1) rotate(90deg);
    color: #fff;
    box-shadow: 0 8px 30px var(--primary-glow);
}

.fab:active {
    transform: scale(0.95);
}

/* --- Cards --- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    animation: fadeInUp 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.chd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
    flex-wrap: wrap;
}

.ct {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Stats Cards */
.sg {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.sc {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    transition: all var(--transition-bounce);
    cursor: default;
    animation: fadeInUp 0.3s ease;
    animation-fill-mode: both;
}

.sc:nth-child(1) { animation-delay: 0.05s; }
.sc:nth-child(2) { animation-delay: 0.1s; }
.sc:nth-child(3) { animation-delay: 0.15s; }
.sc:nth-child(4) { animation-delay: 0.2s; }

.sc:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.si {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: transform var(--transition);
}

.sc:hover .si {
    transform: rotate(5deg) scale(1.1);
}

.ig { background: var(--primary-faint); color: var(--primary); }
.ir { background: var(--danger-bg); color: var(--danger); }
.ia { background: var(--warning-bg); color: var(--warning); }
.ib { background: var(--info-bg); color: var(--info); }
.ip { background: var(--purple-bg); color: var(--purple); }

.sv {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.sl {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 4px;
    font-weight: 600;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: all var(--transition-bounce);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: scale(0.96);
}

.btn:hover {
    transform: translateY(-2px);
}

.bp {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 9px var(--primary-glow);
}

.bp:hover {
    background: var(--primary-dark);
    color: #fff;
    box-shadow: 0 5px 18px var(--primary-glow);
}

.bs {
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
}

.bs:hover {
    background: var(--border);
    transform: translateY(-2px);
}

.bd {
    background: var(--danger);
    color: #fff;
}

.bd:hover {
    background: #C62828;
    color: #fff;
}

.bg {
    background: transparent;
    color: var(--text-2);
    border: 1px solid var(--border);
}

.bg:hover {
    background: var(--surface-2);
    color: var(--text);
}

.bsm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 7px;
}

.bic {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 9px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 15px;
}

/* Loading spinner */
.spin {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2.5px solid var(--border);
    border-top-color: var(--primary);
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

/* Shimmer loading effect */
.shimmer {
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* --- Forms --- */
.fg {
    margin-bottom: 16px;
}

.fr2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.fr3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 13px;
}

label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-2);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="date"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    transition: all var(--transition);
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: var(--surface);
    transform: translateY(-1px);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-3);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234CAF50' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    appearance: none;
    cursor: pointer;
}

textarea {
    min-height: 80px;
    resize: vertical;
}

/* Search wrapper */
.sw-wrap {
    position: relative;
}

.sw-wrap input {
    padding-left: 38px;
}

.sw-wrap i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    pointer-events: none;
}

/* --- Toggle Switch --- */
.tog {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.tog input[type="checkbox"] {
    width: 42px;
    height: 23px;
    border-radius: 12px;
    background: var(--border);
    border: none;
    outline: none;
    position: relative;
    cursor: pointer;
    transition: background var(--transition);
    appearance: none;
    flex-shrink: 0;
    margin-top: 2px;
}

.tog input:checked {
    background: var(--primary);
}

.tog input::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 5px rgba(0,0,0,0.2);
    transition: transform var(--transition-bounce);
}

.tog input:checked::after {
    transform: translateX(19px);
}

.tog-l {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    text-transform: none;
    letter-spacing: 0;
}

.tog-s {
    font-size: 12px;
    color: var(--text-3);
    display: block;
    margin-top: 2px;
}

/* --- Tables --- */
.tw {
    overflow-x: auto;
    border-radius: var(--radius);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

thead th {
    background: var(--surface-2);
    color: var(--text-2);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
    transition: background var(--transition);
}

tbody tr {
    transition: all var(--transition);
}

tbody tr:hover td {
    background: var(--primary-faint);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.bg-green { background: var(--success-bg); color: var(--success); }
.bg-red { background: var(--danger-bg); color: var(--danger); }
.bg-amber { background: var(--warning-bg); color: #A66A00; }
.bg-blue { background: var(--info-bg); color: var(--info); }
.bg-purple { background: var(--purple-bg); color: var(--purple); }
.bg-gray { background: var(--surface-2); color: var(--text-3); }

.sp { background: var(--warning-bg); color: #A66A00; }
.si2 { background: var(--info-bg); color: var(--info); }
.sc2 { background: var(--success-bg); color: var(--success); }
.sd { background: var(--primary-faint); color: var(--primary-dark); }
.sx { background: var(--danger-bg); color: var(--danger); }

/* --- Alerts --- */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

.a-ok {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--primary-light);
}

.a-err {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid #FFCDD2;
}

.a-warn {
    background: var(--warning-bg);
    color: #A66A00;
    border: 1px solid #FFE082;
}

.a-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid #BBDEFB;
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.52);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.modal-overlay.open {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.25s var(--transition-bounce);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px 14px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 1;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-title {
    font-size: 16px;
    font-weight: 800;
}

.modal-close {
    width: 29px;
    height: 29px;
    border-radius: 8px;
    background: var(--surface-2);
    border: none;
    cursor: pointer;
    color: var(--text-2);
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--danger-bg);
    color: var(--danger);
    transform: rotate(90deg);
}

.modal-body {
    padding: 18px 22px 22px;
}

/* --- Page Header --- */
.pghd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.pg-ttl {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
}

.pg-sub {
    font-size: 13px;
    color: var(--text-3);
    margin-top: 2px;
}

/* --- Tab Navigation --- */
.tnav {
    display: flex;
    gap: 2px;
    background: var(--surface-2);
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 24px;
    width: fit-content;
    flex-wrap: wrap;
}

.tbtn2 {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text-3);
    background: none;
    font-family: inherit;
}

.tbtn2:hover {
    color: var(--primary);
}

.tbtn2.on {
    background: var(--surface);
    color: var(--primary);
    box-shadow: var(--shadow);
}

.tc {
    display: none;
}

.tc.on {
    display: block;
    animation: fadeInUp 0.3s ease;
}

/* --- IMEI Tags --- */
.it {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 8px;
}

.itag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-faint);
    border: 1px solid var(--primary-light);
    color: var(--primary-dark);
    border-radius: 7px;
    padding: 4px 10px;
    font-size: 12px;
    font-family: 'DM Mono', monospace;
    font-weight: 500;
    transition: all var(--transition);
    animation: scaleIn 0.2s ease;
}

.itag:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.itag .rm {
    cursor: pointer;
    opacity: 0.6;
    font-size: 14px;
    margin-left: 2px;
    transition: all var(--transition);
}

.itag .rm:hover {
    opacity: 1;
    color: var(--danger);
    transform: scale(1.2);
}

/* --- Task Blocks --- */
.task-block {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    transition: all var(--transition);
    animation: fadeInUp 0.3s ease;
}

.task-block:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}

.tbhd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.tbn {
    width: 23px;
    height: 23px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- POS Layout --- */
.pos-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
}

.ig2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 11px;
}

.icard {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 12px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-bounce);
    animation: fadeInUp 0.3s ease;
}

.icard:hover {
    border-color: var(--primary);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 22px var(--primary-glow);
}

.icard:active {
    transform: scale(0.97);
}

.icard.out-of-stock {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.in {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.ip2 {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary);
}

.isk {
    font-size: 10px;
    color: var(--text-3);
    margin-top: 2px;
}

.cp {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    position: sticky;
    top: calc(var(--topbar-h) + 18px);
}

/* --- Invoice Print Styles --- */
@media print {
    .no-print { display: none !important; }
    .topbar, .sidebar, .bnav, .fab, .drw { display: none !important; }
    body { background: #fff !important; }
    .main { margin: 0 !important; padding: 0 !important; width: 100% !important; }
}

/* --- Responsive --- */
@media (max-width: 1023px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.on {
        transform: translateX(0);
        box-shadow: var(--shadow-md);
    }
    .topbar {
        left: 0;
        padding: 0 20px;
    }
    .main {
        margin-left: 0;
        width: 100%;
        padding: 22px;
    }
    .menu-btn {
        display: flex;
    }
    .pos-layout {
        grid-template-columns: 1fr;
    }
    .cp {
        position: static;
    }
}

@media (max-width: 767px) {
    .topbar {
        padding: 0 15px;
    }
    .main {
        padding: 15px;
        padding-bottom: calc(var(--bottombar-h) + 15px);
    }
    .bnav {
        display: block;
    }
    .fab {
        display: flex;
    }
    .sg {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .fr2, .fr3 {
        grid-template-columns: 1fr;
    }
    .modal-content {
        border-radius: 18px 18px 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: 100%;
        max-height: 88vh;
        margin: 0;
    }
    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }
}

/* --- Utility Classes --- */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 20px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-2);
}

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 52px 20px;
    color: var(--text-3);
    text-align: center;
}

.empty i {
    font-size: 44px;
    margin-bottom: 12px;
    opacity: 0.3;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 18px 0;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* ============================================================ */
/* BEAUTIFUL POS STYLES */
/* ============================================================ */

.pos-items-container {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
}

.pos-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.pos-cat-btn {
    padding: 8px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.2s;
}

.pos-cat-btn:hover {
    background: var(--primary-faint);
    border-color: var(--primary);
    color: var(--primary);
}

.pos-cat-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    max-height: 500px;
    overflow-y: auto;
    padding: 4px;
}

.pos-item-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.pos-item-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.pos-item-card:active {
    transform: translateY(-2px);
}

.pos-item-image {
    position: relative;
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, var(--surface-2) 0%, var(--bg) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pos-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.pos-item-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--text-3);
    opacity: 0.3;
}

.pos-out-of-stock {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(2px);
}

.pos-item-info {
    padding: 14px 12px;
}

.pos-item-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-item-brand {
    font-size: 11px;
    color: var(--text-3);
    margin-bottom: 8px;
}

.pos-item-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

.pos-item-stock {
    font-size: 11px;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pos-item-stock.low-stock {
    color: var(--warning);
}

.pos-item-imei-badge {
    background: var(--info-bg);
    color: var(--info);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    margin-left: auto;
}

/* Cart Styles */
.cart-container {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.cart-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px;
    color: white;
}

.cart-title {
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-items-container {
    padding: 16px;
    max-height: 350px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg);
    border-radius: 12px;
    margin-bottom: 8px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.cart-item-image {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 2px;
}

.cart-item-price {
    font-size: 12px;
    color: var(--text-3);
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.cart-qty-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.cart-qty-input {
    width: 40px;
    text-align: center;
    font-weight: 700;
    border: none;
    background: transparent;
}

.cart-item-total {
    font-weight: 800;
    color: var(--primary);
    min-width: 70px;
    text-align: right;
}

.cart-remove-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: var(--danger-bg);
    color: var(--danger);
    cursor: pointer;
    transition: all 0.2s;
}

.cart-remove-btn:hover {
    background: var(--danger);
    color: white;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.cart-total-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-2);
}

.cart-total-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
}

.cart-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-checkout {
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-checkout:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(76, 175, 80, 0.3);
}

.btn-hold {
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-hold:hover {
    background: var(--bg);
    border-color: var(--primary);
}

.btn-clear {
    background: transparent;
    color: var(--text-3);
    border: none;
    padding: 8px;
    cursor: pointer;
}

.btn-clear:hover {
    color: var(--danger);
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-3);
}

.empty-cart i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* Held Orders Panel */
.held-orders-panel {
    margin-top: 16px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.held-order-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--bg);
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.held-order-item:hover {
    background: var(--primary-faint);
    transform: translateX(4px);
}

.held-order-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--info-bg);
    color: var(--info);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.held-order-info {
    flex: 1;
}

.held-order-ref {
    font-weight: 700;
    font-family: monospace;
}

.held-order-meta {
    font-size: 11px;
    color: var(--text-3);
}

.held-order-amount {
    font-weight: 800;
    color: var(--primary);
}