/* ---------------------------------------------------------------
   Finance Manager — custom styles on top of Tailwind (CDN).
   Holds the gradient backdrop, the "liquid glass" surface,
   card shadows and the print stylesheet for invoices/receipts.
----------------------------------------------------------------- */

body {
    background:
        radial-gradient(1100px 560px at 8% -10%, rgba(99, 102, 241, 0.16), transparent 60%),
        radial-gradient(900px 520px at 100% 0%, rgba(56, 189, 248, 0.16), transparent 55%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    background-attachment: fixed;
}

/* Frosted glass surface */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.55);
}

/* Soft card shadow */
.card {
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.06), 0 2px 6px rgba(2, 6, 23, 0.04);
}

/* Inputs share a consistent, minimalist look */
.field {
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 0.6rem 0.85rem;
    font-size: 0.875rem;
    color: #334155;
    transition: border-color .15s, box-shadow .15s;
}
.field:focus {
    outline: none;
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.25);
}
.label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
}

/* Primary button */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.75rem;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: transform .05s, box-shadow .15s, background .15s;
    cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
    color: #fff;
    background-image: linear-gradient(to right, #6366f1, #38bdf8);
    box-shadow: 0 6px 16px rgba(56, 189, 248, 0.35);
}
.btn-primary:hover { box-shadow: 0 8px 22px rgba(56, 189, 248, 0.45); }
.btn-ghost { color: #475569; background: rgba(255, 255, 255, 0.7); border: 1px solid #e2e8f0; }
.btn-ghost:hover { background: #fff; }
.btn-danger { color: #e11d48; background: #fff1f2; }
.btn-danger:hover { background: #ffe4e6; }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: .35rem; border-radius: 9999px; padding: .2rem .65rem; font-size: .72rem; font-weight: 600; }
.pill-paid   { background: #dcfce7; color: #15803d; }
.pill-unpaid { background: #fef3c7; color: #b45309; }

/* Thin scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, .25); border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(100, 116, 139, .4); }

.flash { animation: flash-in .25s ease-out; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ----------------------------------------------------------------
   PRINT: show only the document (.print-area); hide everything else.
   Used by invoice_view.php and receipt_view.php.
----------------------------------------------------------------- */
@media print {
    .no-print, .no-print * { display: none !important; }

    body {
        background: #fff !important;
        color: #000;
    }

    .print-area {
        box-shadow: none !important;
        border: none !important;
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        background: #fff !important;
    }

    /* Keep coloured pills / table headers visible when printing */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    @page { margin: 1.4cm; }
}
