:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --border: #e5e9f2;
    --border-light: #eef1f7;
    --text: #1a2332;
    --text-muted: #6b7a90;
    --text-soft: #8a96a8;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --success: #10b981;
    --success-light: #d1fae5;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warn: #f59e0b;
    --warn-light: #fef3c7;
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-active: #4f46e5;
    --radius: 8px;
    --radius-sm: 6px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.15);
    --transition: all 0.18s ease;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ========== LOGIN ========== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #0f172a;
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.login-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.login-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}
.login-blob.blob-1 {
    width: 500px; height: 500px;
    background: #4f46e5;
    top: -100px; left: -100px;
}
.login-blob.blob-2 {
    width: 400px; height: 400px;
    background: #7c3aed;
    bottom: -100px; right: -100px;
    animation-delay: -7s;
}
.login-blob.blob-3 {
    width: 350px; height: 350px;
    background: #ec4899;
    top: 40%; left: 50%;
    animation-delay: -14s;
    opacity: 0.3;
}
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.05); }
    66% { transform: translate(-20px, 30px) scale(0.95); }
}
.login-box {
    background: rgba(255, 255, 255, 0.98);
    padding: 44px 40px 36px;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
    backdrop-filter: blur(20px);
}
.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}
.login-logo-mark {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 800;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.4);
    letter-spacing: -1px;
}
.login-box h2 {
    text-align: center;
    margin: 0 0 6px;
}
.login-box .sub {
    text-align: center;
}
.login-footer {
    margin-top: 28px;
    text-align: center;
    font-size: 11px;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}
.login-box h2 {
    margin: 0 0 4px;
    color: var(--text);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
}
.login-box .sub {
    color: var(--text-muted);
    margin: 0 0 24px;
    font-size: 13px;
}
.login-box label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin: 14px 0 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.login-box input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: var(--transition);
    background: #fafbfd;
}
.login-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.login-box button {
    width: 100%;
    margin-top: 22px;
    padding: 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.2px;
}
.login-box button:hover { background: var(--primary-hover); transform: translateY(-1px); }
.login-box button:active { transform: translateY(0); }

/* ========== INSTALLER ========== */
.install-page {
    min-height: 100vh;
    background: #0f172a;
    padding: 40px 20px;
    position: relative;
    overflow-x: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.install-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.install-container {
    width: 100%;
    max-width: 560px;
    position: relative;
    z-index: 1;
}
.install-header {
    text-align: center;
    margin-bottom: 24px;
    color: #fff;
}
.install-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}
.install-header h1 {
    margin: 0 0 4px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
}
.install-header p {
    margin: 0;
    font-size: 13px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.install-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.install-status {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 28px 30px;
    color: #fff;
}
.install-status-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
.install-status-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}
.install-status-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
}
.install-status h2 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}
.install-status p {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
}

.install-body { padding: 28px 30px; }

.install-section-title {
    margin: 0 0 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-soft);
}

.install-steps {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
}
.install-steps li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}
.install-steps li:last-child { border-bottom: none; }
.install-step-check {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #d1fae5;
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.install-steps strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}
.install-steps small {
    display: block;
    font-size: 11px;
    color: var(--text-soft);
}

.install-credentials {
    background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%);
    border: 1px solid #e0e7ff;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 22px;
}
.install-credentials-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: var(--primary);
}
.install-credentials-head h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--primary);
}
.install-cred-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(79, 70, 229, 0.2);
}
.install-cred-row:last-of-type { border-bottom: none; }
.install-cred-row span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
}
.install-cred-row code {
    background: #fff;
    border: 1px solid #e0e7ff;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.btn-lg {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    width: 100%;
}

.install-footer {
    margin-top: 8px;
}

.install-footer-text {
    text-align: center;
    margin-top: 24px;
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* ========== ADMIN LAYOUT ========== */
.admin-wrap { display: flex; min-height: 100vh; }

.sidebar {
    width: 250px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}
.sidebar .brand {
    padding: 22px 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.sidebar .brand strong {
    display: block;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.2px;
    text-transform: capitalize;
}
.sidebar .brand small {
    color: #64748b;
    font-size: 11px;
    margin-top: 2px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.sidebar .nav {
    padding: 16px 0;
    flex: 1;
    overflow-y: auto;
}
.sidebar .nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 24px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: var(--transition);
    position: relative;
}
.sidebar .nav a .icon {
    opacity: 0.75;
    flex-shrink: 0;
}
.sidebar .nav a:hover .icon,
.sidebar .nav a.active .icon { opacity: 1; }
.sidebar .nav a:hover {
    background: var(--sidebar-hover);
    color: #fff;
    text-decoration: none;
}
.sidebar .nav a.active {
    background: var(--sidebar-hover);
    color: #fff;
    border-left-color: var(--sidebar-active);
    font-weight: 600;
}
.sidebar .nav .nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 14px 24px;
}
.sidebar .nav .nav-label {
    padding: 10px 24px 6px;
    font-size: 10px;
    text-transform: uppercase;
    color: #475569;
    letter-spacing: 0.8px;
    font-weight: 700;
}
.sidebar .nav a.logout { color: #f87171; }
.sidebar .nav a.logout:hover { background: rgba(239, 68, 68, 0.1); color: #fca5a5; }

/* Dropdown nav groups */
.sidebar .nav-group { margin: 0; }
.sidebar .nav-group > summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 24px;
    color: var(--sidebar-text);
    font-size: 13px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: var(--transition);
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.sidebar .nav-group > summary::-webkit-details-marker { display: none; }
.sidebar .nav-group > summary::marker { display: none; }
.sidebar .nav-group > summary:hover {
    background: var(--sidebar-hover);
    color: #fff;
}
.sidebar .nav-group > summary .icon { opacity: 0.75; flex-shrink: 0; }
.sidebar .nav-group > summary:hover .icon { opacity: 1; }
.sidebar .nav-group > summary > span {
    flex: 1;
}
.sidebar .nav-group > summary > .icon:last-child {
    opacity: 0.5;
    transition: transform 0.2s ease;
}
.sidebar .nav-group[open] > summary > .icon:last-child {
    transform: rotate(180deg);
    opacity: 0.85;
}
.sidebar .nav-group > summary.active {
    color: #fff;
}
.sidebar .nav-group > summary.active .icon { opacity: 1; }
.sidebar .nav-sub {
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 0;
    animation: slideDown 0.18s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.sidebar .nav-sub a {
    padding: 9px 24px 9px 52px;
    font-size: 12.5px;
    color: #8b95a8;
    border-left: 3px solid transparent;
}
.sidebar .nav-sub a .icon {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}
.sidebar .nav-sub a:hover {
    background: var(--sidebar-hover);
    color: #fff;
}
.sidebar .nav-sub a:hover .icon { opacity: 1; }
.sidebar .nav-sub a.active {
    background: rgba(79, 70, 229, 0.15);
    color: #fff;
    border-left-color: var(--sidebar-active);
    font-weight: 600;
}
.sidebar .nav-sub a.active .icon { opacity: 1; color: var(--sidebar-active); }
.sidebar .nav-empty {
    padding: 10px 24px 10px 52px;
    color: #475569;
    font-size: 11px;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.topbar {
    background: #fff;
    padding: 18px 32px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}
.topbar h1 {
    margin: 0;
    font-size: 20px;
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.3px;
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

/* Notification bell */
.notif-wrap { position: relative; }
.notif-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f5f7fb;
    border: 1px solid #e5e9f2;
    color: #52606d;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.notif-btn:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4f46e5;
}
.notif-btn .icon { display: block; }
.notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #f59e0b;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.notif-badge-critical {
    background: #dc2626;
    animation: notifPulse 1.8s infinite;
}
@keyframes notifPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.15); }
}

.notif-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 380px;
    max-height: 480px;
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
    display: none;
    z-index: 100;
    overflow: hidden;
}
.notif-panel.open { display: flex; flex-direction: column; }
.notif-panel::before {
    content: '';
    position: absolute;
    top: -7px;
    right: 14px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-top: 1px solid #e5e9f2;
    border-left: 1px solid #e5e9f2;
    transform: rotate(45deg);
}
.notif-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #eef1f7;
    background: #fafbfd;
    position: relative;
    z-index: 1;
}
.notif-head strong {
    font-size: 14px;
    font-weight: 700;
    color: #1a2332;
}
.notif-body {
    overflow-y: auto;
    flex: 1;
    padding: 6px 0;
}
.notif-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6b7a90;
}
.notif-empty .icon {
    color: #10b981;
    background: #d1fae5;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    padding: 15px;
    margin-bottom: 12px;
}
.notif-empty p {
    margin: 0 0 2px;
    font-weight: 700;
    color: #1a2332;
    font-size: 14px;
}
.notif-empty small { font-size: 12px; }
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid #f4f6fb;
    text-decoration: none;
    color: #1a2332;
    transition: background 0.15s ease;
    border-left: 3px solid transparent;
}
.notif-item:hover {
    background: #fafbfd;
    text-decoration: none;
}
.notif-item:last-child { border-bottom: none; }
.notif-item.notif-critical { border-left-color: #dc2626; }
.notif-item.notif-warning  { border-left-color: #f59e0b; }
.notif-item.notif-info     { border-left-color: #3b82f6; }
.notif-item-ic {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.notif-item.notif-critical .notif-item-ic { background: #fee2e2; color: #dc2626; }
.notif-item.notif-warning  .notif-item-ic { background: #fef3c7; color: #d97706; }
.notif-item.notif-info     .notif-item-ic { background: #dbeafe; color: #3b82f6; }
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 3px;
}
.notif-item-top strong {
    font-size: 12.5px;
    font-weight: 700;
    color: #1a2332;
}
.notif-item-top span {
    font-size: 10px;
    color: #8a96a8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}
.notif-item-detail {
    font-size: 11.5px;
    color: #52606d;
    line-height: 1.35;
}
@media (max-width: 600px) {
    .notif-panel { width: calc(100vw - 40px); right: -10px; }
}

.topbar .user-info {
    text-align: right;
    display: flex;
    align-items: center;
    gap: 12px;
}
.topbar .user-info .user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}
.topbar .user-info .user-meta { text-align: right; }
.topbar .user-info span { display: block; font-weight: 600; font-size: 13px; }
.topbar .user-info small { color: var(--text-soft); font-size: 11px; }

.flash-wrap { padding: 20px 32px 0; }
.flash {
    padding: 13px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: 13px;
    border-left: 4px solid;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.flash-success { border-left-color: var(--success); color: #065f46; background: var(--success-light); }
.flash-error   { border-left-color: var(--danger);  color: #991b1b; background: #fee2e2; }

.page-body { padding: 24px 32px 40px; }

/* ========== CARDS ========== */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}
.card {
    background: var(--panel);
    padding: 22px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}
.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.card-label {
    color: var(--text-soft);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    font-weight: 600;
}
.card-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    margin-top: 8px;
    letter-spacing: -0.5px;
}
.card-value-sm {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-top: 10px;
}

/* ========== PANELS ========== */
.panel {
    background: var(--panel);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 20px;
}
.panel h3 {
    margin: 0 0 16px;
    font-size: 16px;
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.2px;
}
.panel p { margin: 0 0 12px; color: var(--text-muted); }
.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    gap: 16px;
    flex-wrap: wrap;
}
.panel-head h3 { margin: 0; }
.panel-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
.panel-actions input[type="text"] {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: #fafbfd;
    transition: var(--transition);
}
.panel-actions input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

/* ========== TABLES ========== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th,
.data-table td {
    padding: 13px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}
.data-table th {
    background: #f9fafc;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-bottom: 1px solid var(--border);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafbfd; }
.data-table td strong { color: var(--text); font-weight: 600; }
.data-table .muted { color: var(--text-soft); margin-top: 3px; }

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: var(--transition);
    line-height: 1.3;
}
.btn:hover {
    background: #f5f7fb;
    border-color: #d1d9e6;
    text-decoration: none;
    transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}
.btn-danger:hover { background: var(--danger-hover); border-color: var(--danger-hover); color: #fff; }
.btn + .btn, .btn + form, form + .btn, form + form { margin-left: 6px; }

/* ========== BADGES ========== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-on { background: var(--success-light); color: #065f46; }
.badge-off { background: #f1f5f9; color: #64748b; }
.badge-warn { background: var(--warn-light); color: #92400e; }
.badge-required { background: var(--primary-light); color: var(--primary); margin-left: 6px; }

/* ========== FORMS ========== */
.form label {
    display: block;
    margin-bottom: 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.form label small {
    text-transform: none;
    font-weight: 400;
    color: var(--text-soft);
    margin-left: 4px;
}
.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form select,
.form textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-top: 6px;
    font-family: inherit;
    background: #fafbfd;
    transition: var(--transition);
    color: var(--text);
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
}
.form input:focus,
.form select:focus,
.form textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.form textarea { resize: vertical; font-family: "SF Mono", Menlo, Consolas, monospace; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

/* ========== UTILITIES ========== */
.muted { color: var(--text-muted); }
.small { font-size: 12px; }
code {
    background: #f1f5f9;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 12px;
    font-family: "SF Mono", Menlo, Consolas, monospace;
    color: #475569;
}

/* ========== WELCOME BANNER ========== */
.welcome-banner {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
    color: #fff;
    padding: 26px 30px;
    border-radius: var(--radius);
    margin-bottom: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.25);
    flex-wrap: wrap;
}
.welcome-banner h2 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
}
.welcome-banner p {
    margin: 0;
    opacity: 0.9;
    font-size: 13px;
}
.welcome-meta {
    text-align: right;
    padding-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}
.welcome-meta small {
    display: block;
    opacity: 0.8;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.welcome-meta strong {
    display: block;
    font-size: 15px;
    margin-top: 2px;
}

/* ========== ACCENT CARDS ========== */
.card-accent { position: relative; overflow: hidden; }
.card-accent::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--primary);
}
.card-accent.card-primary::before { background: linear-gradient(180deg, #4f46e5, #7c3aed); }
.card-accent.card-success::before { background: linear-gradient(180deg, #10b981, #059669); }
.card-accent.card-warn::before    { background: linear-gradient(180deg, #f59e0b, #ea580c); }
.card-accent.card-info::before    { background: linear-gradient(180deg, #06b6d4, #0891b2); }

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.card-primary .card-icon { background: #eef2ff; color: #4f46e5; }
.card-success .card-icon { background: #d1fae5; color: #059669; }
.card-warn .card-icon    { background: #fef3c7; color: #d97706; }
.card-info .card-icon    { background: #cffafe; color: #0891b2; }

.card-value-sub {
    font-size: 16px;
    color: var(--text-soft);
    font-weight: 500;
}
.card-foot {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
    font-size: 12px;
}
.card-foot a {
    color: var(--primary);
    font-weight: 600;
}

/* ========== DASHBOARD GRID ========== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}
@media (max-width: 1100px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}

/* ========== QUICK ACTIONS ========== */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.quick-action {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #fafbfd;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
}
.quick-action:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    text-decoration: none;
    transform: translateX(4px);
}
.quick-action .icon { color: var(--primary); flex-shrink: 0; }
.quick-action strong { display: block; font-size: 13px; font-weight: 600; }
.quick-action small { display: block; color: var(--text-soft); font-size: 11px; margin-top: 2px; }

/* ========== CREDIT CARDS ========== */
.cc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
}
.cc-card {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.cc-card:hover {
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
    transform: translateY(-3px);
}

.cc-visual {
    background: linear-gradient(135deg, #1e293b 0%, #312e81 50%, #7c3aed 100%);
    color: #fff;
    padding: 22px;
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    min-height: 190px;
    box-shadow: 0 12px 28px rgba(49, 46, 129, 0.35);
    margin-bottom: 20px;
}
.cc-visual::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, transparent 70%);
    border-radius: 50%;
}
.cc-visual::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -40px;
    width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.3) 0%, transparent 70%);
    border-radius: 50%;
}
.cc-visual-chip {
    width: 40px;
    height: 30px;
    background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
    border-radius: 6px;
    margin-bottom: 12px;
    position: relative;
}
.cc-visual-chip::after {
    content: '';
    position: absolute;
    inset: 4px 6px;
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 2px;
}
.cc-visual-brand {
    position: absolute;
    top: 22px;
    right: 22px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
    opacity: 0.95;
}
.cc-visual-issuer {
    position: absolute;
    top: 44px;
    right: 22px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    opacity: 0.7;
}
.cc-visual-number {
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 18px;
    letter-spacing: 2.5px;
    font-weight: 600;
    margin: 14px 0 16px;
    position: relative;
    z-index: 1;
}
.cc-visual-foot {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 11px;
    position: relative;
    z-index: 1;
}
.cc-visual-foot small {
    display: block;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 9px;
    margin-bottom: 2px;
}
.cc-visual-foot span {
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.3px;
}

.cc-body { display: flex; flex-direction: column; flex: 1; }

.cc-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.cc-title strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.2px;
    margin-bottom: 3px;
}
.cc-title small {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--success);
    font-weight: 600;
}
.cc-title small.muted { color: var(--text-soft); font-weight: 500; }

.cc-expiry-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
    margin-bottom: 14px;
}
.cc-expiry-ok       { background: #d1fae5; color: #065f46; }
.cc-expiry-expiring { background: #fef3c7; color: #92400e; animation: pulse 2s infinite; }
.cc-expiry-expired  { background: #fee2e2; color: #991b1b; }
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.cc-limit-bar {
    background: #fafbfd;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 14px;
}
.cc-limit-head {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 600;
}
.cc-limit-track {
    height: 8px;
    background: #e5e9f2;
    border-radius: 4px;
    overflow: hidden;
}
.cc-limit-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 4px;
    transition: width 0.6s ease;
}
.cc-limit-fill.warn   { background: linear-gradient(90deg, #f59e0b 0%, #ea580c 100%); }
.cc-limit-fill.danger { background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%); }
.cc-limit-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-light);
}
.cc-limit-foot strong {
    font-size: 16px;
    font-weight: 700;
    color: var(--success);
}

.cc-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--border-light);
}
.cc-meta > div { text-align: center; }
.cc-meta small {
    display: block;
    font-size: 9px;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
    font-weight: 600;
}
.cc-meta span {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}
.cc-card .bank-card-actions { margin-top: auto; padding-top: 0; }

/* Notification templates (list) */
.ntpl-list {
    display: grid;
    gap: 14px;
    margin-bottom: 22px;
}
.ntpl-card {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border: 1px solid #eef1f7;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    transition: all 0.15s ease;
}
.ntpl-card:hover { box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08); }
.ntpl-card-left {
    display: flex;
    gap: 16px;
    padding: 18px 22px;
    flex: 1;
    border-left: 4px solid #4f46e5;
}
.ntpl-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ntpl-card-body { flex: 1; min-width: 0; }
.ntpl-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}
.ntpl-card-head strong {
    font-size: 15px;
    font-weight: 700;
    color: #1a2332;
}
.ntpl-card-body p {
    margin: 0 0 10px;
    font-size: 12.5px;
    color: #6b7a90;
}
.ntpl-subject {
    background: #fafbfd;
    border: 1px solid #eef1f7;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 11px;
}
.ntpl-subject small {
    display: block;
    color: #8a96a8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
    font-size: 9px;
}
.ntpl-subject code {
    background: none;
    padding: 0;
    font-size: 12px;
    color: #1a2332;
    font-weight: 500;
    font-family: "SF Mono", Menlo, Consolas, monospace;
    word-break: break-all;
}
.ntpl-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 20px;
    border-left: 1px solid #eef1f7;
    background: #fafbfd;
    justify-content: center;
    min-width: 160px;
}
.ntpl-card-actions .btn { justify-content: center; }
@media (max-width: 700px) {
    .ntpl-card { flex-direction: column; }
    .ntpl-card-actions { border-left: none; border-top: 1px solid #eef1f7; flex-direction: row; min-width: 0; }
}

/* Template editor */
.ntpl-form .ntpl-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}
@media (max-width: 1000px) { .ntpl-form .ntpl-grid { grid-template-columns: 1fr; } }
.ntpl-main { min-width: 0; }
.ntpl-side { }
.ntpl-vars {
    background: #fff;
    border: 1px solid #eef1f7;
    border-radius: 12px;
    padding: 20px;
    position: sticky;
    top: 90px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.ntpl-vars h4 {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 700;
    color: #1a2332;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.ntpl-vars p { margin: 0 0 14px; }
.ntpl-vars ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ntpl-vars li {
    padding: 10px 0;
    border-bottom: 1px solid #f4f6fb;
}
.ntpl-vars li:last-child { border-bottom: none; }
.ntpl-var {
    display: block;
    width: 100%;
    background: #eef2ff;
    border: 1px solid #e0e7ff;
    border-radius: 6px;
    padding: 6px 10px;
    text-align: left;
    cursor: pointer;
    margin-bottom: 4px;
    transition: all 0.15s ease;
}
.ntpl-var:hover {
    background: #4f46e5;
    border-color: #4f46e5;
}
.ntpl-var:hover code { color: #fff; }
.ntpl-var code {
    background: none;
    padding: 0;
    color: #4f46e5;
    font-weight: 700;
    font-size: 11.5px;
}
.ntpl-vars small {
    display: block;
    font-size: 11px;
    color: #8a96a8;
    line-height: 1.4;
}

/* Notifications settings — schedule cards */
.notif-schedule {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 700px) { .notif-schedule { grid-template-columns: 1fr; } }
.notif-schedule-card {
    background: #fafbfd;
    border: 1px solid #eef1f7;
    border-radius: 10px;
    padding: 18px 20px;
}
.notif-schedule-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: #4f46e5;
}
.notif-schedule-head strong {
    font-size: 14px;
    font-weight: 700;
    color: #1a2332;
}
.notif-schedule-card p {
    margin: 0 0 12px;
    font-size: 12px;
    color: #6b7a90;
}
.notif-triggers {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.notif-triggers span {
    display: inline-block;
    padding: 5px 11px;
    background: #eef2ff;
    color: #4f46e5;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Unified reminders section (dashboard) */
.rem-section {
    background: #fff;
    border: 1px solid #eef1f7;
    border-radius: 12px;
    padding: 22px 24px;
    margin-bottom: 22px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.rem-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eef1f7;
}
.rem-head-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.rem-head h3 {
    margin: 0 0 2px;
    font-size: 15px;
    font-weight: 700;
    color: #1a2332;
    display: flex;
    align-items: center;
    gap: 8px;
}
.rem-head p {
    margin: 0;
    font-size: 12px;
    color: #6b7a90;
    font-weight: 500;
}
.rem-badge {
    display: inline-block;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}
.rem-count-critical { color: #dc2626; font-weight: 700; }
.rem-count-warning  { color: #d97706; font-weight: 700; }

.rem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 12px;
}
.rem-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid #eef1f7;
    text-decoration: none;
    color: #1a2332;
    transition: all 0.18s ease;
    background: #fff;
    border-left-width: 4px;
}
.rem-card:hover {
    transform: translateX(3px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    text-decoration: none;
}
.rem-card.rem-critical {
    background: linear-gradient(to right, #fef2f2, #fff);
    border-left-color: #dc2626;
}
.rem-card.rem-warning {
    background: linear-gradient(to right, #fffbeb, #fff);
    border-left-color: #f59e0b;
}
.rem-card.rem-info {
    background: linear-gradient(to right, #eff6ff, #fff);
    border-left-color: #3b82f6;
}
.rem-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.rem-card.rem-critical .rem-card-icon { background: #fee2e2; color: #dc2626; }
.rem-card.rem-warning  .rem-card-icon { background: #fef3c7; color: #d97706; }
.rem-card.rem-info     .rem-card-icon { background: #dbeafe; color: #3b82f6; }
.rem-card-body { flex: 1; min-width: 0; }
.rem-card-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 3px;
}
.rem-card-top strong {
    font-size: 13px;
    font-weight: 700;
    color: #1a2332;
}
.rem-card-meta {
    font-size: 10px;
    color: #8a96a8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}
.rem-card-detail {
    font-size: 12px;
    color: #52606d;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rem-card-arrow {
    color: #cbd5e1;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
}
.rem-card:hover .rem-card-arrow { color: #4f46e5; }

/* Payment-due alert variant (on Credit Cards page) */
.expiry-alert.expiry-alert-danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fecaca;
    border-left-color: #dc2626;
}
.expiry-alert.expiry-alert-danger strong { color: #991b1b; }
.expiry-alert.expiry-alert-danger span   { color: #b91c1c; }

/* Expiry alert banner */
.expiry-alert {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
    border: 1px solid #fed7aa;
    border-left: 4px solid #f59e0b;
    border-radius: var(--radius);
    margin-bottom: 22px;
    box-shadow: var(--shadow-sm);
}
.expiry-alert-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f59e0b;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.expiry-alert strong {
    display: block;
    color: #92400e;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
}
.expiry-alert span {
    color: #78350f;
    font-size: 12px;
    margin-right: 10px;
}

/* ========== FORM SECTIONS (stepper) ========== */
.bank-form { max-width: 900px; }
.form-section {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.form-section-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: linear-gradient(90deg, #fafbfd 0%, #fff 100%);
    border-bottom: 1px solid var(--border-light);
}
.form-section-num {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}
.form-section-head h3 {
    margin: 0 0 2px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}
.form-section-head p {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}
.form-section-body { padding: 22px; }
.form-section-body label:last-child { margin-bottom: 0; }

.hint-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #eef2ff;
    color: #3730a3;
    border-radius: var(--radius-sm);
    font-size: 12px;
    margin-top: 4px;
}
.hint-box .icon { color: var(--primary); flex-shrink: 0; }

.sticky-actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 16px 22px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    z-index: 5;
    margin-top: 8px;
}
.sticky-actions .btn { min-width: 120px; justify-content: center; }

/* ========== PAGE HEADER ========== */
.page-header {
    display: flex;
    align-items: center;
    gap: 18px;
    background: #fff;
    padding: 22px 26px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 20px;
}
.page-header-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.page-header-text h2 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
}
.page-header-text p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}
.empty-state-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.empty-state h3 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}
.empty-state p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

/* ========== BANK SUMMARY STRIP ========== */
.bank-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    background: #fff;
    padding: 20px 22px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 22px;
}
.bank-summary-item {
    display: flex;
    align-items: center;
    gap: 14px;
}
.bank-summary-item + .bank-summary-item {
    border-left: 1px solid var(--border-light);
    padding-left: 18px;
}
.bank-summary-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.bank-summary-icon-primary { background: #eef2ff; color: #4f46e5; }
.bank-summary-icon-success { background: #d1fae5; color: #059669; }
.bank-summary-icon-info    { background: #cffafe; color: #0891b2; }
.bank-summary-icon-warn    { background: #fef3c7; color: #d97706; }
.bank-summary-item small {
    display: block;
    font-size: 11px;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.bank-summary-item strong {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
}

@media (max-width: 900px) {
    .bank-summary-item + .bank-summary-item {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--border-light);
        padding-top: 16px;
    }
}

/* ========== BANK CARDS ========== */
.bank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 22px;
}
.bank-card {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.bank-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
}
.bank-card:hover {
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    transform: translateY(-3px);
}

.bank-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}
.bank-logo-mark {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: -0.5px;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.25);
}
.bank-card-title { flex: 1; min-width: 0; }
.bank-card-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bank-card-type {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 3px 10px;
    border-radius: 10px;
}
.bank-card-type.type-savings { background: #dcfce7; color: #166534; }
.bank-card-type.type-current { background: #dbeafe; color: #1e40af; }
.bank-card-type.type-salary  { background: #fef3c7; color: #92400e; }
.bank-card-type.type-nr      { background: #f3e8ff; color: #6b21a8; }
.bank-card-type.type-other   { background: #f1f5f9; color: #475569; }

.bank-card-balance-big {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    padding: 16px 18px;
    border-radius: 10px;
    margin-bottom: 16px;
    border: 1px solid var(--border-light);
}
.bank-card-balance-big small {
    display: block;
    font-size: 10px;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
    margin-bottom: 4px;
}
.bank-card-balance-big strong {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
}

.bank-card-info {
    padding: 0 2px 14px;
    border-bottom: 1px dashed var(--border-light);
    margin-bottom: 14px;
}
.bank-card-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 12.5px;
}
.bank-card-row small {
    color: var(--text-soft);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.bank-card-row span {
    color: var(--text);
    font-weight: 500;
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 12px;
}
.bank-card-actions {
    margin-top: auto;
    padding-top: 16px;
    display: flex;
    gap: 8px;
}
.bank-card-actions .btn { flex: 1; justify-content: center; }

/* Debit card visual */
.debit-card {
    margin-top: 16px;
    background: linear-gradient(135deg, #1e293b 0%, #4338ca 60%, #7c3aed 100%);
    color: #fff;
    padding: 18px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(67, 56, 202, 0.25);
}
.debit-card::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 140px; height: 140px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
    border-radius: 50%;
}
.debit-card-chip {
    width: 36px;
    height: 26px;
    background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
    border-radius: 5px;
    margin-bottom: 14px;
    position: relative;
}
.debit-card-chip::after {
    content: '';
    position: absolute;
    inset: 4px 6px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}
.debit-card-brand {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    opacity: 0.9;
}
.debit-card-number {
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 17px;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 14px;
}
.debit-card-foot {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 11px;
}
.debit-card-foot small {
    display: block;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 9px;
    margin-bottom: 2px;
}
.debit-card-foot span {
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.3px;
}

/* ================================================================
   BANKING PAGE (namespaced bk-*, bf-*, pg-*) — final polished UI
   ================================================================ */

/* --- Page header (reusable across pages) --- */
.pg-header {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    padding: 22px 26px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    border: 1px solid #eef1f7;
    margin-bottom: 22px;
}
.pg-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}
.pg-header-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pg-header-text h2 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
    color: #1a2332;
    letter-spacing: -0.3px;
}
.pg-header-text p {
    margin: 0;
    color: #6b7a90;
    font-size: 13px;
}
.pg-header-right { flex-shrink: 0; }

/* --- Stats strip --- */
.bk-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    border: 1px solid #eef1f7;
    margin-bottom: 22px;
    overflow: hidden;
}
.bk-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 22px;
    border-right: 1px solid #eef1f7;
}
.bk-stat:last-child { border-right: none; }
.bk-stat-ic {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.bk-ic-primary { background: #eef2ff; color: #4f46e5; }
.bk-ic-success { background: #d1fae5; color: #059669; }
.bk-ic-info    { background: #cffafe; color: #0891b2; }
.bk-ic-warn    { background: #fef3c7; color: #d97706; }
.bk-stat-text small {
    display: block;
    font-size: 11px;
    color: #8a96a8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 3px;
}
.bk-stat-text strong {
    display: block;
    font-size: 19px;
    font-weight: 700;
    color: #1a2332;
    letter-spacing: -0.4px;
}
@media (max-width: 900px) {
    .bk-stat { border-right: none; border-bottom: 1px solid #eef1f7; }
    .bk-stat:last-child { border-bottom: none; }
}

/* --- Empty state --- */
.bk-empty {
    background: #fff;
    border: 2px dashed #e5e9f2;
    border-radius: 14px;
    padding: 60px 30px;
    text-align: center;
}
.bk-empty-icon {
    width: 92px;
    height: 92px;
    margin: 0 auto 18px;
    border-radius: 24px;
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bk-empty h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: #1a2332;
}
.bk-empty p {
    margin: 0 0 22px;
    color: #6b7a90;
    font-size: 13px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Bank card grid --- */
.bk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 22px;
}
.bk-card {
    background: #fff;
    border: 1px solid #eef1f7;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.bk-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
}
.bk-card:hover {
    border-color: #d8ddea;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
    transform: translateY(-3px);
}

.bk-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}
.bk-logo {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 17px;
    letter-spacing: -0.5px;
    flex-shrink: 0;
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.28);
}
.bk-card-title { flex: 1; min-width: 0; }
.bk-card-bank {
    font-size: 17px;
    font-weight: 700;
    color: #1a2332;
    letter-spacing: -0.3px;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bk-type-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 4px 11px;
    border-radius: 10px;
}
.bk-type-badge.type-savings { background: #dcfce7; color: #166534; }
.bk-type-badge.type-current { background: #dbeafe; color: #1e40af; }
.bk-type-badge.type-salary  { background: #fef3c7; color: #92400e; }
.bk-type-badge.type-nr      { background: #f3e8ff; color: #6b21a8; }
.bk-type-badge.type-other   { background: #f1f5f9; color: #475569; }

.bk-balance {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid #e5e9f2;
    margin-bottom: 18px;
}
.bk-balance small {
    display: block;
    font-size: 10px;
    color: #8a96a8;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
    margin-bottom: 5px;
}
.bk-balance strong {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: #1a2332;
    letter-spacing: -0.6px;
}

.bk-info {
    margin: 0 0 18px;
    padding: 0 2px 16px;
    border-bottom: 1px dashed #eef1f7;
    display: grid;
    gap: 8px;
}
.bk-info > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}
.bk-info dt {
    margin: 0;
    font-size: 10px;
    color: #8a96a8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    flex-shrink: 0;
}
.bk-info dd {
    margin: 0;
    font-size: 13px;
    color: #1a2332;
    font-weight: 500;
    font-family: "SF Mono", Menlo, Consolas, monospace;
    text-align: right;
    min-width: 0;
    word-break: break-all;
}

/* Debit card visual inside bank card */
.bk-debit {
    margin-bottom: 18px;
    background: linear-gradient(135deg, #1e293b 0%, #312e81 60%, #7c3aed 100%);
    color: #fff;
    padding: 20px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(49, 46, 129, 0.3);
}
.bk-debit::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, transparent 70%);
    border-radius: 50%;
}
.bk-debit-chip {
    width: 38px;
    height: 28px;
    background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
    border-radius: 5px;
    margin-bottom: 14px;
    position: relative;
}
.bk-debit-chip::after {
    content: '';
    position: absolute;
    inset: 4px 6px;
    border: 1px solid rgba(0, 0, 0, 0.22);
    border-radius: 2px;
}
.bk-debit-brand {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    font-weight: 700;
    opacity: 0.95;
}
.bk-debit-number {
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 17px;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}
.bk-debit-foot {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    z-index: 1;
}
.bk-debit-foot small {
    display: block;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 9px;
    margin-bottom: 3px;
}
.bk-debit-foot span {
    font-weight: 600;
    font-size: 12px;
}

.bk-actions {
    margin-top: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.bk-actions form { display: contents; }
.btn-block { width: 100%; justify-content: center; }
.btn-danger-ghost {
    background: #fff;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.btn-danger-ghost:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #b91c1c;
}

/* --- Banking form --- */
.bf-form {
    max-width: 880px;
}
.bf-section {
    background: #fff;
    border: 1px solid #eef1f7;
    border-radius: 12px;
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}
.bf-section-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(to right, #fafbfd, #fff);
    border-bottom: 1px solid #eef1f7;
}
.bf-section-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 5px 14px rgba(79, 70, 229, 0.32);
}
.bf-section-head h3 {
    margin: 0 0 3px;
    font-size: 15px;
    font-weight: 700;
    color: #1a2332;
    letter-spacing: -0.2px;
}
.bf-section-head p {
    margin: 0;
    font-size: 12px;
    color: #6b7a90;
}
.bf-optional {
    display: inline-block;
    background: #f1f5f9;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 8px;
    margin-left: 6px;
    vertical-align: middle;
}
.bf-section-body {
    padding: 22px 24px 24px;
}
.bf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.bf-row-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 700px) {
    .bf-row, .bf-row-3 { grid-template-columns: 1fr; }
}
.bf-field {
    margin-bottom: 16px;
}
.bf-field:last-child { margin-bottom: 0; }
.bf-section-body .bf-row + .bf-field,
.bf-section-body .bf-row + .bf-row { margin-top: 0; }
.bf-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #52606d;
    margin-bottom: 7px;
    text-transform: none;
    letter-spacing: 0;
}
.bf-field label .req { color: #ef4444; }
.bf-field input[type="text"],
.bf-field input[type="email"],
.bf-field input[type="password"],
.bf-field input[type="number"],
.bf-field select,
.bf-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #dce1e8;
    border-radius: 8px;
    font-size: 13.5px;
    font-family: inherit;
    background: #fafbfd;
    color: #1a2332;
    transition: all 0.15s ease;
}
.bf-field input:focus,
.bf-field select:focus,
.bf-field textarea:focus {
    outline: none;
    border-color: #4f46e5;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.bf-field textarea {
    resize: vertical;
    min-height: 80px;
}
.bf-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    background: #eef2ff;
    color: #3730a3;
    border: 1px solid #e0e7ff;
    border-radius: 8px;
    font-size: 12.5px;
    margin-top: 14px;
}
.bf-hint .icon { color: #4f46e5; flex-shrink: 0; }
.bf-hint.pe-link-empty {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
    margin-top: 8px;
}
.bf-hint.pe-link-empty .icon { color: #d97706; }
.bf-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 22px;
    background: #fff;
    border: 1px solid #eef1f7;
    border-radius: 12px;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
    position: sticky;
    bottom: 16px;
    z-index: 5;
}
.btn-ghost {
    background: #fff;
    color: #52606d;
    border: 1px solid #dce1e8;
}
.btn-ghost:hover {
    background: #f5f7fb;
    border-color: #cdd5e1;
}

/* ================================================================
   PERSONAL ENTRY (namespaced pe-*)
   ================================================================ */

.pe-pos { color: #059669; }
.pe-neg { color: #dc2626; }

/* Live indicator dot — pulsing green circle showing value is computed live */
.pe-live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #10b981;
    border-radius: 50%;
    margin-left: 5px;
    vertical-align: middle;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
    animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
    0%, 100% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18); }
    50%      { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.08); }
}

/* Bank balance meta-line (opening + net change) */
.bk-balance-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(26, 35, 50, 0.1);
    font-size: 11px;
    font-weight: 500;
    color: #6b7a90;
}
.bk-balance-meta small { font-size: 10px; opacity: 0.8; }

/* Credit card live breakdown line */
.cc-live-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e5e9f2;
    font-size: 10.5px;
    font-weight: 600;
    align-items: center;
}
.cc-live-meta .muted { opacity: 0.7; font-weight: 500; }

/* Toggle (type / mode) */
.pe-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.pe-toggle-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 700px) { .pe-toggle-3 { grid-template-columns: 1fr; } }
.pe-toggle-opt {
    position: relative;
    display: block;
    padding: 18px 20px;
    border: 2px solid #e5e9f2;
    border-radius: 12px;
    cursor: pointer;
    background: #fafbfd;
    transition: all 0.18s ease;
}
.pe-toggle-opt input { position: absolute; opacity: 0; pointer-events: none; }
.pe-toggle-opt:hover { border-color: #cdd5e1; background: #fff; }
.pe-toggle-label strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #1a2332;
    margin-bottom: 3px;
}
.pe-toggle-label small {
    display: block;
    font-size: 12px;
    color: #6b7a90;
}
.pe-toggle-opt:has(input:checked) { background: #fff; }
.pe-opt-income:has(input:checked)  { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1); }
.pe-opt-expense:has(input:checked) { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1); }
.pe-opt-cash:has(input:checked)    { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1); }
.pe-opt-liquid:has(input:checked)  { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1); }
.pe-opt-credit:has(input:checked)  { border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1); }

/* Filter bar */
.pe-filter {
    background: #fff;
    border: 1px solid #eef1f7;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 22px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.pe-filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    align-items: end;
}
.pe-filter-field { display: flex; flex-direction: column; }
.pe-filter-field label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7a90;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.pe-filter-field input,
.pe-filter-field select {
    padding: 9px 12px;
    border: 1px solid #dce1e8;
    border-radius: 8px;
    font-size: 13px;
    background: #fafbfd;
    color: #1a2332;
    font-family: inherit;
    transition: all 0.15s ease;
}
.pe-filter-field input:focus,
.pe-filter-field select:focus {
    outline: none;
    border-color: #4f46e5;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.pe-filter-buttons { display: flex; gap: 8px; }
.pe-filter-buttons .btn { flex: 1; justify-content: center; }

/* Breakdown cards */
.pe-breakdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 22px;
}
@media (max-width: 900px) { .pe-breakdown { grid-template-columns: 1fr; } }
.pe-breakdown-card {
    background: #fff;
    border: 1px solid #eef1f7;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.pe-breakdown-card h3 {
    margin: 0 0 16px;
    font-size: 13px;
    font-weight: 700;
    color: #1a2332;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.pe-breakdown-card h3 .icon { color: #6b7a90; }
.pe-breakdown-card ul { list-style: none; margin: 0; padding: 0; }
.pe-breakdown-card li { margin-bottom: 14px; }
.pe-breakdown-card li:last-child { margin-bottom: 0; }
.pe-br-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13px;
    margin-bottom: 6px;
}
.pe-br-top strong { font-weight: 700; color: #1a2332; font-size: 13px; }
.pe-br-bar {
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
}
.pe-br-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}
.pe-br-exp { background: linear-gradient(90deg, #ef4444, #f97316); }
.pe-br-inc { background: linear-gradient(90deg, #10b981, #059669); }

/* Entries table */
.pe-table-wrap {
    background: #fff;
    border: 1px solid #eef1f7;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.pe-table {
    width: 100%;
    border-collapse: collapse;
}
.pe-table thead th {
    background: #f9fafc;
    padding: 13px 16px;
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #6b7a90;
    border-bottom: 1px solid #eef1f7;
    white-space: nowrap;
}
.pe-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #eef1f7;
    font-size: 13px;
    vertical-align: middle;
}
.pe-table tbody tr:last-child td { border-bottom: none; }
.pe-table tbody tr:hover td { background: #fafbfd; }
.pe-table .pe-date { color: #6b7a90; font-size: 12px; white-space: nowrap; }
.pe-table .muted.small { font-size: 11.5px; line-height: 1.4; }
.pe-table code { background: #f1f5f9; padding: 1px 6px; border-radius: 4px; font-size: 10.5px; }
.pe-row-actions { white-space: nowrap; text-align: right; }
.pe-row-actions .btn { padding: 6px 9px; }

.pe-type-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 10px;
}
.pe-type-income  { background: #d1fae5; color: #065f46; }
.pe-type-expense { background: #fee2e2; color: #991b1b; }
.pe-type-liquid  { background: #fef3c7; color: #b45309; }
.pe-mode-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 10px;
}
.pe-mode-cash   { background: #fef3c7; color: #92400e; }
.pe-mode-liquid { background: #e0e7ff; color: #3730a3; }
.pe-mode-credit { background: #f3e8ff; color: #6b21a8; }

@media (max-width: 800px) {
    .pe-table thead { display: none; }
    .pe-table, .pe-table tbody, .pe-table tr, .pe-table td { display: block; width: 100%; }
    .pe-table tbody tr {
        border: 1px solid #eef1f7;
        border-radius: 10px;
        padding: 12px;
        margin-bottom: 10px;
    }
    .pe-table tbody td {
        border: none;
        padding: 6px 0;
    }
}

/* ========== PERSONAL ENTRY — CATEGORIES MANAGER ========== */
.pe-cat-panel {
    background: #fff;
    border: 1px solid #eef1f7;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}
.pe-cat-add {
    padding: 20px 22px;
    background: linear-gradient(to right, #fafbfd, #fff);
    border-bottom: 1px solid #eef1f7;
}
.pe-cat-add form {
    display: flex;
    gap: 10px;
}
.pe-cat-add input[type="text"] {
    flex: 1;
    padding: 11px 14px;
    border: 1px solid #dce1e8;
    border-radius: 8px;
    font-size: 14px;
    background: #fafbfd;
    transition: all 0.15s ease;
}
.pe-cat-add input[type="text"]:focus {
    outline: none;
    border-color: #4f46e5;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.pe-cat-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 22px;
    border-bottom: 1px solid #eef1f7;
    background: #f9fafc;
}
.pe-check-all {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #52606d;
    cursor: pointer;
    user-select: none;
}
.pe-check-all input { width: 16px; height: 16px; cursor: pointer; accent-color: #4f46e5; }
.pe-cat-count { font-size: 12px; color: #6b7a90; }
.pe-cat-count strong { color: #1a2332; }
.pe-cat-list {
    max-height: 70vh;
    overflow-y: auto;
}
.pe-cat-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 22px;
    border-bottom: 1px solid #eef1f7;
    transition: background 0.15s ease;
}
.pe-cat-row:last-child { border-bottom: none; }
.pe-cat-row:hover { background: #fafbfd; }
.pe-cat-check input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #4f46e5;
    display: block;
}
.pe-cat-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #1a2332;
    word-break: break-word;
}
.pe-cat-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
/* Category tree */
.pe-cat-add-form .pe-cat-add-fields {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 10px;
}
.pe-cat-add-fields select {
    padding: 11px 14px;
    border: 1px solid #dce1e8;
    border-radius: 8px;
    font-size: 13.5px;
    background: #fafbfd;
    font-family: inherit;
}
.pe-cat-add-fields select:focus {
    outline: none;
    border-color: #4f46e5;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
@media (max-width: 700px) {
    .pe-cat-add-form .pe-cat-add-fields { grid-template-columns: 1fr; }
}

.pe-cat-tree { padding: 0; }
.pe-cat-parent { border-bottom: 1px solid #eef1f7; }
.pe-cat-parent:last-child { border-bottom: none; }
.pe-cat-row-parent {
    background: #fafbfd;
    padding: 14px 22px;
    border-bottom: none;
}
.pe-cat-row-parent .pe-cat-name { font-size: 14px; }
.pe-cat-row-parent .pe-cat-name .icon { color: #4f46e5; margin-right: 4px; }
.pe-cat-badge {
    display: inline-block;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 8px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.pe-cat-children {
    background: #fff;
}
.pe-cat-row-child {
    padding: 12px 22px 12px 52px;
    border-bottom: 1px solid #f4f6fb;
}
.pe-cat-row-child:last-child { border-bottom: none; }
.pe-cat-row-child .pe-cat-name {
    font-size: 13px;
    font-weight: 500;
    color: #52606d;
}
.pe-cat-dash {
    color: #cbd5e1;
    margin-right: 8px;
    font-family: monospace;
}

/* Refund linkage chips */
.pe-refund-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    padding: 3px 9px;
    background: #d1fae5;
    color: #065f46;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}
.pe-refund-chip .icon { color: #059669; }
.pe-linked-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    padding: 3px 9px;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}
.pe-linked-chip .icon { color: #3b82f6; }
.pe-linked-chip small { opacity: 0.8; font-size: 10px; margin-left: 2px; }

.pe-cat-empty {
    padding: 60px 30px;
    text-align: center;
}
.pe-cat-empty h3 {
    margin: 14px 0 6px;
    font-size: 17px;
    color: #1a2332;
}
.pe-cat-empty p {
    margin: 0;
    color: #6b7a90;
    font-size: 13px;
}

/* ================================================================
   GST ENTRY
   ================================================================ */

/* Inline "add new" button next to labels */
.inline-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 10px;
    padding: 3px 10px;
    background: #eef2ff;
    color: #4f46e5;
    border: 1px solid #e0e7ff;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    transition: all 0.15s ease;
}
.inline-add-btn:hover {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}
.inline-add-btn .icon { color: currentColor; }

/* Modal overlay + dialog */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
    z-index: 1000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;
}
.modal-overlay.open { display: flex; animation: modalFade 0.18s ease; }
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
.modal-dialog {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 620px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    animation: modalSlide 0.2s ease;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 80px);
}
@keyframes modalSlide {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
.modal-head {
    padding: 20px 26px;
    border-bottom: 1px solid #eef1f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #fafbfd, #fff);
    border-radius: 14px 14px 0 0;
}
.modal-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1a2332;
}
.modal-close {
    background: none;
    border: none;
    color: #8a96a8;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.15s ease;
}
.modal-close:hover { color: #dc2626; }
.modal-body {
    padding: 22px 26px;
    overflow-y: auto;
    flex: 1;
}
.modal-body .bf-field { margin-bottom: 14px; }
.modal-body .bf-field label {
    font-size: 12px;
    font-weight: 600;
    color: #52606d;
    display: block;
    margin-bottom: 6px;
}
.modal-body .bf-field input,
.modal-body .bf-field select {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid #dce1e8;
    border-radius: 8px;
    font-size: 13px;
    background: #fafbfd;
    font-family: inherit;
    transition: all 0.15s ease;
}
.modal-body .bf-field input:focus,
.modal-body .bf-field select:focus {
    outline: none;
    border-color: #4f46e5;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.modal-body .bf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 600px) {
    .modal-body .bf-row { grid-template-columns: 1fr; }
}
.modal-foot {
    padding: 16px 26px;
    border-top: 1px solid #eef1f7;
    background: #fafbfd;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-radius: 0 0 14px 14px;
}

/* Customer Type Cards */
.cust-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}
.cust-type-opt {
    display: block;
    padding: 14px 16px;
    border: 2px solid #e5e9f2;
    border-radius: 10px;
    background: #fafbfd;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: center;
    position: relative;
}
.cust-type-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cust-type-opt:hover { border-color: #c7d2fe; background: #fff; }
.cust-type-opt.selected {
    border-color: #4f46e5;
    background: linear-gradient(135deg, #eef2ff, #f5f3ff);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.15);
}
.cust-type-opt strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #1a2332;
    margin-bottom: 3px;
}
.cust-type-opt small {
    display: block;
    font-size: 11px;
    color: #6b7a90;
    margin-bottom: 6px;
}
.cust-type-opt em {
    display: inline-block;
    font-style: normal;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.cust-type-opt.selected em {
    background: #4f46e5;
    color: #fff;
}

/* Customer type contextual hint box */
.cust-hint-wrap { margin-bottom: 18px; }
.cust-hint {
    display: none;
    padding: 14px 18px;
    background: linear-gradient(to right, #eef2ff, #f5f3ff);
    border: 1px solid #c7d2fe;
    border-left: 4px solid #4f46e5;
    border-radius: 10px;
    font-size: 12.5px;
    color: #3730a3;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}
.cust-hint .icon { color: #4f46e5; flex-shrink: 0; margin-top: 2px; }
.cust-hint strong { color: #1e1b4b; }

/* GST Quick Action Cards (dashboard) */
.gst-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}
.gst-quick-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    background: #fff;
    border: 1px solid #eef1f7;
    border-radius: 12px;
    text-decoration: none;
    color: #1a2332;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: all 0.18s ease;
    position: relative;
    overflow: hidden;
}
.gst-quick-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
    text-decoration: none;
    border-color: #c7d2fe;
}
.gst-quick-card > div:nth-child(2) { flex: 1; min-width: 0; }
.gst-quick-card strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #1a2332;
    margin-bottom: 3px;
}
.gst-quick-card small {
    display: block;
    font-size: 12px;
    color: #6b7a90;
}
.gst-quick-ic {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    background: #f5f7fb;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.18s ease;
}
.gst-quick-card:hover .gst-quick-ic {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    transform: rotate(-4deg);
}
.gst-quick-primary {
    border: 2px solid #4f46e5;
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
}
.gst-quick-primary .gst-quick-ic {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
}
.gst-quick-primary:hover {
    border-color: #4338ca;
    box-shadow: 0 14px 36px rgba(79, 70, 229, 0.25);
}
.gst-quick-arrow {
    font-size: 22px;
    color: #cbd5e1;
    font-weight: 700;
    transition: all 0.18s ease;
}
.gst-quick-card:hover .gst-quick-arrow {
    color: #4f46e5;
    transform: translateX(4px);
}
.gst-quick-primary .gst-quick-arrow { color: #4f46e5; }

/* Sub-navigation tabs */
.gst-subnav {
    display: flex;
    gap: 4px;
    background: #fff;
    border: 1px solid #eef1f7;
    border-radius: 10px;
    padding: 6px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    flex-wrap: wrap;
}
.gst-subnav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    color: #52606d;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: 7px;
    transition: all 0.15s ease;
}
.gst-subnav-item:hover {
    background: #f5f7fb;
    color: #1a2332;
    text-decoration: none;
}
.gst-subnav-item.active {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}
.gst-subnav-item.active .icon { color: #fff; }

/* Invoice items table in the form */
.gst-items-wrap {
    overflow-x: auto;
}
.gst-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
}
.gst-items-table th {
    background: #f9fafc;
    padding: 10px 8px;
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7a90;
    border-bottom: 1px solid #eef1f7;
}
.gst-items-table td {
    padding: 8px 6px;
    border-bottom: 1px solid #f4f6fb;
}
.gst-items-table input,
.gst-items-table select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #dce1e8;
    border-radius: 6px;
    font-size: 12.5px;
    background: #fafbfd;
    font-family: inherit;
}
.gst-items-table input:focus,
.gst-items-table select:focus {
    outline: none;
    border-color: #4f46e5;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.pe-table .right,
.gst-items-table .right {
    text-align: right;
}

/* ===================== GST INVOICE PRINT ===================== */
.gst-print-body {
    background: #f5f7fb;
    padding: 30px 20px;
    margin: 0;
}
.gst-print-actions {
    max-width: 850px;
    margin: 0 auto 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.gst-invoice {
    max-width: 850px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 8px;
    padding: 38px 42px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
    color: #1a2332;
    font-size: 12.5px;
    line-height: 1.5;
}
.gst-inv-header {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #1a2332;
    margin-bottom: 20px;
}
.gst-inv-company h1 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 800;
    color: #1a2332;
    letter-spacing: -0.3px;
}
.gst-inv-company p {
    margin: 2px 0;
    color: #52606d;
    font-size: 11.5px;
}
.gst-inv-title {
    text-align: right;
    min-width: 260px;
}
.gst-inv-title-tag {
    display: inline-block;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    padding: 8px 22px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 12px;
}
.gst-inv-title table {
    width: 100%;
    font-size: 11.5px;
}
.gst-inv-title table td {
    padding: 3px 0;
}
.gst-inv-title table td:first-child {
    color: #6b7a90;
    text-align: right;
    padding-right: 10px;
}
.gst-inv-title table td:last-child {
    text-align: right;
    font-weight: 600;
}

.gst-inv-parties {
    margin-bottom: 22px;
}
.gst-inv-party {
    background: #fafbfd;
    border: 1px solid #eef1f7;
    border-radius: 6px;
    padding: 14px 18px;
}
.gst-inv-party small {
    display: block;
    color: #8a96a8;
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    margin-bottom: 4px;
}
.gst-inv-party strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}
.gst-inv-party p {
    margin: 2px 0;
    font-size: 11.5px;
    color: #52606d;
}

.gst-inv-items {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    border: 1px solid #dce1e8;
}
.gst-inv-items thead th {
    background: #1a2332;
    color: #fff;
    padding: 10px 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    border-right: 1px solid #2d3748;
}
.gst-inv-items thead th.right { text-align: right; }
.gst-inv-items tbody td {
    padding: 9px 8px;
    border-bottom: 1px solid #eef1f7;
    border-right: 1px solid #eef1f7;
    vertical-align: top;
    font-size: 11.5px;
}
.gst-inv-items tbody td.right { text-align: right; }
.gst-inv-items small {
    display: block;
    color: #8a96a8;
    font-size: 9.5px;
    font-weight: 500;
}

.gst-inv-totals-wrap {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 22px;
}
.gst-inv-amt-words {
    flex: 1;
    background: #fafbfd;
    border: 1px solid #eef1f7;
    border-radius: 6px;
    padding: 14px 18px;
}
.gst-inv-amt-words small {
    display: block;
    color: #8a96a8;
    font-size: 9.5px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.gst-inv-amt-words strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #1a2332;
}
.gst-inv-totals {
    min-width: 280px;
    border-collapse: collapse;
}
.gst-inv-totals td {
    padding: 6px 14px;
    border-bottom: 1px solid #eef1f7;
    font-size: 12px;
}
.gst-inv-totals td:first-child {
    color: #6b7a90;
    font-weight: 500;
}
.gst-inv-totals td:last-child {
    text-align: right;
    font-weight: 600;
}
.gst-inv-totals tr.gst-inv-grand td {
    background: #1a2332;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    padding: 11px 14px;
}

.gst-inv-bank,
.gst-inv-terms {
    background: #fafbfd;
    border: 1px solid #eef1f7;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 14px;
    font-size: 11.5px;
}
.gst-inv-bank small,
.gst-inv-terms small {
    display: block;
    color: #8a96a8;
    font-size: 9.5px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.gst-inv-footer {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #dce1e8;
}
.gst-inv-sign {
    text-align: right;
    min-width: 200px;
}
.gst-inv-sign small {
    display: block;
    color: #6b7a90;
    font-size: 10.5px;
}
.gst-inv-sign-box {
    height: 50px;
    margin: 6px 0;
    border-bottom: 1px solid #1a2332;
}

.gst-inv-compliance {
    text-align: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed #dce1e8;
    color: #8a96a8;
    font-size: 10px;
    font-style: italic;
}

@media print {
    body { background: #fff; padding: 0; }
    .gst-print-actions,
    .gst-noprint { display: none !important; }
    .gst-invoice {
        box-shadow: none;
        border: none;
        border-radius: 0;
        max-width: 100%;
        padding: 20px;
    }
}

/* ========== ICON ========== */
.icon { display: inline-block; vertical-align: middle; }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
    .sidebar { width: 70px; }
    .sidebar .brand strong, .sidebar .brand small, .sidebar .nav a span { display: none; }
    .form .row { grid-template-columns: 1fr; }
    .topbar { padding: 14px 20px; }
    .page-body, .flash-wrap { padding-left: 20px; padding-right: 20px; }
}
