/* eMicrofin - Enterprise Design Tokens & Theme Engine */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #6366f1;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;

    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-surface-hover: #334155;
    --border-color: #334155;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    --sidebar-width: 265px;
    --navbar-height: 60px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

/* Light Theme Variables */
body.light-theme {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-surface-hover: #f1f5f9;
    --border-color: #e2e8f0;

    --text-main: #0f172a;
    --text-muted: #64748b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    width: 100vw;
    display: flex;
    overflow-x: hidden;
}

/* Layout Architecture - Full Width Screen Responsiveness */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
}

/* Day Mode Sidebar Main Menu Alignment */
body.light-theme .sidebar {
    background-color: #ffffff;
    border-right: 1px solid #e2e8f0;
}

/* Sidebar Backdrop Overlay for Mobile Drawer */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
    display: none;
}

body.light-theme .sidebar-backdrop {
    background: rgba(15, 23, 42, 0.45);
}

/* Mobile Sidebar Toggle Hamburger Button in Navbar */
.btn-sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    cursor: pointer;
    font-size: 1.15rem;
    transition: all 0.2s ease;
    margin-right: 0.5rem;
    flex-shrink: 0;
    padding: 0;
}

.btn-sidebar-toggle:hover {
    background: var(--bg-surface-hover);
    color: var(--primary);
}

body.light-theme .btn-sidebar-toggle {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

body.light-theme .btn-sidebar-toggle:hover {
    background: #e2e8f0;
    color: var(--primary);
}

/* Close Button inside Mobile Sidebar Header */
.sidebar-close-btn {
    display: none;
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0 0.4rem;
    line-height: 1;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.sidebar-close-btn:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.12);
}

body.light-theme .sidebar-close-btn {
    color: #64748b;
}

body.light-theme .sidebar-close-btn:hover {
    color: var(--danger);
}

.sidebar-header {
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.brand-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
}

.brand-title {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-theme .brand-title {
    background: linear-gradient(135deg, #0f172a, #334155);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    padding: 0.85rem 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.15px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.nav-item:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-main);
}

body.light-theme .nav-item {
    color: #64748b;
}

body.light-theme .nav-item:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.main-wrapper {
    margin-left: var(--sidebar-width);
    width: calc(100vw - var(--sidebar-width));
    max-width: calc(100vw - var(--sidebar-width));
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.navbar {
    height: var(--navbar-height);
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 90;
    width: 100%;
    max-width: 100%;
}

.navbar-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.content-body {
    padding: 1.25rem 1.5rem;
    width: 100%;
    max-width: 100%;
    flex: 1;
}

/* Cards & Containers - 100% Full Width Expansiveness */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 100%;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.1rem;
    gap: 0.75rem;
    width: 100%;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 100%;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.stat-info h3 {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.35rem;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stat-icon.info {
    background-color: rgba(6, 182, 212, 0.1);
    color: var(--info);
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.85rem;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    width: 100%;
}

/* Premium Action Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #ffffff;
}
.btn-primary:hover {
    opacity: 0.95;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background-color: var(--bg-surface-hover);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background-color: var(--border-color);
}

.btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
}

/* ─── Premium Micro Action Buttons (all modules) ─────────────────────────── */

/* Base shared style */
.btn-action-edit,
.btn-action-delete,
.btn-action-deposit,
.btn-action-withdraw,
.btn-action-passbook {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    padding: 0.26rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: 0.02em;
    transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease, color 0.18s ease;
    line-height: 1.4;
    text-decoration: none;
}
.btn-action-edit:active,
.btn-action-delete:active,
.btn-action-deposit:active,
.btn-action-withdraw:active,
.btn-action-passbook:active {
    transform: scale(0.96);
}

/* ✏️ Edit — Blue */
.btn-action-edit {
    color: #60a5fa;
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.28);
}
.btn-action-edit:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.35);
}

/* 🗑️ Delete — Red */
.btn-action-delete {
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
}
.btn-action-delete:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.35);
}

/* ➕ Deposit — Emerald green */
.btn-action-deposit {
    color: #34d399;
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.25);
}
.btn-action-deposit:hover {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.35);
}

/* ➖ Withdraw — Amber orange */
.btn-action-withdraw {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.25);
}
.btn-action-withdraw:hover {
    background: #f59e0b;
    color: #ffffff;
    border-color: #f59e0b;
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.35);
}

/* 📖 Passbook — Indigo violet */
.btn-action-passbook {
    color: #a78bfa;
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.25);
}
.btn-action-passbook:hover {
    background: #6366f1;
    color: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.35);
}

/* Action group wrapper — keeps buttons tight and aligned */
.action-group {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: nowrap;
}


.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 20px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}
.btn-logout:hover {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Premium Tab Navigation Bar (Accounting, Reports & Multi-Tab Views) */
.report-tabs-nav {
    display: flex;
    gap: 0.45rem;
    background: var(--bg-surface, #1e293b);
    padding: 0.35rem 0.45rem;
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    margin-bottom: 1.25rem;
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    scrollbar-width: thin;
}

.report-tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.45rem 0.95rem;
    font-size: 0.80rem;
    font-weight: 600;
    color: var(--text-muted, #94a3b8);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm, 6px);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    line-height: 1.4;
    user-select: none;
}

.report-tab-btn:hover {
    color: var(--text-main, #f8fafc);
    background: var(--bg-surface-hover, rgba(255, 255, 255, 0.08));
    border-color: rgba(255, 255, 255, 0.06);
}

.report-tab-btn.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--primary, #2563eb) 0%, var(--primary-hover, #1d4ed8) 100%) !important;
    border-color: var(--primary, #2563eb) !important;
    box-shadow: 0 3px 12px rgba(37, 99, 235, 0.35);
    font-weight: 700;
}

body.light-theme .report-tabs-nav {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

body.light-theme .report-tab-btn {
    color: #64748b;
}

body.light-theme .report-tab-btn:hover {
    color: #0f172a;
    background: #ffffff;
    border-color: #cbd5e1;
}

body.light-theme .report-tab-btn.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    border-color: #2563eb !important;
    box-shadow: 0 3px 12px rgba(37, 99, 235, 0.25);
}

/* Data Table Architecture - 100% Full Width Screen Responsiveness */
.table-responsive,
.table-wrap,
.app-table-wrap,
.dataTables_wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
}

.table-responsive::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.app-table-wrap::-webkit-scrollbar {
    height: 6px;
}

.table-responsive::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.app-table-wrap::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 4px;
}

.data-table,
.app-table,
.table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.data-table th, .data-table td,
.app-table th, .app-table td,
.table th, .table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table th,
.app-table th,
.table th {
    background-color: var(--bg-main);
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.data-table tbody tr:hover,
.app-table tbody tr:hover,
.table tbody tr:hover {
    background-color: var(--bg-surface-hover);
}

/* Table Item Elements: Numbers, Codes, Badges, Buttons, Inputs */
.data-table td.text-right,
.data-table td[style*="text-align:right"],
.data-table td[style*="text-align: right"],
.app-table td.text-right,
.app-table td[style*="text-align:right"],
.app-table td[style*="text-align: right"] {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.data-table td .badge,
.app-table td .badge,
.table td .badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
    font-size: 0.68rem;
    padding: 2px 7px;
    line-height: 1.25;
    font-weight: 700;
}

.data-table td .btn,
.data-table td .btn-sm,
.data-table td .btn-app,
.app-table td .btn,
.app-table td .btn-sm,
.app-table td .btn-app {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
    padding: 4px 8px;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
    min-height: 30px;
}

.data-table td .action-btns,
.data-table td .btn-group,
.app-table td .action-btns,
.app-table td .btn-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.data-table input[type="checkbox"],
.data-table input[type="radio"],
.app-table input[type="checkbox"],
.app-table input[type="radio"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    vertical-align: middle;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge-danger  { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.badge-info    { background: rgba(6, 182, 212, 0.15); color: var(--info); }
.badge-secondary{ background: rgba(148, 163, 184, 0.15); color: var(--text-muted); }

/* Modal Architecture */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-backdrop.active {
    display: flex;
}

.modal {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Toast Notifications */
#toast-container,
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
    max-width: calc(100vw - 3rem);
}

.toast {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error   { border-left: 4px solid var(--danger); }
.toast-info    { border-left: 4px solid var(--info); }

/* Premium Glassmorphic Login Card */
.login-container {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 50%, #1e293b 0%, #0f172a 100%);
    padding: 1.5rem;
    box-sizing: border-box;
    position: relative;
    overflow-x: hidden;
}

body.light-theme .login-container {
    background: radial-gradient(circle at 50% 50%, #ffffff 0%, #f1f5f9 100%);
}

.login-card {
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    padding: 2.25rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

body.light-theme .login-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body.light-theme #login-error-alert {
    background: #fef2f2 !important;
    border-color: #f87171 !important;
    color: #dc2626 !important;
}

.login-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.login-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.4rem;
    margin: 0 auto 0.75rem auto;
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}

.login-title {
    font-size: 1.4rem;
    font-weight: 800;
}

.login-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.demo-pill {
    padding: 0.3rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.demo-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
}

/* Stepper & Workspace Window Redesign */
.stepper-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 0.85rem;
    padding: 0.25rem 0;
}
.stepper-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 8%;
    right: 8%;
    height: 2px;
    background: var(--border-color);
    z-index: 1;
    transform: translateY(-50%);
}
.stepper-step {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-card);
    padding: 0.25rem 0.55rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.stepper-step .stepper-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-main);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 800;
}
.stepper-step .stepper-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
}
.stepper-step.completed {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.12);
}
.stepper-step.completed .stepper-dot {
    background: var(--success);
    color: #ffffff;
}
.stepper-step.completed .stepper-label {
    color: var(--success);
}
.stepper-step.active {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.15);
}
.stepper-step.active .stepper-dot {
    background: var(--primary);
    color: #ffffff;
}
.stepper-step.active .stepper-label {
    color: var(--primary);
}

/* Glassmorphic Workspace Tab Navigation Bar */
.workspace-tabs-bar {
    display: flex;
    gap: 0.35rem;
    background: var(--bg-main);
    padding: 0.3rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 0.85rem;
}
.workspace-tabs-bar .ws-tab-btn {
    flex: 1;
    text-align: center;
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.workspace-tabs-bar .ws-tab-btn.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

/* Hide scrollbar for Chrome, Safari and Opera */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
.hide-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Print Media Stylesheet */
@media print {
    @page {
        size: portrait;
        margin: 10mm;
    }
    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-family: 'Plus Jakarta Sans', sans-serif;
    }
}

/* Custom Scrollbar Helper - Smooth Scroll without visible scrollbar */
.hide-scrollbar {
    -ms-overflow-style: none !important;  /* IE and Edge */
    scrollbar-width: none !important;  /* Firefox */
}
.hide-scrollbar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Mobile Responsive Utility - Sidebar Drawer, Navbar Toggle & Table Responsiveness */
@media (max-width: 1024px) {
    .header-desktop-only,
    .hide-on-mobile {
        display: none !important;
    }

    /* Off-canvas Mobile Sidebar Drawer */
    .sidebar {
        transform: translateX(-100%) !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.28s ease !important;
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 280px !important;
        max-width: 85vw !important;
        z-index: 1050 !important;
        box-shadow: none !important;
    }

    .sidebar.open,
    body.sidebar-open .sidebar {
        transform: translateX(0) !important;
        visibility: visible !important;
        pointer-events: auto !important;
        box-shadow: 0 0 45px rgba(0, 0, 0, 0.7) !important;
    }

    .main-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        min-width: 0 !important;
    }

    .navbar {
        padding: 0 1rem !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    .btn-sidebar-toggle {
        display: inline-flex !important;
    }

    .sidebar-close-btn {
        display: inline-flex !important;
    }

    .sidebar-backdrop {
        display: block !important;
    }

    body.sidebar-open .sidebar-backdrop,
    .sidebar.open ~ .sidebar-backdrop,
    .sidebar-backdrop.active {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    body.sidebar-open {
        overflow: hidden !important;
    }

    .data-table,
    .app-table,
    .table {
        min-width: 580px !important;
        font-size: 0.82rem !important;
    }

    .data-table th, .data-table td,
    .app-table th, .app-table td,
    .table th, .table td {
        padding: 0.6rem 0.75rem !important;
    }

    .data-table th,
    .app-table th,
    .table th {
        font-size: 0.70rem !important;
    }

    .card-header,
    .table-toolbar {
        flex-wrap: wrap !important;
        gap: 0.75rem !important;
    }
}

@media (max-width: 768px) {
    .data-table,
    .app-table,
    .table {
        min-width: 520px !important;
        font-size: 0.78rem !important;
    }

    .data-table th, .data-table td,
    .app-table th, .app-table td,
    .table th, .table td {
        padding: 0.5rem 0.65rem !important;
    }

    .data-table th,
    .app-table th,
    .table th {
        font-size: 0.68rem !important;
    }

    .card-header,
    .table-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.6rem !important;
    }

    .card-header .header-actions,
    .card-header > div:not(:first-child),
    .table-toolbar > div {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        justify-content: flex-start !important;
    }

    .card-header input[type="text"],
    .card-header input[type="search"],
    .table-toolbar input[type="text"],
    .table-toolbar input[type="search"] {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    .table-footer,
    .pagination-container,
    .dataTables_wrapper .dataTables_paginate {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.75rem !important;
        text-align: center !important;
    }

    .pagination {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 3px !important;
    }

    .page-link,
    .pagination li a {
        min-width: 30px !important;
        height: 30px !important;
        padding: 4px 8px !important;
        font-size: 0.74rem !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

@media (max-width: 480px) {
    .data-table,
    .app-table,
    .table {
        min-width: 480px !important;
        font-size: 0.75rem !important;
    }

    .data-table th, .data-table td,
    .app-table th, .app-table td,
    .table th, .table td {
        padding: 0.45rem 0.55rem !important;
    }

    .data-table th,
    .app-table th,
    .table th {
        font-size: 0.65rem !important;
    }

    .data-table td .btn,
    .data-table td .btn-sm,
    .data-table td .btn-app,
    .app-table td .btn-app {
        min-height: 28px !important;
        height: 28px !important;
        padding: 0 6px !important;
        font-size: 0.70rem !important;
    }
}

/* Member Profile View & Landscape ID Card System */
.mpv-tabs-nav {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    scrollbar-width: thin;
}

.mpv-tabs-nav::-webkit-scrollbar {
    height: 4px;
}

.mpv-tabs-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.mpv-tabs-nav .mpv-tab-btn {
    padding: 0.75rem 0.95rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-bottom: 2.5px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.mpv-tabs-nav .mpv-tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

.mpv-tabs-nav .mpv-tab-btn.active {
    color: #38bdf8;
    font-weight: 800;
    border-bottom-color: #38bdf8;
    background: rgba(56, 189, 248, 0.06);
}

.landscape-member-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.landscape-member-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7), 0 0 25px rgba(56, 189, 248, 0.2) !important;
}

#card-qrcode-container canvas,
#card-qrcode-container img,
#card-qrcode-container svg {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    margin: 0 auto !important;
    padding: 0 !important;
}

