/* Design System: Antigravity Premium Theme */
:root {
    --bg-dark: #0b0f19;
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-card-hover: rgba(17, 24, 39, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(99, 102, 241, 0.15);
    
    --primary: #4f46e5;
    --primary-glow: rgba(79, 70, 229, 0.4);
    --primary-hover: #4338ca;
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dark: #374151;
    
    /* Accents */
    --accent-blue: #06b6d4;
    --accent-blue-glow: rgba(6, 182, 212, 0.2);
    --accent-purple: #a855f7;
    --accent-purple-glow: rgba(168, 85, 247, 0.2);
    --accent-red: #ef4444;
    --accent-red-glow: rgba(239, 68, 68, 0.2);
    --accent-green: #10b981;
    --accent-green-glow: rgba(16, 185, 129, 0.2);
    
    --font-heading: 'Outfit', 'Sarabun', sans-serif;
    --font-body: 'Inter', 'Sarabun', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Floating animated glowing orbs for rich premium aesthetic */
.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.8) 0%, #030712 100%);
    z-index: -3;
}

.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -2;
    opacity: 0.25;
    pointer-events: none;
    transition: all 1s ease;
}

#orb-1 {
    top: -10%;
    left: 10%;
    width: 500px;
    height: 500px;
    background: var(--primary);
    animation: orb-float 25s infinite alternate ease-in-out;
}

#orb-2 {
    bottom: -10%;
    right: 10%;
    width: 600px;
    height: 600px;
    background: var(--accent-purple);
    animation: orb-float 35s infinite alternate-reverse ease-in-out;
}

@keyframes orb-float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(100px, 80px) scale(1.2); }
    100% { transform: translate(-50px, -100px) scale(0.9); }
}

/* Main Container */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-purple) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.logo-icon i {
    width: 24px;
    height: 24px;
    color: white;
}

.app-header h1 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #ffffff 30%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.online {
    background-color: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green-glow);
}

/* Cards (Glassmorphism layout) */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
}

/* Step Title */
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.step-num {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-purple) 100%);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.section-title h2 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
}

/* Upload Grid */
.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .upload-grid {
        grid-template-columns: 1fr;
    }
}

.upload-box {
    position: relative;
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    background: rgba(255, 255, 255, 0.01);
    transition: all 0.25s ease;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.upload-box:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.04);
}

.file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.icon-circle {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.upload-box:hover .icon-circle {
    transform: translateY(-4px);
    background: var(--primary-glow);
    border-color: var(--primary);
}

.icon-circle i {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
}

.upload-box:hover .icon-circle i {
    color: var(--text-main);
}

.upload-label h3 {
    font-size: 15px;
    font-weight: 600;
}

.upload-desc {
    font-size: 12px;
    color: var(--text-muted);
    max-width: 240px;
    line-height: 1.5;
}

/* File Status Box */
.file-status {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111827;
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 16px;
    z-index: 5;
    border: 1px solid var(--border-color);
}

.status-icon {
    width: 32px;
    height: 32px;
}

.status-icon.success {
    color: var(--accent-green);
}

.file-info {
    flex-grow: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-name {
    font-size: 14px;
    font-weight: 500;
    word-break: break-all;
}

.file-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.btn-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-clear:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-red);
}

.hidden {
    display: none !important;
}

/* Buttons */
.btn {
    font-family: var(--font-heading);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    text-decoration: none;
}

.btn-sm {
    font-size: 12px;
    padding: 8px 16px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-purple) 100%);
    color: white;
    padding: 12px 28px;
    font-size: 15px;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

.action-area {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    border-top-color: var(--primary);
    border-right-color: var(--accent-purple);
    animation: spin 1s linear infinite;
}

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

.loading-overlay h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
}

.loading-overlay p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Account Selector */
.account-selector-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.02);
}

.selector-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.selector-container label {
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
}

.form-select {
    background-color: #111827;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    cursor: pointer;
    transition: border 0.2s;
    min-width: 250px;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary);
}

.account-details {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

#account-full-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

/* Summary Grid */
.summary-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .summary-cards-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .summary-cards-grid {
        grid-template-columns: 1fr;
    }
}

.summary-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.border-left-blue { border-left: 4px solid var(--accent-blue); }
.border-left-purple { border-left: 4px solid var(--accent-purple); }
.border-left-red { border-left: 4px solid var(--accent-red); }
.border-left-green { border-left: 4px solid var(--accent-green); }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}

.card-header i {
    width: 16px;
    height: 16px;
}

.text-blue { color: var(--accent-blue); }
.text-purple { color: var(--accent-purple); }
.text-red { color: var(--accent-red); }
.text-green { color: var(--accent-green); }

.card-value {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    margin: 12px 0 6px 0;
}

.card-footer {
    font-size: 11px;
    color: var(--text-muted);
}

/* Tabs */
.tabs-menu {
    display: flex;
    gap: 8px;
    padding: 8px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.02);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.tab-btn i {
    width: 16px;
    height: 16px;
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
    color: white;
    background: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.tab-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
}

.badge-red { background: var(--accent-red); color: white; }
.badge-blue { background: var(--accent-blue); color: white; }
.badge-green { background: var(--accent-green); color: white; }

/* Tab content area */
.tab-content {
    display: none;
}

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

.tab-header {
    margin-bottom: 20px;
}

.tab-header h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
}

.tab-description {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Recon Table styling */
.recon-table-container {
    overflow-x: auto;
    margin-bottom: 24px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.recon-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.01);
}

.recon-table th, .recon-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.recon-table th {
    background: rgba(255, 255, 255, 0.03);
    font-weight: 600;
    color: var(--text-muted);
}

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

.text-right {
    text-align: right !important;
}

.recon-table td.text-right {
    font-family: var(--font-heading);
}

.font-bold {
    font-weight: 700 !important;
}

.text-highlight {
    color: var(--accent-blue);
}

/* Action Plan container */
.action-plan-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.action-plan-box h4 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.action-plan-box h4 i {
    color: var(--accent-purple);
}

.action-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-list li {
    font-size: 13px;
    position: relative;
    padding-left: 20px;
    line-height: 1.6;
}

.action-list li::before {
    content: "•";
    position: absolute;
    left: 4px;
    color: var(--accent-purple);
    font-weight: bold;
    font-size: 16px;
    top: -1px;
}

/* Unmatched Side-by-side Layout */
.unmatched-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 1024px) {
    .unmatched-grid {
        grid-template-columns: 1fr;
    }
}

.unmatched-column {
    background: rgba(255, 255, 255, 0.01);
}

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

.column-header h3 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.column-header h3 i {
    width: 18px;
    height: 18px;
}

.column-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.search-bar {
    position: relative;
    margin-bottom: 16px;
}

.search-bar i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.search-bar input {
    width: 100%;
    background: #111827;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 12px 8px 38px;
    border-radius: 8px;
    font-size: 13px;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
}

.table-scroll-container {
    overflow-y: auto;
    max-height: 450px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

/* List tables inside scrolling containers */
.list-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    text-align: left;
}

.list-table th, .list-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.list-table th {
    background-color: #111827; /* Fully opaque background to prevent row text from showing through header */
    font-weight: 600;
    color: var(--text-muted);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: inset 0 -1px 0 var(--border-color); /* Bottom border for sticky header to prevent layout overlap */
}

.list-table td {
    background: rgba(255, 255, 255, 0.005);
}

.list-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.list-table td.text-right {
    font-family: var(--font-heading);
    font-weight: 500;
}

.font-sm {
    font-size: 11px !important;
}

/* Grouped Matches design */
.grouped-matches-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.grouped-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
}

.grouped-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.grouped-card-title {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-blue);
}

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

@media (max-width: 768px) {
    .grouped-grid {
        grid-template-columns: 1fr;
    }
}

.grouped-subcol {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.grouped-subcol-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.grouped-subcol-title i {
    width: 14px;
    height: 14px;
}

.grouped-item-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.grouped-item {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.015);
    padding: 6px 10px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grouped-item-desc {
    color: var(--text-muted);
    margin-left: 8px;
}

.grouped-item-amt {
    font-family: var(--font-heading);
    font-weight: 600;
}

/* Footer bar */
.app-footer-bar {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
}

/* Selection Action Bar for Manual Reconciliation */
.selection-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 24px;
    padding: 20px;
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.selection-totals {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.total-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.total-group .label {
    font-size: 11px;
    color: var(--text-muted);
}

.total-group .value {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
}

.total-group .count {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

#selected-diff-group .value {
    color: var(--text-main);
}

#selected-diff-group.match .value {
    color: var(--accent-green);
}

#selected-diff-group.mismatch .value {
    color: var(--accent-red);
}

#btn-manual-match:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #27272a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: none;
    color: var(--text-muted);
}

/* PDF Print styles */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    .glass-bg, .glow-orb, .app-header, .upload-section, .account-selector-bar, .summary-cards-grid, .tabs-menu, .app-footer-bar, .export-actions, .btn-primary, #lucide-icon {
        display: none !important;
    }
    .app-container {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
    }
    .card {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    .tab-content {
        display: none !important;
    }
    .tab-content.active {
        display: block !important;
        width: 100% !important;
    }
    .recon-table-container {
        border: 1px solid #000 !important;
        margin-top: 20px;
    }
    .recon-table th {
        background: #f3f4f6 !important;
        color: black !important;
        border-bottom: 2px solid #000 !important;
    }
    .recon-table td {
        border-bottom: 1px solid #ddd !important;
        color: black !important;
    }
    .action-plan-box {
        display: block !important;
        border: 1px solid #000 !important;
        background: transparent !important;
        margin-top: 30px;
        page-break-inside: avoid;
    }
    .action-plan-box h4 {
        color: black !important;
    }
    .action-list li {
        color: black !important;
    }
    .print-only {
        display: block !important;
    }
}

.print-only {
    display: none !important;
}

/* Editable amount inputs in unmatched list tables */
.amount-edit-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 6px 10px;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    width: 130px;
    text-align: right;
    transition: all 0.2s ease-in-out;
}

.amount-edit-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 8px var(--primary-glow);
}

/* Chrome, Safari, Edge, Opera: Remove spin button arrows from number input */
.amount-edit-input::-webkit-outer-spin-button,
.amount-edit-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox: Remove spin button arrows from number input */
.amount-edit-input[type=number] {
    -moz-appearance: textfield;
}

/* Login screen styling */
.login-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 32px !important;
    background: rgba(17, 24, 39, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.login-header {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-purple) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.login-logo-icon i {
    width: 28px;
    height: 28px;
    color: white;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group input {
    background: #111827;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px 14px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.02);
}

.login-error-msg {
    color: var(--accent-red);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
}

.login-error-msg i {
    width: 14px;
    height: 14px;
}

/* Hide helper classes */
.login-wrapper.hidden, .app-container.hidden {
    display: none !important;
}

/* User Manual Section */
.manual-section {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    margin-top: 24px;
}
.manual-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}
.manual-header h2 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-blue);
}
.manual-content {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: all 0.3s ease;
}
.manual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
@media (max-width: 768px) {
    .manual-grid {
        grid-template-columns: 1fr;
    }
}
.manual-block h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}
.manual-block h3 i {
    width: 16px;
    height: 16px;
    color: var(--accent-purple);
}
.manual-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.manual-list li {
    font-size: 12px;
    color: var(--text-muted);
    position: relative;
    padding-left: 20px;
    line-height: 1.6;
}
.manual-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-green);
    font-weight: bold;
}
.manual-list.steps li::before {
    content: attr(data-step);
    position: absolute;
    left: 0;
    color: var(--accent-blue);
    font-weight: 700;
}
.manual-list li code {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-main);
    font-family: monospace;
}
.manual-list li ul {
    margin-top: 6px;
    padding-left: 14px;
    list-style: circle;
}
.manual-list li ul li {
    font-size: 11px;
    padding-left: 0;
}
.manual-list li ul li::before {
    content: none;
}

/* Google AdSense Widget - Bottom Left */
.adsense-bottom-left {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999;
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

/* Label for Ad */
.adsense-bottom-left::before {
    content: "Advertisement";
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hide on print media */
@media print {
    .adsense-bottom-left {
        display: none !important;
    }
}

/* Adjust layout on small screens so it doesn't overlap content */
@media (max-width: 1200px) {
    .adsense-bottom-left {
        position: static;
        margin: 20px auto;
        width: 100%;
        max-width: 220px;
        display: flex;
        justify-content: center;
    }
}

