/* -------------------------------------------------------------
 * GF Cupom - Custom Styling & Design System
 * Modern Web UI (Dark/Light Glassmorphism) + Print Layout (Thermal 80mm)
 * ------------------------------------------------------------- */

/* Design Tokens */
:root {
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'Courier Prime', monospace;
    
    --border-radius-lg: 16px;
    --border-radius-md: 10px;
    --border-radius-sm: 6px;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* Themes */
.dark-theme {
    --bg-app: #080b11;
    --bg-ambient-1: rgba(99, 102, 241, 0.12); /* Indigo glow */
    --bg-ambient-2: rgba(6, 182, 212, 0.12);  /* Cyan glow */
    
    --card-bg: rgba(17, 24, 39, 0.7);
    --card-border: rgba(255, 255, 255, 0.06);
    --card-hover-border: rgba(99, 102, 241, 0.3);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-primary: #6366f1;
    --accent-primary-hover: #4f46e5;
    --accent-secondary: #06b6d4;
    
    --input-bg: rgba(15, 23, 42, 0.8);
    --input-border: rgba(255, 255, 255, 0.08);
    --input-focus-border: #6366f1;
    
    --success: #10b981;
    --danger: #ef4444;
}

.light-theme {
    --bg-app: #f1f5f9;
    --bg-ambient-1: rgba(99, 102, 241, 0.06);
    --bg-ambient-2: rgba(6, 182, 212, 0.06);
    
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-border: rgba(0, 0, 0, 0.06);
    --card-hover-border: rgba(99, 102, 241, 0.25);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --accent-primary: #4f46e5;
    --accent-primary-hover: #4338ca;
    --accent-secondary: #0891b2;
    
    --input-bg: rgba(255, 255, 255, 0.9);
    --input-border: rgba(0, 0, 0, 0.08);
    --input-focus-border: #4f46e5;
    
    --success: #059669;
    --danger: #dc2626;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-app);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Ambient glow backgrounds */
.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
}

.glow-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background-color: var(--bg-ambient-1);
}

.glow-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background-color: var(--bg-ambient-2);
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 1200px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

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

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

.logo-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius-md);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.logo-icon svg {
    width: 22px;
    height: 22px;
}

.logo-text h1 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    line-height: 1.1;
    margin: 0;
}

.logo-text h1 span {
    color: var(--accent-secondary);
}

.logo-text p {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    margin: 2px 0 0 0;
}

.logo-text p a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
}

.logo-text p a:hover {
    color: var(--accent-primary);
}

/* Interactive button resets */
.btn-icon {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}
.btn-icon:hover {
    border-color: var(--card-hover-border);
    color: var(--text-primary);
    transform: translateY(-1px);
}
.btn-icon svg {
    width: 20px;
    height: 20px;
}
.light-theme .btn-icon .sun-icon,
.dark-theme .btn-icon .moon-icon {
    display: none;
}

/* Main layout upload section */
.upload-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    animation: fadeIn 0.4s ease-out;
}
.upload-card {
    background: var(--card-bg);
    border: 2px dashed var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: 60px 40px;
    text-align: center;
    width: 100%;
    max-width: 680px;
    box-sizing: border-box;
    cursor: pointer;
    transition: var(--transition-smooth);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}
.upload-card:hover {
    border-color: var(--card-hover-border);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.05);
    transform: translateY(-2px);
}
.upload-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px auto;
    transition: var(--transition-smooth);
}
.upload-card:hover .upload-icon-wrapper {
    background: var(--accent-primary);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
    transform: scale(1.05);
}
.upload-icon-wrapper svg {
    width: 38px;
    height: 38px;
}
.upload-card h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: var(--text-primary);
}
.upload-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 20px 0;
}
.upload-note {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
}
.hidden-file-input {
    display: none;
}

/* Initial Grid Layout (Recent + Decoder side-by-side) */
.initial-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 32px;
    width: 100%;
}

/* If recent section is hidden, stretch decoder to full center-aligned view */
.initial-grid:has(#recent-section.hidden) {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin: 32px auto 0 auto;
}

/* Recent items view */
.recent-section {
    margin-top: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeIn 0.4s ease;
}
.recent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 10px;
    margin-bottom: 0;
}
.recent-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.recent-title svg {
    width: 20px;
    height: 20px;
    color: var(--accent-secondary);
}
.recent-title h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.btn-clear-link {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}
.btn-clear-link:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}
.btn-clear-link svg {
    width: 14px;
    height: 14px;
}
.recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    width: 100%;
}
.recent-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    padding: 16px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}
.recent-card:hover {
    border-color: var(--card-hover-border);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.08);
}
.recent-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent-primary), var(--accent-secondary));
    opacity: 0.8;
}
.recent-card-nf {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.recent-card-num {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
}
.recent-card-date {
    font-size: 11px;
    color: var(--text-muted);
}
.recent-card-emit {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
    text-align: left;
}
.recent-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    border-top: 1px dashed rgba(255, 255, 255, 0.04);
    padding-top: 8px;
}
.recent-card-key {
    font-size: 9px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-weight: bold;
}
.recent-card-val {
    font-size: 13px;
    font-weight: 800;
    color: var(--accent-secondary);
}

/* Key access decoder widget */
.decoder-section {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    backdrop-filter: blur(12px);
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}
.decoder-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.decoder-header svg {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
}
.decoder-header h2 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}
.decoder-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0 0 20px 0;
}
.decoder-input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.decoder-input-row input {
    flex-grow: 1;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius-md);
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font-mono);
    outline: none;
    transition: var(--transition-fast);
}
.decoder-input-row input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}
.btn-primary {
    background: var(--accent-primary);
    border: none;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: var(--border-radius-md);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}
.btn-primary:hover {
    background: var(--accent-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
}
.btn-secondary {
    background: var(--btn-secondary-bg);
    border: 1px solid var(--btn-secondary-border);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: var(--border-radius-md);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}
.btn-secondary:hover {
    border-color: var(--btn-secondary-hover-border);
    transform: translateY(-1px);
}
.decoder-result {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius-md);
    padding: 16px;
    animation: slideUp 0.3s ease-out;
}
.decoder-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.decoder-item label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
}
.decoder-item span {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Disclaimer & Criteria Panel Styles */
.disclaimer-panel {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    max-width: 750px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
}
.disclaimer-panel .panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 10px;
}
.disclaimer-panel .panel-header svg {
    color: var(--accent-primary);
    width: 20px;
    height: 20px;
}
.disclaimer-panel .panel-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}
.disclaimer-panel p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}
.criteria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.criteria-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius-md);
    padding: 14px;
}
.criteria-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--accent-primary);
    flex-shrink: 0;
}
.criteria-icon svg {
    width: 18px;
    height: 18px;
}
.criteria-text h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.criteria-text p {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}
.legal-notice {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
    background: rgba(245, 158, 11, 0.05);
    border-left: 3px solid #f59e0b;
    padding: 10px 14px;
    border-radius: 4px;
}

/* Preview Section Dashboard styling */
.preview-section {
    animation: fadeIn 0.4s ease-out;
}
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: 18px 24px;
    margin-bottom: 30px;
    backdrop-filter: blur(12px);
    flex-wrap: wrap;
    gap: 15px;
}
.nf-summary-title {
    display: flex;
    align-items: center;
    gap: 12px;
}
.badge-nfe {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
    border: 1px solid rgba(99, 102, 241, 0.25);
    padding: 4px 10px;
    border-radius: var(--border-radius-sm);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.nf-summary-title h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}
.action-buttons {
    display: flex;
    gap: 10px;
}

/* Workspace Grid: split view for thermal & metadata */
.workspace-grid {
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 30px;
    align-items: flex-start;
}

/* Thermal receipt paper preview container */
.receipt-workspace {
    display: flex;
    justify-content: center;
    width: 100%;
}
.thermal-receipt {
    background: #ffffff;
    color: #000000;
    width: 100%;
    max-width: 400px;
    padding: 24px;
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
    font-family: var(--font-mono);
    font-size: 8.5pt;
    line-height: 1.35;
    box-sizing: border-box;
    position: relative;
    border-top: 3px solid var(--accent-primary);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

/* Simulated jagged paper tear at the bottom of the ticket */
.thermal-receipt::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(-45deg, transparent 6px, #ffffff 6px), linear-gradient(45deg, transparent 6px, #ffffff 6px);
    background-size: 12px 10px;
    background-repeat: repeat-x;
}

/* Thermal typography & structure */
.thermal-bold {
    font-weight: bold;
}
.thermal-divider {
    border-top: 1px solid #000000;
    margin: 8px 0;
}
.thermal-divider-dotted {
    border-top: 1px dotted #000000;
    margin: 8px 0;
}
.thermal-wrap {
    word-break: break-all;
    white-space: normal;
}
.thermal-header {
    text-align: center;
    margin-bottom: 12px;
}
.thermal-header h3 {
    font-size: 10pt;
    margin: 0 0 4px 0;
}
.thermal-header p {
    margin: 2px 0;
    font-size: 8pt;
}
.thermal-items-header {
    font-size: 8pt;
}

/* Items line list in receipt */
.thermal-item-row {
    margin-bottom: 4px;
    font-size: 8pt;
}
.thermal-item-detail {
    display: flex;
    justify-content: space-between;
}
.thermal-item-indent {
    padding-left: 12px;
    color: #444;
}

/* Totals structures in receipt */
.thermal-totals-block {
    margin-top: 12px;
}
.thermal-totals-row {
    display: flex;
    justify-content: space-between;
    font-size: 8.5pt;
    margin: 2px 0;
}

/* Tributos & Obs */
.thermal-tributos-block p {
    font-size: 7.5pt;
    margin: 4px 0;
    text-align: justify;
}

/* Fiscal codes details */
.thermal-fiscal-info {
    text-align: center;
    margin-top: 12px;
    font-size: 8pt;
}
.thermal-fiscal-info p {
    margin: 3px 0;
}

/* Barcode simulation block */
.thermal-barcode {
    width: 90%;
    height: 40px;
    background: repeating-linear-gradient(90deg, 
        #000, #000 2px, 
        #fff 2px, #fff 4px, 
        #000 4px, #000 5px,
        #fff 5px, #fff 8px,
        #000 8px, #000 10px
    );
    margin: 12px auto;
}

/* QR Code centering block */
.thermal-qrcode-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 14px 0;
}
.thermal-qrcode-box {
    width: 140px;
    height: 140px;
    padding: 6px;
    background: #ffffff;
    border: 1px solid #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}
.thermal-qrcode-box svg {
    width: 100%;
    height: 100%;
}

/* Metadata cards columns on the right */
.metadata-workspace {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.meta-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    backdrop-filter: blur(12px);
}
.meta-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 10px;
}
.meta-header svg {
    color: var(--accent-primary);
    width: 18px;
    height: 18px;
}
.meta-header h3 {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
}
.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}
.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.meta-item label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}
.meta-item span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
}

/* Status colors helpers */
.text-success { color: #10b981 !important; }
.font-bold { font-weight: 700 !important; }
.font-mono { font-family: var(--font-mono) !important; }
.hidden { display: none !important; }

/* Transitions & animations keyframes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustment breakpoints */
@media (max-width: 992px) {
    .workspace-grid {
        grid-template-columns: 1fr;
    }
    .receipt-workspace {
        order: 2;
    }
    .metadata-workspace {
        order: 1;
    }
    .initial-grid {
        grid-template-columns: 1fr;
    }
}

/* Participant info-cards-grid & info-card styles */
.info-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.info-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.info-card:hover {
    border-color: var(--card-hover-border);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px dashed var(--card-border);
    padding-bottom: 10px;
}

.card-title svg {
    width: 18px;
    height: 18px;
    color: var(--accent-primary);
}

.card-title h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.card-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.details-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.details-sub {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Totais Card customization */
.highlight-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04), rgba(6, 182, 212, 0.04));
    border-color: rgba(99, 102, 241, 0.15);
}

/* Products Card & Table Layout */
.products-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: 20px 0 0 0;
    overflow: hidden;
}

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

.table-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-title svg {
    width: 18px;
    height: 18px;
    color: var(--accent-primary);
}

.table-title h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.products-count {
    background: rgba(99, 102, 241, 0.08);
    padding: 4px 10px;
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
}

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

.styled-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.styled-table th, .styled-table td {
    padding: 14px 20px;
}

.styled-table th {
    background-color: rgba(0, 0, 0, 0.15);
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.styled-table tr {
    border-bottom: 1px solid var(--card-border);
}

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

.styled-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.01);
}

.styled-table .center {
    text-align: center;
}

.styled-table .right {
    text-align: right;
}

.styled-table td.right {
    font-weight: 600;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 12px 20px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    z-index: 100000;
    animation: slideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
    from { transform: translateY(100%) scale(0.9); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.toast-icon {
    width: 16px;
    height: 16px;
    color: #10b981;
}

/* Print thermal styling override layout */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .ambient-glow,
    .app-header,
    .upload-section,
    .initial-grid,
    .action-bar,
    .metadata-workspace,
    .recent-section,
    .decoder-section {
        display: none !important;
    }
    .app-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
    .workspace-grid {
        display: block !important;
    }
    .receipt-workspace {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
    .thermal-receipt {
        max-width: 100% !important;
        width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        border-top: none !important;
    }
    .thermal-receipt::after {
        display: none !important;
    }
}

/* Footer styling */
.app-footer {
    text-align: center;
    border-top: 1px solid var(--card-border);
    padding-top: 20px;
    margin-top: auto;
}

.app-footer p {
    font-size: 12px;
    color: var(--text-muted);
}

.app-footer p a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
}

.app-footer p a:hover {
    color: var(--accent-primary);
}

/* Custom Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* Light Theme overrides for scrollbar */
.light-theme ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border: 2px solid transparent;
    background-clip: padding-box;
}

.light-theme ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* Firefox scrollbar support */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.light-theme {
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}
