/* ==========================================================================
   Shree Kutch Gurjar Kshatriya Samaj, Mumbai Ghatak
   Royal Sapphire & Sky Blue Frosted Glass Palette (Unified with Login Form)
   ========================================================================== */

:root {
    /* Royal Sapphire & Sky Blue Palette Tokens (Unified with Login Form) */
    --cherry-50: #f0f7ff;
    --cherry-100: #e0f2fe;
    --cherry-200: #bae6fd;
    --cherry-300: #7dd3fc;
    --cherry-400: #38bdf8;
    --cherry-500: #0ea5e9;
    --cherry-600: #2563eb;
    --cherry-700: #1d4ed8;
    --cherry-800: #1e40af;
    --cherry-900: #1e3a8a;
    --cherry-950: #06152d;

    /* Light Theme Tokens */
    --bg-mesh: 
        radial-gradient(at 0% 0%, rgba(224, 242, 254, 0.75) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(186, 230, 253, 0.60) 0px, transparent 50%),
        #f8fafc;

    --text-main: #06152d;
    --text-muted: #1e40af;
    --text-label: #0284c7;
    --text-body: #334155;

    /* Luminous Frosted Glass Tokens (Light) */
    --glass-card-bg: rgba(255, 255, 255, 0.88);
    --glass-card-border: rgba(37, 99, 235, 0.20);
    --glass-card-shadow: 
        0 10px 30px rgba(15, 23, 42, 0.08),
        0 0 0 1px rgba(37, 99, 235, 0.12),
        inset 0 0 16px rgba(56, 189, 248, 0.04),
        inset 0 1.5px 2px rgba(255, 255, 255, 0.95);
    --glass-card-backdrop: blur(20px) saturate(180%);

    --glass-input-bg: rgba(255, 255, 255, 0.85);
    --glass-input-border: rgba(37, 99, 235, 0.24);
    --glass-input-color: #06152d;
    --glass-input-focus-bg: #ffffff;

    --modal-bg: #ffffff;
    --modal-border: var(--cherry-200);

    /* Buttons (Unified with Login Form Royal Blue Pill Button) */
    --btn-gradient: linear-gradient(135deg, #1d68d8 0%, #2575fc 50%, #38bdf8 100%);
    --btn-hover-gradient: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);
    --btn-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    --btn-shadow-hover: 0 6px 20px rgba(37, 99, 235, 0.50);

    /* System Tokens */
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Reduced Heights */
    --header-height: 52px;
    --footer-height: 34px;
}

/* ==========================================================================
   Dark Theme Tokens (Deep Navy Background matching Login Screen #06152d)
   ========================================================================== */
[data-theme="dark"] {
    /* Deep Navy Blue Mesh Background (Matching Login Screen #06152d) */
    --bg-mesh: 
        radial-gradient(at 10% 12%, rgba(29, 104, 216, 0.38) 0px, transparent 48%),
        radial-gradient(at 90% 15%, rgba(37, 117, 252, 0.30) 0px, transparent 45%),
        radial-gradient(at 80% 85%, rgba(56, 189, 248, 0.22) 0px, transparent 45%),
        radial-gradient(at 15% 85%, rgba(6, 21, 45, 0.70) 0px, transparent 42%),
        #06152d;

    --text-main: #ffffff;
    --text-muted: #93c5fd;
    --text-label: #bfdbfe;
    --text-body: #f1f5f9;

    /* Elevated Frosted Glass Card (Dark) - Deep Navy Crystalline Shade */
    --glass-card-bg: linear-gradient(135deg, rgba(6, 21, 45, 0.85) 0%, rgba(10, 25, 60, 0.90) 100%);
    --glass-card-border: rgba(96, 165, 250, 0.35);
    --glass-card-shadow: 
        0 16px 40px rgba(0, 0, 0, 0.65),
        0 0 16px rgba(56, 189, 248, 0.15),
        inset 0 1.5px 2px rgba(255, 255, 255, 0.18),
        inset 0 -1.5px 2px rgba(37, 99, 235, 0.20);
    --glass-card-backdrop: blur(28px) saturate(210%);

    /* Dark Mode Inputs: Frosted deep navy fill with crisp cyan/blue border */
    --glass-input-bg: rgba(10, 25, 60, 0.75);
    --glass-input-border: rgba(56, 189, 248, 0.30);
    --glass-input-color: #ffffff;
    --glass-input-focus-bg: rgba(15, 35, 75, 0.90);

    --modal-bg: #06152d;
    --modal-border: rgba(96, 165, 250, 0.35);

    --btn-gradient: linear-gradient(135deg, #1d68d8 0%, #2575fc 50%, #38bdf8 100%);
    --btn-hover-gradient: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);
    --btn-shadow: 0 4px 18px rgba(37, 99, 235, 0.45);
    --btn-shadow-hover: 0 6px 24px rgba(56, 189, 248, 0.55);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-mesh);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
    position: relative;
}



a {
    color: inherit;
    text-decoration: none;
}

button, input, select {
    font-family: inherit;
    font-size: inherit;
}

/* ==========================================================================
   Ambient Glowing Frost Orbs (Dark Mode - Ruby Glow)
   ========================================================================== */
.frost-orb {
    display: none;
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.85;
    animation: floatOrb 12s ease-in-out infinite alternate;
}

[data-theme="dark"] .frost-orb {
    display: block;
}

.frost-orb-1 {
    width: 380px;
    height: 380px;
    top: 8%;
    left: 5%;
    background: radial-gradient(circle, #2575fc 0%, #1d4ed8 60%, transparent 80%);
    opacity: 0.35;
}

.frost-orb-2 {
    width: 420px;
    height: 420px;
    bottom: 12%;
    right: 5%;
    background: radial-gradient(circle, #38bdf8 0%, #06152d 60%, transparent 80%);
    opacity: 0.30;
    animation-delay: -6s;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 25px) scale(1.1); }
}

/* ==========================================================================
   Reduced Height Top Header (Desktop & Mobile)
   ========================================================================== */

.app-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    position: relative;
    z-index: 1;
}

.app-header {
    background: var(--glass-card-bg);
    backdrop-filter: var(--glass-card-backdrop);
    -webkit-backdrop-filter: var(--glass-card-backdrop);
    border-bottom: 1px solid var(--glass-card-border);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
    height: var(--header-height);
    display: flex;
    align-items: center;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.header-container {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-sizing: border-box;
}

.header-brand {
    flex-shrink: 0;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-logo-wrap {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    flex-shrink: 0;
    overflow: visible;
}

.brand-logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(56, 189, 248, 0.35));
}

.brand-info {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.15;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.brand-subtitle {
    font-size: 0.64rem;
    font-weight: 700;
    color: var(--cherry-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 1px;
}

[data-theme="dark"] .brand-subtitle {
    color: var(--cherry-400);
}

.header-actions-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Header Right - Desktop */
.header-right-desktop {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-right-mobile {
    display: none;
}

/* Light / Dark Theme Toggle Button */
.btn-topbar-theme {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--glass-input-bg);
    border: 1.5px solid var(--glass-input-border);
    color: var(--text-label);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-topbar-theme:hover {
    background: rgba(37, 99, 235, 0.15);
    color: #2563eb;
    border-color: #2563eb;
    transform: scale(1.05);
}

[data-theme="dark"] .btn-topbar-theme {
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.35);
    background: rgba(10, 25, 60, 0.7);
}

/* Icon visibility toggle */
.theme-icon-light { display: none; }
.theme-icon-dark  { display: block; }

[data-theme="dark"] .theme-icon-light { display: block; }
[data-theme="dark"] .theme-icon-dark  { display: none; }

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 10px 3px 4px;
    border-radius: 9999px;
    background: var(--glass-card-bg);
    border: 1px solid var(--glass-card-border);
}

.user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--btn-gradient);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.76rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-display-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
}

.user-role-tag {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-admin {
    background-color: var(--cherry-100);
    color: var(--cherry-800);
    border: 1px solid var(--cherry-300);
}

.badge-manager {
    background-color: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.badge-user {
    background-color: #e0e7ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}

[data-theme="dark"] .badge-admin {
    background-color: rgba(37, 99, 235, 0.25);
    color: #bae6fd;
    border-color: rgba(56, 189, 248, 0.4);
}

[data-theme="dark"] .badge-user {
    background-color: rgba(99, 102, 241, 0.25);
    color: #c7d2fe;
    border-color: rgba(99, 102, 241, 0.4);
}

/* Small Logout Icon Button (No word logout) */
.btn-topbar-logout {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.1);
    flex-shrink: 0;
}

.btn-topbar-logout:hover {
    background: #fecaca;
    color: #991b1b;
    border-color: #fca5a5;
    transform: translateY(-1px);
}

.btn-topbar-logout:active {
    transform: scale(0.96);
}

[data-theme="dark"] .btn-topbar-logout {
    background: rgba(220, 38, 38, 0.25);
    color: #fca5a5;
    border-color: rgba(220, 38, 38, 0.45);
}

[data-theme="dark"] .btn-topbar-logout:hover {
    background: rgba(220, 38, 38, 0.4);
    color: #fee2e2;
}

/* ==========================================================================
   Dashboard Main & Cards (3 Cards: View family details, Collection, Reports)
   ========================================================================== */

.dashboard-main {
    flex-grow: 1;
    padding: 32px 16px;
    width: 100%;
    box-sizing: border-box;
}

.dashboard-container {
    max-width: 980px;
    margin: 0 auto;
    width: 100%;
}

.modules-section {
    width: 100%;
}

/* Module Cards Grid: 3 columns on desktop */
.module-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

/* Individual Card (Virar Kalakrida Luminous Frosted Glass) */
.module-card {
    background: var(--glass-card-bg);
    backdrop-filter: var(--glass-card-backdrop);
    -webkit-backdrop-filter: var(--glass-card-backdrop);
    border: 1.5px solid var(--glass-card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-card-shadow);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--btn-gradient);
    opacity: 0.85;
}

.module-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.16), 0 0 0 1px var(--cherry-400);
    border-color: var(--cherry-400);
}

.module-card:active {
    transform: scale(0.98);
}

/* Card Icon */
.module-card-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--cherry-50);
    border: 1px solid var(--cherry-200);
    color: var(--cherry-700);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
    transition: all 0.2s ease;
}

[data-theme="dark"] .module-card-icon-wrap {
    background: rgba(10, 25, 60, 0.65);
    border-color: rgba(56, 189, 248, 0.35);
    color: #38bdf8;
}

.module-card:hover .module-card-icon-wrap {
    background: var(--btn-gradient);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.module-card-body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.module-card-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.module-card-arrow {
    font-size: 1rem;
    color: var(--cherry-600);
    transition: transform 0.2s ease;
}

[data-theme="dark"] .module-card-arrow {
    color: var(--cherry-400);
}

.module-card:hover .module-card-arrow {
    transform: translateX(4px);
    color: var(--cherry-800);
}

/* Card Accents */
.card-family .module-card-icon-wrap { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.card-collection .module-card-icon-wrap { color: #6d28d9; background: #f5f3ff; border-color: #ddd6fe; }
.card-reports .module-card-icon-wrap { color: #0284c7; background: #f0f9ff; border-color: #bae6fd; }

[data-theme="dark"] .card-family .module-card-icon-wrap { color: #fbbf24; background: rgba(180, 83, 9, 0.25); border-color: rgba(251, 191, 36, 0.35); }
[data-theme="dark"] .card-collection .module-card-icon-wrap { color: #c084fc; background: rgba(109, 40, 217, 0.25); border-color: rgba(192, 132, 252, 0.35); }
[data-theme="dark"] .card-reports .module-card-icon-wrap { color: #38bdf8; background: rgba(14, 165, 233, 0.25); border-color: rgba(56, 189, 248, 0.35); }

/* ==========================================================================
   Login Page Styles (Mumbai Night Royal Blue Theme - from Desktop_View.png)
   ========================================================================== */

body.login-page {
    background-color: #06152d;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Dedicated fixed background layer to enable 100% reliable hardware-accelerated backdrop-filter blur across all browsers */
body.login-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/Desktop_View.png') !important;
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    z-index: 0;
    pointer-events: none;
    transform: translateZ(0); /* Hardware accelerated compositing surface */
}

body.login-page .frost-orb {
    display: none !important;
}

@media (max-width: 768px) {
    body.login-page::before {
        background-image: url('../images/Desktop_View.png') !important;
        background-position: center center !important;
    }
}

.login-top-bar {
    width: 100%;
    max-width: 440px;
    margin: 12px auto 0;
    display: flex;
    justify-content: flex-end;
    padding: 0 16px;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

.login-main {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    box-sizing: border-box;
    width: 100%;
    position: relative;
    z-index: 1;
}

.login-wrapper {
    width: 100%;
    max-width: 410px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Banking Glassmorphic Card (Envato Mobile App UI Kit Aesthetic - Ultra Transparent) */
.login-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 40%, rgba(10, 25, 60, 0.06) 100%) !important;
    backdrop-filter: blur(8px) saturate(140%) contrast(102%) !important;
    -webkit-backdrop-filter: blur(8px) saturate(140%) contrast(102%) !important;
    border-radius: 26px !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    border-top: 1.5px solid rgba(255, 255, 255, 0.55) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.38) !important;
    box-shadow: 
        0 20px 45px -10px rgba(0, 0, 0, 0.45),
        0 0 20px 0 rgba(56, 189, 248, 0.10),
        inset 0 1px 1.5px rgba(255, 255, 255, 0.40),
        inset 0 -1px 2px rgba(0, 0, 0, 0.15) !important;
    padding: 32px 28px !important;
    position: relative;
    z-index: 2;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    transform: translateZ(0); /* Hardware accelerated backdrop filter */
}

/* Top specular glass hairline */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1.5px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.85) 50%, transparent 100%);
    opacity: 0.95;
    pointer-events: none;
}

/* Signature Envato Glass Optical Glint on Corner */
.login-card::after {
    content: '';
    position: absolute;
    top: -1px;
    right: 42px;
    width: 75px;
    height: 2.5px;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.95) 0%, rgba(56, 189, 248, 0.55) 45%, transparent 70%);
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.70));
    pointer-events: none;
    z-index: 3;
}

.login-brand-header {
    text-align: center;
    margin-bottom: 22px;
    position: relative;
    z-index: 2;
}

.login-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.login-logo-img {
    height: 76px;
    max-width: 108px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    transition: transform 0.25s ease;
}

.login-logo-img:hover {
    transform: scale(1.03);
}

.gujarati-title {
    font-family: 'Anek Gujarati', 'Noto Sans Gujarati', 'Shruti', var(--font-sans);
    font-size: 1.28rem;
    font-weight: 700;
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    line-height: 1.35;
    letter-spacing: 0.01em;
    margin-top: 4px;
    margin-bottom: 4px;
}

.gujarati-subtitle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 2px;
}

.subtitle-text {
    font-family: 'Anek Gujarati', 'Noto Sans Gujarati', 'Shruti', var(--font-sans);
    font-size: 1.05rem;
    font-weight: 600;
    color: #e0f2fe !important;
    letter-spacing: 0.04em;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.gujarati-subtitle::before,
.gujarati-subtitle::after {
    content: '';
    display: inline-block;
    width: 22px;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85));
    border-radius: 2px;
}

.gujarati-subtitle::after {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.85), transparent);
}

/* Forms */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    z-index: 2;
}

.login-card .form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.login-card .input-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.login-card .input-icon {
    position: absolute;
    left: 14px;
    color: #93c5fd;
    opacity: 0.9;
    pointer-events: none;
    z-index: 1;
}

.login-card .form-control {
    width: 100%;
    height: 48px;
    padding: 8px 14px 8px 42px;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 14px !important;
    color: #ffffff !important;
    font-size: 0.92rem;
    font-family: var(--font-sans);
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    box-shadow: inset 0 1.5px 3px rgba(0, 0, 0, 0.20), inset 0 0 1px rgba(255, 255, 255, 0.15) !important;
    transition: all 0.25s ease !important;
}

.login-card .form-control::placeholder {
    color: rgba(215, 235, 255, 0.75) !important;
}

.login-card .form-control:focus {
    background: rgba(255, 255, 255, 0.09) !important;
    border-color: rgba(96, 165, 250, 0.85) !important;
    box-shadow: 0 0 0 3.5px rgba(59, 130, 246, 0.35), inset 0 1px 2px rgba(0, 0, 0, 0.15) !important;
    outline: none;
}

/* Remember Me & Forgot Password Row */
.login-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2px 0 4px;
    font-size: 0.82rem;
    color: #e2e8f0;
}

.remember-me-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    font-size: 0.80rem;
    color: #e2e8f0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.remember-me-label input[type="checkbox"] {
    accent-color: #3b82f6;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.link-forgot-pass {
    color: #bae6fd;
    font-size: 0.80rem;
    font-weight: 500;
    text-decoration: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    transition: color 0.15s ease;
}

.link-forgot-pass:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Banking Pill Button with Radial Glint (Envato Mobile App UI Kit) */
.btn-login-blue {
    background: linear-gradient(135deg, #1d68d8 0%, #2575fc 50%, #38bdf8 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    border-radius: 9999px !important;
    height: 46px !important;
    font-size: 0.96rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    color: #ffffff !important;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.55), inset 0 1.5px 1.5px rgba(255, 255, 255, 0.50) !important;
    margin-top: 8px !important;
    cursor: pointer;
    transition: all 0.22s ease !important;
    position: relative;
    overflow: hidden;
}

.btn-login-blue:hover {
    background: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%) !important;
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.70), 0 0 16px rgba(56, 189, 248, 0.45) !important;
    transform: translateY(-1px);
}

/* Register Link */
.login-register-row {
    text-align: center;
    font-size: 0.80rem;
    color: #cbd5e1;
    margin-top: 2px;
}

.link-register {
    color: #60a5fa;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.15s ease;
}

.link-register:hover {
    color: #93c5fd;
    text-decoration: underline;
}

/* Card Footer Attributions */
.login-card-footer {
    text-align: center;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(147, 197, 253, 0.18);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.powered-by-text {
    font-size: 0.70rem;
    color: #94a3b8;
    letter-spacing: 0.02em;
}

.skgks-digital-tag {
    font-size: 0.74rem;
    font-weight: 700;
    color: #bfdbfe;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
    font-size: 0.90rem;
    font-family: var(--font-sans);
    transition: all 0.15s ease-in-out;
}

.form-control:focus {
    outline: none;
    background-color: #ffffff !important;
    border-color: var(--cherry-600);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-control::placeholder {
    color: var(--cherry-300);
    font-size: 0.86rem;
}

/* Light mode browser autofill fix */
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover, 
.form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #0a1936 !important;
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
    box-shadow: 0 0 0px 1000px #ffffff inset !important;
    border-color: var(--cherry-300) !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Dark mode form controls */
[data-theme="dark"] .form-control {
    background-color: rgba(6, 20, 48, 0.75) !important;
    border-color: rgba(96, 165, 250, 0.35);
    color: #ffffff !important;
}

[data-theme="dark"] .form-control:focus {
    background-color: rgba(11, 35, 78, 0.90) !important;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.28);
}

[data-theme="dark"] .form-control::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

/* Dark mode browser autofill fix */
[data-theme="dark"] .form-control:-webkit-autofill,
[data-theme="dark"] .form-control:-webkit-autofill:hover, 
[data-theme="dark"] .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0px 1000px #071733 inset !important;
    box-shadow: 0 0 0px 1000px #071733 inset !important;
    border-color: rgba(96, 165, 250, 0.4) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.btn-toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--cherry-400);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.btn-toggle-password:hover {
    color: var(--cherry-800);
}

[data-theme="dark"] .btn-toggle-password:hover {
    color: #ffffff;
}

/* Primary Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--btn-gradient);
    color: #ffffff;
    box-shadow: var(--btn-shadow);
}

.btn-primary:hover {
    background: var(--btn-hover-gradient);
    box-shadow: var(--btn-shadow-hover);
    transform: translateY(-1px);
}

.btn-block {
    width: 100%;
}

.btn-login {
    height: 46px;
    font-size: 0.94rem;
    margin-top: 6px;
}

.btn-sm {
    height: 34px;
    padding: 4px 14px;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

[data-theme="dark"] .btn-secondary {
    background: rgba(11, 35, 78, 0.8);
    color: #eed9dc;
    border-color: rgba(147, 197, 253, 0.3);
}

[data-theme="dark"] .btn-secondary:hover {
    background: rgba(10, 28, 62, 0.95);
    color: #ffffff;
}

.btn-danger-logout {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-danger-logout:hover {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.45);
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    margin-bottom: 16px;
}

.alert-danger {
    background-color: var(--cherry-100);
    border: 1px solid var(--cherry-300);
    color: var(--cherry-900);
}

[data-theme="dark"] .alert-danger {
    background-color: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.4);
    color: #bfdbfe;
}

/* ==========================================================================
   Reduced Height Persistent Footer
   ========================================================================== */

.app-footer {
    display: block;
    margin-top: auto;
    width: 100%;
    background: var(--glass-card-bg);
    backdrop-filter: var(--glass-card-backdrop);
    -webkit-backdrop-filter: var(--glass-card-backdrop);
    border-top: 1px solid var(--glass-card-border);
    padding: 6px 14px;
    box-sizing: border-box;
    height: var(--footer-height);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    text-align: center;
    width: 100%;
}

.footer-copyright {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    margin: 0;
}

/* ==========================================================================
   Modals (Virar Kalakrida Theme - Light & Dark)
   ========================================================================== */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(6, 21, 45, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
    box-sizing: border-box;
    animation: fadeInModal 0.18s ease-out;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-box {
    background: var(--modal-bg);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 45px rgba(6, 21, 45, 0.3), 0 0 0 1px var(--modal-border);
    width: 100%;
    max-width: 440px;
    padding: 20px 22px;
    box-sizing: border-box;
    border: 1.5px solid var(--modal-border);
    animation: scaleModal 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-logout-box {
    max-width: 380px;
}

@keyframes scaleModal {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-card-border);
}

.modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-icon-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon-cherry {
    background: var(--cherry-100);
    color: var(--cherry-800);
    border: 1px solid var(--cherry-300);
}

.modal-icon-logout {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

[data-theme="dark"] .modal-icon-cherry {
    background: rgba(37, 99, 235, 0.25);
    color: #bae6fd;
    border-color: rgba(56, 189, 248, 0.4);
}

[data-theme="dark"] .modal-icon-logout {
    background: rgba(220, 38, 38, 0.25);
    color: #fca5a5;
    border-color: rgba(220, 38, 38, 0.4);
}

.modal-title {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--text-main);
}

.modal-subtitle {
    font-size: 0.70rem;
    font-weight: 600;
    color: var(--cherry-600);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

[data-theme="dark"] .modal-subtitle {
    color: var(--cherry-400);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--cherry-400);
    cursor: pointer;
    padding: 4px;
}

.modal-close:hover {
    color: var(--cherry-800);
}

[data-theme="dark"] .modal-close:hover {
    color: #ffffff;
}

.modal-body {
    padding: 14px 0 16px;
}

.logout-confirm-text {
    font-size: 0.94rem;
    color: var(--text-main);
    margin: 6px 0 10px;
}

.notice-callout {
    background: var(--cherry-50);
    border-left: 3px solid var(--cherry-600);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.86rem;
    color: var(--cherry-950);
}

[data-theme="dark"] .notice-callout {
    background: rgba(10, 25, 60, 0.6);
    border-left-color: var(--cherry-400);
    color: #e0f2fe;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--glass-card-border);
}

/* ==========================================================================
   Responsive Breakpoints & Mobile Views
   ========================================================================== */

/* Mobile View (max-width: 768px)
   - Natural page flow
   - Top right shows: Theme Toggle Button + Small Logout Icon Button (No word logout)
   - All cards formatted as full-width horizontal cards (identical to the Reports card)
*/
@media (max-width: 768px) {
    :root {
        --header-height: 48px;
        --footer-height: 32px;
    }

    .app-header {
        position: sticky;
        top: 0;
        height: var(--header-height);
        background: var(--glass-card-bg);
        border-bottom: 1px solid var(--glass-card-border);
        box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    }

    .header-container {
        padding: 0 10px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .header-brand {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }

    .brand-link {
        min-width: 0;
        gap: 6px;
    }

    .brand-logo-wrap {
        width: 30px;
        height: 30px;
        border-radius: 7px;
        flex-shrink: 0;
    }

    .brand-info {
        min-width: 0;
        overflow: hidden;
    }

    .brand-title {
        font-size: 0.78rem;
        line-height: 1.15;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .brand-subtitle {
        font-size: 0.58rem;
        white-space: nowrap;
    }

    /* Hide desktop header right on mobile */
    .header-right-desktop {
        display: none !important;
    }

    /* Show Theme Toggle & Small Logout Icon Button in Top Right on Mobile */
    .header-right-mobile {
        display: flex !important;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }

    .btn-topbar-theme {
        width: 30px;
        height: 30px;
        border-radius: 8px;
    }

    .btn-topbar-logout {
        width: 30px;
        height: 30px;
        border-radius: 8px;
    }

    .btn-topbar-logout svg {
        width: 14px;
        height: 14px;
    }

    /* Dashboard Main Container on Mobile */
    .dashboard-main {
        display: block !important;
        padding: 16px 14px 24px;
        flex-grow: 1;
    }

    /* All Cards Look Like Report Card on Mobile (Full-width horizontal rows) */
    .module-cards-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .module-card {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding: 12px 16px !important;
        gap: 14px !important;
        border-radius: var(--radius-md) !important;
        width: 100% !important;
        text-align: left !important;
    }

    .module-card::before {
        top: 0;
        bottom: 0;
        left: 0;
        right: auto;
        width: 3.5px;
        height: 100%;
    }

    .module-card-icon-wrap {
        width: 40px !important;
        height: 40px !important;
        border-radius: 11px !important;
        margin-bottom: 0 !important;
        flex-shrink: 0 !important;
    }

    .module-card-icon-wrap svg {
        width: 22px !important;
        height: 22px !important;
    }

    .module-card-body {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex: 1 !important;
        width: auto !important;
        gap: 8px !important;
    }

    .module-card-title {
        font-size: 0.95rem !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
    }

    .module-card-arrow {
        font-size: 0.95rem !important;
        margin-left: auto !important;
        color: var(--cherry-600);
    }

    [data-theme="dark"] .module-card-arrow {
        color: var(--cherry-400);
    }

    /* Login Form on Mobile */
    .login-main {
        padding: 16px 12px;
    }

    .login-card {
        padding: 24px 18px;
        border-radius: 20px !important;
    }

    .login-logo-img {
        height: 64px;
        max-width: 90px;
    }

    .gujarati-title {
        font-size: 1.18rem;
    }

    .subtitle-text {
        font-size: 0.98rem;
    }

    .form-control {
        height: 42px;
        font-size: 0.88rem;
    }

    .btn-login {
        height: 44px;
        font-size: 0.90rem;
    }

    /* Reduced Height Footer on Mobile */
    .app-footer {
        padding: 5px 10px;
        height: var(--footer-height);
    }

    .footer-copyright {
        font-size: 0.68rem;
    }
}

/* Extra Small Screens (<= 360px) */
@media (max-width: 360px) {
    .header-container {
        padding: 0 6px;
        gap: 4px;
    }

    .brand-title {
        font-size: 0.74rem;
    }

    .module-card {
        padding: 10px 12px !important;
        gap: 10px !important;
    }

    .module-card-title {
        font-size: 0.88rem !important;
    }
}


/* ==========================================================================
   Collection Details & Form Styles (Virar Kalakrida Theme)
   Left Side Caption and Right Side Field Layout (Responsive 2-Col Grid)
   ========================================================================== */

.collection-container {
    max-width: 1140px;
    margin: 0 auto;
    width: 100%;
    padding: 24px 16px 40px;
    box-sizing: border-box;
}

/* Page Top Header Bar */
.page-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}

.page-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-back-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    background: var(--glass-card-bg);
    border: 1px solid var(--glass-card-border);
    color: var(--text-main);
    font-size: 0.84rem;
    font-weight: 700;
    transition: all 0.18s ease;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.05);
}

.btn-back-nav:hover {
    background: var(--cherry-100);
    color: var(--cherry-800);
    border-color: var(--cherry-400);
    transform: translateX(-2px);
}

[data-theme="dark"] .btn-back-nav:hover {
    background: rgba(37, 99, 235, 0.25);
    color: #bae6fd;
    border-color: rgba(56, 189, 248, 0.45);
}

.page-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.015em;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--cherry-600);
    margin-top: 2px;
}

[data-theme="dark"] .page-subtitle {
    color: var(--cherry-400);
}

.page-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--cherry-50);
    color: var(--cherry-800);
    border: 1px solid var(--cherry-200);
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 700;
}

[data-theme="dark"] .page-meta-badge {
    background: rgba(10, 25, 60, 0.65);
    border-color: rgba(56, 189, 248, 0.35);
    color: #bae6fd;
}

/* Main Collection Form Card */
.collection-form-card {
    background: var(--glass-card-bg);
    backdrop-filter: var(--glass-card-backdrop);
    -webkit-backdrop-filter: var(--glass-card-backdrop);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-card-shadow);
    border: 1.5px solid var(--glass-card-border);
    padding: 32px 34px;
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
    width: 100%;
    box-sizing: border-box;
}

.collection-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--btn-gradient);
}

/* Section Header Dividers */
.form-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px 0 18px;
    padding-bottom: 10px;
    border-bottom: 1.5px solid rgba(37, 99, 235, 0.16);
}

.form-section-header:first-of-type {
    margin-top: 0;
}

.section-icon-badge {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--cherry-100);
    color: var(--cherry-800);
    border: 1px solid var(--cherry-300);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

[data-theme="dark"] .section-icon-badge {
    background: rgba(37, 99, 235, 0.25);
    color: #bae6fd;
    border-color: rgba(56, 189, 248, 0.4);
}

.section-title {
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.section-subtext {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--cherry-600);
    margin-left: auto;
}

[data-theme="dark"] .section-subtext {
    color: var(--cherry-400);
}

/* 2-Column Responsive Layout: Left Caption, Right Field */
.form-row-2col {
    display: grid;
    grid-template-columns: 210px 1fr;
    align-items: center;
    gap: 18px;
    margin-bottom: 14px;
    position: relative;
}

.form-row-2col.align-top {
    align-items: flex-start;
}

.form-caption {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-label);
    text-align: right;
    padding-right: 6px;
    line-height: 1.35;
    user-select: none;
}

.form-caption .caption-sub {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 2px;
}

.form-field-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    position: relative;
    box-sizing: border-box;
}

.form-field-wrap.flex-wrap {
    flex-wrap: wrap;
}

/* Mode Switchers (Segmented Radio Pills) */
.segmented-mode-wrap {
    display: inline-flex;
    background: var(--glass-input-bg);
    border: 1.5px solid var(--cherry-200);
    border-radius: var(--radius-md);
    padding: 3px;
    gap: 4px;
}

[data-theme="dark"] .segmented-mode-wrap {
    border-color: rgba(56, 189, 248, 0.35);
    background: rgba(10, 25, 60, 0.75);
}

.segmented-option {
    position: relative;
    cursor: pointer;
}

.segmented-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segmented-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.16s ease;
    user-select: none;
}

.segmented-option input[type="radio"]:checked + .segmented-pill {
    background: var(--btn-gradient);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

/* Member Search Dropdown / Autocomplete Box */
.member-search-box {
    position: relative;
    width: 100%;
    max-width: 520px;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-icon-left {
    position: absolute;
    left: 12px;
    color: var(--cherry-400);
    pointer-events: none;
    z-index: 2;
}

.search-input-field {
    width: 100%;
    height: 42px;
    padding: 8px 36px 8px 38px;
    background-color: #ffffff !important;
    border: 1.5px solid var(--cherry-200);
    border-radius: var(--radius-md);
    color: var(--text-main) !important;
    font-size: 0.90rem;
    font-family: var(--font-sans);
    transition: all 0.15s ease-in-out;
}

.search-input-field:focus {
    outline: none;
    border-color: var(--cherry-600);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .search-input-field {
    background-color: rgba(10, 25, 60, 0.75) !important;
    border-color: rgba(56, 189, 248, 0.35);
    color: #ffffff !important;
}

[data-theme="dark"] .search-input-field:focus {
    background-color: rgba(15, 35, 75, 0.90) !important;
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.28);
}

.btn-clear-search {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--cherry-400);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    display: none;
}

.btn-clear-search:hover {
    color: var(--cherry-700);
}

/* Floating Results Dropdown */
.member-dropdown-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 360px;
    width: max-content;
    max-width: min(520px, 92vw);
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--modal-bg);
    border: 1.5px solid var(--modal-border);
    border-radius: var(--radius-md);
    box-shadow: 0 16px 36px rgba(6, 21, 45, 0.2);
    z-index: 100;
    display: none;
}

.member-item-option {
    padding: 7px 12px;
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
    cursor: pointer;
    transition: background 0.12s ease;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.member-item-option:last-child {
    border-bottom: none;
}

.member-item-option:hover,
.member-item-option.highlighted {
    background: var(--cherry-50);
}

[data-theme="dark"] .member-item-option:hover,
[data-theme="dark"] .member-item-option.highlighted {
    background: rgba(15, 35, 75, 0.7);
}

.member-name-text {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.25;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    width: 100%;
}

.member-area-text {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    line-height: 1.2;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
}

[data-theme="dark"] .member-area-text {
    color: #bae6fd;
    opacity: 0.78;
}

/* Button to View Family Details near Name */
.btn-view-family {
    height: 42px;
    padding: 0 16px;
    border-radius: var(--radius-md);
    background: var(--glass-card-bg);
    border: 1.5px solid var(--glass-card-border);
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.18s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.06);
    user-select: none;
}

.btn-view-family:hover:not(:disabled) {
    background: var(--cherry-100);
    color: var(--cherry-800);
    border-color: var(--cherry-500);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.btn-view-family:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

[data-theme="dark"] .btn-view-family:hover:not(:disabled) {
    background: rgba(37, 99, 235, 0.25);
    color: #bae6fd;
    border-color: rgba(56, 189, 248, 0.45);
}

/* Age Groups Breakdown Pills */
.age-groups-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.age-group-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 9999px;
    font-size: 0.80rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--cherry-200);
    color: var(--text-main);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.04);
}

[data-theme="dark"] .age-group-pill {
    background: rgba(10, 25, 60, 0.65);
    border-color: rgba(56, 189, 248, 0.3);
}

.age-group-pill.pill-below5 {
    border-color: #38bdf8;
    color: #0284c7;
    background: #f0f9ff;
}

.age-group-pill.pill-5to11 {
    border-color: #fbbf24;
    color: #b45309;
    background: #fffbeb;
}

.age-group-pill.pill-12above {
    border-color: #34d399;
    color: #059669;
    background: #ecfdf5;
}

.age-group-pill.pill-total {
    border-color: var(--cherry-400);
    color: var(--cherry-700);
    background: var(--cherry-50);
}

[data-theme="dark"] .age-group-pill.pill-below5 {
    background: rgba(2, 132, 199, 0.2);
    color: #7dd3fc;
    border-color: rgba(56, 189, 248, 0.4);
}

[data-theme="dark"] .age-group-pill.pill-5to11 {
    background: rgba(180, 83, 9, 0.2);
    color: #fde68a;
    border-color: rgba(251, 191, 36, 0.4);
}

[data-theme="dark"] .age-group-pill.pill-12above {
    background: rgba(5, 150, 105, 0.2);
    color: #a7f3d0;
    border-color: rgba(52, 211, 153, 0.4);
}

[data-theme="dark"] .age-group-pill.pill-total {
    background: rgba(37, 99, 235, 0.25);
    color: #bae6fd;
    border-color: rgba(56, 189, 248, 0.4);
}

.age-count-badge {
    background: #ffffff;
    border-radius: 9999px;
    padding: 1px 6px;
    font-size: 0.74rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .age-count-badge {
    background: rgba(0, 0, 0, 0.4);
}

/* Auto Receipt Badge */
.auto-receipt-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

[data-theme="dark"] .auto-receipt-badge {
    background: rgba(5, 150, 105, 0.2);
    color: #a7f3d0;
    border-color: rgba(52, 211, 153, 0.4);
}

/* Fee Items Section (2-Column Subgrid) */
.fee-items-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 24px;
    width: 100%;
}

.fee-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    align-items: center;
    gap: 12px;
}

.fee-caption {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-label);
    text-align: right;
    line-height: 1.25;
}

.fee-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.currency-prefix {
    position: absolute;
    left: 12px;
    font-weight: 700;
    color: var(--cherry-600);
    pointer-events: none;
    font-size: 0.88rem;
}

[data-theme="dark"] .currency-prefix {
    color: var(--cherry-400);
}

.fee-input-field {
    width: 100%;
    height: 40px;
    padding: 6px 12px 6px 30px;
    background-color: #ffffff !important;
    border: 1.5px solid var(--cherry-200);
    border-radius: var(--radius-md);
    color: var(--text-main) !important;
    font-size: 0.92rem;
    font-weight: 600;
    font-family: var(--font-sans);
    transition: all 0.15s ease;
    text-align: right;
}

.fee-input-field:focus {
    outline: none;
    border-color: var(--cherry-600);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .fee-input-field {
    background-color: rgba(10, 25, 60, 0.75) !important;
    border-color: rgba(56, 189, 248, 0.35);
    color: #ffffff !important;
}

[data-theme="dark"] .fee-input-field:focus {
    background-color: rgba(15, 35, 75, 0.90) !important;
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.28);
}

/* Total Collection Highlight Card */
.total-highlight-row {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1.5px dashed rgba(37, 99, 235, 0.22);
}

.total-display-card {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    background: var(--cherry-50);
    border: 1.5px solid var(--cherry-300);
    color: var(--text-main);
}

[data-theme="dark"] .total-display-card {
    background: rgba(10, 25, 60, 0.75);
    border-color: rgba(56, 189, 248, 0.45);
}

.total-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-label);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.total-amount-val {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--cherry-700);
    letter-spacing: -0.01em;
}

[data-theme="dark"] .total-amount-val {
    color: #38bdf8;
}

/* Form Action Buttons Bar */
.form-actions-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1.5px solid rgba(37, 99, 235, 0.16);
}

.btn-submit-collection {
    height: 46px;
    padding: 0 28px;
    font-size: 0.96rem;
    font-weight: 700;
}

.btn-reset-form {
    height: 46px;
    padding: 0 20px;
    font-size: 0.90rem;
    font-weight: 700;
}

/* Family Details Modal Table */
.family-modal-dialog {
    max-width: 620px;
    width: 100%;
}

.family-table-wrap {
    overflow-x: auto;
    max-height: 380px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-card-border);
    margin-top: 10px;
}

.family-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    table-layout: fixed;
}

.family-table th {
    background: var(--cherry-100);
    color: var(--cherry-950);
    font-weight: 700;
    text-align: left;
    padding: 8px 10px;
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 1.5px solid var(--cherry-300);
}

[data-theme="dark"] .family-table th {
    background: rgba(10, 25, 60, 0.95);
    color: #bae6fd;
    border-bottom-color: rgba(56, 189, 248, 0.4);
}

.family-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
    color: var(--text-main);
    white-space: nowrap;
}

.family-table tr:hover td {
    background: var(--cherry-50);
}

[data-theme="dark"] .family-table tr:hover td {
    background: rgba(15, 35, 75, 0.45);
}

.family-col-srno {
    width: 48px;
    text-align: center;
}

.family-col-name {
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.family-col-relation {
    width: 130px;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.family-col-age {
    width: 60px;
    text-align: center;
    font-weight: 700;
}

.family-name-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    white-space: nowrap;
}

.family-name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    color: var(--text-main);
}

.family-seq-badge {
    display: inline-block;
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    border-radius: 50%;
    background: var(--cherry-200);
    color: var(--cherry-900);
    font-weight: 700;
    font-size: 0.74rem;
}

[data-theme="dark"] .family-seq-badge {
    background: rgba(37, 99, 235, 0.35);
    color: #bae6fd;
}

.hof-pill {
    font-size: 0.66rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 9999px;
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    flex-shrink: 0;
}

[data-theme="dark"] .hof-pill {
    background: rgba(5, 150, 105, 0.2);
    color: #a7f3d0;
    border-color: rgba(52, 211, 153, 0.4);
}

/* Recent Collections Summary Section */
.recent-collections-card {
    background: var(--glass-card-bg);
    backdrop-filter: var(--glass-card-backdrop);
    -webkit-backdrop-filter: var(--glass-card-backdrop);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-card-shadow);
    border: 1.5px solid var(--glass-card-border);
    padding: 20px 22px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 24px;
}

.recent-collections-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.recent-table-wrap {
    overflow-x: auto;
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-card-border);
}

.recent-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    white-space: nowrap;
}

.recent-table th {
    background: var(--cherry-100);
    color: var(--cherry-950);
    font-weight: 700;
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1.5px solid var(--cherry-300);
}

[data-theme="dark"] .recent-table th {
    background: rgba(10, 25, 60, 0.95);
    color: #bae6fd;
    border-bottom-color: rgba(56, 189, 248, 0.4);
}

.recent-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
    color: var(--text-main);
}

.recent-table tr:hover td {
    background: var(--cherry-50);
}

[data-theme="dark"] .recent-table tr:hover td {
    background: rgba(15, 35, 75, 0.45);
}

/* Responsive Overrides for Collection Form (<= 768px) */
@media (max-width: 768px) {
    .collection-container {
        padding: 14px 10px 30px;
    }

    .collection-form-card {
        padding: 20px 16px;
        border-radius: var(--radius-lg);
    }

    .form-row-2col {
        grid-template-columns: 1fr;
        gap: 6px;
        margin-bottom: 16px;
        align-items: flex-start;
    }

    .form-caption {
        text-align: left;
        padding-right: 0;
        font-size: 0.84rem;
    }

    .form-field-wrap {
        width: 100%;
    }

    .fee-items-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .fee-row {
        grid-template-columns: 140px 1fr;
        gap: 8px;
    }

    .fee-caption {
        font-size: 0.80rem;
    }

    .member-search-box {
        max-width: 100%;
    }

    .form-actions-bar {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .btn-submit-collection,
    .btn-reset-form {
        width: 100%;
        justify-content: center;
    }

    .page-title {
        font-size: 1.15rem;
    }
}

@media (max-width: 480px) {
    .fee-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .fee-caption {
        text-align: left;
    }

    .total-display-card {
        width: 100%;
        justify-content: space-between;
        box-sizing: border-box;
    }
}


/* ==========================================================================
   Compact Single-Screen Form Styles for Collection Details
   ========================================================================== */

.compact-form-card {
    padding: 16px 20px !important;
    margin-bottom: 18px !important;
    border-radius: var(--radius-lg) !important;
}

.form-divider-line {
    border: none;
    border-top: 1px solid rgba(37, 99, 235, 0.18);
    margin: 8px 0;
    width: 100%;
}

[data-theme="dark"] .form-divider-line {
    border-top-color: rgba(56, 189, 248, 0.22);
}

.form-row-compact {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 7px;
    width: 100%;
    flex-wrap: nowrap;
}

.form-item-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.form-item-inline.flex-grow-1 {
    flex-grow: 1;
    flex-shrink: 1;
    min-width: 0;
}

.form-caption-compact {
    font-size: 0.80rem;
    font-weight: 700;
    color: var(--text-label);
    white-space: nowrap;
    flex-shrink: 0;
}

.form-control-compact {
    height: 32px !important;
    padding: 3px 8px !important;
    font-size: 0.84rem !important;
    border-radius: 6px !important;
    line-height: 1.2;
}

.compact-pill {
    padding: 3px 10px !important;
    font-size: 0.78rem !important;
    border-radius: 5px !important;
}

.compact-search-box {
    position: relative;
    width: 280px;
    flex-shrink: 0;
}

.compact-search-input {
    height: 32px !important;
    padding: 3px 26px 3px 28px !important;
    font-size: 0.84rem !important;
    border-radius: 6px !important;
}

.compact-search-icon {
    position: absolute;
    left: 8px;
    color: var(--cherry-400);
    pointer-events: none;
    z-index: 2;
}

.btn-view-family.compact-btn {
    height: 32px !important;
    padding: 0 10px !important;
    font-size: 0.78rem !important;
    border-radius: 6px !important;
    white-space: nowrap;
}

.age-group-pill.compact-age-pill {
    padding: 2px 8px !important;
    font-size: 0.74rem !important;
    border-radius: 9999px;
}

.age-count-badge.compact-count-badge {
    padding: 0 4px !important;
    font-size: 0.70rem !important;
}

/* Type and Family ID Row (Strictly ONE single horizontal line) */
.row-type-family {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
    margin-bottom: 8px !important;
}

.type-segmented-wrap {
    flex: 0 0 auto !important;
    width: auto !important;
}

.family-id-box-wrap {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex: 0 0 auto !important;
    margin-left: auto;
}

.family-id-prefix {
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--cherry-700);
    white-space: nowrap;
    user-select: none;
}

[data-theme="dark"] .family-id-prefix {
    color: #38bdf8;
}

.family-id-input {
    width: 65px !important;
    height: 32px !important;
    text-align: center !important;
    font-weight: 800 !important;
    font-size: 0.88rem !important;
    color: var(--cherry-900) !important;
    background-color: #ffffff !important;
    border: 1.5px solid var(--cherry-300) !important;
    border-radius: 6px !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .family-id-input {
    background-color: rgba(10, 25, 60, 0.85) !important;
    border-color: rgba(56, 189, 248, 0.45) !important;
    color: #bae6fd !important;
}

/* Receipt Number & Date Row (Single line on both Desktop and Mobile) */
.receipt-date-line {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

/* Mobile No and Generic Inline Field (Caption & Textbox on ONE line) */
.inline-field-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
}

.inline-field-group .form-caption-compact {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

.inline-field-group input {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
}

/* Address Expandable: 32px single line default, expands on focus to fit */
.address-inline-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
}

.address-inline-group .form-caption-compact {
    padding-top: 6px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

.address-expandable {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 140px !important;
    resize: none !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    line-height: 24px !important;
    padding: 3px 8px !important;
    font-family: var(--font-sans) !important;
    transition: height 0.22s ease, box-shadow 0.2s ease !important;
}

.address-expandable:focus,
.address-expandable.address-expanded {
    height: 75px !important;
    min-height: 75px !important;
    white-space: normal !important;
    overflow-y: auto !important;
    line-height: 1.35 !important;
}

/* Row Receipt & Payment (Receipt Mode, Receipt Number + Date, Pay Mode on ONE row on Desktop) */
.row-receipt-pay {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    width: 100% !important;
    flex-wrap: wrap !important;
}

.receipt-mode-inline-group,
.pay-mode-inline-group {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    width: auto !important;
    flex: 0 0 auto !important;
    flex-wrap: nowrap !important;
}

.receipt-mode-inline-group .form-caption-compact,
.pay-mode-inline-group .form-caption-compact {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

.receipt-mode-inline-group .segmented-mode-wrap,
.pay-mode-inline-group .segmented-mode-wrap {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    width: auto !important;
}

.receipt-mode-inline-group .segmented-option,
.pay-mode-inline-group .segmented-option {
    flex: 0 0 auto !important;
    text-align: center !important;
}

.date-input-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.date-display-field {
    width: 118px !important;
    padding-right: 28px !important;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.hidden-native-date {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
    border: 0;
    padding: 0;
    margin: 0;
}

.btn-date-calendar {
    position: absolute;
    right: 5px;
    background: transparent;
    border: none;
    color: var(--cherry-600);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    border-radius: 4px;
    transition: color 0.15s ease;
}

.btn-date-calendar:hover {
    color: var(--cherry-800);
}

[data-theme="dark"] .btn-date-calendar {
    color: var(--cherry-400);
}

[data-theme="dark"] .btn-date-calendar:hover {
    color: #bae6fd;
}

/* Single Card for Amount Heads */
.amount-heads-card {
    background: rgba(255, 255, 255, 0.45);
    border: 1.5px solid rgba(37, 99, 235, 0.16);
    border-radius: var(--radius-md);
    padding: 8px 10px;
    margin: 4px 0 6px 0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: all 0.2s ease;
}

[data-theme="dark"] .amount-heads-card {
    background: rgba(10, 25, 60, 0.55);
    border-color: rgba(56, 189, 248, 0.24);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* 5-Column Compact Fee Grid */
.fee-grid-compact {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px 12px;
    width: 100%;
}

.fee-item-box {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 6px;
    padding: 3px 6px;
}

[data-theme="dark"] .fee-item-box {
    background: rgba(10, 25, 60, 0.45);
    border-color: rgba(56, 189, 248, 0.22);
}

.fee-label-compact {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-label);
    white-space: nowrap;
    width: 85px;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
    text-align: right;
}

.fee-input-wrap.compact-fee-wrap {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.currency-prefix-compact {
    position: absolute;
    left: 6px;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--cherry-600);
    pointer-events: none;
}

[data-theme="dark"] .currency-prefix-compact {
    color: var(--cherry-400);
}

.fee-input-compact {
    width: 100%;
    height: 28px !important;
    padding: 2px 6px 2px 18px !important;
    font-size: 0.82rem !important;
    font-weight: 600;
    text-align: right;
    border-radius: 5px !important;
}

/* Bottom Actions & Total Row */
.bottom-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(37, 99, 235, 0.18);
    gap: 12px;
    width: 100%;
}

[data-theme="dark"] .bottom-actions-row {
    border-top-color: rgba(56, 189, 248, 0.22);
}

.total-display-compact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 3px 12px;
    border-radius: 6px;
    background: var(--cherry-50);
    border: 1px solid var(--cherry-300);
    flex-shrink: 0;
}

[data-theme="dark"] .total-display-compact {
    background: rgba(10, 25, 60, 0.7);
    border-color: rgba(56, 189, 248, 0.35);
}

.total-label-compact {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-label);
    text-transform: uppercase;
}

.total-amount-compact {
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--cherry-700);
}

[data-theme="dark"] .total-amount-compact {
    color: #38bdf8;
}

.remarks-inline-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-buttons-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-submit-compact {
    height: 34px !important;
    padding: 0 18px !important;
    font-size: 0.84rem !important;
    border-radius: 6px !important;
    font-weight: 700;
}

.btn-reset-compact {
    height: 34px !important;
    padding: 0 14px !important;
    font-size: 0.80rem !important;
    border-radius: 6px !important;
    font-weight: 700;
}

/* Responsive adjustments for compact layout */
@media (max-width: 1024px) {
    .fee-grid-compact {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .collection-container {
        padding: 12px 10px 24px;
    }

    .compact-form-card {
        padding: 12px 10px !important;
    }

    /* Mobile Header: Remove Subtitle, Keep Title and Short FY Badge Compact with Zero Overlap */
    .page-top-bar {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 6px !important;
        margin-bottom: 8px !important;
        width: 100% !important;
        flex-wrap: nowrap !important;
    }

    .page-title-wrap {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .btn-back-nav {
        padding: 4px 7px !important;
        font-size: 0.74rem !important;
        flex-shrink: 0 !important;
        gap: 4px !important;
    }

    .page-title-text-wrap {
        min-width: 0 !important;
        flex: 1 1 auto !important;
        overflow: hidden !important;
    }

    .page-title {
        font-size: 0.96rem !important;
        margin: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        line-height: 1.2 !important;
    }

    /* Remove New Receipt Entry & Samaj Member / Guest Tax Collection on mobile */
    .page-subtitle {
        display: none !important;
    }

    .page-meta-badge {
        font-size: 0.70rem !important;
        padding: 3px 6px !important;
        margin: 0 !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        gap: 4px !important;
    }

    /* Base compact mobile flow */
    .form-row-compact {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
        margin-bottom: 5px;
        width: 100%;
    }

    .form-item-inline {
        display: flex;
        align-items: center;
        width: 100%;
        flex-wrap: wrap;
        gap: 6px;
    }

    .form-item-inline.flex-grow-1 {
        width: 100%;
    }

    .form-item-inline input[type="text"],
    .form-item-inline input[type="number"] {
        width: 100%;
        flex: 1 1 auto;
    }

    .compact-search-box {
        width: 100%;
    }

    .member-dropdown-list {
        min-width: 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
    }

    .btn-view-family.compact-btn {
        width: 100%;
        justify-content: center;
    }

    .age-groups-wrap {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 6px;
    }

    /* Fit Member | Guest | Family ID in ONE single horizontal line */
    .row-type-family {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        width: 100% !important;
        flex-wrap: nowrap !important;
        margin-bottom: 5px !important;
    }

    .row-type-family .type-segmented-wrap,
    .row-type-family .segmented-mode-wrap {
        flex: 0 0 auto !important;
        width: auto !important;
    }

    .family-id-box-wrap {
        display: inline-flex !important;
        align-items: center !important;
        gap: 4px !important;
        flex: 0 0 auto !important;
    }

    .family-id-input {
        width: 55px !important;
        flex: 0 0 55px !important;
    }

    /* Mobile No: Caption & Textbox in ONE line */
    .row-mobile-wrap,
    .row-mobile-wrap .inline-field-group {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
        width: 100% !important;
        flex-wrap: nowrap !important;
        margin-bottom: 3px !important;
    }

    .row-mobile-wrap .form-caption-compact {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        margin: 0 !important;
    }

    .row-mobile-wrap input[type="text"] {
        width: auto !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    /* Address: Caption & Textarea in ONE line */
    .row-address-wrap,
    .row-address-wrap .address-inline-group {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 8px !important;
        width: 100% !important;
        flex-wrap: nowrap !important;
        margin-bottom: 3px !important;
    }

    .row-address-wrap .form-caption-compact {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        padding-top: 5px !important;
        margin: 0 !important;
    }

    .row-address-wrap textarea.address-expandable {
        width: auto !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    /* Receipt Mode: Caption & Buttons in ONE line */
    .receipt-mode-inline-group {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
        width: 100% !important;
        flex-wrap: nowrap !important;
        margin: 2px 0 !important;
    }

    .receipt-mode-inline-group .form-caption-compact {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        margin: 0 !important;
    }

    .receipt-mode-inline-group .segmented-mode-wrap {
        flex: 1 1 auto !important;
        display: inline-flex !important;
        width: auto !important;
        min-width: 0 !important;
    }

    .receipt-mode-inline-group .segmented-option {
        flex: 1 1 0 !important;
        min-width: 0 !important;
    }

    .receipt-mode-inline-group .segmented-pill {
        width: 100% !important;
        padding: 4px 6px !important;
        font-size: 0.74rem !important;
        text-align: center !important;
        justify-content: center !important;
    }

    /* Pay Mode: Caption & Buttons in ONE line */
    .pay-mode-inline-group {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
        width: 100% !important;
        flex-wrap: nowrap !important;
        margin: 2px 0 !important;
    }

    .pay-mode-inline-group .form-caption-compact {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        margin: 0 !important;
    }

    .pay-mode-inline-group .segmented-mode-wrap {
        flex: 1 1 auto !important;
        display: inline-flex !important;
        width: auto !important;
        min-width: 0 !important;
    }

    .pay-mode-inline-group .segmented-option {
        flex: 1 1 0 !important;
        min-width: 0 !important;
    }

    .pay-mode-inline-group .segmented-pill {
        width: 100% !important;
        padding: 4px 6px !important;
        font-size: 0.74rem !important;
        text-align: center !important;
        justify-content: center !important;
    }

    /* Fit Receipt Number | Date in ONE line */
    .receipt-date-line {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        margin: 3px 0 !important;
        flex-wrap: nowrap !important;
    }

    .receipt-date-line .form-item-inline {
        width: auto !important;
        flex: 1 1 auto !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 4px !important;
        flex-wrap: nowrap !important;
    }

    .receipt-date-line input[type="number"] {
        width: 58px !important;
        flex: 0 0 58px !important;
    }

    .date-input-wrap {
        flex: 1 1 auto !important;
        width: 100% !important;
        min-width: 85px !important;
    }

    .date-display-field {
        width: 100% !important;
        min-width: 80px !important;
    }

    /* Reduced vertical line spacing from Pay Mode to Remarks */
    .form-divider-line {
        margin: 3px 0 !important;
    }

    .row-receipt-pay {
        gap: 3px !important;
        margin-bottom: 3px !important;
    }

    .amount-heads-card {
        padding: 4px 6px !important;
        margin: 3px 0 !important;
    }

    .fee-grid-compact {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 4px 6px !important;
    }

    .fee-item-box {
        padding: 2px 4px !important;
        gap: 3px !important;
    }

    .fee-label-compact {
        font-size: 0.70rem !important;
        width: 66px !important;
    }

    .fee-input-compact {
        height: 25px !important;
        font-size: 0.78rem !important;
        padding: 1px 4px 1px 13px !important;
    }

    .currency-prefix-compact {
        font-size: 0.70rem !important;
        left: 4px !important;
    }

    .bottom-actions-row {
        flex-direction: column;
        align-items: stretch;
        gap: 4px !important;
        margin-top: 3px !important;
        padding-top: 3px !important;
    }

    .total-display-compact {
        width: 100%;
        justify-content: space-between;
        box-sizing: border-box;
        padding: 2px 8px !important;
    }

    .total-amount-compact {
        font-size: 1.05rem !important;
    }

    .remarks-inline-wrap {
        width: 100%;
        margin: 0;
    }

    .remarks-inline-wrap input {
        width: 100% !important;
        height: 30px !important;
        font-size: 0.80rem !important;
    }

    .action-buttons-wrap {
        width: 100%;
        display: flex;
        gap: 6px !important;
    }

    .btn-submit-compact,
    .btn-reset-compact {
        flex: 1;
        justify-content: center;
        height: 35px !important;
    }

    /* Family Details Modal Mobile View: Srno | Name (First & Middle) | Age in ONE single line */
    .family-modal-dialog {
        width: calc(100vw - 20px) !important;
        max-width: 460px !important;
        padding: 14px 12px !important;
        margin: 10px auto !important;
        box-sizing: border-box !important;
    }

    .family-modal-dialog .modal-header {
        padding-bottom: 8px !important;
        margin-bottom: 6px !important;
    }

    .family-modal-dialog .modal-title {
        font-size: 0.95rem !important;
    }

    .family-modal-dialog .modal-subtitle {
        display: none !important;
    }

    .family-modal-dialog .modal-icon-badge {
        width: 30px !important;
        height: 30px !important;
    }

    .family-table-wrap {
        max-height: 320px !important;
        margin-top: 6px !important;
    }

    .family-table {
        font-size: 0.80rem !important;
        table-layout: fixed !important;
        width: 100% !important;
    }

    .family-table th {
        padding: 6px 4px !important;
        font-size: 0.74rem !important;
    }

    .family-table td {
        padding: 6px 4px !important;
        font-size: 0.80rem !important;
        line-height: 1.25 !important;
        white-space: nowrap !important;
    }

    /* Hide Relation on mobile: only Srno | Name (First & Middle) | Age */
    .family-col-relation {
        display: none !important;
    }

    .family-col-srno {
        width: 36px !important;
        text-align: center !important;
        padding: 6px 2px !important;
    }

    .family-col-age {
        width: 44px !important;
        text-align: center !important;
        padding: 6px 2px !important;
        font-size: 0.82rem !important;
    }

    .family-col-name {
        padding: 6px 6px !important;
        overflow: hidden !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
    }

    .family-name-cell {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        overflow: hidden !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
    }

    .family-name-text {
        overflow: hidden !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
        font-size: 0.82rem !important;
    }

    .family-seq-badge {
        width: 19px !important;
        height: 19px !important;
        line-height: 19px !important;
        font-size: 0.68rem !important;
    }

    .hof-pill {
        font-size: 0.60rem !important;
        padding: 1px 3px !important;
        flex-shrink: 0 !important;
    }
}

@media (max-width: 480px) {
    /* 2 compact columns on mobile to drastically reduce vertical space */
    .fee-grid-compact {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 3px 4px !important;
    }

    .fee-item-box {
        padding: 1px 3px !important;
        gap: 2px !important;
    }

    .fee-label-compact {
        width: 60px !important;
        font-size: 0.67rem !important;
    }

    .fee-input-compact {
        height: 24px !important;
        font-size: 0.75rem !important;
        padding: 1px 3px 1px 11px !important;
    }

    .currency-prefix-compact {
        font-size: 0.66rem !important;
        left: 3px !important;
    }

    .amount-heads-card {
        padding: 3px 4px !important;
        margin: 2px 0 !important;
    }

    .form-divider-line {
        margin: 2px 0 !important;
    }

    /* Keep segmented wraps flexible so Caption & Buttons stay strictly on ONE line */
    .row-type-family .type-segmented-wrap,
    .row-type-family .segmented-mode-wrap {
        width: auto !important;
        flex: 0 0 auto !important;
    }

    .receipt-mode-inline-group .segmented-mode-wrap,
    .pay-mode-inline-group .segmented-mode-wrap {
        width: auto !important;
        flex: 1 1 auto !important;
        display: inline-flex !important;
    }

    .segmented-option {
        flex: 1;
        text-align: center;
    }

    .segmented-pill {
        width: 100%;
        justify-content: center;
        padding: 4px 6px !important;
        font-size: 0.72rem !important;
    }

    .form-caption-compact {
        font-size: 0.75rem;
    }

    .bottom-actions-row {
        gap: 4px !important;
        margin-top: 2px !important;
        padding-top: 2px !important;
    }

    .btn-submit-compact,
    .btn-reset-compact {
        height: 34px !important;
        font-size: 0.78rem !important;
    }
}

@media (max-width: 360px) {
    /* Hide 'Dashboard' text on very small screens, keeping the back icon */
    .btn-back-text {
        display: none !important;
    }

    .btn-back-nav {
        padding: 4px 6px !important;
    }

    .page-title {
        font-size: 0.88rem !important;
    }
}

/* ==========================================================================
   Official Receipt Component & Modal Styles
   Matches physical/digital specification (from media_1795344811353_91588e74.jpg)
   ========================================================================== */
.receipt-paper {
    width: 100%;
    max-width: 590px;
    background: #ffffff !important;
    color: #000000 !important;
    border: 1.5px solid #000000;
    padding: 24px 26px 20px;
    box-sizing: border-box;
    position: relative;
    margin: 0 auto;
    font-family: 'Times New Roman', Times, Georgia, serif;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

.receipt-header-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.receipt-logo-cell {
    width: 90px;
    vertical-align: middle;
    text-align: center;
    padding-right: 12px;
}

.receipt-logo-img {
    height: 82px;
    width: auto;
    max-width: 90px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.receipt-title-cell {
    vertical-align: middle;
    text-align: center;
}

.receipt-gujarati-title {
    font-family: 'Anek Gujarati', 'Noto Sans Gujarati', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: #000000 !important;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}

.receipt-reg-no {
    font-size: 0.84rem;
    font-weight: 700;
    color: #002b80 !important;
    letter-spacing: 0.01em;
    line-height: 1.3;
}

.receipt-pill-wrap {
    text-align: center;
    margin: 8px 0 14px;
}

.receipt-pill {
    display: inline-block;
    background: #6e0012 !important;
    color: #ffffff !important;
    font-family: 'Times New Roman', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 3px 34px;
    border-radius: 9999px;
    letter-spacing: 0.04em;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.receipt-meta-grid {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.98rem;
    line-height: 1.4;
    color: #000000 !important;
}

.receipt-meta-grid .meta-left,
.receipt-meta-grid .meta-right {
    font-weight: 700;
}

.receipt-meta-grid .meta-right {
    text-align: right;
}

.receipt-payer-para {
    font-size: 0.98rem;
    line-height: 1.5;
    text-align: justify;
    margin-bottom: 12px;
    color: #000000 !important;
}

.payer-name-highlight {
    font-weight: 800;
    font-style: italic;
}

.amount-highlight {
    font-weight: 800;
}

.particulars-wrap {
    position: relative;
    margin: 8px 0 10px;
}

.watermark-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    object-fit: contain;
    opacity: 0.12;
    pointer-events: none;
    z-index: 0;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.receipt-table {
    position: relative;
    z-index: 1;
    width: 100%;
    border-collapse: collapse;
    font-size: 0.96rem;
    line-height: 1.35;
    color: #000000 !important;
}

.receipt-table th {
    font-weight: 800;
    border-top: 1.5px solid #000000;
    border-bottom: 1.5px solid #000000;
    padding: 5px 8px;
    color: #000000 !important;
    background: transparent !important;
}

.receipt-table td {
    padding: 3.5px 8px;
    color: #000000 !important;
    background: transparent !important;
}

.col-particular {
    text-align: left;
    width: 72%;
    padding-left: 36px !important;
}

.col-amount {
    text-align: right;
    width: 28%;
    padding-right: 20px !important;
    font-weight: 700;
}

.total-amount-row {
    background-color: #00f0ff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.total-amount-row td {
    border-top: 1.5px solid #000000 !important;
    border-bottom: 3.5px double #000000 !important;
    font-weight: 800;
    font-size: 1.02rem;
    padding: 5px 8px;
    color: #000000 !important;
    background-color: #00f0ff !important;
}

.total-amount-row td.col-particular {
    padding-left: 36px !important;
}

.total-amount-row td.col-amount {
    padding-right: 20px !important;
}

.receipt-words-line {
    font-size: 0.94rem;
    margin: 10px 0 12px;
    padding-left: 4px;
    color: #000000 !important;
}

.receipt-footer-grid {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 0.94rem;
    line-height: 1.45;
    color: #000000 !important;
}

.footer-payment-info {
    flex: 1;
}

.footer-signature-block {
    text-align: right;
    padding-bottom: 4px;
    min-width: 180px;
}

.signature-text {
    font-size: 0.95rem;
    font-weight: 700;
}

.btn-whatsapp-share {
    background: #25d366 !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-whatsapp-share:hover {
    background: #20ba5a !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

/* Recent Collections Table Receipt Action Buttons */
.btn-receipt-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.4;
}

.btn-receipt-view {
    background: rgba(139, 21, 56, 0.08);
    color: var(--cherry-800);
    border-color: rgba(139, 21, 56, 0.2);
}

.btn-receipt-view:hover {
    background: var(--cherry-800);
    color: #ffffff;
}

.btn-receipt-wa {
    background: rgba(37, 211, 102, 0.12);
    color: #0d8038;
    border-color: rgba(37, 211, 102, 0.3);
}

.btn-receipt-wa:hover {
    background: #25d366;
    color: #ffffff;
}

.share-count-badge {
    background: #0d8038;
    color: #ffffff;
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 9999px;
    font-weight: 700;
    margin-left: 2px;
}

.btn-receipt-wa:hover .share-count-badge {
    background: #ffffff;
    color: #0d8038;
}

/* Modal Receipt Styles */
.online-receipt-modal-dialog {
    max-width: 820px;
    width: 95%;
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
}

.online-receipt-modal-body {
    padding: 20px;
    overflow-y: auto;
    background: #f1f5f9;
    display: flex;
    justify-content: center;
}

.receipt-preview-container {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    padding: 8px;
    width: 100%;
    max-width: 700px;
}
