/* --- GLOBAL RESET & THEME --- */
:root {
    --brand-blue: #2563eb;
    --brand-cyan: #06b6d4;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --glass-bg: rgba(15, 23, 42, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

body {
    background: radial-gradient(at top center, #1e293b, #0f172a);
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    margin: 0;
    padding: 40px 20px;
}

/* --- LAYOUT --- */
.main-wrapper {
    width: 100%;
    max-width: 680px; /* Professional, focused width */
    margin: 0 auto;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--card-shadow);
}

/* --- TYPOGRAPHY --- */
h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
    background: linear-gradient(to right, #fff, #bfdbfe, #a5f3fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 8px 0;
}

.section-title {
    color: var(--brand-cyan);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 8px;
    margin: 30px 0 20px;
}

/* --- FORM ELEMENTS --- */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.input-group { margin-bottom: 15px; }

.label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.label.highlight { color: #34d399; }

input[type="number"], select {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid #475569;
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.2s;
    box-sizing: border-box;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--brand-cyan);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

/* --- MODE TOGGLE --- */
.mode-toggle-container {
    display: flex;
    background: #0f172a;
    padding: 5px;
    border-radius: 14px;
    margin-bottom: 30px;
    border: 1px solid #334155;
}

.mode-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.mode-btn.active {
    background: var(--brand-cyan);
    color: #fff;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

/* --- CHECKBOXES --- */
.check-grid { display: flex; gap: 20px; margin-top: 10px; }

.check-group {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-cyan);
}

/* --- BUTTON --- */
.btn-calculate {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
    border: none;
    border-radius: 16px;
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    margin-top: 25px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(6, 182, 212, 0.5);
}

/* --- RESULTS --- */
.total-tax {
    font-size: 3.5rem;
    font-weight: 800;
    text-align: center;
    background: linear-gradient(to right, #6ee7b7, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 20px 0;
}

.res-list { margin-top: 25px; }

.res-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--glass-border);
}

.text-red { color: #f87171; }
.font-bold { font-weight: 700; }
.border-top { border-top: 2px solid var(--glass-border); margin-top: 10px; padding-top: 15px; }

/* --- SECURITY HELPER --- */
.hidden { display: none !important; }

/* --- MOBILE OPTIMIZATION --- */
@media (max-width: 640px) {
    .glass-panel { padding: 25px; }
    h1 { font-size: 1.8rem; }
    .total-tax { font-size: 2.5rem; }
}
/* Styling for the Print Button in UI */
.btn-print {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.btn-print:hover { background: rgba(255, 255, 255, 0.2); }

/* THE PRINT ENGINE */
@media print {
    body { background: white !important; color: black !important; padding: 0; }
    .no-print, .main-card, .mode-toggle-container, .btn-calculate { display: none !important; }
    
    .glass-panel#result {
        display: block !important;
        background: white !important;
        border: none !important;
        box-shadow: none !important;
        margin: 0;
        padding: 0;
        width: 100%;
    }
    
    .total-tax {
        background: none !important;
        -webkit-text-fill-color: black !important;
        color: black !important;
        font-size: 2.5rem;
    }
    
    .res-item { border-bottom: 1px solid #eee !important; color: black !important; }
    .section-title { color: black !important; border-bottom: 2px solid #000 !important; }
    
    /* Re-insert Logo at top of Printout */
    #result::before {
        content: "";
        display: block;
        width: 150px;
        height: 50px;
        background: url('superpay-logo.jpg') no-repeat center;
        background-size: contain;
        margin-bottom: 20px;
    }
}
/* --- Centering the Logo --- */
.header-section {
    display: flex;
    flex-direction: column;
    align-items: center; /* This centers the flex items (a, h1, p) */
    text-align: center;
    margin-bottom: 30px;
}

.logo-link {
    display: inline-block;
    margin-bottom: 15px;
}

.logo-img {
    display: block;
    margin: 0 auto; /* Standard centering for block images */
    height: 60px;   /* Your existing height */
    width: auto;    /* Maintain aspect ratio */
    border-radius: 12px;
}
/* Center the print button container */
.no-print {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 2rem;
}

/* Style the button to match the premium feel without being as loud as the Calculate button */
.btn-print {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--brand-cyan);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
}

.btn-print:hover {
    background: var(--brand-cyan);
    color: white;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}