/* BalanceLadg unified interface
 * Loaded after each page's local styles so the old standalone ledger theme
 * does not leak into the current application.  No business logic lives here.
 */
:root {
    --bl-ink: #0f1f3d;
    --bl-muted: #64748b;
    --bl-border: #dbe6f1;
    --bl-surface: rgba(255, 255, 255, .94);
    --bl-primary: #0f766e;
    --bl-primary-dark: #115e59;
    --bl-accent: #14b8a6;
    --bl-shadow: 0 18px 45px rgba(15, 31, 61, .09);
}

html { background: #f4f8fc; }
body {
    color: var(--bl-ink) !important;
    background:
        radial-gradient(circle at 4% -10%, rgba(20, 184, 166, .13), transparent 28rem),
        radial-gradient(circle at 100% 0%, rgba(59, 130, 246, .11), transparent 32rem),
        #f4f8fc !important;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

body > header:not(.topbar):not(.balance-main-nav),
body > main > header,
.balance-app-header,
.ledger-shell-header {
    background: linear-gradient(118deg, #0f1f3d 0%, #17345d 56%, #0f766e 150%) !important;
    color: #fff !important;
    border: 0 !important;
    box-shadow: 0 20px 42px rgba(15, 31, 61, .18) !important;
}

main, .max-w-7xl, .max-w-6xl { position: relative; }

main > section, main > div > section, main > .bg-white, main > .bg-slate-50,
.card, .profile-card, .login-card, .register-card, .group-card,
.transaction-history-panel, .bg-white.border, .bg-white.rounded-xl,
.bg-white.rounded-2xl, .bg-white.rounded-3xl {
    border-color: var(--bl-border) !important;
    box-shadow: var(--bl-shadow) !important;
}

input:not([type="checkbox"]):not([type="radio"]), select, textarea {
    border-color: var(--bl-border) !important;
    border-radius: .85rem !important;
    background: rgba(248, 251, 255, .92) !important;
    color: var(--bl-ink) !important;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus {
    border-color: #2dd4bf !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(45, 212, 191, .15) !important;
    outline: 0 !important;
}

button, a[class*="bg-indigo"], a[class*="bg-blue"], button[class*="bg-indigo"], button[class*="bg-blue"],
button[class*="bg-emerald"], a[class*="bg-emerald"] {
    border-radius: .85rem !important;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
button:hover, a[class*="bg-indigo"]:hover, a[class*="bg-blue"]:hover, button[class*="bg-indigo"]:hover,
button[class*="bg-blue"]:hover, button[class*="bg-emerald"]:hover, a[class*="bg-emerald"]:hover {
    filter: brightness(1.02);
    box-shadow: 0 9px 20px rgba(15, 118, 110, .14);
}

table { border-color: var(--bl-border) !important; }
table thead { background: #eef5fa !important; color: #55708c !important; }
table tbody tr { border-color: var(--bl-border) !important; }
table tbody tr:hover { background: #effcf9 !important; }

.balance-design-hero {
    position: relative;
    overflow: hidden;
    border-radius: 2rem;
    background: linear-gradient(118deg, #0f1f3d 0%, #17345d 56%, #0f766e 150%);
    color: #fff;
    box-shadow: 0 24px 52px rgba(15, 31, 61, .2);
}
.balance-design-hero::after {
    content: "";
    position: absolute;
    width: 26rem;
    height: 26rem;
    right: -9rem;
    top: -14rem;
    border: 40px solid rgba(255,255,255,.08);
    border-radius: 999px;
    pointer-events: none;
}

@media (max-width: 720px) {
    body { overflow-x: hidden; }
    main { padding-left: 1rem !important; padding-right: 1rem !important; }
    .balance-design-hero { border-radius: 1.35rem; }
    table { min-width: 680px; }
}

@media print {
    body { background: #fff !important; }
    body > header:not(.balance-main-nav), .balance-main-nav, .no-print { display: none !important; }
    main { max-width: none !important; padding: 0 !important; }
    .balance-design-hero { box-shadow: none !important; }
}
