/* =====================================================
   CLICK PAY - Premium Banking UI
   Design System v2.0 - Agency Grade
   ===================================================== */

/* =====================================================
   DESIGN TOKENS
   ===================================================== */
:root {
    /* Brand */
    --primary: #029148;
    --primary-hover: #02753c;
    --primary-active: #015f31;
    --primary-50: #eaf7f0;
    --primary-100: #c8ecd8;
    --primary-200: #9dd8b7;

    --gold: #ebad23;
    --gold-hover: #cb8f15;
    --gold-50: #fff7e7;
    --gold-100: #f8e6b7;
    --secondary: var(--gold);
    --secondary-hover: var(--gold-hover);
    --secondary-50: var(--gold-50);
    --secondary-100: var(--gold-100);

    /* Neutrals */
    --white: #ffffff;
    --gray-25: #fcfcfd;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Status */
    --success: #059669;
    --success-50: #ecfdf5;
    --warning: #d97706;
    --warning-50: #fffbeb;
    --danger: #dc2626;
    --danger-50: #fef2f2;
    --info: #0284c7;
    --info-50: #f0f9ff;

    /* Elevation */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
    --shadow-ring: 0 0 0 3px rgb(2 145 72 / 0.12);

    /* Radius */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-full: 9999px;

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --duration: 200ms;

    /* Layout */
    --sidebar-width: 272px;
    --header-height: 60px;
}

/* =====================================================
   RESET & BASE
   ===================================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 15px;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: #f0f2f5;
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    font-variant-numeric: tabular-nums;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; background: none; }
input, select, textarea { font-family: inherit; outline: none; border: none; }
ul { list-style: none; }
.hidden { display: none !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* Focus ring */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* =====================================================
   LOGIN PAGE
   ===================================================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    background: #edf7f1;
}

.login-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 55% 45% at 12% 10%, rgba(2, 145, 72, 0.16), transparent 72%),
        radial-gradient(ellipse 50% 40% at 88% 18%, rgba(235, 173, 35, 0.2), transparent 70%),
        radial-gradient(ellipse 62% 48% at 70% 84%, rgba(2, 145, 72, 0.1), transparent 75%),
        linear-gradient(145deg, #f4fbf7 0%, #f8fcfa 52%, #eef9f2 100%);
}

.login-background::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(120deg, rgba(2, 145, 72, 0.06) 0%, transparent 52%),
        linear-gradient(300deg, rgba(235, 173, 35, 0.07) 0%, transparent 48%);
    background-size: 100% 100%, 100% 100%;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgb(255 255 255 / 0.05);
    padding: 44px 40px 36px;
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
    transform: translateY(-12px);
}

.login-brand-footer {
    position: fixed;
    inset-inline: 0;
    inset-block-end: 14px;
    display: flex;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
    padding: 0 14px;
}

.login-brand-link {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    border-radius: 14px;
    border: 1px solid rgba(2, 145, 72, 0.2);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 18px rgba(2, 145, 72, 0.13);
}

.login-brand-logo {
    width: auto;
    height: 28px;
    padding: 5px 9px;
    border-radius: 8px;
    background: linear-gradient(145deg, #124631 0%, #0a2f20 100%);
    display: block;
    object-fit: contain;
    object-position: center;
    flex: 0 0 auto;
    box-sizing: content-box;
}

.login-brand-meta {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    color: #1b4534;
    line-height: 1.2;
    flex-wrap: wrap;
}

.login-brand-kicker {
    font-size: 0.8rem;
    font-weight: 700;
    color: #2e6f52;
}

.login-brand-name {
    font-size: 0.98rem;
    font-weight: 800;
    color: #0f5a39;
}

.login-brand-address {
    font-size: 0.78rem;
    font-weight: 700;
    color: #4b7b66;
}

.login-brand-site {
    font-size: 0.78rem;
    font-weight: 800;
    color: #266045;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-hover));
    border-radius: 0 0 3px 3px;
}

.login-header {
    text-align: center;
    margin: -16px -16px 24px;
    padding: 20px 16px 16px;
    border-radius: 14px;
    background:
        radial-gradient(120% 100% at 100% 0%, rgba(235, 173, 35, 0.2) 0%, rgba(235, 173, 35, 0) 62%),
        linear-gradient(165deg, rgba(2, 145, 72, 0.12) 0%, rgba(2, 145, 72, 0.04) 100%);
    border: 1px solid rgba(2, 145, 72, 0.14);
}

.logo-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 4px;
}

.main-logo-img {
    max-width: 240px;
    width: 100%;
    height: auto;
}

.welcome-title {
    margin-top: 8px;
    font-size: 1.28rem;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: 0.02em;
    color: #0f5a39;
}

.welcome-message {
    font-size: 0.92rem;
    color: #154533;
    margin-top: 9px;
    font-weight: 800;
    letter-spacing: 0.012em;
}

.welcome-service-note {
    display: inline-block;
    font-size: 0.78rem;
    color: #1f5f45;
    margin-top: 8px;
    font-weight: 700;
    line-height: 1.6;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(2, 145, 72, 0.16);
    border-radius: 10px;
    padding: 7px 12px;
}

/* Login Form */
.login-form .form-group {
    margin-bottom: 18px;
}

.login-form label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.input-icon {
    width: 14px;
    height: 14px;
    color: var(--primary);
    flex-shrink: 0;
    opacity: 0.7;
}

.login-form input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.9rem;
    background: var(--white);
    color: var(--gray-800);
    transition: all var(--duration) var(--ease);
}

.login-form input::placeholder {
    color: var(--gray-400);
    font-size: 0.82rem;
}

.login-form input:hover {
    border-color: var(--gray-300);
}

.login-form input:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-ring);
}

/* Password Toggle */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-inline-end: 42px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    inset-inline-end: 8px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    transition: color var(--duration) var(--ease);
    border-radius: var(--radius-sm);
}

.password-toggle:hover { color: var(--primary); }
.password-toggle svg { width: 16px; height: 16px; }

/* Login Button */
.login-btn {
    width: 100%;
    height: 48px;
    background: var(--primary);
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--duration) var(--ease);
    margin-top: 6px;
}

.login-btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgb(2 145 72 / 0.3);
}

.login-btn:active {
    background: var(--primary-active);
    transform: scale(0.99);
}

.login-btn .btn-icon { width: 18px; height: 18px; }

.login-btn .btn-loading {
    display: none;
    align-items: center;
    gap: 8px;
}

.login-btn .spinner {
    width: 18px;
    height: 18px;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.login-btn.loading .btn-text,
.login-btn.loading .btn-icon { display: none; }

.login-btn.loading .btn-loading { display: flex; }

/* Error Message */
.error-message {
    margin-top: 16px;
    padding: 12px 14px;
    background: var(--danger-50);
    border: 1px solid rgb(220 38 38 / 0.15);
    border-radius: var(--radius);
    color: var(--danger);
    font-size: 0.82rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* Lang Switch */
.lang-switch-login {
    display: block;
    margin: 20px auto 0;
    padding: 8px 20px;
    background: var(--gray-50);
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all var(--duration) var(--ease);
}

.lang-switch-login:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
}

/* =====================================================
   DASHBOARD LAYOUT
   ===================================================== */
.dashboard {
    display: flex;
    min-height: 100vh;
    background:
        radial-gradient(140% 120% at 100% -10%, rgba(2, 145, 72, 0.09) 0%, rgba(2, 145, 72, 0) 52%),
        radial-gradient(120% 100% at 0% 100%, rgba(235, 173, 35, 0.12) 0%, rgba(235, 173, 35, 0) 48%),
        linear-gradient(180deg, #f5fbf8 0%, #f6faf8 100%);
    overflow-x: hidden;
}

/* =====================================================
   SIDEBAR
   ===================================================== */
#sidebar {
    position: fixed !important;
    top: 40px !important;
    width: 272px !important;
    height: calc(100vh - 40px) !important;
    z-index: 40 !important;
    transition: right 0.3s var(--ease), left 0.3s var(--ease) !important;
    background:
        radial-gradient(140% 120% at 100% 0%, rgba(235, 173, 35, 0.16) 0%, rgba(235, 173, 35, 0) 58%),
        radial-gradient(120% 100% at 0% 100%, rgba(2, 145, 72, 0.1) 0%, rgba(2, 145, 72, 0) 64%),
        linear-gradient(180deg, #f8fcfa 0%, #eef6f1 52%, #e8f2ed 100%) !important;
    box-shadow:
        0 18px 36px -24px rgba(1, 61, 34, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

@media (min-width: 1024px) {
    #sidebar {
        top: 0 !important;
        height: 100vh !important;
    }
}

html[dir="rtl"] #sidebar {
    right: -272px !important;
    left: auto !important;
    border-left: 1px solid rgba(2, 145, 72, 0.16);
}
html[dir="rtl"] #sidebar[data-state="open"] { right: 0 !important; }

html[dir="ltr"] #sidebar {
    left: -272px !important;
    right: auto !important;
    border-right: 1px solid rgba(2, 145, 72, 0.16);
}
html[dir="ltr"] #sidebar[data-state="open"] { left: 0 !important; }

@media (min-width: 1024px) {
    html[dir="rtl"] #sidebar { right: 0 !important; }
    html[dir="ltr"] #sidebar { left: 0 !important; }
    html[dir="rtl"] .main-content { margin-right: var(--sidebar-width); margin-left: 0; }
    html[dir="ltr"] .main-content { margin-left: var(--sidebar-width); margin-right: 0; }
}

/* Sidebar unified brand colors */
.sidebar-brand {
    position: relative;
    padding: 16px 14px 14px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.72) 100%) !important;
    border-bottom-color: rgba(2, 145, 72, 0.14) !important;
    backdrop-filter: blur(6px);
}

.sidebar-brand > .flex-1 {
    padding-block: 6px 4px;
}

.sidebar-brand img {
    display: block;
    width: auto;
    height: auto;
    max-width: 156px !important;
    max-height: 58px;
    margin-inline: auto;
    filter: drop-shadow(0 4px 8px rgba(1, 77, 43, 0.16));
}

@media (min-width: 1024px) {
    .sidebar-brand {
        padding-top: 20px !important;
        padding-bottom: 16px !important;
    }
    .sidebar-brand > .flex-1 {
        padding-block: 8px 6px;
    }
}

.sidebar-avatar {
    background: linear-gradient(145deg, var(--gold) 0%, var(--gold-hover) 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.sidebar-user-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(248, 252, 250, 0.95) 100%) !important;
    border-bottom-color: rgba(2, 145, 72, 0.12) !important;
}

#sidebar .sidebar-user-panel #userDisplayName {
    color: #12412c !important;
}

#sidebar .sidebar-user-panel #userAgentName,
#sidebar .sidebar-user-panel #userAgentId {
    color: rgba(18, 65, 44, 0.74) !important;
}

#sidebar .sidebar-user-panel #logoutBtn {
    color: #a43a10 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(235, 173, 35, 0.46) !important;
}

#sidebar .sidebar-user-panel #logoutBtn:hover {
    color: #fff !important;
    background: linear-gradient(135deg, #f59e0b 0%, #e67e22 100%) !important;
    border-color: rgba(245, 158, 11, 0.6) !important;
}

.sidebar-nav-link {
    color: #154230 !important;
    border: 1px solid rgba(2, 145, 72, 0.12);
    background: rgba(255, 255, 255, 0.74);
    box-shadow: 0 10px 18px -18px rgba(2, 145, 72, 0.7);
    border-radius: 12px !important;
}

.sidebar-nav-icon {
    color: rgba(2, 103, 52, 0.86) !important;
    transition: color var(--duration) var(--ease);
}

.sidebar-nav-link:hover {
    background: linear-gradient(135deg, rgba(2, 145, 72, 0.12) 0%, rgba(235, 173, 35, 0.14) 100%) !important;
    color: #103a29 !important;
    border-color: rgba(2, 145, 72, 0.28);
}

.sidebar-nav-link:hover .sidebar-nav-icon {
    color: #01733a !important;
}

.nav-item.active .sidebar-nav-link {
    background: linear-gradient(135deg, #029148 0%, #0c7a47 60%, #d8a73c 140%) !important;
    color: #f7fff9 !important;
    border-color: rgba(255, 255, 255, 0.46);
    box-shadow: 0 12px 22px -14px rgba(2, 145, 72, 0.54);
}

.nav-item.active .sidebar-nav-link .sidebar-nav-icon,
.nav-item.active .sidebar-nav-link span {
    color: #f7fff9 !important;
}

#sidebar nav {
    padding: 14px 12px 16px !important;
}

#sidebar nav ul {
    gap: 8px !important;
}

#sidebar #sidebarClose {
    color: #335947 !important;
}

#sidebar #sidebarClose:hover {
    color: #01592f !important;
    background: rgba(2, 145, 72, 0.12) !important;
}

/* =====================================================
   MAIN CONTENT
   ===================================================== */
.main-content {
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    max-width: 100%;
}

/* =====================================================
   TOP HEADER
   ===================================================== */
.top-header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.84);
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(2, 145, 72, 0.12);
    position: sticky;
    top: 0;
    z-index: 50;
    transition: box-shadow 0.3s var(--ease), background 0.3s var(--ease);
    backdrop-filter: blur(10px);
}

.top-header::after {
    content: '';
    position: absolute;
    inset-inline-start: 16px;
    inset-inline-end: 16px;
    inset-block-end: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(2, 145, 72, 0) 0%, rgba(2, 145, 72, 0.18) 40%, rgba(235, 173, 35, 0.18) 60%, rgba(235, 173, 35, 0) 100%);
}

.top-header.scrolled {
    box-shadow: 0 1px 8px rgb(0 0 0 / 0.06);
}

.menu-toggle {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: var(--radius);
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    transition: all var(--duration) var(--ease);
}
.menu-toggle:hover { background: var(--gray-100); }
.menu-toggle svg { width: 20px; height: 20px; }

.top-header h1 {
    flex: 1;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.lang-switch {
    padding: 6px 14px;
    background: var(--gold);
    color: var(--white);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    transition: all var(--duration) var(--ease);
}
.lang-switch:hover { background: var(--gold-hover); }

.quick-status-header-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration) var(--ease);
}
.quick-status-header-btn svg { width: 16px; height: 16px; }
.quick-status-header-btn:hover { background: var(--primary); color: var(--white); }

/* Session Timer */
.session-timer {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: var(--success);
    color: var(--white);
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    transition: background 0.5s var(--ease);
}
.session-timer svg { width: 14px; height: 14px; }
.session-timer.timer-warning { background: var(--warning); }
.session-timer.timer-danger { background: var(--danger); animation: pulse 2s ease-in-out infinite; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* =====================================================
   PAGE CONTENT
   ===================================================== */
.page-content {
    display: none;
    padding: 20px 24px;
    flex: 1;
    overflow-x: hidden;
    max-width: 100%;
}
.page-content.active {
    display: block;
    animation: cpPageFadeIn 260ms var(--ease);
}

@keyframes cpPageFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   DASHBOARD HOME
   ===================================================== */
#dashboardHomePage {
    width: 100%;
    max-width: 1680px;
    margin-inline: auto;
}

.hp-dashboard-hero {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    min-height: 168px;
    margin-bottom: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(235, 173, 35, 0.26);
    background:
        radial-gradient(120% 110% at 100% 0%, rgba(2, 145, 72, 0.24) 0%, rgba(2, 145, 72, 0) 60%),
        radial-gradient(110% 120% at 0% 100%, rgba(235, 173, 35, 0.2) 0%, rgba(235, 173, 35, 0) 56%),
        linear-gradient(135deg, #0a3524 0%, #029148 64%, #1d7f50 100%);
    color: #f8fbff;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.hp-dashboard-hero::after {
    content: '';
    position: absolute;
    inset-inline-end: -35px;
    inset-block-end: -45px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    opacity: 0.7;
}

.hp-dashboard-hero::before {
    content: '';
    position: absolute;
    inset-inline-end: 8px;
    inset-block-end: 0;
    width: 220px;
    height: 132px;
    border-radius: 30px;
    transform: rotate(-8deg);
    background:
        linear-gradient(140deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.03) 46%, rgba(255, 255, 255, 0) 100%),
        linear-gradient(135deg, rgba(235, 173, 35, 0.2) 0%, rgba(2, 145, 72, 0.18) 100%);
    border: 1px solid rgba(255, 255, 255, 0.26);
    box-shadow: 0 16px 30px -24px rgba(0, 0, 0, 0.6);
    opacity: 0.55;
    z-index: 1;
    pointer-events: none;
}

.hp-dashboard-hero-content {
    width: min(100%, 940px);
    max-width: 940px;
    position: relative;
    z-index: 2;
    display: grid;
    gap: 10px;
}

.hp-dashboard-kicker {
    display: inline-block;
    margin-bottom: 0;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.74rem;
    font-weight: 700;
}

.hp-dashboard-hero-headline {
    display: grid;
    gap: 5px;
    max-width: 760px;
}

.hp-dashboard-service-title {
    margin: 0;
    font-size: 1.22rem;
    line-height: 1.22;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.hp-dashboard-service-subtitle {
    margin: 0;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.7;
    color: rgba(240, 248, 255, 0.92);
    max-width: 680px;
}

.hp-dashboard-identity {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.07) 100%);
    max-width: 560px;
}

.hp-dashboard-user-label {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: rgba(229, 240, 255, 0.9);
}

.hp-dashboard-identity h3 {
    font-size: 1.28rem;
    line-height: 1.25;
    font-weight: 800;
    margin: 0;
    min-height: 1.35em;
    color: #ffffff;
}

.hp-dashboard-hero-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(164px, 1fr));
    gap: 8px;
    max-width: 860px;
    align-items: stretch;
}

.hp-hero-meta-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 34px;
    padding: 0 11px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.21);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.13) 0%, rgba(255, 255, 255, 0.07) 100%);
    color: rgba(247, 251, 255, 0.96);
    font-size: 0.73rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    backdrop-filter: blur(2px);
}

.hp-hero-session {
    justify-content: center;
    min-inline-size: 172px;
    font-variant-numeric: tabular-nums;
}

.hp-hero-session[data-state="warning"] {
    border-color: rgba(253, 186, 116, 0.75);
    background: rgba(245, 158, 11, 0.24);
    color: #fff7db;
}

.hp-hero-session[data-state="danger"] {
    border-color: rgba(254, 202, 202, 0.8);
    background: rgba(220, 38, 38, 0.26);
    color: #fff1f1;
}

.hp-dashboard-hero-permissions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 860px;
}

.hp-dashboard-permissions-panel {
    display: grid;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.05) 100%);
    max-width: 860px;
}

.hp-dashboard-permissions-label {
    margin: 0;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: rgba(229, 240, 255, 0.88);
}

.hp-hero-perm-chip {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid rgba(235, 173, 35, 0.42);
    background: linear-gradient(180deg, rgba(235, 173, 35, 0.28) 0%, rgba(235, 173, 35, 0.17) 100%);
    color: #fff4d4;
    font-size: 0.69rem;
    font-weight: 700;
}

.hp-hero-perm-chip::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    margin-inline-end: 6px;
}

.hp-hero-perm-empty {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(243, 248, 255, 0.86);
    font-size: 0.7rem;
    font-weight: 700;
}

.hp-dashboard-hero-brand-mark {
    position: absolute;
    inset-inline-end: 16px;
    inset-block-end: 12px;
    width: 214px;
    min-width: 160px;
    max-width: 36vw;
    height: auto;
    opacity: 0.98;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    filter:
        drop-shadow(0 10px 14px rgba(0, 0, 0, 0.34))
        drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
    pointer-events: none;
    user-select: none;
    z-index: 3;
}

.hp-dashboard-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
    white-space: nowrap;
    position: relative;
    z-index: 3;
}

.hp-dashboard-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 4px rgba(235, 173, 35, 0.24);
}

.hp-dashboard-badge[data-state="ready"] .hp-dashboard-badge-dot {
    background: #34d399;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.2);
}

.hp-dashboard-badge[data-state="error"] .hp-dashboard-badge-dot {
    background: #f87171;
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.2);
}

.hp-dashboard-badge[data-state="loading"] .hp-dashboard-badge-dot {
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
    animation: hpPulseDot 1.2s ease-in-out infinite;
}

@keyframes hpPulseDot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.72); }
}

.hp-dashboard-card {
    position: relative;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
    overflow: hidden;
}

.hp-dashboard-card-head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--gray-100);
    background: linear-gradient(180deg, #fcfdff 0%, #f7fafc 100%);
}

.hp-dashboard-card-head h3 {
    margin: 0 0 4px;
    font-size: 0.94rem;
    font-weight: 800;
    color: var(--gray-800);
}

.hp-dashboard-card-head p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.hp-readiness-panel {
    margin: 14px;
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(2, 145, 72, 0.16);
    background:
        radial-gradient(120% 120% at 0% 100%, rgba(2, 145, 72, 0.08) 0%, rgba(2, 145, 72, 0) 70%),
        linear-gradient(180deg, #ffffff 0%, #f8fcfa 100%);
}

.hp-readiness-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #029148;
    font-size: 0.9rem;
    font-weight: 800;
}

.hp-readiness-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 5px rgba(235, 173, 35, 0.22);
}

.hp-readiness-message {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.83rem;
    line-height: 1.75;
}

.hp-readiness-chips {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.hp-readiness-actions {
    margin-top: 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.hp-readiness-refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid rgba(2, 145, 72, 0.25);
    background: linear-gradient(180deg, #ffffff 0%, #eef9f2 100%);
    color: #029148;
    font-size: 0.76rem;
    font-weight: 800;
    transition: all var(--duration) var(--ease);
}

.hp-readiness-refresh-btn:hover:not(:disabled) {
    border-color: rgba(2, 145, 72, 0.45);
    background: linear-gradient(180deg, #ffffff 0%, #e4f6ec 100%);
    box-shadow: 0 10px 20px -16px rgba(2, 145, 72, 0.7);
    transform: translateY(-1px);
}

.hp-readiness-refresh-btn:disabled {
    opacity: 0.72;
    cursor: not-allowed;
    transform: none;
}

.hp-readiness-refresh-note {
    font-size: 0.73rem;
    color: var(--gray-500);
    font-weight: 600;
}

.hp-readiness-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--primary-50);
    border: 1px solid rgba(2, 145, 72, 0.18);
    color: var(--primary-hover);
    white-space: nowrap;
}

.hp-readiness-updated {
    color: var(--gray-600);
    background: #f8fafc;
    border-color: #e2e8f0;
}

.hp-readiness-panel[data-state="ready"] .hp-readiness-dot {
    background: #10b981;
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.18);
}

.hp-readiness-panel[data-state="partial"] .hp-readiness-dot {
    background: #0ea5e9;
    box-shadow: 0 0 0 5px rgba(14, 165, 233, 0.18);
}

.hp-readiness-panel[data-state="error"] .hp-readiness-dot {
    background: #ef4444;
    box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.18);
}

.hp-readiness-panel[data-state="loading"] .hp-readiness-dot {
    background: #f59e0b;
    box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.18);
    animation: hpPulseDot 1.1s ease-in-out infinite;
}

/* Compact readiness card to reduce vertical footprint */
.hp-dashboard-data-card .hp-dashboard-card-head {
    padding: 6px 10px;
}

.hp-dashboard-data-card .hp-dashboard-card-head h3 {
    margin: 0;
    font-size: 0.8rem;
}

.hp-dashboard-data-card .hp-dashboard-card-head p {
    display: none;
}

.hp-dashboard-data-card .hp-readiness-panel {
    margin: 6px 8px;
    padding: 6px 8px;
    border-radius: 9px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 8px;
}

.hp-dashboard-data-card .hp-readiness-line {
    margin-bottom: 0;
    gap: 5px;
    font-size: 0.76rem;
    flex-shrink: 0;
}

.hp-dashboard-data-card .hp-readiness-dot {
    width: 8px;
    height: 8px;
}

.hp-dashboard-data-card .hp-readiness-message {
    display: none;
}

.hp-dashboard-data-card .hp-readiness-chips {
    margin-top: 0;
    gap: 5px;
    min-width: 0;
}

.hp-dashboard-data-card .hp-readiness-chip {
    padding: 2px 7px;
    font-size: 0.6rem;
    line-height: 1.2;
}

.hp-dashboard-data-card .hp-readiness-actions {
    margin-top: 0;
    gap: 6px;
    justify-content: flex-end;
    margin-inline-start: 0;
}

.hp-dashboard-data-card .hp-readiness-refresh-btn {
    width: auto;
    height: 26px;
    padding: 0 9px;
    border-radius: 7px;
    font-size: 0.63rem;
    min-width: 0;
}

.hp-dashboard-data-card .hp-readiness-refresh-note {
    display: none;
}

.hp-dashboard-actions-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
    padding: 14px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(140% 90% at 100% 0%, rgba(2, 145, 72, 0.15) 0%, rgba(2, 145, 72, 0) 62%),
        radial-gradient(120% 100% at 0% 100%, rgba(235, 173, 35, 0.2) 0%, rgba(235, 173, 35, 0) 66%),
        linear-gradient(180deg, #f8fcfa 0%, #eef7f2 100%);
}

.hp-dashboard-actions-grid::before {
    content: '';
    position: absolute;
    inset: -30px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
    background:
        radial-gradient(240px 120px at 85% 10%, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 70%),
        radial-gradient(180px 110px at 12% 92%, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 74%);
}

.hp-dashboard-action-card {
    --tone-rgb: 2, 145, 72;
    --tone-gold: #ebad23;
    grid-column: span 4;
    position: relative;
    overflow: hidden;
    min-height: 158px;
    aspect-ratio: auto;
    text-align: start;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 10px;
    padding: 16px;
    border-radius: 20px 12px 20px 12px;
    border: 1px solid rgba(216, 171, 57, 0.4);
    background:
        linear-gradient(140deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.02) 36%, rgba(255, 255, 255, 0) 62%),
        radial-gradient(130% 100% at 100% 0%, rgba(var(--tone-rgb), 0.4) 0%, rgba(var(--tone-rgb), 0) 56%),
        radial-gradient(120% 95% at 0% 100%, rgba(216, 171, 57, 0.3) 0%, rgba(216, 171, 57, 0) 68%),
        linear-gradient(162deg, #028643 0%, #0a5536 54%, #052c1d 100%);
    color: #f2f8ff;
    box-shadow:
        0 20px 32px -24px rgba(8, 16, 28, 0.98),
        0 10px 16px -14px rgba(var(--tone-rgb), 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
    transition:
        transform 320ms var(--ease),
        box-shadow 360ms var(--ease),
        border-color 260ms var(--ease),
        filter 320ms var(--ease);
    animation: hpDashboardLift 520ms var(--ease) both;
    will-change: transform, box-shadow;
    z-index: 1;
}

.hp-dashboard-action-card:nth-child(1),
.hp-dashboard-action-card:nth-child(2) {
    grid-column: span 6;
}

.hp-dashboard-action-card::before {
    content: '';
    position: absolute;
    inset-block-start: 12px;
    inset-inline-start: 10px;
    width: 5px;
    height: 40px;
    border-radius: 99px;
    background: linear-gradient(180deg, rgba(255, 242, 199, 0.3) 0%, var(--tone-gold) 100%);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.hp-dashboard-action-card::after {
    content: '';
    position: absolute;
    inset-inline-end: -20px;
    inset-block-end: -24px;
    width: 118px;
    height: 118px;
    border-radius: 26px 10px 28px 12px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.04) 55%, rgba(216, 171, 57, 0.08) 100%);
    transform: rotate(17deg);
    opacity: 0.68;
    pointer-events: none;
}

.hp-dashboard-action-card:nth-child(2) { animation-delay: 40ms; }
.hp-dashboard-action-card:nth-child(3) { animation-delay: 80ms; }
.hp-dashboard-action-card:nth-child(4) { animation-delay: 120ms; }
.hp-dashboard-action-card:nth-child(5) { animation-delay: 160ms; }
.hp-dashboard-action-card:nth-child(6) { animation-delay: 200ms; }
.hp-dashboard-action-card:nth-child(7) { animation-delay: 240ms; }

@keyframes hpDashboardLift {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hp-dashboard-action-card:hover {
    border-color: rgba(236, 197, 96, 0.74);
    transform: translateY(-6px) scale(1.01);
    box-shadow:
        0 34px 44px -20px rgba(var(--tone-rgb), 0.48),
        0 18px 26px -18px rgba(10, 21, 35, 0.98);
    filter: saturate(1.04);
}

.hp-dashboard-action-card:active {
    transform: translateY(-2px) scale(0.996);
}

.hp-dashboard-action-card:focus-visible {
    outline: 2px solid rgba(255, 219, 133, 0.9);
    outline-offset: 2px;
}

.hp-action-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.hp-action-main {
    display: grid;
    gap: 8px;
    align-content: start;
}

.hp-action-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px 10px 14px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff9eb;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.08) 100%);
    border: 1px solid rgba(224, 182, 76, 0.52);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 12px 16px -14px rgba(0, 0, 0, 0.7);
}

.hp-action-icon svg {
    width: 18px;
    height: 18px;
}

.hp-action-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #f8fcff;
    line-height: 1.45;
}

.hp-action-desc {
    font-size: 0.8rem;
    line-height: 1.65;
    color: rgba(236, 245, 255, 0.84);
}

.hp-action-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 25px;
    padding: 0 11px;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 800;
    color: #fff2c9;
    border: 1px solid rgba(236, 197, 96, 0.56);
    background: linear-gradient(180deg, rgba(236, 197, 96, 0.24) 0%, rgba(236, 197, 96, 0.12) 100%);
    white-space: nowrap;
}

.hp-action-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px dashed rgba(236, 197, 96, 0.34);
}

.hp-action-link {
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #eef5ff;
}

.hp-action-arrow {
    width: 30px;
    height: 30px;
    border-radius: 10px 8px 10px 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f5a38;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.62);
    box-shadow:
        0 10px 16px -12px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
    transition: transform 320ms var(--ease), background 260ms var(--ease), border-color 260ms var(--ease);
}

.hp-action-arrow svg {
    width: 13px;
    height: 13px;
}

.hp-dashboard-action-card:hover .hp-action-arrow {
    transform: translateX(-3px);
    background: #ffffff;
    border-color: rgba(255, 255, 255, 0.8);
    color: #0a4e31;
}

html[dir="ltr"] .hp-dashboard-action-card:hover .hp-action-arrow {
    transform: translateX(2px);
}

.hp-dashboard-action-card[data-tone="send"] {
    --tone-rgb: 2, 145, 72;
    --tone-gold: #ebad23;
}

.hp-dashboard-action-card[data-tone="pay"] {
    --tone-rgb: 5, 150, 105;
    --tone-gold: #e3b64f;
}

.hp-dashboard-action-card[data-tone="detailed"] {
    --tone-rgb: 1, 117, 60;
    --tone-gold: #dba842;
}

.hp-dashboard-action-card[data-tone="summary"] {
    --tone-rgb: 18, 124, 71;
    --tone-gold: #efc366;
}

.hp-dashboard-action-card[data-tone="statement"] {
    --tone-rgb: 1, 95, 49;
    --tone-gold: #d9aa45;
}

.hp-dashboard-action-card[data-tone="inbox"] {
    --tone-rgb: 3, 132, 84;
    --tone-gold: #dfb24f;
}

.hp-dashboard-action-card[data-tone="contact"] {
    --tone-rgb: 2, 103, 52;
    --tone-gold: #d9a73d;
}

/* =====================================================
   CARDS
   ===================================================== */
.search-card, .results-card, .contact-card, .placeholder-card {
    background: var(--white);
    border: 1px solid rgba(2, 145, 72, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 26px -22px rgba(2, 145, 72, 0.52);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(2, 145, 72, 0.05) 0%, rgba(235, 173, 35, 0.06) 100%);
}
.card-header svg { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; }
.card-header h2 { font-size: 0.88rem; font-weight: 700; color: var(--gray-800); }

.card-header .header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Active Filters Badge */
.active-filters-badge {
    background: var(--primary);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-inline-start: 6px;
}

.results-count {
    margin-inline-start: auto;
    font-size: 0.78rem;
    color: var(--gray-500);
    padding: 4px 12px;
    background: var(--white);
    border-radius: var(--radius-full);
    border: 1px solid var(--gray-200);
}
.results-count strong { color: var(--primary); font-weight: 700; }

/* =====================================================
   QUICK FILTERS
   ===================================================== */
.quick-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--gray-100);
    flex-wrap: wrap;
}

.quick-filters-label {
    font-size: 0.72rem;
    color: var(--gray-400);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.quick-filter-btn,
.account-statement-quick-filter-btn {
    padding: 5px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    background: var(--white);
    color: var(--gray-500);
    border: 1px solid var(--gray-200);
    transition: all var(--duration) var(--ease);
}
.quick-filter-btn:hover,
.account-statement-quick-filter-btn:hover {
    border-color: var(--primary-200);
    color: var(--primary);
    background: var(--primary-50);
}
.quick-filter-btn.active,
.account-statement-quick-filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 1px 4px rgb(2 145 72 / 0.2);
}

/* =====================================================
   SEARCH FORM
   ===================================================== */
.search-form {
    padding: 18px 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 14px;
}
.form-row:last-child { margin-bottom: 0; }

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    letter-spacing: 0.02em;
}

.form-group input,
.form-group select,
.form-group textarea {
    height: 42px;
    padding: 0 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.85rem;
    background: var(--white);
    color: var(--gray-800);
    transition: all var(--duration) var(--ease);
    width: 100%;
}

.form-group textarea {
    height: auto;
    padding: 10px 12px;
    line-height: 1.5;
}

.form-group input::placeholder {
    color: var(--gray-400);
    font-size: 0.8rem;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 14px;
    padding-inline-end: 32px;
}
html[dir="rtl"] .form-group select { background-position: left 10px center; }
html[dir="ltr"] .form-group select { background-position: right 10px center; }

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--gray-300);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-ring);
}

.form-group input[type="date"] {
    font-size: 0.82rem;
    color: var(--gray-700);
}

/* Active Filter Indicator */
.form-group.field-active label {
    color: var(--primary);
    font-weight: 700;
}
.form-group.field-active label::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--secondary);
    margin-inline-start: 6px;
    vertical-align: middle;
    animation: fieldActivePulse 1.5s ease-in-out 1;
}
.form-group.field-active input,
.form-group.field-active select {
    border-color: var(--primary);
    background: rgba(2, 145, 72, 0.03);
    box-shadow: 0 0 0 1px rgba(2, 145, 72, 0.08);
}
@keyframes fieldActivePulse {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.5); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* =====================================================
   ADVANCED SEARCH TOGGLE
   ===================================================== */
.advanced-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 42px;
    padding: 0 16px;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-500);
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    transition: all var(--duration) var(--ease);
    cursor: pointer;
    white-space: nowrap;
    margin-inline-start: auto;
}
.advanced-toggle svg { width: 15px; height: 15px; flex-shrink: 0; }
.advanced-toggle:hover {
    color: var(--primary);
    border-color: var(--primary-200);
    background: var(--primary-50);
}
.advanced-toggle.active {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-50);
}

.advanced-badge {
    background: var(--primary);
    color: var(--white);
    font-size: 0.62rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.advanced-fields {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease,
                padding 0.3s ease;
    opacity: 0;
    padding: 0 20px;
    border-top: 0px solid transparent;
}
.advanced-fields.open {
    max-height: 250px;
    opacity: 1;
    padding: 14px 20px 4px;
    border-top: 1px solid var(--gray-100);
}

.form-actions-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 8px;
}

.form-actions-inline {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.form-actions-inline > label { visibility: hidden; }
.form-actions-inline .form-actions { flex: 1; }
.form-actions-inline .btn { flex: 1; min-width: 0; }

.pay-search-mode {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.pay-search-mode-option {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-600);
    font-size: 0.75rem;
    font-weight: 700;
    transition: all var(--duration) var(--ease);
}

.pay-search-mode-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pay-search-mode-option.active {
    border-color: var(--primary);
    background: var(--primary-50);
    color: var(--primary);
}

.pay-name-results {
    padding: 12px 16px 16px;
    display: grid;
    gap: 10px;
}

.pay-search-result-item {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #ffffff 0%, #f8fcfa 100%);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pay-search-result-main {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.pay-search-result-number {
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
}

.pay-search-result-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-600);
    font-size: 0.74rem;
    flex-wrap: wrap;
}

.pay-search-result-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pay-search-result-meta span:not(:last-child)::after {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gray-300);
}

.pay-search-result-btn {
    height: 34px;
    padding: 0 12px;
    font-size: 0.74rem;
    flex-shrink: 0;
}

.account-statement-table .as-notes-cell {
    text-align: start;
    white-space: normal;
    line-height: 1.55;
}

.account-statement-table {
    min-width: 1140px;
    table-layout: fixed;
}

.account-statement-table col.as-col-date { width: 9%; }
.account-statement-table col.as-col-document { width: 13%; }
.account-statement-table col.as-col-record { width: 8%; }
.account-statement-table col.as-col-notes { width: 24%; }
.account-statement-table col.as-col-debit { width: 13%; }
.account-statement-table col.as-col-credit { width: 13%; }
.account-statement-table col.as-col-balance { width: 15%; }
.account-statement-table col.as-col-action { width: 6%; }

.account-statement-table th,
.account-statement-table td {
    vertical-align: middle;
}

.account-statement-table th:not(:nth-child(4)):not(:last-child),
.account-statement-table td:not(.as-notes-cell):not(.as-balance-cell) {
    white-space: nowrap;
}

.account-statement-table .as-balance-cell {
    white-space: nowrap;
}

.account-statement-table .as-document-cell,
.account-statement-table .as-head-document,
.account-statement-table .as-head-record {
    white-space: normal !important;
    line-height: 1.45;
}

.account-statement-table .as-document-cell {
    text-align: start;
    overflow-wrap: anywhere;
}

.account-statement-table .as-amount-cell,
.account-statement-table .as-balance-cell {
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}

.account-statement-row-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(29, 78, 216, 0.16);
    background: #ebf3ff;
    color: #1d4ed8;
    transition: all var(--duration) var(--ease);
}

.account-statement-row-action-btn svg {
    width: 14px;
    height: 14px;
}

.account-statement-row-action-btn:hover {
    background: #dce9ff;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.2);
}

.account-statement-row-action-empty {
    color: var(--gray-400);
    font-weight: 700;
}

.as-balance-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    max-width: 100%;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: var(--primary-50);
    border: 1px solid rgba(2, 145, 72, 0.18);
    color: var(--primary);
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
    overflow-wrap: normal;
    text-align: center;
}

.account-statement-header-right {
    margin-inline-start: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.account-statement-header-right .results-count {
    margin-inline-start: 0;
}

.account-statement-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.account-statement-action-btn {
    height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
}

.account-statement-action-btn svg {
    width: 14px;
    height: 14px;
}

.account-statement-action-btn:hover {
    color: var(--primary);
    border-color: rgba(2, 145, 72, 0.24);
    box-shadow: 0 2px 8px rgba(2, 145, 72, 0.12);
}

.account-statement-table-toolbar {
    margin: 14px 20px 16px;
    padding: 12px 14px;
    border: 1px solid rgba(2, 145, 72, 0.14);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbf8 100%);
    box-shadow: 0 10px 22px -22px rgba(2, 145, 72, 0.45);
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.account-statement-table-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.account-statement-table-filter-group label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--gray-700);
}

.account-statement-table-filter-group label::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #0d7a42 100%);
    box-shadow: 0 0 0 5px rgba(2, 145, 72, 0.08);
}

.account-statement-table-filter-group select {
    min-width: 260px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(2, 145, 72, 0.16);
    border-radius: 12px;
    background: #ffffff;
    color: var(--gray-800);
    font-size: 0.78rem;
    font-weight: 700;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.account-statement-table-filter-group select:hover,
.account-statement-table-filter-group select:focus {
    border-color: rgba(2, 145, 72, 0.3);
    box-shadow: 0 0 0 4px rgba(2, 145, 72, 0.08);
}

/* Search input */
.as-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.as-search-wrap svg {
    position: absolute;
    right: 12px;
    width: 16px;
    height: 16px;
    color: var(--gray-400);
    pointer-events: none;
}
[dir="ltr"] .as-search-wrap svg { right: auto; left: 12px; }
.as-search-wrap input {
    width: 100%;
    min-width: 180px;
    height: 40px;
    padding: 0 14px;
    padding-right: 36px;
    border: 1px solid rgba(2, 145, 72, 0.16);
    border-radius: 12px;
    background: #ffffff;
    color: var(--gray-800);
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
[dir="ltr"] .as-search-wrap input { padding-right: 14px; padding-left: 36px; }
.as-search-wrap input:hover,
.as-search-wrap input:focus {
    border-color: rgba(2, 145, 72, 0.3);
    box-shadow: 0 0 0 4px rgba(2, 145, 72, 0.08);
}

/* Sort wrap */
.as-sort-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}
.as-sort-wrap select {
    min-width: 140px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(2, 145, 72, 0.16);
    border-radius: 12px 0 0 12px;
    background: #ffffff;
    color: var(--gray-800);
    font-size: 0.78rem;
    font-weight: 700;
    font-family: inherit;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color var(--duration) var(--ease);
}
[dir="ltr"] .as-sort-wrap select { border-radius: 0 12px 12px 0; }
.as-sort-dir-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(2, 145, 72, 0.16);
    border-radius: 0 12px 12px 0;
    background: #fff;
    cursor: pointer;
    transition: background 0.15s, transform 0.2s;
    flex-shrink: 0;
}
[dir="ltr"] .as-sort-dir-btn { border-radius: 12px 0 0 12px; }
.as-sort-dir-btn svg { width: 18px; height: 18px; color: var(--primary); transition: transform 0.2s; }
.as-sort-dir-btn[disabled] { opacity: 0.4; cursor: default; }
.as-sort-dir-btn.is-asc svg { transform: rotate(180deg); }
.as-sort-dir-btn:not([disabled]):hover { background: #f0faf4; }

.account-statement-table .as-action-cell {
    text-align: center;
}

.inbox-filter-row {
    grid-template-columns: minmax(220px, 1fr) auto;
}

.inbox-list {
    padding: 14px;
    display: grid;
    gap: 10px;
}

.inbox-item {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    padding: 12px;
    display: grid;
    gap: 8px;
    transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.inbox-item.is-unread {
    border-color: rgba(2, 145, 72, 0.28);
    box-shadow: 0 0 0 1px rgba(2, 145, 72, 0.08);
    background: linear-gradient(180deg, #ffffff 0%, #f6fbf8 100%);
}

.inbox-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.inbox-item-head h3 {
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--gray-800);
}

.inbox-item-date {
    font-size: 0.7rem;
    color: var(--gray-500);
    white-space: nowrap;
}

.inbox-item-body {
    margin: 0;
    font-size: 0.79rem;
    color: var(--gray-700);
    line-height: 1.7;
    white-space: pre-wrap;
}

.inbox-item-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--gray-500);
    font-size: 0.73rem;
    font-weight: 600;
}

.inbox-empty {
    padding: 22px 16px;
    text-align: center;
    font-size: 0.82rem;
    color: var(--gray-500);
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 42px;
    padding: 0 18px;
    border-radius: var(--radius);
    font-size: 0.82rem;
    font-weight: 600;
    transition: all var(--duration) var(--ease);
    white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn:disabled,
.btn.is-loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 2px 8px rgb(2 145 72 / 0.25);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-600);
    border: 1.5px solid var(--gray-200);
}
.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

/* =====================================================
   DETAILED STATS BAR
   ===================================================== */
.detailed-stats-bar {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0;
    background: linear-gradient(135deg, var(--white) 0%, #f8fafc 100%);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow), 0 0 0 1px rgba(2,145,72,0.04);
    margin-bottom: 16px;
    overflow: hidden;
}

/* Sections */
.dstat-section {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 20px;
    position: relative;
}
.dstat-section-count {
    min-width: 130px;
    background: linear-gradient(135deg, rgba(2,145,72,0.04) 0%, transparent 100%);
}
.dstat-section-amounts {
    flex: 1;
    min-width: 200px;
}
.dstat-section-status {
    flex: 1;
    min-width: 180px;
}
.dstat-section-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dstat-section-count .dstat-section-icon {
    background: linear-gradient(135deg, var(--primary), #38b26f);
    color: white;
    box-shadow: 0 2px 8px rgba(2,145,72,0.25);
}
.dstat-section-amounts .dstat-section-icon {
    background: linear-gradient(135deg, var(--secondary), #f4bf4d);
    color: white;
    box-shadow: 0 2px 8px rgba(235,173,35,0.25);
}
.dstat-section-icon svg {
    width: 18px;
    height: 18px;
}
.dstat-section-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.dstat-label {
    font-size: 0.7rem;
    color: var(--gray-400);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.dstat-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--gray-800);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

/* Vertical Divider */
.dstat-divider-v {
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--gray-200) 20%, var(--gray-200) 80%, transparent);
    flex-shrink: 0;
}

/* Currency Breakdown Cards */
.dstat-currencies {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 2px;
}
.dstat-currency-card {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--gray-200);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: all var(--duration) var(--ease);
}
.dstat-currency-card:hover {
    border-color: var(--primary-200);
    box-shadow: 0 2px 6px rgba(2,145,72,0.08);
}
.dstat-currency-flag {
    font-size: 1.3rem;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}
.dstat-currency-amount {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--gray-800);
    font-variant-numeric: tabular-nums;
}
.dstat-currency-count {
    font-size: 0.62rem;
    color: var(--gray-400);
    font-weight: 500;
}

/* Status Chips */
.dstat-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.dstat-chip {
    --status-accent: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gray-800);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(100, 116, 139, 0.26);
    box-shadow: 0 6px 14px -14px rgba(15, 23, 42, 0.4);
    transition: all var(--duration) var(--ease);
}
.dstat-chip:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(0,0,0,0.08); }
.dstat-chip .dstat-chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--status-accent);
}
.dstat-chip-available { --status-accent: #0284c7; border-color: rgba(2, 132, 199, 0.36); }
.dstat-chip-received { --status-accent: #16a34a; border-color: rgba(22, 163, 74, 0.34); }
.dstat-chip-pending { --status-accent: #f59e0b; border-color: rgba(245, 158, 11, 0.38); }
.dstat-chip-stopped { --status-accent: #dc2626; border-color: rgba(220, 38, 38, 0.36); }
.dstat-chip-closed { --status-accent: #64748b; border-color: rgba(100, 116, 139, 0.34); }
.dstat-chip-processing { --status-accent: #7c3aed; border-color: rgba(124, 58, 237, 0.32); }

/* =====================================================
   TABLE FILTER BAR
   ===================================================== */
.table-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--gray-100);
    background: var(--white);
    flex-wrap: wrap;
}

.table-filter-search {
    position: relative;
    flex: 1;
    min-width: 180px;
    max-width: 320px;
    display: flex;
    align-items: center;
}
.table-filter-search > svg {
    position: absolute;
    inset-inline-start: 10px;
    width: 15px;
    height: 15px;
    color: var(--gray-400);
    pointer-events: none;
}
.table-filter-search input {
    width: 100%;
    height: 36px;
    padding: 0 32px;
    padding-inline-start: 34px;
    padding-inline-end: 32px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    background: var(--gray-50);
    color: var(--gray-800);
    transition: all var(--duration) var(--ease);
}
.table-filter-search input::placeholder { color: var(--gray-400); font-size: 0.78rem; }
.table-filter-search input:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: var(--shadow-ring);
}
.table-filter-clear {
    position: absolute;
    inset-inline-end: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    transition: all var(--duration) var(--ease);
}
.table-filter-clear:hover { background: var(--gray-200); color: var(--gray-600); }
.table-filter-clear svg { width: 12px; height: 12px; }

.table-filter-chips {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.table-chip {
    padding: 5px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    background: var(--gray-50);
    color: var(--gray-500);
    border: 1px solid var(--gray-200);
    transition: all var(--duration) var(--ease);
    white-space: nowrap;
}
.table-chip:hover { border-color: var(--primary-200); color: var(--primary); background: var(--primary-50); }
.table-chip.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

.table-filter-count {
    font-size: 0.75rem;
    color: var(--gray-400);
    font-weight: 600;
    margin-inline-start: auto;
    white-space: nowrap;
    padding: 4px 10px;
    background: var(--gray-50);
    border-radius: var(--radius-full);
}
.table-filter-count span { color: var(--primary); font-weight: 700; }

/* =====================================================
   DATA TABLE
   ===================================================== */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1060px;
    table-layout: fixed;
}

/* Column widths based on data analysis */
.data-table .col-row      { width: 50px; }     /* # */
.data-table .col-number   { width: 155px; }    /* رقم الحوالة - 17 char monospace */
.data-table .col-date     { width: 95px; }     /* التاريخ - 10 char */
.data-table .col-sender   { width: 165px; }    /* المرسل - avg 23 char */
.data-table .col-receiver { width: 190px; }    /* المستلم - avg 24, max 34 char */
.data-table .col-amount   { width: 95px; }     /* المبلغ - max 6 char */
.data-table .col-currency { width: 120px; }     /* العملة - علم + اسم */
.currency-cell { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.currency-flag { font-size: 1.4rem; line-height: 1; }
.data-table .col-target   { width: 90px; }     /* الوجهة - max 9 char */
.data-table .col-status   { width: 115px; }    /* الحالة - max 12 char + badge */
.data-table .col-attach   { width: 80px; }     /* المرفقات */

.data-table thead th {
    background: linear-gradient(135deg, #016734 0%, #029148 64%, #2a9f62 100%);
    color: var(--white);
    padding: 12px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.02em;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid rgba(235, 173, 35, 0.35);
}

.data-table th:first-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.data-table th:last-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
html[dir="ltr"] .data-table th:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
html[dir="ltr"] .data-table th:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.data-table td {
    padding: 12px 12px;
    text-align: center;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Name columns: right-align for RTL, allow wrapping */
.data-table td:nth-child(4),
.data-table td:nth-child(5) {
    text-align: start;
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
}

/* Amount: bold, no wrap */
.data-table td:nth-child(6) {
    white-space: nowrap;
    font-weight: 700;
}

.data-table tbody tr {
    transition: background var(--duration) var(--ease);
}

/* Zebra */
.data-table tbody tr:nth-child(even):not(.empty-row):not(.expand-row) {
    background: var(--gray-25);
}

/* Clickable Row */
.data-table tbody tr.clickable-row {
    cursor: pointer;
    transition: all 0.15s var(--ease);
}
.data-table tbody tr.clickable-row:hover {
    background: var(--primary-50);
    box-shadow: inset 3px 0 0 var(--primary);
}
html[dir="ltr"] .data-table tbody tr.clickable-row:hover {
    box-shadow: inset -3px 0 0 var(--primary);
}
.data-table tbody tr.clickable-row.expanded {
    background: var(--primary-50);
    box-shadow: inset 3px 0 0 var(--gold);
}
html[dir="ltr"] .data-table tbody tr.clickable-row.expanded {
    box-shadow: inset -3px 0 0 var(--gold);
}
.data-table tbody tr.clickable-row:active {
    background: var(--primary-100);
}

/* Expand Icon */
.row-expand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid var(--gray-200);
    transition: all 0.25s var(--ease);
    color: var(--gray-400);
    margin-inline-end: 6px;
    vertical-align: middle;
    flex-shrink: 0;
}
.row-expand-icon svg { width: 11px; height: 11px; transition: transform 0.25s var(--ease); }
.clickable-row:hover .row-expand-icon {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-50);
}
.expanded .row-expand-icon {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 2px 6px rgb(2 145 72 / 0.25);
}
.expanded .row-expand-icon svg { transform: rotate(90deg); }

/* Expand Row */
.expand-row { background: var(--gray-50) !important; }
.expand-row td { padding: 0 !important; border-bottom: 2px solid var(--primary-200) !important; }

.expand-content {
    padding: 16px 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    border-inline-start: 3px solid var(--gold);
    margin-inline-start: 16px;
}
.expand-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px 12px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--gray-100);
}
.expand-label { font-size: 0.72rem; color: var(--gray-400); font-weight: 600; letter-spacing: 0.03em; }
.expand-value { font-size: 0.88rem; color: var(--gray-800); font-weight: 600; }

/* Row Animation */
@keyframes fadeInRow {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.data-table tbody tr.row-animate {
    animation: fadeInRow 0.25s var(--ease) forwards;
    opacity: 0;
}

/* =====================================================
   EMPTY STATES
   ===================================================== */
.empty-state {
    padding: 56px 20px;
    text-align: center;
}

.empty-state-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.empty-state-icon svg { width: 32px; height: 32px; color: var(--gray-400); }
.empty-state p { font-size: 0.95rem; font-weight: 600; margin-bottom: 6px; color: var(--gray-600); }
.empty-state span {
    font-size: 0.82rem;
    color: var(--gray-400);
    display: block;
    max-width: 300px;
    margin: 0 auto;
    line-height: 1.5;
}

.empty-state-no-results .empty-state-icon { background: var(--warning-50); }
.empty-state-no-results .empty-state-icon svg { color: var(--warning); }

/* =====================================================
   STATUS BADGES
   ===================================================== */
.status-badge {
    --status-accent: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--gray-800);
    background: rgba(255, 255, 255, 0.95);
    border: 1.5px solid rgba(100, 116, 139, 0.25);
    box-shadow: 0 8px 16px -16px rgba(15, 23, 42, 0.48);
    position: relative;
}
.status-badge .status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--status-accent);
    flex-shrink: 0;
}
.status-badge .status-icon { width: 13px; height: 13px; }

.status-available { --status-accent: #0284c7; border-color: rgba(2, 132, 199, 0.36); }
.status-received { --status-accent: #16a34a; border-color: rgba(22, 163, 74, 0.34); }
.status-pending { --status-accent: #f59e0b; border-color: rgba(245, 158, 11, 0.38); }
.status-stopped { --status-accent: #dc2626; border-color: rgba(220, 38, 38, 0.36); }
.status-closed { --status-accent: #64748b; border-color: rgba(100, 116, 139, 0.34); }
.status-processing { --status-accent: #7c3aed; border-color: rgba(124, 58, 237, 0.32); }

/* Cell Styles */
.transfer-number {
    font-family: 'Courier New', monospace;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary);
}

.amount-cell {
    font-weight: 700;
    color: var(--gray-800);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.target-name {
    font-size: 0.84rem;
    color: var(--gray-600);
}

.text-muted {
    color: var(--gray-400);
    font-size: 0.7rem;
    display: block;
    margin-top: 1px;
}

.phone-hint {
    color: var(--primary-600);
    font-size: 0.75rem;
    display: block;
    margin-top: 2px;
    direction: ltr;
    unicode-bidi: isolate;
}

.no-attachments { color: var(--gray-300); font-size: 0.8rem; }

/* Attachments Button */
.attachments-btn {
    padding: 6px 12px;
    background: var(--gold);
    color: var(--white);
    border-radius: var(--radius);
    font-size: 0.73rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all var(--duration) var(--ease);
}
.attachments-btn svg { width: 13px; height: 13px; }
.attachments-btn .attach-count {
    background: rgb(255 255 255 / 0.25);
    padding: 1px 5px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
}
.attachments-btn:hover {
    background: var(--gold-hover);
    box-shadow: 0 2px 8px rgb(184 148 31 / 0.3);
}

/* Skeleton Loading */
.skeleton-row td { padding: 12px 14px; }
.skeleton-cell {
    height: 14px;
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
    margin: 0 auto;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-cell.w-short { width: 36px; }
.skeleton-cell.w-medium { width: 72px; }
.skeleton-cell.w-long { width: 110px; }
.skeleton-cell.w-badge { width: 64px; height: 22px; border-radius: var(--radius-full); }

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-25);
}

.pagination-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: var(--radius);
    background: rgba(2, 145, 72, 0.08);
    color: var(--gray-700);
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.page-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 36px;
    padding: 0 14px;
    background: var(--white);
    color: var(--gray-600);
    border-radius: var(--radius);
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid var(--gray-200);
    transition: all var(--duration) var(--ease);
}
.page-btn svg { width: 14px; height: 14px; }
.page-btn:hover:not(:disabled) {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.page-numbers { display: flex; gap: 4px; }
.page-number {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    color: var(--gray-600);
    border-radius: var(--radius);
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid var(--gray-200);
    transition: all var(--duration) var(--ease);
}
.page-number:hover { background: var(--gray-100); border-color: var(--gray-300); }
.page-number.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* =====================================================
   SUMMARY REPORT
   ===================================================== */
.summary-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-xs);
    transition: all var(--duration) var(--ease);
}
.stat-card:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-total .stat-icon { background: var(--primary-50); color: var(--primary); }
.stat-amount .stat-icon { background: var(--gold-50); color: var(--gold); }
.stat-received .stat-icon { background: var(--success-50); color: var(--success); }
.stat-not-received .stat-icon { background: var(--danger-50); color: var(--danger); }

.stat-info { flex: 1; min-width: 0; }
.stat-label { display: block; font-size: 0.72rem; color: var(--gray-400); font-weight: 600; margin-bottom: 2px; }
.stat-value { display: block; font-size: 1.35rem; font-weight: 800; color: var(--gray-800); line-height: 1.2; }
.stat-sub { font-size: 0.68rem; color: var(--gray-400); }

/* Status Breakdown Grid */
/* Summary Currency Cards */
.summary-currency-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.summary-currency-card {
    flex: 1;
    min-width: 180px;
    background: var(--white);
    border-radius: 12px;
    padding: 16px 18px;
    border: 1px solid var(--gray-100);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
    transition: all var(--duration) var(--ease);
}
.summary-currency-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(2,145,72,0.1);
    border-color: rgba(2,145,72,0.15);
}
.summary-currency-card::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 4px;
    height: 100%;
    border-radius: 0 4px 4px 0;
}
.summary-currency-card:nth-child(1)::before { background: linear-gradient(to bottom, #029148, #54c17a); }
.summary-currency-card:nth-child(2)::before { background: linear-gradient(to bottom, #059669, #34d399); }
.summary-currency-card:nth-child(3)::before { background: linear-gradient(to bottom, #ebad23, #f4c65d); }
.summary-currency-card:nth-child(4)::before { background: linear-gradient(to bottom, #dc2626, #f87171); }
.summary-currency-badge {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.8);
    border: 1px solid var(--gray-100);
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.05));
}
.summary-currency-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.summary-currency-name {
    font-size: 0.72rem;
    color: var(--gray-400);
    font-weight: 500;
}
.summary-currency-amount {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--gray-800);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.summary-currency-count {
    font-size: 0.68rem;
    color: var(--gray-400);
}

.summary-status-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}
.stat-card-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-xs);
    flex: 1;
    min-width: 140px;
}
.stat-mini-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat-mini-icon svg { width: 18px; height: 18px; }
.stat-mini-info { display: flex; flex-direction: column; gap: 1px; }
.stat-mini-label { font-size: 0.72rem; color: var(--gray-500); font-weight: 500; }
.stat-mini-value { font-size: 1.1rem; font-weight: 800; color: var(--gray-800); }

.stat-available .stat-mini-icon { background: #e6f3fb; color: #0369a1; }
.stat-received .stat-mini-icon { background: #eaf9ef; color: #15803d; }
.stat-pending .stat-mini-icon { background: #fff4df; color: #b45309; }
.stat-stopped .stat-mini-icon { background: #feecec; color: #b91c1c; }
.stat-closed .stat-mini-icon { background: #f1f5f9; color: #475569; }
.stat-processing .stat-mini-icon { background: #f3ecff; color: #6d28d9; }

.summary-placeholder { padding: 16px; }

/* =====================================================
   CONTACT FORM
   ===================================================== */
.contact-form {
    padding: 20px;
    max-width: 560px;
}

.contact-form .form-group { margin-bottom: 16px; }

.contact-form label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 5px;
}

.contact-form .input-icon {
    width: 14px;
    height: 14px;
    color: var(--primary);
    opacity: 0.7;
    flex-shrink: 0;
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.char-counter {
    margin-top: 4px;
    font-size: 0.7rem;
    color: var(--gray-400);
    text-align: end;
}
.char-counter.near-limit { color: var(--warning); }
.char-counter.at-limit { color: var(--danger); }

/* Contact Success */
.contact-success {
    padding: 44px 20px;
    text-align: center;
}

.success-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: var(--success-50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pop 0.35s var(--ease);
}
@keyframes pop {
    0% { transform: scale(0); }
    60% { transform: scale(1.08); }
    100% { transform: scale(1); }
}
.success-icon svg { width: 28px; height: 28px; color: var(--success); }
.contact-success h3 { font-size: 1.05rem; font-weight: 700; color: var(--gray-800); margin-bottom: 6px; }
.contact-success p { font-size: 0.82rem; color: var(--gray-500); max-width: 320px; margin: 0 auto; }

/* =====================================================
   MODAL
   ===================================================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgb(17 24 39 / 0.6);
    backdrop-filter: blur(4px);
}

.modal-container {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 680px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    padding: 14px 20px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--white);
}
.modal-header h3 svg { width: 18px; height: 18px; color: var(--gold-100); }

.modal-transfer-info {
    font-size: 0.73rem;
    font-weight: 400;
    opacity: 0.8;
    margin-inline-start: 6px;
    padding: 2px 8px;
    background: rgb(255 255 255 / 0.15);
    border-radius: var(--radius);
}

.modal-close {
    width: 30px;
    height: 30px;
    background: rgb(255 255 255 / 0.12);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: background var(--duration) var(--ease);
}
.modal-close svg { width: 14px; height: 14px; }
.modal-close:hover { background: rgb(255 255 255 / 0.22); }

.modal-body {
    padding: 20px;
    max-height: calc(85vh - 56px);
    overflow-y: auto;
}

/* Attachment Controls */
.attachment-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 14px;
    padding: 8px;
    background: var(--gray-50);
    border-radius: var(--radius);
}
.control-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    color: var(--gray-500);
    transition: all var(--duration) var(--ease);
}
.control-btn:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }
.control-btn svg { width: 16px; height: 16px; }

.attachment-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.attachment-tab {
    padding: 8px 16px;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all var(--duration) var(--ease);
    border: 1.5px solid transparent;
}
.attachment-tab:hover { background: var(--gray-200); }
.attachment-tab.active {
    background: var(--gold);
    color: var(--white);
    border-color: var(--gold-hover);
}

.attachment-viewer {
    min-height: 260px;
    border: 2px dashed var(--gray-200);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--gray-25);
}
.attachment-viewer img { max-width: 100%; max-height: 380px; object-fit: contain; }

.attachment-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    overflow: hidden;
}
.attachment-image-wrapper img {
    max-width: 100%;
    max-height: 380px;
    object-fit: contain;
    transition: transform 0.3s var(--ease);
}

.viewer-placeholder { text-align: center; color: var(--gray-400); padding: 36px; }
.viewer-placeholder svg { width: 48px; height: 48px; margin-bottom: 12px; color: var(--gray-300); }

.viewer-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--primary);
}
.viewer-loading .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* Fullscreen */
.fullscreen-viewer {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgb(0 0 0 / 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.fullscreen-viewer img { max-width: 95%; max-height: 95vh; object-fit: contain; }

.fullscreen-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    background: rgb(255 255 255 / 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: background var(--duration) var(--ease);
}
.fullscreen-close:hover { background: rgb(255 255 255 / 0.25); }
.fullscreen-close svg { width: 22px; height: 22px; }

/* =====================================================
   CONFIRM DIALOG
   ===================================================== */
.confirm-dialog {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.confirm-overlay {
    position: absolute;
    inset: 0;
    background: rgb(17 24 39 / 0.5);
    backdrop-filter: blur(4px);
}

.confirm-container {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px;
    width: 100%;
    max-width: 360px;
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.confirm-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    background: var(--danger-50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--danger);
}
.confirm-icon svg { width: 26px; height: 26px; }

.confirm-container h3 { font-size: 1rem; font-weight: 700; color: var(--gray-800); margin-bottom: 6px; }
.confirm-container p { font-size: 0.82rem; color: var(--gray-500); margin-bottom: 20px; }

.confirm-actions { display: flex; gap: 10px; justify-content: center; }
.confirm-yes {
    background: var(--danger) !important;
    min-width: 110px;
}
.confirm-yes:hover {
    background: #b91c1c !important;
    box-shadow: 0 2px 8px rgb(220 38 38 / 0.3) !important;
}
.confirm-no { min-width: 110px; }

/* =====================================================
   FOOTER
   ===================================================== */
.app-footer {
    padding: 14px 22px;
    display: grid;
    gap: 8px;
    border-top: 1px solid rgba(2, 145, 72, 0.16);
    background: linear-gradient(180deg, #fbfefc 0%, #f4faf7 100%);
    margin-top: auto;
}

.app-footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.footer-main {
    color: #255942;
    font-size: 0.79rem;
    font-weight: 700;
}
.footer-credit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid rgba(2, 145, 72, 0.22);
    border-radius: 12px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 16px rgba(2, 145, 72, 0.08);
    transition: all var(--duration) var(--ease);
}
.footer-credit:hover {
    border-color: rgba(2, 145, 72, 0.34);
    background: #ffffff;
}

.footer-credit-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 108px;
    height: 30px;
    padding: 0 8px;
    border-radius: 8px;
    background: linear-gradient(145deg, #135238 0%, #0b3222 100%);
    flex-shrink: 0;
}

.footer-credit-logo {
    width: auto;
    height: 18px;
    display: block;
    object-fit: contain;
    object-position: center;
}
.footer-credit-text {
    display: inline-grid;
    align-items: center;
    gap: 1px;
    min-width: 0;
    text-align: start;
    justify-items: start;
}
.footer-credit-label {
    font-size: 0.66rem;
    font-weight: 700;
    color: #396d56;
}
.footer-credit-name {
    font-size: 0.82rem;
    font-weight: 800;
    color: #0f5a39;
}
.footer-credit-site {
    font-size: 0.72rem;
    font-weight: 800;
    color: #216947;
    white-space: nowrap;
    flex-shrink: 0;
}
.footer-version {
    font-size: 0.66rem;
    color: #2f6b51;
    font-weight: 700;
    background: rgba(2, 145, 72, 0.08);
    border: 1px solid rgba(2, 145, 72, 0.16);
    padding: 3px 10px;
    border-radius: 999px;
}

/* =====================================================
   TOAST
   ===================================================== */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    min-width: 260px;
    border: 1px solid var(--gray-100);
    animation: toastIn 0.3s var(--ease);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.toast.toast-success { border-right: 3px solid var(--success); }
.toast.toast-error { border-right: 3px solid var(--danger); }
.toast.toast-warning { border-right: 3px solid var(--warning); }
.toast.toast-info { border-right: 3px solid var(--info); }

html[dir="ltr"] .toast { border-right: none; }
html[dir="ltr"] .toast.toast-success { border-left: 3px solid var(--success); }
html[dir="ltr"] .toast.toast-error { border-left: 3px solid var(--danger); }
html[dir="ltr"] .toast.toast-warning { border-left: 3px solid var(--warning); }
html[dir="ltr"] .toast.toast-info { border-left: 3px solid var(--info); }

.toast-icon { width: 18px; height: 18px; flex-shrink: 0; }
.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info .toast-icon { color: var(--info); }
.toast-message { flex: 1; font-size: 0.82rem; color: var(--gray-700); font-weight: 500; }

/* Count-up */
@keyframes countPop {
    0% { transform: scale(0.85); opacity: 0; }
    60% { transform: scale(1.03); }
    100% { transform: scale(1); opacity: 1; }
}
.count-up-animated { animation: countPop 0.35s var(--ease) forwards; }

/* Placeholder Card */
.placeholder-card { padding: 60px 20px; text-align: center; }
.placeholder-card svg { width: 64px; height: 64px; color: var(--gray-300); margin-bottom: 16px; }
.placeholder-card h2 { font-size: 1.1rem; color: var(--gray-700); margin-bottom: 6px; }
.placeholder-card p { color: var(--gray-400); font-size: 0.88rem; }

/* Logout Button (Tailwind styled in HTML) */
.logout-btn {
    width: 100%;
    padding: 10px;
    background: var(--white);
    color: var(--danger);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid var(--gray-200);
    transition: all var(--duration) var(--ease);
}
.logout-btn svg { width: 16px; height: 16px; }
.logout-btn:hover { background: var(--danger-50); border-color: var(--danger); }

/* =====================================================
   CHARTS
   ===================================================== */
.charts-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    margin-top: 24px;
    overflow: hidden;
    position: relative;
}
.charts-section::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    inset-inline-end: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 50%, var(--primary) 100%);
}
.charts-section .card-header {
    background: linear-gradient(135deg, rgba(2,145,72,0.03) 0%, rgba(235,173,35,0.03) 100%);
    padding: 16px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 10px;
}
.charts-section .card-header svg {
    width: 22px;
    height: 22px;
    color: var(--secondary);
    filter: drop-shadow(0 1px 2px rgba(235,173,35,0.3));
}
.charts-section .card-header h2 {
    font-size: 0.95rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 24px;
    background: linear-gradient(180deg, rgba(2,145,72,0.01) 0%, transparent 100%);
}
.chart-card {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--gray-100);
    box-shadow: 0 2px 8px rgba(2,145,72,0.04);
    position: relative;
    overflow: hidden;
    transition: all var(--duration) var(--ease);
}
.chart-card:hover {
    box-shadow: 0 4px 16px rgba(2,145,72,0.08);
    border-color: rgba(2,145,72,0.12);
    transform: translateY(-2px);
}
.chart-card::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 3px;
    height: 100%;
    border-radius: 0 3px 3px 0;
}
.chart-card:nth-child(1)::before { background: linear-gradient(to bottom, var(--primary), #38b26f); }
.chart-card:nth-child(2)::before { background: linear-gradient(to bottom, var(--secondary), #f4bf4d); }
.chart-card:nth-child(3)::before { background: linear-gradient(to bottom, var(--primary), var(--secondary)); }
.chart-card h3 {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--gray-500);
    margin-bottom: 14px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.chart-card h3::before,
.chart-card h3::after {
    content: '';
    flex: 1;
    max-width: 40px;
    height: 1px;
}
.chart-card:nth-child(1) h3::before,
.chart-card:nth-child(1) h3::after { background: linear-gradient(90deg, transparent, rgba(2,145,72,0.2)); }
.chart-card:nth-child(2) h3::before,
.chart-card:nth-child(2) h3::after { background: linear-gradient(90deg, transparent, rgba(235,173,35,0.2)); }
.chart-card:nth-child(3) h3::before,
.chart-card:nth-child(3) h3::after { background: linear-gradient(90deg, transparent, rgba(2,145,72,0.15)); }
.chart-card h3::before { transform: rotate(180deg); }

.chart-card.chart-wide { grid-column: span 2; }
.chart-container { position: relative; height: 250px; width: 100%; }
.chart-card.chart-wide .chart-container { height: 290px; }

/* =====================================================
   SEND TRANSFER FORM
   ===================================================== */
.send-transfer-form .search-card { margin-bottom: 16px; }

.section-subtitle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    padding: 12px 0 8px;
    margin-top: 4px;
    border-top: 1px dashed var(--gray-200);
}

.commission-bar {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--gold-50) 100%);
    border: 1px solid var(--primary-100);
    border-radius: var(--radius);
    margin-top: 14px;
}
.commission-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.commission-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
}
.commission-value {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.form-submit-bar {
    padding: 16px 0;
    display: flex;
    justify-content: center;
}
.btn-lg {
    height: 48px;
    padding: 0 32px;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
}
.btn-lg svg { width: 18px; height: 18px; }

.btn-danger {
    background: var(--danger);
    color: var(--white);
}
.btn-danger:hover {
    background: #b91c1c;
    box-shadow: 0 2px 8px rgb(220 38 38 / 0.3);
}

/* =====================================================
   PAY TRANSFER PAGE
   ===================================================== */
.transfer-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}
.transfer-detail-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 14px;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-100);
}
.transfer-detail-label {
    font-size: 0.72rem;
    color: var(--gray-400);
    font-weight: 600;
    letter-spacing: 0.03em;
}
.transfer-detail-value {
    font-size: 0.9rem;
    color: var(--gray-800);
    font-weight: 700;
}

/* =====================================================
   CONFIRM DIALOG VARIANTS
   ===================================================== */
.confirm-icon-send {
    background: var(--primary-50);
    color: var(--primary);
}
.confirm-icon-pay {
    background: var(--success-50);
    color: var(--success);
}
.confirm-icon-success {
    background: var(--success-50);
    color: var(--success);
}
.confirm-icon-danger {
    background: var(--danger-50);
    color: var(--danger);
}
.confirm-icon-info {
    background: var(--info-50);
    color: var(--info);
}

.confirm-summary {
    text-align: start;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 0.82rem;
    line-height: 1.7;
}
.confirm-summary .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
}
.confirm-summary .summary-label {
    color: var(--gray-500);
    font-weight: 500;
}
.confirm-summary .summary-value {
    color: var(--gray-800);
    font-weight: 700;
}

.result-container {
    max-width: 420px;
}
.result-details {
    text-align: start;
    background: var(--success-50);
    border: 1px solid rgba(5, 150, 105, 0.15);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 16px;
}
.result-details .result-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.82rem;
    border-bottom: 1px dashed rgba(5, 150, 105, 0.1);
}
.result-details .result-row:last-child { border-bottom: none; }
.result-details .result-label {
    color: var(--gray-600);
    font-weight: 500;
}
.result-details .result-value {
    color: var(--gray-800);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Quick Status Result */
#quickStatusResult {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 12px;
    text-align: start;
}
.quick-status-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.82rem;
}
.quick-status-label {
    color: var(--gray-500);
    font-weight: 500;
}
.quick-status-value {
    color: var(--gray-800);
    font-weight: 700;
}

/* Stop button in expanded row */
.stop-transfer-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: var(--danger-50);
    color: var(--danger);
    border: 1px solid rgba(220, 38, 38, 0.15);
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
    transition: all var(--duration) var(--ease);
}
.stop-transfer-btn:hover {
    background: var(--danger);
    color: var(--white);
    box-shadow: 0 2px 6px rgb(220 38 38 / 0.25);
}
.stop-transfer-btn svg { width: 13px; height: 13px; }

/* =====================================================
   RESPONSIVE - Laptop (1280px)
   ===================================================== */
@media (min-width: 1400px) {
    :root { --sidebar-width: 288px; }
    .page-content { padding: 24px 32px; }
    .top-header { padding: 0 32px; }
    .search-form { padding: 20px 24px; }
    .form-row { gap: 18px; }
}

@media (max-width: 1280px) {
    .top-header h1 { font-size: 0.95rem; }
    .stat-card { padding: 16px; gap: 12px; }
    .stat-value { font-size: 1.2rem; }
}

/* =====================================================
   RESPONSIVE - Tablet (1024px)
   ===================================================== */
@media (max-width: 1024px) {
    .main-content { margin: 0; }
    .menu-toggle { display: flex; }

    .top-header { padding: 0 14px; gap: 8px; }
    .top-header h1 { font-size: 0.9rem; }

    .page-content { padding: 14px; }

    .form-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .search-form { padding: 14px 16px; }
    .card-header { padding: 12px 16px; }
    .card-header h2 { font-size: 0.85rem; }

    .summary-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }

    .quick-filters { padding: 8px 16px; }
    .quick-filter-btn,
    .account-statement-quick-filter-btn { padding: 4px 12px; font-size: 0.72rem; }

    .charts-grid { grid-template-columns: 1fr; padding: 14px; gap: 14px; }
    .chart-card.chart-wide { grid-column: span 1; }
    .chart-card { padding: 14px; }
    .chart-container { height: 220px; }

    .hp-dashboard-actions-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; padding: 14px; }
    .hp-dashboard-action-card { grid-column: span 3; min-height: 152px; aspect-ratio: auto; }
    .hp-dashboard-action-card:nth-child(1),
    .hp-dashboard-action-card:nth-child(2) { grid-column: span 3; }
}

/* =====================================================
   RESPONSIVE - Mobile (768px)
   ===================================================== */
@media (max-width: 768px) {
    html { font-size: 14px; }

    /* Detailed Stats */
    .detailed-stats-bar { flex-direction: column; }
    .dstat-section { padding: 10px 14px; }
    .dstat-section-count { min-width: 0; }
    .dstat-divider-v { width: 100%; height: 1px; background: linear-gradient(to right, transparent, var(--gray-200) 20%, var(--gray-200) 80%, transparent); }
    .dstat-chips { width: 100%; }
    .dstat-chip { font-size: 0.68rem; padding: 3px 8px; }
    .dstat-currencies { gap: 6px; }
    .dstat-currency-card { padding: 4px 8px; }
    .dstat-currency-amount { font-size: 0.8rem; }

    /* Table Filter */
    .table-filter-bar { padding: 8px 12px; gap: 8px; }
    .table-filter-search { max-width: 100%; min-width: 0; }
    .table-filter-chips { width: 100%; overflow-x: auto; flex-wrap: nowrap; gap: 4px; -webkit-overflow-scrolling: touch; }
    .table-chip { padding: 4px 10px; font-size: 0.7rem; flex-shrink: 0; }
    .table-filter-count { width: 100%; text-align: center; }

    /* Login */
    .login-container { padding: 14px; }
    .login-card { padding: 32px 22px 26px; }
    .main-logo-img { max-width: 180px; }
    .login-form input { height: 44px; }
    .login-btn { height: 46px; }

    /* Header */
    .top-header { height: 50px; padding: 0 12px; }
    .top-header h1 { font-size: 0.85rem; }
    .lang-switch { padding: 4px 10px; font-size: 0.68rem; }
    .quick-status-header-btn { width: 30px; height: 30px; }
    .quick-status-header-btn svg { width: 14px; height: 14px; }
    .session-timer { padding: 4px 8px; font-size: 0.72rem; }
    .session-timer svg { width: 12px; height: 12px; }

    /* Form */
    .form-row { grid-template-columns: 1fr; gap: 10px; margin-bottom: 10px; }
    .search-form { padding: 12px 14px; }
    .form-group input, .form-group select { height: 40px; font-size: 0.82rem; }
    .form-group label { font-size: 0.72rem; }
    .form-group input::placeholder { font-size: 0.78rem; }
    .form-actions-inline > label { display: none; }
    .form-actions .btn { flex: 1; }
    .btn { height: 40px; font-size: 0.78rem; padding: 0 14px; }
    .inbox-filter-row { grid-template-columns: 1fr; }
    .pay-search-result-item { flex-direction: column; align-items: stretch; }
    .pay-search-result-btn { width: 100%; }

    /* Advanced Search */
    .advanced-toggle { height: 38px; font-size: 0.75rem; padding: 0 12px; width: 100%; justify-content: center; margin-top: 4px; }
    .form-actions-bar { flex-wrap: wrap; }
    .form-actions-bar .btn { flex: 1; }
    .form-actions-bar .advanced-toggle { flex-basis: 100%; margin-inline-start: 0; }
    .advanced-fields.open { max-height: 400px; padding: 10px 14px 4px; }

    /* Content */
    .page-content { padding: 10px; }
    .hp-dashboard-hero {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 16px 14px 17px;
        min-height: auto;
    }
    .hp-dashboard-identity { padding: 8px 10px; border-radius: 10px; }
    .hp-dashboard-user-label { font-size: 0.65rem; }
    .hp-dashboard-service-title { font-size: 1.05rem; }
    .hp-dashboard-service-subtitle { font-size: 0.7rem; line-height: 1.55; }
    .hp-dashboard-identity h3 { font-size: 1.06rem; margin-bottom: 0; }
    .hp-dashboard-hero-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .hp-hero-meta-item { height: 30px; padding: 0 8px; font-size: 0.67rem; border-radius: 8px; }
    .hp-hero-session { min-inline-size: 0; }
    .hp-dashboard-permissions-panel { padding: 8px 10px; gap: 6px; border-radius: 10px; }
    .hp-dashboard-permissions-label { font-size: 0.63rem; margin-top: 0; }
    .hp-dashboard-hero-permissions { margin-top: 0; gap: 5px; }
    .hp-dashboard-hero-brand-mark {
        width: 156px;
        min-width: 118px;
        max-width: 39vw;
        inset-inline-end: 14px;
        inset-block-end: 12px;
        padding: 0;
        border-radius: 0;
    }
    .hp-hero-perm-chip,
    .hp-hero-perm-empty { height: 22px; padding: 0 8px; font-size: 0.64rem; }
    .hp-dashboard-badge { align-self: flex-start; }
    .hp-readiness-panel { margin: 12px; padding: 12px; }
    .hp-readiness-chips { gap: 6px; }
    .hp-readiness-chip { font-size: 0.68rem; padding: 4px 9px; }
    .hp-readiness-actions { gap: 8px; }
    .hp-readiness-refresh-btn { height: 32px; padding: 0 12px; font-size: 0.72rem; }
    .hp-readiness-refresh-note { font-size: 0.69rem; }
    .hp-dashboard-data-card .hp-readiness-panel {
        margin: 6px 8px;
        padding: 6px 8px;
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 5px 7px;
    }
    .hp-dashboard-data-card .hp-readiness-message { display: none; }
    .hp-dashboard-data-card .hp-readiness-line { font-size: 0.74rem; }
    .hp-dashboard-data-card .hp-readiness-chip { padding: 2px 6px; font-size: 0.58rem; }
    .hp-dashboard-data-card .hp-readiness-actions { margin-inline-start: 0; justify-content: flex-end; }
    .hp-dashboard-data-card .hp-readiness-refresh-btn { width: auto; height: 26px; padding: 0 8px; font-size: 0.62rem; }
    .hp-dashboard-actions-grid { grid-template-columns: 1fr; gap: 10px; padding: 12px; }
    .hp-dashboard-action-card,
    .hp-dashboard-action-card:nth-child(1),
    .hp-dashboard-action-card:nth-child(2) {
        grid-column: 1 / -1;
        min-height: 144px;
        aspect-ratio: auto;
    }
    .card-header { padding: 10px 14px; flex-wrap: wrap; gap: 6px; }
    .card-header h2 { font-size: 0.82rem; }
    .card-header svg { width: 15px; height: 15px; }
    .results-count { width: 100%; text-align: center; margin: 4px 0 0; font-size: 0.75rem; }
    .account-statement-header-right {
        width: 100%;
        margin-inline-start: 0;
        justify-content: space-between;
        align-items: stretch;
        flex-wrap: wrap;
        gap: 8px;
    }
    .account-statement-header-right .results-count {
        width: auto;
        margin: 0;
    }
    .account-statement-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }
    .account-statement-table-toolbar {
        margin: 12px 14px 14px;
        padding: 10px 12px;
    }
    .account-statement-table-filter-group {
        width: 100%;
    }
    .account-statement-table-filter-group select,
    .as-search-wrap input,
    .as-sort-wrap select {
        width: 100%;
        min-width: 0;
    }
    .as-search-wrap { width: 100%; }
    .as-sort-wrap { width: 100%; }
    .as-sort-wrap select { flex: 1; }
    .account-statement-action-btn {
        width: 100%;
        height: 34px;
        padding: 0 6px;
        font-size: 0.66rem;
    }

    /* Quick Filters */
    .quick-filters { padding: 8px 12px; gap: 4px; }
    .quick-filters-label { width: 100%; font-size: 0.68rem; }
    .quick-filter-btn,
    .account-statement-quick-filter-btn { padding: 4px 10px; font-size: 0.7rem; }

    /* Table */
    .data-table { min-width: 860px; }
    .data-table thead th { padding: 10px 10px; font-size: 0.8rem; }
    .data-table td { padding: 10px 10px; font-size: 0.85rem; }

    /* Pagination */
    .pagination { flex-wrap: wrap; padding: 12px; gap: 6px; }
    .pagination-info { order: -1; width: 100%; min-height: 32px; font-size: 0.72rem; }
    .page-numbers { order: -1; width: 100%; justify-content: center; }
    .page-btn { height: 32px; padding: 0 10px; font-size: 0.72rem; }
    .page-number { width: 30px; height: 30px; font-size: 0.78rem; }

    /* Stats */
    .summary-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat-card { padding: 14px; flex-direction: column; text-align: center; gap: 8px; }
    .stat-icon { width: 38px; height: 38px; }
    .stat-icon svg { width: 18px; height: 18px; }
    .stat-value { font-size: 1.1rem; }
    .stat-label { font-size: 0.68rem; }

    /* Toast */
    .toast-container { left: 8px; right: 8px; bottom: 8px; }
    .toast { min-width: auto; padding: 10px 12px; }
    .toast-message { font-size: 0.78rem; }

    /* Modal */
    .modal { padding: 8px; }
    .modal-container { max-height: 92vh; }
    .modal-header { padding: 12px 14px; }
    .modal-header h3 { font-size: 0.82rem; }
    .modal-body { padding: 14px; }
    .attachment-tab { padding: 6px 12px; font-size: 0.75rem; }
    .attachment-viewer { min-height: 180px; }

    /* Contact */
    .contact-form { padding: 14px; }

    /* Footer */
    .app-footer { padding: 10px 12px; gap: 7px; }
    .app-footer-top { flex-direction: column; gap: 4px; text-align: center; }
    .footer-main { font-size: 0.72rem; }
    .footer-credit { padding: 7px 9px; border-radius: 11px; gap: 8px; }
    .footer-credit-logo-wrap { min-width: 92px; height: 27px; padding: 0 7px; }
    .footer-credit-logo { height: 16px; }
    .footer-credit-text { gap: 1px; text-align: center; justify-items: center; }
    .footer-credit-label { font-size: 0.62rem; }
    .footer-credit-name { font-size: 0.74rem; }
    .footer-credit-site { font-size: 0.66rem; }
    .footer-version { font-size: 0.64rem; }

    /* Empty */
    .empty-state { padding: 36px 14px; }
    .empty-state-icon { width: 60px; height: 60px; }
    .empty-state-icon svg { width: 26px; height: 26px; }
    .empty-state p { font-size: 0.88rem; }
    .empty-state span { font-size: 0.78rem; }
}

/* =====================================================
   RESPONSIVE - Small Phone (480px)
   ===================================================== */
@media (max-width: 480px) {
    .login-card { padding: 24px 16px 20px; transform: translateY(-8px); }
    .main-logo-img { max-width: 150px; }
    .login-brand-link { padding: 8px 10px; gap: 9px; }
    .login-brand-logo { height: 24px; padding: 4px 8px; }
    .login-brand-meta { gap: 5px; flex-wrap: wrap; justify-content: center; }
    .login-brand-kicker,
    .login-brand-name,
    .login-brand-address,
    .login-brand-site { font-size: 0.72rem; }
    .login-form .form-group { margin-bottom: 14px; }
    .hp-dashboard-hero-brand-mark {
        width: 118px;
        min-width: 88px;
        max-width: 42vw;
        inset-inline-end: 11px;
        inset-block-end: 11px;
        padding: 0;
        border-radius: 0;
    }
    .login-form label { font-size: 0.75rem; }
    .login-form input { height: 42px; }
    .login-btn { height: 44px; }

    .top-header { height: 46px; }
    .top-header h1 { font-size: 0.8rem; }
    .menu-toggle { width: 34px; height: 34px; }
    .menu-toggle svg { width: 18px; height: 18px; }
    .lang-switch { padding: 3px 8px; font-size: 0.62rem; }
    .quick-status-header-btn { width: 28px; height: 28px; }
    .quick-status-header-btn svg { width: 13px; height: 13px; }
    .session-timer { padding: 3px 6px; font-size: 0.68rem; }

    .form-group input, .form-group select { height: 38px; font-size: 0.8rem; }
    .btn { height: 38px; font-size: 0.75rem; }

    .data-table { min-width: 780px; }
    .data-table th, .data-table td { padding: 8px 8px; font-size: 0.78rem; }
    .status-badge { padding: 3px 8px; font-size: 0.65rem; }
    .attachments-btn { padding: 4px 7px; font-size: 0.65rem; }
    .attachments-btn svg { width: 11px; height: 11px; }

    .summary-stats { gap: 6px; }
    .stat-card { padding: 10px; }
    .stat-value { font-size: 0.95rem; }

    .confirm-container { padding: 22px 16px; }
    .hp-dashboard-identity { padding: 7px 8px; border-radius: 9px; }
    .hp-dashboard-user-label { font-size: 0.62rem; }
    .hp-dashboard-service-title { font-size: 0.97rem; }
    .hp-dashboard-service-subtitle { font-size: 0.66rem; line-height: 1.5; }
    .hp-dashboard-identity h3 { font-size: 0.98rem; }
    .hp-dashboard-hero-meta { grid-template-columns: 1fr; }
    .hp-hero-meta-item { height: 27px; padding: 0 7px; font-size: 0.62rem; }
    .hp-dashboard-permissions-panel { padding: 7px 8px; gap: 5px; border-radius: 9px; }
    .hp-dashboard-permissions-label { font-size: 0.6rem; margin-top: 0; }
    .hp-dashboard-hero-brand-mark {
        width: 118px;
        min-width: 88px;
        max-width: 42vw;
        inset-inline-end: 11px;
        inset-block-end: 11px;
        opacity: 0.96;
    }
    .hp-hero-perm-chip,
    .hp-hero-perm-empty { height: 21px; padding: 0 7px; font-size: 0.61rem; }
    .hp-readiness-panel { margin: 10px; padding: 10px; }
    .hp-readiness-line { font-size: 0.82rem; }
    .hp-readiness-message { font-size: 0.75rem; }
    .hp-readiness-chips { gap: 5px; }
    .hp-readiness-chip { font-size: 0.64rem; padding: 4px 8px; }
    .hp-readiness-actions { align-items: stretch; }
    .hp-readiness-refresh-btn { width: 100%; justify-content: center; }
    .hp-readiness-refresh-note { font-size: 0.65rem; }
    .hp-dashboard-data-card .hp-readiness-panel {
        margin: 5px 7px;
        padding: 5px 7px;
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 5px 6px;
    }
    .hp-dashboard-data-card .hp-readiness-message { display: none; }
    .hp-dashboard-data-card .hp-readiness-line { font-size: 0.71rem; }
    .hp-dashboard-data-card .hp-readiness-chip { font-size: 0.56rem; padding: 1px 6px; }
    .hp-dashboard-data-card .hp-readiness-actions { margin-inline-start: 0; justify-content: flex-end; }
    .hp-dashboard-data-card .hp-readiness-refresh-btn { width: auto; height: 25px; padding: 0 7px; font-size: 0.6rem; }
    .hp-dashboard-action-card,
    .hp-dashboard-action-card:nth-child(1),
    .hp-dashboard-action-card:nth-child(2) { min-height: 136px; aspect-ratio: auto; }
    .hp-action-pill { height: 22px; padding: 0 8px; font-size: 0.64rem; }
    .hp-action-link { font-size: 0.7rem; }
    .pay-search-mode { gap: 6px; }
    .pay-search-mode-option { flex: 1; justify-content: center; padding: 0 10px; }
}

/* =====================================================
   TRANSFER DETAILS MODAL
   ===================================================== */

/* Wide modal - start from top so header is always visible */
.modal-wide {
    align-items: flex-start;
    padding: 24px 20px;
    overflow-y: auto;
}

.modal-wide .modal-container {
    max-width: 960px;
    width: 95vw;
    margin: 0 auto;
}

.td-modal-container {
    max-height: none;
    display: flex;
    flex-direction: column;
}

.td-modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, #016734 100%);
    padding: 16px 24px;
    flex-shrink: 0;
}

.td-modal-header h3 {
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.td-modal-header h3 svg {
    color: var(--gold);
}

.td-modal-header .modal-close {
    color: rgba(255,255,255,0.7);
}

.td-modal-header .modal-close:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.td-public-number {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    background: rgba(255,255,255,0.12);
    padding: 2px 10px;
    border-radius: 4px;
    letter-spacing: 0.04em;
}

.td-status-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 100px;
    background: rgba(255,255,255,0.15);
}

.td-modal-body {
    overflow-y: auto;
    flex: 1;
    padding: 0;
}

/* Financial bar at top */
.td-financial-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 14px 20px;
    background: linear-gradient(135deg, #f7f9fd 0%, #eef3fb 60%, #faf8f0 100%);
    border-bottom: 1px solid var(--gray-200);
    flex-wrap: wrap;
}

.td-fin-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 24px;
    min-width: 100px;
}

.td-fin-item:not(:last-child) {
    border-inline-end: 1px solid var(--gray-200);
}

.td-fin-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--gray-400);
    letter-spacing: 0.04em;
}

.td-fin-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--gray-800);
}

.td-fin-value.td-fin-amount {
    font-size: 1.4rem;
    font-weight: 900;
    color: #0c2d52;
    font-variant-numeric: tabular-nums;
}

.td-fin-value.td-fin-gold {
    color: var(--gold);
    font-weight: 800;
}

/* Sections */
.td-section {
    padding: 16px 24px;
    border-bottom: 1px solid var(--gray-100);
}

.td-section:last-child {
    border-bottom: none;
}

.td-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1.5px solid var(--gray-100);
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--gray-800);
}

.td-section-title svg {
    width: 18px;
    height: 18px;
    color: var(--gold);
}

/* Info grid */
.td-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.td-info-item {
    padding: 8px 12px;
    border-bottom: 1px solid var(--gray-50);
    border-inline-end: 1px solid var(--gray-50);
    transition: background 0.15s;
}

.td-info-item:hover {
    background: var(--gray-25);
}

.td-info-label {
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--gray-400);
    letter-spacing: 0.03em;
    margin-bottom: 2px;
}

.td-info-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1.3;
}

/* Two-column parties */
.td-parties-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.td-party-card {
    background: var(--gray-25);
    border: 1px solid var(--gray-100);
    border-radius: 10px;
    overflow: hidden;
}

.td-party-header {
    padding: 10px 14px;
    font-size: 0.78rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.td-party-header svg {
    width: 16px;
    height: 16px;
}

.td-party-card.sender .td-party-header {
    background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
    color: var(--primary);
    border-bottom: 2px solid var(--primary-200);
}

.td-party-card.receiver .td-party-header {
    background: linear-gradient(135deg, var(--gold-50), var(--gold-100));
    color: var(--gold);
    border-bottom: 2px solid var(--gold-100);
}

.td-party-body {
    padding: 10px 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.td-party-field {
    padding: 6px 4px;
}

.td-party-field.full-width {
    grid-column: 1 / -1;
}

.td-party-field-label {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--gray-400);
    margin-bottom: 1px;
}

.td-party-field-value {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--gray-700);
}

/* Attachment gallery */
.td-attach-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.td-attach-thumb {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    aspect-ratio: 4/3;
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: center;
}

.td-attach-thumb:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.td-attach-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.td-attach-thumb .td-attach-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 8px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    text-align: center;
}

.td-attach-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
}

.td-attach-loading svg {
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

/* Footer actions */
.td-modal-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: center;
    gap: 12px;
    background: var(--gray-25);
}

.td-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 8px;
    border: none;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.td-btn svg {
    width: 16px;
    height: 16px;
}

.td-btn-primary {
    background: var(--primary);
    color: #fff;
}

.td-btn-primary:hover {
    background: var(--primary-hover);
}

.td-btn-secondary {
    background: #ebf3ff;
    color: #1d4ed8;
    border: 1px solid rgba(29, 78, 216, 0.16);
}

.td-btn-secondary:hover {
    background: #dce9ff;
}

/* Skeleton shimmer */
.td-skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    height: 16px;
    width: 80px;
    display: inline-block;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Actions column buttons */
.td-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.td-row-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-size: 0;
    white-space: nowrap;
}

.td-row-btn:active {
    transform: scale(0.95);
}

.td-row-btn svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* View details button */
.td-btn-view {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 6px rgba(2, 145, 72, 0.25);
}

.td-btn-view:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(2, 145, 72, 0.35);
    transform: translateY(-1px);
}

/* Print button */
.td-btn-print {
    background: var(--gold);
    color: #fff;
    box-shadow: 0 2px 6px rgba(235, 173, 35, 0.25);
}

.td-btn-print:hover {
    background: var(--gold-hover);
    box-shadow: 0 4px 12px rgba(235, 173, 35, 0.35);
    transform: translateY(-1px);
}

.td-btn-notice {
    background: #ebf3ff;
    color: #1d4ed8;
    box-shadow: 0 2px 6px rgba(29, 78, 216, 0.18);
}

.td-btn-notice:hover {
    background: #dce9ff;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.24);
    transform: translateY(-1px);
}

.col-actions {
    width: 170px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-wide {
        padding: 0;
    }
    .modal-wide .modal-container {
        width: 100vw;
        max-width: 100vw;
        margin: 0;
        border-radius: 0;
    }
    .td-info-grid {
        grid-template-columns: 1fr 1fr;
    }
    .td-parties-grid {
        grid-template-columns: 1fr;
    }
    .td-financial-bar {
        padding: 10px 12px;
    }
    .td-fin-item {
        padding: 4px 14px;
        min-width: 80px;
    }
    .td-fin-value.td-fin-amount {
        font-size: 1.1rem;
    }
    .td-section {
        padding: 12px 16px;
    }
}

/* =====================================================
   RECEIPT ACTION SHEET
   ===================================================== */
.receipt-action-sheet {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.receipt-action-sheet.hidden { display: none; }
.receipt-action-sheet-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.receipt-action-sheet-panel {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    background: #fff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: receiptSheetSlideUp 0.3s ease-out;
}
@keyframes receiptSheetSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.receipt-action-sheet-handle {
    width: 36px;
    height: 4px;
    background: #d1d5db;
    border-radius: 999px;
    margin: 10px auto 0;
}
.receipt-action-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px 8px;
}
.receipt-action-sheet-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
}
.receipt-action-sheet-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    transition: background 0.15s;
}
.receipt-action-sheet-close:hover { background: var(--gray-200); }
.receipt-action-sheet-close svg { width: 16px; height: 16px; }
.receipt-action-sheet-preview {
    padding: 12px 18px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.receipt-action-sheet-preview img {
    width: 100%;
    max-height: 50vh;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.receipt-action-sheet-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 14px 18px 22px;
    border-top: 1px solid #f0f0f0;
}
.receipt-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-700);
}
.receipt-action-btn svg { width: 22px; height: 22px; stroke-width: 1.8; }
.receipt-action-btn:active { transform: scale(0.96); }
.receipt-action-print { color: var(--primary); border-color: #d0e8d9; background: #f5fbf7; }
.receipt-action-print:hover { background: #eaf6ee; }
.receipt-action-print svg { color: var(--primary); }
.receipt-action-download { color: #b45309; border-color: #fde68a; background: #fffbeb; }
.receipt-action-download:hover { background: #fef3c7; }
.receipt-action-download svg { color: #b45309; }
.receipt-action-share { color: #1d4ed8; border-color: #bfdbfe; background: #eff6ff; }
.receipt-action-share:hover { background: #dbeafe; }
.receipt-action-share svg { color: #1d4ed8; }

@media (min-width: 640px) {
    .receipt-action-sheet {
        align-items: center;
    }
    .receipt-action-sheet-panel {
        border-radius: 20px;
        max-height: 85vh;
        margin: 20px;
        animation: receiptSheetFadeIn 0.25s ease-out;
    }
    @keyframes receiptSheetFadeIn {
        from { transform: scale(0.95) translateY(20px); opacity: 0; }
        to { transform: scale(1) translateY(0); opacity: 1; }
    }
    .receipt-action-sheet-handle { display: none; }
}

/* =====================================================
   PRINT
   ===================================================== */
@media print {
    .sidebar, .top-header, .search-card, .pagination, .attachments-btn, .app-footer { display: none !important; }
    .main-content { margin: 0; }
    .page-content { padding: 0; }
    .dashboard { background: white; }
    .results-card { box-shadow: none; border: 1px solid #e5e7eb; }
    .data-table th {
        background: var(--primary) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
