:root {
    --bg: #01041d;
    --panel: rgba(15, 23, 42, 0.85);
    --panel-border: rgba(148, 163, 184, 0.3);
    --text-muted: #94a3b8;
    --text: #e2e8f0;
    --accent: #2dd4bf;
    --accent-strong: #14b8a6;
    --shadow: 0 25px 45px rgba(2, 6, 23, 0.5);
    color: var(--text);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.25), transparent 40%),
        radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.2), transparent 35%),
        radial-gradient(circle at 70% 80%, rgba(248, 250, 252, 0.05), transparent 40%);
    color: var(--text);
}

.card-panel {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 1.25rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(15px);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.card-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.25), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card-panel:hover::after {
    opacity: 1;
}

.card-panel h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #f8fafc;
}

.section-title {
    font-size: 0.85rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th {
    padding-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: 0.25em;
}

.history-table td {
    padding: 0.85rem 0.5rem;
    font-size: 0.9rem;
    color: #cbd5f5;
}

.history-table tr {
    transition: background 0.3s ease, transform 0.3s ease;
}

.history-table tr:hover {
    background: rgba(15, 23, 42, 0.65);
    transform: translateX(4px);
}

.receipt-preview {
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    border-radius: 1.5rem;
    padding: 2rem;
    color: #0f172a;
    box-shadow: 0 25px 45px rgba(15, 23, 42, 0.25);
}

.receipt-preview header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.4);
    padding-bottom: 1rem;
}

.receipt-preview header h2 {
    font-size: 2rem;
    color: #0f172a;
}

.receipt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.receipt-actions button,
.receipt-actions a,
.receipt-actions form button {
    min-width: 150px;
    border-radius: 999px;
    padding: 0.65rem 1rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.7rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.btn-outline {
    border: 1px solid rgba(15, 23, 42, 0.6);
    background: #e2e8f0;
    color: #0f172a;
}

.btn-primary {
    background: var(--accent);
    border: none;
    color: #022b3a;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.35);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.4);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(45, 212, 191, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(45, 212, 191, 0);
    }
}

.hero-glow {
    animation: pulse 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@media print {
    body * {
        visibility: hidden;
    }
    #receipt-preview,
    #receipt-preview * {
        visibility: visible;
    }
    #receipt-preview {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    #print-receipt-btn,
    #png-receipt-btn,
    form[action="email_receipt.php"] button {
        display: none;
    }
}
