/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --accent: #0078d4;
    --accent-hover: #1a8cee;
    --taskbar-bg: rgba(24, 24, 32, 0.85);
    --taskbar-hover: rgba(255, 255, 255, 0.08);
    --window-bg: #1e1e2e;
    --window-header: #2a2a3a;
    --window-border: rgba(255, 255, 255, 0.06);
    --text-primary: #e4e4e8;
    --text-secondary: #a0a0b0;
    --text-muted: #6c6c80;
    --surface-1: #252535;
    --surface-2: #2a2a3c;
    --surface-3: #32324a;
    --danger: #e74856;
    --success: #16c784;
    --warning: #ffc107;
    --shadow-soft: 0 8px 32px rgba(0,0,0,0.4);
    --shadow-heavy: 0 16px 48px rgba(0,0,0,0.6);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --wallpaper: #010101;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: #0a0a12;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
    user-select: none;
    width: 100vw;
    height: 100vh;
    color: var(--text-primary);
}

.hidden { display: none !important; }

/* ===== SCREEN ===== */
.monitor-screen {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
    background: #000;
}

/* ===== BOOT SCREEN ===== */
.boot-screen {
    position: absolute;
    inset: 0;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 50px;
    z-index: 1000;
    animation: bootFadeIn 0.5s ease;
}

@keyframes bootFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.boot-logo-img {
    width: 180px;
    height: auto;
    object-fit: contain;
    animation: bootLogoGlow 2s ease-in-out infinite;
}

@keyframes bootLogoGlow {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(16,185,129,0.3)); }
    50% { filter: drop-shadow(0 0 30px rgba(16,185,129,0.6)); }
}

.boot-loader {
    display: flex;
    gap: 8px;
}

.boot-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #56ba9c;
    box-shadow: 0 0 6px 2px rgba(86, 186, 156, 0.4);
    animation: bootDots 1.8s ease-in-out infinite;
}

.boot-dot:nth-child(1) { animation-delay: 0s; }
.boot-dot:nth-child(2) { animation-delay: 0.15s; }
.boot-dot:nth-child(3) { animation-delay: 0.3s; }
.boot-dot:nth-child(4) { animation-delay: 0.45s; }
.boot-dot:nth-child(5) { animation-delay: 0.6s; }

@keyframes bootDots {
    0%, 100% { transform: translateY(0); opacity: 0.3; box-shadow: 0 0 4px 1px rgba(86, 186, 156, 0.2); }
    50% { transform: translateY(-12px); opacity: 1; box-shadow: 0 0 14px 5px rgba(86, 186, 156, 0.7); }
}

/* ===== LOCK SCREEN ===== */
.lock-screen {
    position: absolute;
    inset: 0;
    z-index: 900;
    cursor: pointer;
    overflow-y: auto;
    overflow-x: hidden;
}

.lock-bg {
    position: absolute;
    inset: 0;
    background: var(--wallpaper);
    filter: blur(0px) brightness(0.5);
}

.lock-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100%;
    gap: 8px;
    padding-top: 6vh;
    padding-bottom: 30px;
    animation: lockFadeIn 0.8s ease;
}

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

.lock-time {
    font-size: 72px;
    font-weight: 300;
    color: white;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
    letter-spacing: -2px;
}

.lock-date {
    font-size: 16px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 40px;
}

.lock-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    margin-bottom: 8px;
    overflow: hidden;
}

.lock-avatar-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.lock-user {
    font-size: 18px;
    color: white;
    font-weight: 500;
}

/* Avatar Glow Effect */
.lock-avatar-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
}

.lock-avatar-glow {
    position: absolute;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(86,186,156,0.3) 0%, transparent 70%);
    animation: avatarGlow 2.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes avatarGlow {
    0%, 100% { transform: scale(0.85); opacity: 0.3; }
    50% { transform: scale(1.15); opacity: 0.8; }
}

/* Auth Choice Buttons */
.auth-choice {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    width: 300px;
    max-width: 90%;
}

.auth-choice-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.auth-choice-btn.primary {
    background: #56ba9c;
    color: #fff;
}

.auth-choice-btn.primary:hover {
    background: #4aa889;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(86,186,156,0.35);
}

.auth-choice-btn.secondary {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.12);
}

.auth-choice-btn.secondary:hover {
    background: rgba(255,255,255,0.16);
    transform: translateY(-2px);
}

.lock-hint {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-top: 30px;
    animation: hintPulse 2s infinite;
}

@keyframes hintPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ===== LOCK SCREEN ACTION BUTTONS ===== */
.lock-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    align-items: center;
}

.lock-enter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: 24px;
    background: #56ba9c;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.lock-enter-btn:hover {
    background: #4aa889;
    box-shadow: 0 4px 24px rgba(86, 186, 156, 0.35);
    transform: translateY(-1px);
}

.lock-switch-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lock-switch-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ===== ICON COLORS ===== */
.purchases-icon { background: rgba(245, 158, 11, 0.15) !important; color: #f59e0b !important; }

/* Mobile: buttons above notifications */
@media (max-width: 768px) {
    .lock-actions { order: 1; }
    .lock-notifications { order: 2; }
}

/* ===== AUTH FORM (Lock Screen) ===== */
.auth-form {
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 24px;
}

.auth-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0;
    padding: 4px 4px;
    transition: all 0.3s ease;
}

.auth-input-group:focus-within {
    border-bottom-color: #56ba9c;
}

.auth-input-group i {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.3);
    width: 18px;
    text-align: center;
    transition: color 0.3s ease;
}

.auth-input-group:focus-within i {
    color: #56ba9c;
}

.auth-input-group input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    padding: 14px 0;
    letter-spacing: 0.2px;
}

.auth-input-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 300;
}

.auth-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: #56ba9c;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 16px;
    letter-spacing: 0.3px;
}

.auth-btn:hover {
    background: #4aa889;
    box-shadow: 0 4px 24px rgba(86, 186, 156, 0.3);
    transform: translateY(-1px);
}

.auth-btn:active {
    transform: scale(0.98);
}

.auth-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-toggle {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 12px;
}

.auth-toggle a {
    color: #56ba9c;
    text-decoration: none;
    font-weight: 600;
}

.auth-toggle a:hover {
    text-decoration: underline;
}

.auth-error {
    background: rgba(239, 68, 68, 0.1);
    border: none;
    border-left: 3px solid #ef4444;
    color: #fca5a5;
    padding: 10px 14px;
    border-radius: 0 8px 8px 0;
    font-size: 12px;
    text-align: left;
}

.auth-success {
    background: rgba(86, 186, 156, 0.1);
    border: none;
    border-left: 3px solid #56ba9c;
    color: #86efac;
    padding: 10px 14px;
    border-radius: 0 8px 8px 0;
    font-size: 12px;
    text-align: left;
}

/* ===== SETTINGS PANEL ===== */
.pw-settings {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: rgba(20, 20, 24, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 0;
    z-index: 100;
    animation: settingsSlideIn 0.25s ease;
    overflow: hidden;
}

@keyframes settingsSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.pw-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pw-settings-header span {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.pw-settings-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    transition: color 0.2s;
}

.pw-settings-close:hover {
    color: #fff;
}

.pw-settings-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.pw-settings-row:last-child {
    border-bottom: none;
}

.pw-settings-row > i {
    font-size: 13px;
    color: #56ba9c;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.pw-settings-row > div {
    flex: 1;
    min-width: 0;
}

.pw-settings-row label {
    display: block;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1px;
}

.pw-settings-row span {
    font-size: 13px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* ===== CALCULATOR APP ===== */
.calc-app {
    display: flex;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: #202124;
}

.calc-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
}

/* -- Sidebar -- */
.calc-sidebar {
    width: 200px;
    background: #171719;
    border-right: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    overflow-y: auto;
    flex-shrink: 0;
    transition: margin-left 0.25s ease, opacity 0.25s ease;
}

.calc-sidebar.hidden {
    margin-left: -200px;
    opacity: 0;
    pointer-events: none;
}

.calc-sidebar-header {
    padding: 10px 16px 8px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calc-sidebar-item {
    padding: 9px 16px;
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    transition: all 0.15s ease;
    border-radius: 6px;
    margin: 1px 6px;
}

.calc-sidebar-item:hover {
    background: rgba(86, 186, 156, 0.12);
    color: #56ba9c;
}

.calc-sidebar-separator {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 6px 14px;
}

/* -- Top bar -- */
.calc-topbar {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    gap: 8px;
}

.calc-menu-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.calc-menu-btn:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.calc-mode-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.45);
}

/* -- Display -- */
.calc-display-area {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 8px 18px 12px;
    min-height: 80px;
}

.calc-expr {
    font-size: 13px;
    color: rgba(255,255,255,0.35);
    min-height: 18px;
    margin-bottom: 2px;
}

.calc-value {
    font-size: 44px;
    font-weight: 300;
    color: #fff;
    line-height: 1.1;
    word-break: break-all;
    text-align: right;
    width: 100%;
}

/* -- Keypad -- */
.calc-keypad {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 6px;
    padding: 6px 10px 12px;
}

.calc-key {
    border: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.12s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.07);
    color: #fff;
}

.calc-key:hover {
    background: rgba(255,255,255,0.13);
}

.calc-key:active {
    transform: scale(0.95);
    background: rgba(255,255,255,0.18);
}

.calc-key.fn {
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.85);
}

.calc-key.fn:hover {
    background: rgba(255,255,255,0.18);
}

.calc-key.op {
    background: rgba(86, 186, 156, 0.15);
    color: #56ba9c;
    font-size: 19px;
}

.calc-key.op:hover {
    background: rgba(86, 186, 156, 0.25);
}

.calc-key.eq {
    background: #56ba9c;
    color: #fff;
}

.calc-key.eq:hover {
    background: #4aa889;
}

.calc-key.wide {
    grid-column: span 2;
    text-align: left;
    padding-left: 20px;
    justify-content: flex-start;
}

/* ===== REPORTS APP ===== */
.reports-app {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 16px;
    background: #1a1a1e;
    overflow-y: auto;
    gap: 14px;
}

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

.reports-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.reports-header h3 i {
    color: #56ba9c;
}

.reports-period {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: rgba(255,255,255,0.06);
    border-radius: 6px;
}

.reports-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.report-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
}

.report-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.report-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.report-card-label {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
}

.report-card-value {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.reports-chart-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
}

.reports-chart {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 4px;
    min-height: 140px;
    padding: 8px 0 0;
}

.chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 100%;
}

.chart-bar-wrap {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
    position: relative;
}

.chart-bar {
    width: 100%;
    background: linear-gradient(180deg, #56ba9c, rgba(86,186,156,0.4));
    border-radius: 4px 4px 0 0;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    transition: height 0.6s ease;
    animation: chartGrow 0.8s ease both;
    min-height: 4px;
}

@keyframes chartGrow {
    from { height: 0 !important; }
}

.chart-val {
    font-size: 9px;
    font-weight: 600;
    color: #fff;
    position: absolute;
    top: -16px;
    white-space: nowrap;
}

.chart-label {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    font-weight: 500;
}

/* Reports empty state */
.reports-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
    gap: 12px;
}

.reports-empty-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: rgba(255,255,255,0.2);
    margin-bottom: 4px;
}

.reports-empty h3 {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.reports-empty p {
    color: rgba(255,255,255,0.4);
    font-size: 13px;
    line-height: 1.5;
    max-width: 280px;
    margin: 0;
}

.reports-connect-btn {
    margin-top: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: #56ba9c;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.reports-connect-btn:hover {
    background: #4aa889;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(86,186,156,0.3);
}

/* Reports tray icon */
.reports-icon {
    cursor: pointer;
}

.reports-icon:hover {
    color: #56ba9c !important;
}

/* ===== SHUTDOWN SCREEN ===== */
.shutdown-screen {
    position: absolute;
    inset: 0;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    gap: 30px;
}

.shutdown-logo-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shutdown-logo {
    width: 100px;
    height: auto;
    border-radius: 12px;
    position: relative;
    z-index: 1;
}

.shutdown-glow {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(86,186,156,0.25) 0%, transparent 70%);
    animation: shutdownGlow 2.5s ease-in-out infinite;
}

@keyframes shutdownGlow {
    0%, 100% { transform: scale(0.9); opacity: 0.4; }
    50% { transform: scale(1.2); opacity: 1; }
}

.shutdown-hint {
    font-size: 14px;
    color: rgba(255,255,255,0.4);
    font-weight: 400;
    animation: hintPulse 2s infinite;
}

/* ===== LOCK HEADLINE COPY ===== */
.lock-headline {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 8px;
    margin-bottom: 4px;
    gap: 0;
    order: 0;
}

.headline-white {
    font-size: 18px;
    font-weight: 800;
    font-style: italic;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
    letter-spacing: 0.5px;
}

.headline-green {
    font-size: 22px;
    font-weight: 800;
    font-style: italic;
    color: #56ba9c;
    text-shadow: 0 2px 16px rgba(86,186,156,0.4);
    letter-spacing: 0.5px;
}

/* Mobile: hide notification description, show only icon + title */
@media (max-width: 768px) {
    .notif-msg {
        display: none !important;
    }
    .notif-card {
        padding: 8px 12px;
    }
    .notif-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
        border-radius: 6px;
    }
    .lock-headline {
        order: 0;
    }
    .lock-actions {
        order: 1;
    }
    .lock-notifications {
        order: 2;
    }
}

/* ===== LOCK SCREEN NOTIFICATIONS ===== */
.lock-notifications {
    width: 100%;
    max-width: 340px;
    overflow-y: visible;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    padding: 0 4px 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.lock-notifications::-webkit-scrollbar {
    width: 3px;
}

.lock-notifications::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
}

.notif-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 10px 12px;
    cursor: default;
    transition: all 0.4s ease;
}

.notif-hidden {
    opacity: 0;
    transform: translateY(16px);
}

.notif-show {
    opacity: 1;
    transform: translateY(0);
}

.notif-card:hover {
    background: rgba(255, 255, 255, 0.14);
}

.notif-icon-brand {
    border: 1px solid rgba(255,255,255,0.15);
}

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
    flex-shrink: 0;
}

.notif-icon-img {
    background: transparent;
    overflow: hidden;
    padding: 0;
}

.notif-icon-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.notif-body {
    flex: 1;
    min-width: 0;
}

.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.notif-title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.notif-time {
    display: none;
}

.notif-msg {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Desktop: notifications inline below buttons */
@media (min-width: 769px) {
    .lock-notifications {
        max-width: 380px;
    }

    .notif-msg {
        font-size: 11px;
        -webkit-line-clamp: 2;
    }
}

/* ===== DESKTOP ===== */
.desktop {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
}

.wallpaper {
    position: absolute;
    inset: 0;
    background: var(--wallpaper);
    z-index: 0;
    transition: background 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.desktop-watermark {
    width: 220px;
    height: auto;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}

/* ===== PROFILE WIDGET ===== */
.profile-widget {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 10px 14px;
    min-width: 200px;
}

.pw-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.pw-avatar:hover {
    transform: scale(1.05);
}

.pw-avatar-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.pw-avatar-edit {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pw-avatar:hover .pw-avatar-edit {
    opacity: 1;
}

.pw-info {
    flex: 1;
    min-width: 0;
}

.pw-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pw-balance {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.pw-balance-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pw-balance-value {
    font-size: 13px;
    font-weight: 700;
    color: #56ba9c;
}

.pw-actions {
    display: flex;
    gap: 4px;
}

.pw-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pw-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.pw-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* ===== DESKTOP ICONS ===== */
.desktop-icons {
    position: relative;
    z-index: 1;
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 8px;
    overflow: hidden;
    max-height: calc(100% - 48px);
}

.desktop-icon {
    width: 80px;
    min-height: 82px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    padding: 6px;
    user-select: none;
}

.desktop-icon:hover {
    background: rgba(255, 255, 255, 0.08);
}

.desktop-icon.selected {
    background: rgba(0, 120, 212, 0.25);
    outline: 1px solid rgba(0, 120, 212, 0.5);
}

.icon-img {
    width: 40px;
    height: 40px;
    min-height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.desktop-icon span {
    font-size: 11px;
    color: white;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
    text-align: center;
    line-height: 1.3;
    max-width: 80px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ===== CONTEXT MENU ===== */
.context-menu {
    position: absolute;
    z-index: 500;
    background: rgba(30, 30, 46, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    padding: 4px;
    box-shadow: var(--shadow-heavy);
    min-width: 220px;
    animation: contextIn 0.15s ease;
}

@keyframes contextIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.context-item {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-primary);
    transition: var(--transition);
}

.context-item:hover {
    background: rgba(0, 120, 212, 0.15);
}

.context-item i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.context-separator {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 4px 8px;
}

/* ===== TASKBAR ===== */
.taskbar {
    position: relative;
    z-index: 100;
    height: 48px;
    background: var(--taskbar-bg);
    backdrop-filter: blur(30px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    border-top: 1px solid rgba(255,255,255,0.04);
}

.taskbar-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.start-btn {
    width: 40px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.start-btn:hover {
    background: var(--taskbar-hover);
}

.start-btn.active {
    background: rgba(0, 120, 212, 0.2);
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 0 12px;
    border-radius: 20px;
    height: 32px;
    transition: var(--transition);
}

.search-bar:focus-within {
    background: rgba(255,255,255,0.1);
    border-color: var(--accent);
}

.search-bar i {
    font-size: 12px;
    color: var(--text-muted);
}

.search-bar input {
    border: none;
    background: none;
    outline: none;
    color: var(--text-primary);
    font-size: 12px;
    width: 140px;
    font-family: inherit;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.taskbar-center {
    display: flex;
    align-items: center;
    gap: 2px;
}

.taskbar-pin {
    width: 42px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    font-size: 16px;
    position: relative;
}

.taskbar-pin:hover {
    background: var(--taskbar-hover);
    color: var(--text-primary);
}

.taskbar-pin.active {
    color: var(--text-primary);
}

.taskbar-pin.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    width: 16px;
    height: 3px;
    border-radius: 2px;
    background: var(--accent);
}

.taskbar-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tray-icons {
    display: flex;
    align-items: center;
    gap: 2px;
}

.tray-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.tray-icon:hover {
    background: var(--taskbar-hover);
    color: var(--text-primary);
}

.taskbar-clock {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-align: right;
}

.taskbar-clock:hover {
    background: var(--taskbar-hover);
}

.clock-time {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.2;
}

.clock-date {
    font-size: 10px;
    color: var(--text-secondary);
    line-height: 1.2;
}

.show-desktop {
    width: 6px;
    height: 36px;
    border-radius: 2px;
    cursor: pointer;
    transition: var(--transition);
    border-left: 1px solid rgba(255,255,255,0.06);
}

.show-desktop:hover {
    background: rgba(255,255,255,0.1);
}

/* ===== START MENU ===== */
.start-menu {
    position: absolute;
    bottom: 54px;
    left: 8px;
    width: 420px;
    max-height: 520px;
    background: rgba(30, 30, 46, 0.95);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
    z-index: 200;
    box-shadow: var(--shadow-heavy);
    display: flex;
    flex-direction: column;
    animation: startMenuIn 0.25s cubic-bezier(0.1, 0.9, 0.2, 1);
    overflow: hidden;
}

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

.start-menu-header {
    padding: 16px;
}

.start-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 0 14px;
    border-radius: 8px;
    height: 36px;
    transition: var(--transition);
}

.start-search:focus-within {
    border-color: var(--accent);
    background: rgba(255,255,255,0.1);
}

.start-search i {
    font-size: 13px;
    color: var(--text-muted);
}

.start-search input {
    border: none;
    background: none;
    outline: none;
    color: var(--text-primary);
    font-size: 13px;
    width: 100%;
    font-family: inherit;
}

.start-search input::placeholder {
    color: var(--text-muted);
}

.start-menu-body {
    padding: 0 16px;
    flex: 1;
    overflow-y: auto;
}

.start-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.start-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    margin-bottom: 20px;
}

.start-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.start-app:hover {
    background: rgba(255,255,255,0.06);
}

.start-app-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #ffd43b;
}

.start-app-icon.notepad-icon { color: #7ec8e3; }
.start-app-icon.calc-icon { color: #a0a0b0; }
.start-app-icon.wallpaper-icon { color: #e879f9; }
.start-app-icon.store-icon { color: #22d3ee; }
.start-app-icon.gateway-icon { color: #4ade80; }

.start-app span {
    font-size: 11px;
    color: var(--text-secondary);
}

.start-recommended {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 12px;
}

.start-rec-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.start-rec-item:hover {
    background: rgba(255,255,255,0.06);
}

.start-rec-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border-radius: 6px;
    background: var(--surface-2);
}

.start-rec-info span {
    font-size: 13px;
    color: var(--text-primary);
}

.start-rec-info small {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
}

.start-menu-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.start-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    font-size: 13px;
}

.start-user:hover {
    background: rgba(255,255,255,0.06);
}

.start-user i {
    font-size: 20px;
}

.power-btn {
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.power-btn:hover {
    background: rgba(231, 72, 86, 0.15);
    color: var(--danger);
}

/* ===== WINDOWS ===== */
.app-window {
    position: absolute;
    background: var(--window-bg);
    border: 1px solid var(--window-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 320px;
    min-height: 200px;
    animation: windowOpen 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
    transition: box-shadow 0.2s;
}

.app-window.focused {
    box-shadow: var(--shadow-heavy);
    border-color: rgba(255,255,255,0.1);
}

.app-window.minimized {
    animation: windowMinimize 0.3s ease forwards;
    pointer-events: none;
}

.app-window.maximized {
    border-radius: 0;
    border: none;
}

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

@keyframes windowMinimize {
    to { opacity: 0; transform: scale(0.5) translateY(100px); }
}

.window-header {
    height: 36px;
    background: var(--window-header);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px 0 12px;
    cursor: default;
    flex-shrink: 0;
}

.window-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    flex: 1;
    min-width: 0;
}

.window-title i {
    font-size: 14px;
}

.window-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.window-controls {
    display: flex;
    align-items: center;
    gap: 0;
}

.win-ctrl {
    width: 36px;
    height: 30px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border-radius: 4px;
}

.win-ctrl:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
}

.win-ctrl.close:hover {
    background: var(--danger);
    color: white;
}

.window-body {
    flex: 1;
    overflow: auto;
    position: relative;
}

/* Window resize handle */


/* ===== APP CONTENTS ===== */
/* Explorer */
.explorer-content {
    display: flex;
    height: 100%;
}

.explorer-sidebar {
    width: 180px;
    background: rgba(0,0,0,0.2);
    border-right: 1px solid rgba(255,255,255,0.04);
    padding: 8px;
    flex-shrink: 0;
}

.explorer-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.explorer-nav-item:hover, .explorer-nav-item.active {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
}

.explorer-nav-item i {
    width: 16px;
    text-align: center;
    font-size: 13px;
}

.explorer-main {
    flex: 1;
    padding: 12px;
}

.explorer-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.explorer-toolbar button {
    padding: 4px 12px;
    border: none;
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 11px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.explorer-toolbar button:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

.explorer-files {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 6px;
}

.explorer-file {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.explorer-file:hover {
    background: rgba(255,255,255,0.06);
}

.explorer-file i {
    font-size: 28px;
}

.explorer-file span {
    font-size: 10px;
    color: var(--text-secondary);
    text-align: center;
    word-break: break-all;
}

/* Notepad */
.notepad-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.notepad-menubar {
    display: flex;
    gap: 0;
    padding: 4px 8px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--surface-3);
}

.notepad-menubar button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    padding: 4px 10px;
    cursor: pointer;
    font-family: inherit;
    border-radius: var(--radius-sm);
}

.notepad-menubar button:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
}

.notepad-editor {
    flex: 1;
    background: var(--surface-1);
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    padding: 12px;
    resize: none;
    line-height: 1.6;
}

.notepad-statusbar {
    display: flex;
    justify-content: space-between;
    padding: 4px 12px;
    background: var(--surface-2);
    border-top: 1px solid var(--surface-3);
    font-size: 11px;
    color: var(--text-secondary);
}

/* Calculator */
.calc-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--surface-1);
}

.calc-display {
    padding: 16px 20px;
    text-align: right;
    background: var(--surface-2);
    border-bottom: 1px solid var(--surface-3);
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.calc-expression {
    font-size: 12px;
    color: var(--text-secondary);
    min-height: 18px;
    margin-bottom: 4px;
}

.calc-result {
    font-size: 32px;
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1;
}

.calc-buttons {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    padding: 1px;
}

.calc-btn {
    background: var(--surface-2);
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    transition: var(--transition);
    padding: 14px;
}

.calc-btn:hover {
    background: var(--surface-3);
}

.calc-btn:active {
    background: rgba(255,255,255,0.15);
}

.calc-btn.operator {
    color: var(--accent);
}

.calc-btn.clear {
    color: #ef4444;
}

.calc-btn.equals {
    background: var(--accent);
    color: #fff;
}

.calc-btn.equals:hover {
    background: var(--accent-hover);
}

/* Wallpaper App */
.wallpaper-content {
    height: 100%;
    padding: 20px;
    overflow-y: auto;
}

.wallpaper-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wallpaper-title i {
    color: #e879f9;
}

.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.wallpaper-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 32px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
}

.wallpaper-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.wallpaper-card.active {
    box-shadow: 0 0 0 3px #10b981, 0 8px 24px rgba(16,185,129,0.3);
}

/* Store App */
.store-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.store-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.store-header h2 {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.store-header h2 i {
    color: #22d3ee;
}

.store-header p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.store-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.store-card {
    background: var(--surface-2);
    border-radius: var(--radius-md);
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.04);
    transition: var(--transition);
    cursor: pointer;
}

.store-card:hover {
    border-color: rgba(34, 211, 238, 0.3);
    background: var(--surface-3);
}

.store-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.store-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.store-card-badge {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.store-card-badge.hot {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.store-card-badge.new {
    background: rgba(34, 211, 238, 0.15);
    color: #22d3ee;
}

.store-card-badge.promo {
    background: rgba(250, 204, 21, 0.15);
    color: #facc15;
}

.store-card-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.store-card-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 10px;
    line-height: 1.4;
}

.store-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.store-price {
    font-size: 15px;
    font-weight: 700;
    color: #4ade80;
}

.store-price small {
    font-size: 10px;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 4px;
}

.store-buy-btn {
    padding: 5px 14px;
    border: none;
    background: linear-gradient(135deg, #22d3ee, #0ea5e9);
    color: white;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.store-buy-btn:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

/* Gateway App */
.gateway-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.gateway-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #052e16, #14532d);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.gateway-header h2 {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gateway-header h2 i {
    color: #4ade80;
}

.gateway-header p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.gateway-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.gateway-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.gateway-stat {
    background: var(--surface-2);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: center;
}

.gateway-stat-value {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 2px;
}

.gateway-stat-value.green { color: #4ade80; }
.gateway-stat-value.blue { color: #60a5fa; }
.gateway-stat-value.yellow { color: #facc15; }

.gateway-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gateway-section-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gateway-transactions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gateway-tx {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.gateway-tx-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gateway-tx-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.gateway-tx-icon.in {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
}

.gateway-tx-icon.out {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.gateway-tx-details span {
    display: block;
    font-weight: 500;
}

.gateway-tx-details small {
    color: var(--text-muted);
    font-size: 10px;
}

.gateway-tx-amount {
    font-weight: 600;
}

.gateway-tx-amount.positive { color: #4ade80; }
.gateway-tx-amount.negative { color: #ef4444; }

.gateway-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.gateway-action-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.gateway-action-btn.primary {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #052e16;
}

.gateway-action-btn.secondary {
    background: var(--surface-3);
    color: var(--text-primary);
}

.gateway-action-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* Notepad */
.notepad-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.notepad-menubar {
    display: flex;
    gap: 0;
    padding: 2px 4px;
    background: var(--surface-1);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.notepad-menubar button {
    padding: 4px 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
    font-family: inherit;
    transition: var(--transition);
}

.notepad-menubar button:hover {
    background: rgba(255,255,255,0.06);
}

.notepad-editor {
    flex: 1;
    width: 100%;
    border: none;
    background: var(--window-bg);
    color: var(--text-primary);
    padding: 12px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    outline: none;
    resize: none;
    line-height: 1.6;
}

.notepad-statusbar {
    display: flex;
    justify-content: space-between;
    padding: 2px 12px;
    background: var(--surface-1);
    border-top: 1px solid rgba(255,255,255,0.04);
    font-size: 11px;
    color: var(--text-muted);
}



/* ===== NOTIFICATIONS PANEL ===== */
.notifications-panel {
    position: absolute;
    bottom: 54px;
    right: 8px;
    width: 340px;
    max-height: 460px;
    background: rgba(30, 30, 46, 0.95);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
    z-index: 200;
    box-shadow: var(--shadow-heavy);
    animation: startMenuIn 0.25s cubic-bezier(0.1, 0.9, 0.2, 1);
    overflow: hidden;
}

.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.notif-header span {
    font-size: 14px;
    font-weight: 600;
}

.notif-header button {
    border: none;
    background: transparent;
    color: var(--accent);
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
}

.notif-list {
    max-height: 160px;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: var(--transition);
}

.notif-item:hover {
    background: rgba(255,255,255,0.03);
}

.notif-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--surface-3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--accent);
    flex-shrink: 0;
}

.notif-content strong {
    font-size: 12px;
    display: block;
    margin-bottom: 2px;
}

.notif-content p {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.notif-content small {
    font-size: 10px;
    color: var(--text-muted);
}

.quick-settings {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 12px 16px;
}

.qs-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    cursor: pointer;
    transition: var(--transition);
}

.qs-btn:hover {
    background: var(--surface-3);
}

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

.qs-btn i {
    font-size: 14px;
}

.qs-btn span {
    font-size: 9px;
    color: var(--text-secondary);
}

.qs-btn.active span {
    color: rgba(255,255,255,0.8);
}

.qs-sliders {
    padding: 4px 16px 14px;
}

.qs-slider {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
}

.qs-slider i {
    font-size: 13px;
    color: var(--text-secondary);
    width: 18px;
    text-align: center;
}

.qs-slider input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    height: 4px;
    background: rgba(255,255,255,0.12);
    border-radius: 2px;
    outline: none;
}

.qs-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
}

/* ===== CALENDAR ===== */
.calendar-popup {
    position: absolute;
    bottom: 54px;
    right: 60px;
    width: 280px;
    background: rgba(30, 30, 46, 0.95);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
    z-index: 200;
    box-shadow: var(--shadow-heavy);
    padding: 16px;
    animation: startMenuIn 0.25s cubic-bezier(0.1, 0.9, 0.2, 1);
}

.cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.cal-header span {
    font-size: 14px;
    font-weight: 600;
}

.cal-header button {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.cal-header button:hover {
    background: rgba(255,255,255,0.08);
}

.cal-grid, .cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
}

.cal-day-header {
    font-size: 11px;
    color: var(--text-muted);
    padding: 4px 0;
    font-weight: 600;
}

.cal-day {
    font-size: 12px;
    padding: 6px 0;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    margin: 0 auto;
}

.cal-day:hover {
    background: rgba(255,255,255,0.08);
}

.cal-day.today {
    background: var(--accent);
    color: white;
    font-weight: 600;
}

.cal-day.other-month {
    color: var(--text-muted);
    opacity: 0.4;
}

/* Shutdown animation */
.shutdown-animation {
    animation: shutdownAnim 1.5s forwards;
}

@keyframes shutdownAnim {
    0% { filter: brightness(1); }
    50% { filter: brightness(0.5); }
    100% { filter: brightness(0) saturate(0); }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

/* Responsive */
@media (max-width: 900px) {
    .monitor-screen {
        width: 95vw;
        height: 70vh;
    }

    .start-menu {
        width: 320px;
    }

    .start-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .search-bar {
        display: none;
    }

    .explorer-sidebar, .settings-sidebar {
        width: 140px;
    }
}

/* ===== MOBILE ELEMENTS (hidden by default on desktop) ===== */
.mobile-statusbar,
.mobile-dock,
.mobile-search {
    display: none;
}

/* ===== MOBILE RESPONSIVE — PHONE UI ===== */
@media (max-width: 768px) {

    /* Reset body for mobile */
    body {
        background: #000;
    }

    .monitor-screen {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }

    /* ---- Boot Screen mobile (iOS style) ---- */
    .boot-screen {
        gap: 30px;
    }

    .boot-logo-img {
        width: 120px;
    }

    /* ---- Lock Screen mobile (iOS style) ---- */
    .lock-screen {
        background: #000;
    }

    .lock-bg {
        filter: blur(0px) brightness(0.6);
    }

    .lock-content {
        justify-content: flex-start;
        padding-top: 60px;
    }



    .lock-date {
        font-size: 16px;
        font-weight: 500;
        margin-top: -4px;
    }


    .lock-hint {
        position: absolute;
        bottom: 40px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 13px;
        color: rgba(255,255,255,0.6);
        animation: lockHintPulse 2s ease-in-out infinite;
    }

    @keyframes lockHintPulse {
        0%, 100% { opacity: 0.6; }
        50% { opacity: 1; }
    }

    /* ---- Mobile Status Bar (HIDDEN for clean iOS look) ---- */
    .mobile-statusbar {
        display: none !important;
    }



    /* ---- Profile Widget Mobile ---- */
    .profile-widget {
        position: relative;
        top: auto;
        right: auto;
        width: calc(100% - 32px);
        margin: 12px auto 6px;
        border-radius: 16px;
        padding: 12px 16px;
        order: -1;
        background: rgba(255, 255, 255, 0.06);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    .pw-avatar {
        width: 46px;
        height: 46px;
        font-size: 20px;
    }

    .pw-name {
        font-size: 14px;
    }

    .pw-balance-value {
        font-size: 14px;
    }

    /* ---- Desktop → Mobile Home Screen ---- */
    .desktop {
        flex-direction: column;
    }

    .desktop-icons {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr);
        gap: 18px 12px;
        padding: 20px 20px 16px;
        flex: 1;
        align-content: start;
        justify-items: center;
        max-height: none;
        flex-wrap: nowrap;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .desktop-icon {
        width: 68px;
        height: 86px;
        position: static !important;
        gap: 5px;
    }

    .desktop-icon .icon-img {
        width: 54px;
        height: 54px;
        border-radius: 13px;
        font-size: 22px;
        background: rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    /* Icon background colors on mobile */
    .desktop-icon .icon-img {
        background: rgba(255, 193, 7, 0.18);
        color: #ffd43b;
    }
    .desktop-icon .icon-img.notepad-icon {
        background: rgba(126, 200, 227, 0.18);
        color: #7ec8e3;
    }
    .desktop-icon .icon-img.calc-icon {
        background: rgba(160, 160, 176, 0.18);
        color: #c0c0d0;
    }
    .desktop-icon .icon-img.wallpaper-icon {
        background: rgba(232, 121, 249, 0.18);
        color: #e879f9;
    }
    .desktop-icon .icon-img.store-icon {
        background: rgba(34, 211, 238, 0.18);
        color: #22d3ee;
    }
    .desktop-icon .icon-img.gateway-icon {
        background: rgba(52, 211, 153, 0.18);
        color: #34d399;
    }

    .desktop-icon span {
        font-size: 10px;
        color: #fff;
        text-shadow: 0 1px 3px rgba(0,0,0,0.6);
        text-align: center;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 72px;
    }

    .desktop-icon:hover {
        background: none;
    }

    .desktop-icon:active .icon-img {
        transform: scale(0.9);
        transition: transform 0.1s ease;
    }

    /* Desktop watermark smaller on mobile */
    .desktop-watermark {
        width: 140px;
    }

    /* ---- Mobile Search Bar (iOS style) ---- */
    .mobile-search {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 6px;
        margin: 0 auto 12px;
        padding: 8px 24px;
        background: rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: 20px;
        width: fit-content;
        cursor: pointer;
        z-index: 5;
        position: relative;
    }
    .mobile-search i {
        font-size: 12px;
        color: rgba(255,255,255,0.5);
    }
    .mobile-search span {
        font-size: 14px;
        color: rgba(255,255,255,0.5);
        font-weight: 500;
    }

    /* ---- Mobile Dock ---- */
    .mobile-dock {
        display: flex !important;
        justify-content: center;
        gap: 24px;
        padding: 12px 0 20px;
        position: relative;
        z-index: 5;
        margin: 0 24px 8px;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: 24px;
    }

    .dock-app {
        cursor: pointer;
    }

    .dock-icon {
        width: 52px;
        height: 52px;
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        color: #ffd43b;
        background: rgba(255, 193, 7, 0.2);
        backdrop-filter: blur(8px);
        transition: transform 0.15s ease;
    }

    .dock-icon.store-icon {
        color: #22d3ee;
        background: rgba(34, 211, 238, 0.2);
    }

    .dock-icon.gateway-icon {
        color: #34d399;
        background: rgba(52, 211, 153, 0.2);
    }

    .dock-app:active .dock-icon {
        transform: scale(0.88);
    }

    /* ---- Hide Desktop-only Elements ---- */
    .taskbar,
    .start-menu,
    .context-menu,
    .notifications-panel,
    .calendar-popup,
    .search-bar,
    .show-desktop {
        display: none !important;
    }

    /* ---- Windows → Fullscreen on Mobile ---- */
    .app-window {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        border-radius: 0 !important;
        z-index: 100 !important;
        animation: mobileAppOpen 0.3s ease;
    }

    @keyframes mobileAppOpen {
        from {
            opacity: 0;
            transform: scale(0.92);
        }
        to {
            opacity: 1;
            transform: scale(1);
        }
    }

    .window-header {
        border-radius: 0;
        padding: 12px 16px;
    }

    /* Hide minimize and maximize on mobile */
    .win-ctrl.minimize,
    .win-ctrl.maximize {
        display: none;
    }

    /* Make close button bigger for touch */
    .win-ctrl.close {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .window-body {
        height: calc(100vh - 44px);
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        overflow-x: hidden;
    }

    /* Resize handle hidden on mobile */
    .resize-handle,
    

    /* ---- Mobile App Content Overrides ---- */
    .calc-btn {
        padding: 18px;
        font-size: 18px;
    }

    .calc-result {
        font-size: 40px;
    }

    .notepad-editor {
        font-size: 15px;
    }

    .store-grid {
        grid-template-columns: 1fr !important;
    }

    .gateway-stats {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .wallpaper-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .explorer-sidebar {
        display: none;
    }

    .qt-report-summary {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ===== QUALITY TRACKING APP ===== */
.qt-app {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--surface-1);
    overflow: hidden;
    min-width: 0;
}

#qtSalesView {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.qt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: linear-gradient(135deg, #0c4a6e, #164e63);
    border-bottom: 1px solid rgba(6,182,212,0.15);
    flex-shrink: 0;
}

.qt-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qt-header h3 i {
    color: #06b6d4;
    font-size: 16px;
}

.qt-refresh-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.2s ease;
}

.qt-refresh-btn:hover {
    background: rgba(6,182,212,0.2);
    color: #06b6d4;
}

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

/* Platform Tabs */
.qt-platforms {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    flex-shrink: 0;
    overflow-x: auto;
}

.qt-plat-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid rgba(255,255,255,0.06);
    background: var(--surface-2);
    color: var(--text-secondary);
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.25s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.qt-plat-btn i {
    font-size: 16px;
}

.qt-plat-btn:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

.qt-plat-btn.active {
    background: linear-gradient(135deg, rgba(6,182,212,0.15), rgba(6,182,212,0.08));
    border-color: rgba(6,182,212,0.3);
    color: #06b6d4;
    box-shadow: 0 0 12px rgba(6,182,212,0.1);
}

.qt-plat-btn.active i {
    color: #22d3ee;
}

.qt-plat-logo {
    width: 16px;
    height: 16px;
    object-fit: contain;
    border-radius: 3px;
    vertical-align: middle;
}

/* Date Filter */
.qt-date-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(0,0,0,0.12);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    flex-shrink: 0;
    flex-wrap: wrap;
}

.qt-date-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
}

.qt-date-field {
    display: flex;
    align-items: center;
    gap: 6px;
}

.qt-date-field label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.qt-date-field input[type="date"] {
    background: var(--surface-2);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
    color-scheme: dark;
}

.qt-date-field input[type="date"]:focus {
    border-color: rgba(6,182,212,0.4);
    box-shadow: 0 0 0 2px rgba(6,182,212,0.1);
}

.qt-status-filters {
    display: flex;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(0,0,0,0.12);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    flex-shrink: 0;
    flex-wrap: wrap;
    min-width: 0;
}

.qt-status-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid rgba(255,255,255,0.06);
    background: var(--surface-2);
    color: var(--text-secondary);
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.25s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.qt-status-btn i {
    font-size: 14px;
}

.qt-status-btn:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

.qt-status-btn.active {
    background: linear-gradient(135deg, rgba(6,182,212,0.15), rgba(6,182,212,0.08));
    border-color: rgba(6,182,212,0.3);
    color: #06b6d4;
    box-shadow: 0 0 12px rgba(6,182,212,0.1);
}

.qt-status-btn.active i {
    color: #22d3ee;
}

.qt-platform-filters {
    display: flex;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(0,0,0,0.12);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    flex-shrink: 0;
    flex-wrap: wrap;
    min-width: 0;
}

.qt-date-presets {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.qt-preset-btn {
    padding: 5px 12px;
    border: 1px solid rgba(255,255,255,0.06);
    background: var(--surface-2);
    color: var(--text-secondary);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.qt-preset-btn:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
}

.qt-preset-btn.active {
    background: rgba(6,182,212,0.12);
    border-color: rgba(6,182,212,0.25);
    color: #06b6d4;
}

/* Empty State */
.qt-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    color: var(--text-muted);
}

.qt-empty i {
    font-size: 28px;
    opacity: 0.4;
}

.qt-empty span {
    font-size: 13px;
}

/* Report Area */
.qt-report-area {
    flex: 1;
    overflow-y: auto;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Report Summary Cards */
.qt-report-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.qt-rs-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--surface-2);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.04);
}

.qt-rs-card i {
    font-size: 18px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    flex-shrink: 0;
}

.qt-rs-card div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.qt-rs-card small {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.qt-rs-card strong {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sales List */
.qt-sales-list {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Drill-down Filters */
.qt-drilldown {
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0,0,0,0.08);
    border-radius: 10px;
    margin: 0 16px 4px;
}

.qt-drill-group {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.qt-drill-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    padding-top: 5px;
    min-width: 90px;
    flex-shrink: 0;
}

.qt-drill-label i {
    font-size: 10px;
    color: var(--text-muted);
}

.qt-drill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.qt-drill-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1px solid rgba(255,255,255,0.06);
    background: var(--surface-2);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.qt-drill-tag:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

.qt-drill-tag.active {
    background: linear-gradient(135deg, rgba(6,182,212,0.18), rgba(6,182,212,0.08));
    border-color: rgba(6,182,212,0.35);
    color: #06b6d4;
    box-shadow: 0 0 10px rgba(6,182,212,0.1);
}

.qt-drill-count {
    background: rgba(255,255,255,0.08);
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

.qt-drill-tag.active .qt-drill-count {
    background: rgba(6,182,212,0.2);
    color: #22d3ee;
}

.qt-drill-clear {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid rgba(239,68,68,0.2);
    background: rgba(239,68,68,0.08);
    color: #ef4444;
    border-radius: 8px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s;
    align-self: flex-start;
}

.qt-drill-clear:hover {
    background: rgba(239,68,68,0.15);
}

.qt-drill-plat-specific {
    border-top: 1px solid rgba(255,255,255,0.04);
    padding-top: 6px;
    margin-top: 2px;
}

.qt-drill-plat-specific .qt-drill-label {
    color: #06b6d4;
}

.qt-sale-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface-2);
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid rgba(255,255,255,0.04);
    transition: all 0.2s ease;
    animation: qtRowIn 0.3s ease both;
}

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

.qt-sale-row:hover {
    border-color: rgba(6,182,212,0.12);
    background: rgba(255,255,255,0.03);
}

.qt-sale-row,
.qt-sale-row * {
    user-select: text;
    -webkit-user-select: text;
}

/* Left: Platform icon + product info */
.qt-sale-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    flex-shrink: 0;
}

.qt-sale-plat-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    font-size: 15px;
    flex-shrink: 0;
}

.qt-sale-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.qt-sale-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qt-sale-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qt-sale-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
}

.qt-sale-meta span i {
    font-size: 9px;
    opacity: 0.6;
}

/* Middle: UTM Tags */
.qt-sale-utms {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    flex: 1;
    min-width: 0;
}

.qt-utm {
    font-size: 9px;
    color: var(--text-muted);
    background: rgba(6,182,212,0.06);
    border: 1px solid rgba(6,182,212,0.1);
    padding: 3px 7px;
    border-radius: 5px;
    font-family: 'Consolas', 'Courier New', monospace;
    white-space: nowrap;
}

.qt-utm b {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Right: Price + Status */
.qt-sale-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
    min-width: 100px;
}

.qt-sale-revenue {
    font-size: 15px;
    font-weight: 800;
    color: #10b981;
    white-space: nowrap;
}

.qt-sale-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.qt-sale-approved {
    background: rgba(16,185,129,0.12);
    color: #10b981;
}

@keyframes qtStatusPulse {
    0% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.08); filter: brightness(1.5); }
    100% { transform: scale(1); filter: brightness(1); }
}

.qt-sale-review {
    background: rgba(245,158,11,0.12);
    color: #f59e0b;
}

.qt-sale-cancelled {
    background: rgba(239,68,68,0.12);
    color: #ef4444;
}

/* Loading Spinner */
.loading-spinner-qt {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.1);
    border-top-color: #06b6d4;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Offer Management */
.qt-offer-form {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.qt-offer-form h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.qt-offer-form h4 i {
    color: #06b6d4;
    margin-right: 6px;
}

.qt-offer-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.qt-of-input {
    padding: 8px 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 12px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
}

.qt-of-input:focus {
    border-color: rgba(6,182,212,0.4);
}

select.qt-of-input {
    cursor: pointer;
    color-scheme: dark;
}

.qt-of-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, rgba(6,182,212,0.15), rgba(6,182,212,0.08));
    border: 1px solid rgba(6,182,212,0.25);
    border-radius: 8px;
    color: #06b6d4;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.qt-of-btn:hover {
    background: rgba(6,182,212,0.2);
}

.qt-offers-list {
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qt-offer-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 12px;
    transition: all 0.2s;
}

.qt-offer-card:hover {
    border-color: rgba(255,255,255,0.1);
}

.qt-offer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.qt-offer-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qt-offer-info div {
    display: flex;
    flex-direction: column;
}

.qt-offer-info strong {
    font-size: 13px;
    color: var(--text-primary);
}

.qt-offer-info small {
    font-size: 11px;
    color: var(--text-muted);
}

.qt-offer-del {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 13px;
}

.qt-offer-del:hover {
    color: #ef4444;
    background: rgba(239,68,68,0.1);
}

.qt-offer-link {
    display: flex;
    gap: 6px;
}

.qt-of-link-input {
    flex: 1;
    padding: 6px 10px;
    background: rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 10px;
    font-family: 'Consolas', monospace;
    outline: none;
}

.qt-of-copy {
    padding: 6px 10px;
    background: rgba(6,182,212,0.1);
    border: 1px solid rgba(6,182,212,0.2);
    border-radius: 6px;
    color: #06b6d4;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
}

.qt-of-copy:hover {
    background: rgba(6,182,212,0.2);
}

/* ===== Integration Guide ===== */
.qt-integration-guide {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 8px;
}

.qt-integration-guide h4 {
    font-size: 13px;
    font-weight: 600;
    color: #06b6d4;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qt-guide-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.qt-guide-tab {
    flex: 1;
    padding: 8px 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.qt-guide-tab:hover {
    background: rgba(255,255,255,0.06);
}

.qt-guide-tab.active {
    background: linear-gradient(135deg, rgba(6,182,212,0.12), rgba(6,182,212,0.06));
    border-color: rgba(6,182,212,0.3);
    color: #06b6d4;
    font-weight: 600;
}

.qt-guide-desc {
    font-size: 10px;
    color: #8899a6;
    margin-bottom: 14px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.02);
    border-radius: 6px;
    border-left: 3px solid rgba(6,182,212,0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.5;
}

.qt-guide-desc i {
    color: #06b6d4;
    font-size: 12px;
}

.qt-guide-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.qt-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.qt-step-num {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.qt-step-content {
    flex: 1;
    min-width: 0;
}

.qt-step-content h5 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.qt-step-content p {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.5;
}

.qt-step-content code {
    background: rgba(6,182,212,0.1);
    color: #06b6d4;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 10px;
    font-family: 'Consolas', monospace;
}

.qt-code-block {
    position: relative;
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 10px 12px;
    overflow-x: auto;
}

.qt-code-block pre {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 10px;
    color: #a0aec0;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
}

.qt-code-copy {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 11px;
    transition: all 0.2s;
    z-index: 2;
}

.qt-code-copy:hover {
    background: rgba(6,182,212,0.15);
    color: #06b6d4;
}

.qt-webhook-highlight {
    border-color: rgba(6,182,212,0.25);
    background: rgba(6,182,212,0.05);
}

.qt-webhook-highlight pre {
    color: #06b6d4;
    font-weight: 500;
    font-size: 11px;
}

/* Code Cards */
.qt-code-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qt-code-card {
    background: var(--surface-2);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 16px;
    transition: border-color 0.2s;
}

.qt-code-card:hover {
    border-color: rgba(255,255,255,0.1);
}

.qt-code-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.qt-code-card-badge {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.qt-code-card-header h5 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 2px;
}

.qt-code-card-header p {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
}

.qt-code-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.qt-code-card-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border: 1px solid rgba(6,182,212,0.15);
    border-radius: 6px;
    font-size: 9px;
    font-weight: 600;
    color: #67e8f9;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.qt-code-card-tag i {
    font-size: 8px;
}

.qt-code-card-hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 10px;
    background: rgba(0,0,0,0.15);
    border-radius: 8px;
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.5;
}

.qt-code-card-hint i {
    flex-shrink: 0;
    margin-top: 2px;
}

.qt-code-card-expandable {
    margin-top: 8px;
}

.qt-code-card-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 6px 12px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    justify-content: center;
}

.qt-code-card-toggle:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
}

.qt-code-card-toggle .fa-chevron-down {
    transition: transform 0.3s;
    margin-left: auto;
    font-size: 8px;
}

.qt-code-card-expandable.open .qt-code-card-toggle .fa-chevron-down {
    transform: rotate(180deg);
}

.qt-code-card-expand-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.qt-code-card-expandable.open .qt-code-card-expand-content {
    max-height: 300px;
    margin-top: 8px;
}

.qt-code-card-params {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.04);
}

.qt-code-card-params h6 {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.qt-code-card-params h6 i {
    font-size: 10px;
}

.qt-param-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.qt-param {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    background: rgba(0,0,0,0.12);
    border-radius: 6px;
}

.qt-param code {
    font-family: 'Consolas', monospace;
    font-size: 10px;
    color: #f59e0b;
    font-weight: 600;
    background: rgba(245,158,11,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    min-width: 100px;
}

.qt-param span {
    font-size: 10px;
    color: var(--text-muted);
}

.qt-step-hint {
    font-size: 10px !important;
    color: #8899a6 !important;
    margin-top: 6px !important;
    margin-bottom: 0 !important;
    display: flex;
    align-items: center;
    gap: 6px;
}

.qt-step-hint i {
    color: #eab308;
    font-size: 11px;
}

/* ===== STANDALONE MODE ===== */
#standalone-app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    background: #0f172a;
    color: #e2e8f0;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

.standalone-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.standalone-header .window-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #e2e8f0;
}

.standalone-header .window-title i {
    color: #06b6d4;
    font-size: 20px;
}

.standalone-body {
    flex: 1;
    padding: 24px 32px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-y: auto;
}

/* Force all child content to expand in standalone */
.standalone-body > * {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: auto !important;
}

.standalone-body .qt-content {
    width: 100% !important;
    height: auto !important;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.standalone-body .qt-header {
    width: 100% !important;
}

.standalone-body .qt-report-area {
    width: 100% !important;
    flex: 1;
}

.standalone-body .qt-stats-row {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
}

.standalone-body .qt-platform-tabs {
    flex-wrap: wrap !important;
}

/* Gateway standalone */
.standalone-body .gateway-content {
    width: 100% !important;
    max-width: 100% !important;
}

.standalone-body .gateway-content iframe {
    width: 100% !important;
    height: 80vh !important;
    border: none;
    border-radius: 12px;
}

/* App placeholder standalone */
.standalone-body .app-placeholder {
    width: 100% !important;
    height: auto !important;
    min-height: 60vh !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Integration guide standalone */
.standalone-body .qt-integration-guide {
    width: 100% !important;
}

.standalone-body .qt-code-block pre {
    max-width: 100% !important;
    overflow-x: auto;
}

@media (max-width: 768px) {
    .standalone-body {
        padding: 12px;
    }
    .standalone-header {
        padding: 12px 16px;
    }
    .standalone-body .qt-stats-row {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .standalone-body .qt-stats-row {
        grid-template-columns: 1fr !important;
    }
}

/* ===== WINDOW RESIZE EDGES ===== */
.win-edge { position: absolute; z-index: 10; }

/* Top/Bottom edges */
.win-edge-n { top: -4px; left: 8px; right: 8px; height: 8px; cursor: n-resize; }
.win-edge-s { bottom: -4px; left: 8px; right: 8px; height: 8px; cursor: s-resize; }

/* Left/Right edges */
.win-edge-w { left: -4px; top: 8px; bottom: 8px; width: 8px; cursor: w-resize; }
.win-edge-e { right: -4px; top: 8px; bottom: 8px; width: 8px; cursor: e-resize; }

/* Corners */
.win-edge-nw { top: -4px; left: -4px; width: 12px; height: 12px; cursor: nw-resize; }
.win-edge-ne { top: -4px; right: -4px; width: 12px; height: 12px; cursor: ne-resize; }
.win-edge-sw { bottom: -4px; left: -4px; width: 12px; height: 12px; cursor: sw-resize; }
.win-edge-se { bottom: -4px; right: -4px; width: 12px; height: 12px; cursor: se-resize; }

/* ===== QT MAIN TABS ===== */
.qt-main-tabs {
    display: flex;
    gap: 0;
    padding: 0 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.qt-main-tab {
    background: none;
    border: none;
    color: rgba(255,255,255,0.45);
    font-size: 13px;
    font-weight: 500;
    padding: 10px 18px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.qt-main-tab:hover {
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.03);
}

.qt-main-tab.active {
    color: #06b6d4;
    border-bottom-color: #06b6d4;
}

/* ===== UTM TEMPLATES ===== */
.qt-utm-templates {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.qt-utm-template {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 10px 12px;
}

.qt-utm-label {
    font-size: 12px;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qt-utm-label i {
    font-size: 14px;
}

.qt-utm-template .qt-code-block {
    margin: 0;
}

.qt-utm-template .qt-code-block pre {
    font-size: 11px;
    padding: 8px 35px 8px 10px;
    white-space: nowrap;
    overflow-x: auto;
}

/* ===== QT GUIDE CARDS ===== */
.qt-guide-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 0;
}

.qt-guide-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qt-guide-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
    transform: translateX(2px);
}

.qt-guide-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.qt-guide-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.qt-guide-card-info strong {
    font-size: 13px;
    color: #e2e8f0;
}

.qt-guide-card-info small {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
}

.qt-guide-card-arrow {
    color: rgba(255,255,255,0.2);
    font-size: 12px;
    transition: transform 0.2s ease;
}

.qt-guide-card:hover .qt-guide-card-arrow {
    color: rgba(255,255,255,0.5);
    transform: translateX(3px);
}

/* Guide sections */
.qt-guide-section {
    animation: fadeInUp 0.25s ease;
}

.qt-guide-section h4 {
    font-size: 15px;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qt-guide-back {
    background: none;
    border: none;
    color: #06b6d4;
    font-size: 12px;
    cursor: pointer;
    padding: 6px 0;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    transition: opacity 0.2s;
}

.qt-guide-back:hover {
    opacity: 0.7;
}

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

/* ===== QT REFRESH BTN ===== */
.qt-main-tabs .qt-refresh-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.45);
    font-size: 14px;
    cursor: pointer;
    padding: 8px 10px;
    transition: color 0.2s ease;
}
.qt-main-tabs .qt-refresh-btn:hover {
    color: #06b6d4;
}

/* ===== QT REPORTS TAB ===== */
.qt-report-filters {
    margin-bottom: 16px;
}

.qt-report-filter-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.qt-report-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.qt-report-filter-group label {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.qt-report-filter-group select,
.qt-report-filter-group input[type="date"] {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #e2e8f0;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 12px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.qt-report-filter-group select:focus,
.qt-report-filter-group input[type="date"]:focus {
    border-color: #06b6d4;
}

.qt-report-filter-group select option {
    background: #1e293b;
    color: #e2e8f0;
}

.qt-report-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.qt-report-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 16px;
}

.qt-report-card h5 {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0 0 14px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qt-report-card h5 i {
    color: #06b6d4;
}

.qt-pie-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
}

.qt-pie-wrapper canvas {
    flex-shrink: 0;
}

.qt-pie-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.qt-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #cbd5e1;
}

.qt-legend-label {
    flex: 1;
    text-transform: capitalize;
}

.qt-legend-value {
    font-weight: 600;
    color: #e2e8f0;
}

.qt-report-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.qt-report-summary-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qt-report-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    font-size: 12px;
    color: #cbd5e1;
}

.qt-report-stat span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.qt-report-stat strong {
    color: #e2e8f0;
}

@media (max-width: 600px) {
    .qt-report-grid {
        grid-template-columns: 1fr;
    }
    .qt-pie-wrapper {
        flex-direction: column;
    }
    .qt-report-filter-row {
        flex-direction: column;
    }
}

.qt-legend-hidden {
    opacity: 0.4;
}
.qt-legend-hidden:hover {
    opacity: 0.6;
}

/* ===== QT CAMPAIGN TABLE ===== */
.qt-campaign-table-wrap {
    overflow-x: auto;
    margin: 16px 0;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.04);
    background: var(--surface-2);
    max-width: 100%;
}

.qt-campaign-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    table-layout: fixed;
}

.qt-campaign-table thead th {
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.5);
    font-weight: 600;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 10px 8px;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Column widths */
.qt-campaign-table th:nth-child(1) { width: 75px; }   /* Gastos */
.qt-campaign-table th:nth-child(2) { width: 14%; }    /* Campanha */
.qt-campaign-table th:nth-child(3) { width: 10%; }    /* Conjunto */
.qt-campaign-table th:nth-child(4) { width: 10%; }    /* Anúncio */
.qt-campaign-table th:nth-child(5) { width: 14%; }    /* Produto */
.qt-campaign-table th:nth-child(6) { width: 6%; }     /* Pagas */
.qt-campaign-table th:nth-child(7) { width: 6%; }     /* Pend. */
.qt-campaign-table th:nth-child(8) { width: 6%; }     /* Aprov. */
.qt-campaign-table th:nth-child(9) { width: 9%; }     /* Valor */
.qt-campaign-table th:nth-child(10) { width: 10%; }   /* Faturado */
.qt-campaign-table th:nth-child(11) { width: 10%; }   /* Lucro */

.qt-campaign-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: background 0.15s;
}

.qt-campaign-table tbody tr:hover {
    background: rgba(255,255,255,0.03);
}

.qt-campaign-table tbody td {
    padding: 10px 8px;
    color: #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qt-gastos-input {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: #e2e8f0;
    border-radius: 6px;
    padding: 5px 8px;
    width: 50px;
    font-size: 11px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    -moz-appearance: textfield;
}

.qt-gastos-input:focus {
    border-color: #06b6d4;
}

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

.qt-gastos-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.qt-gastos-wrap i {
    color: rgba(255,255,255,0.25);
    font-size: 10px;
}

.qt-gastos-readonly {
    color: rgba(255,255,255,0.4);
    font-size: 11px;
}

.qt-cell-pago { color: #10b981; font-weight: 600; }
.qt-cell-pendente { color: #f59e0b; font-weight: 600; }
.qt-cell-faturado { color: #10b981; font-weight: 600; }
.qt-lucro-pos { color: #10b981; font-weight: 700; }
.qt-lucro-neg { color: #ef4444; font-weight: 700; }

.qt-section-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    margin: 20px 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.qt-section-title i {
    color: #06b6d4;
}
