/* ===== PROFESSIONAL VARIABLES ===== */
:root {
    /* Institutional Colour Palette */
    --navy-primary: #0A2342;
    --navy-dark: #07192F;
    --navy-light: #1A365D;
    --accent-teal: #007A7C;
    --accent-gold: #B8860B;
    --accent-success: #006B54;
    
    /* Professional Neutrals */
    --grey-50: #F9FAFB;
    --grey-100: #F3F4F6;
    --grey-200: #E5E7EB;
    --grey-300: #D1D5DB;
    --grey-400: #9CA3AF;
    --grey-500: #6B7280;
    --grey-600: #4B5563;
    --grey-700: #374151;
    --grey-800: #1F2937;
    
    /* Status Colours */
    --success: #006B54;
    --warning: #B8860B;
    --error: #DC2626;
    --info: #1D4ED8;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    
    /* Typography */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    
    /* Borders & Shadows */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Safe Area Insets */
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
    color: var(--grey-800);
    background-color: var(--grey-50);
    min-height: 100vh;
    padding-top: var(--safe-area-top);
    padding-bottom: var(--safe-area-bottom);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    color: var(--navy-primary);
}

h1 {
    font-size: var(--font-size-4xl);
    font-weight: 700;
}

h2 {
    font-size: var(--font-size-3xl);
}

h3 {
    font-size: var(--font-size-2xl);
}

h4 {
    font-size: var(--font-size-xl);
}

.text-lead {
    font-size: var(--font-size-lg);
    color: var(--grey-600);
    line-height: 1.6;
}

.text-small {
    font-size: var(--font-size-sm);
    color: var(--grey-500);
}

.text-micro {
    font-size: var(--font-size-xs);
    color: var(--grey-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== LAYOUT ===== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-narrow {
    max-width: 900px;
}

.section {
    padding: var(--space-2xl) 0;
}

.section-tight {
    padding: var(--space-xl) 0;
}

/* ===== COMPONENTS ===== */
/* Cards */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--grey-200);
    transition: var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--grey-200);
}

.card-body {
    padding: var(--space-lg);
}

.card-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--grey-200);
    background: var(--grey-50);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: var(--font-size-base);
    cursor: pointer;
    transition: var(--transition-base);
    border: 2px solid transparent;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--navy-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--navy-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: white;
    color: var(--navy-primary);
    border-color: var(--navy-primary);
}

.btn-secondary:hover {
    background-color: var(--grey-50);
}

.btn-accent {
    background-color: var(--accent-teal);
    color: white;
}

.btn-accent:hover {
    background-color: #006666;
}

.btn-outline {
    background-color: transparent;
    color: var(--navy-primary);
    border-color: var(--grey-300);
}

.btn-outline:hover {
    border-color: var(--navy-primary);
    background-color: var(--grey-50);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: var(--font-size-sm);
}

/* Forms */
.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 600;
    color: var(--grey-700);
    font-size: var(--font-size-sm);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--grey-300);
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: var(--font-size-base);
    transition: var(--transition-base);
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--navy-primary);
    box-shadow: 0 0 0 3px rgba(10, 35, 66, 0.1);
}

.form-control:disabled {
    background-color: var(--grey-100);
    color: var(--grey-400);
    cursor: not-allowed;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background-color: rgba(0, 107, 84, 0.1);
    color: var(--success);
}

.badge-warning {
    background-color: rgba(184, 134, 11, 0.1);
    color: var(--warning);
}

.badge-error {
    background-color: rgba(220, 38, 38, 0.1);
    color: var(--error);
}

.badge-info {
    background-color: rgba(29, 78, 216, 0.1);
    color: var(--info);
}

/* Tables */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
    border: 1px solid var(--grey-200);
    background: white;
    position: relative;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--grey-700);
    background-color: var(--grey-50);
    border-bottom: 1px solid var(--grey-200);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--grey-200);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover {
    background-color: var(--grey-50);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--grey-200);
    z-index: 1000;
    padding: 1rem 0;
    height: 72px;
    display: flex;
    align-items: center;
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: var(--navy-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: var(--font-size-xl);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--navy-primary), var(--navy-light));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.nav-links {
    display: flex;
    gap: var(--space-xl);
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--grey-600);
    font-weight: 500;
    transition: var(--transition-base);
    position: relative;
}

.nav-link:hover {
    color: var(--navy-primary);
}

.nav-link.active {
    color: var(--navy-primary);
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--navy-primary);
    border-radius: 1px;
}

/* Dashboard Navigation */
.dashboard-nav {
    background: white;
    border-bottom: 1px solid var(--grey-200);
    position: sticky;
    top: 72px;
    z-index: 999;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.dashboard-nav::-webkit-scrollbar {
    display: none;
}

.dashboard-nav-content {
    display: flex;
    gap: var(--space-xs);
    padding: var(--space-sm) 0;
    min-width: min-content;
}

.dashboard-nav-link {
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    color: var(--grey-600);
    font-weight: 500;
    border-radius: var(--radius-md);
    white-space: nowrap;
    transition: var(--transition-base);
    flex-shrink: 0;
}

.dashboard-nav-link:hover {
    background-color: var(--grey-100);
    color: var(--navy-primary);
}

.dashboard-nav-link.active {
    background-color: var(--navy-primary);
    color: white;
}

/* Statistics Cards */
.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid var(--grey-200);
    position: relative;
}

.stat-card-primary {
    border-left: 4px solid var(--navy-primary);
}

.stat-card-success {
    border-left: 4px solid var(--success);
}

.stat-card-warning {
    border-left: 4px solid var(--warning);
}

.stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--navy-primary);
    margin: var(--space-xs) 0;
}

.stat-label {
    color: var(--grey-600);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-change {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-sm);
    margin-top: var(--space-xs);
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--error);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: var(--space-md);
    animation: fadeIn 150ms ease-out;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: slideUp 200ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-xl);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--grey-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-body {
    padding: var(--space-lg);
}

.modal-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--grey-200);
    background: var(--grey-50);
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-xl);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.progress-steps::-webkit-scrollbar {
    display: none;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--grey-200);
    color: var(--grey-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--font-size-sm);
}

.step-number.active {
    background: var(--navy-primary);
    color: white;
}

.step-number.completed {
    background: var(--success);
    color: white;
}

.step-label {
    font-weight: 600;
    color: var(--grey-600);
    white-space: nowrap;
}

.step-label.active {
    color: var(--navy-primary);
}

.step-connector {
    flex: 1;
    height: 2px;
    background: var(--grey-200);
    margin: 0 var(--space-sm);
    min-width: 40px;
}

.step-connector.active {
    background: var(--navy-primary);
}

/* Compliance Badges */
.compliance-badges {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.compliance-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--grey-100);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    color: var(--grey-700);
    border-left: 3px solid var(--navy-primary);
}

/* Mobile Navigation Toggle */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    position: relative;
    cursor: pointer;
    z-index: 1001;
}

.mobile-nav-toggle span {
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--navy-primary);
    transition: var(--transition-base);
}

.mobile-nav-toggle span:nth-child(1) { top: 4px; }
.mobile-nav-toggle span:nth-child(2) { top: 11px; }
.mobile-nav-toggle span:nth-child(3) { bottom: 4px; }

.mobile-nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--grey-200);
    padding: 0.75rem var(--space-md);
    padding-bottom: calc(0.75rem + var(--safe-area-bottom));
    display: none;
    z-index: 999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.mobile-bottom-nav nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--grey-500);
    font-size: 0.625rem;
    gap: 0.25rem;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    flex: 1;
    text-align: center;
}

.mobile-bottom-nav a.active {
    color: var(--navy-primary);
    background: var(--grey-100);
}

.mobile-bottom-nav i {
    font-size: 1.25rem;
    margin-bottom: 0.125rem;
}

/* Inactivity Warning */
.inactivity-warning {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    animation: fadeIn 150ms ease-out;
}

.inactivity-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: slideUp 200ms ease-out;
}

.inactivity-countdown {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--navy-primary);
    margin: var(--space-md) 0;
    font-family: 'Space Grotesk', monospace;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid var(--grey-200);
    border-radius: 50%;
    border-top-color: var(--navy-primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Transfer Processing */
.transfer-processing {
    text-align: center;
    padding: var(--space-xl) 0;
}

.progress-bar {
    height: 4px;
    background: var(--grey-200);
    border-radius: 2px;
    overflow: hidden;
    margin: var(--space-lg) 0;
}

.progress-fill {
    height: 100%;
    background: var(--navy-primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Transfer Status */
.transfer-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

.transfer-status.success {
    background: rgba(0, 107, 84, 0.1);
    border-left: 4px solid var(--success);
}

.transfer-status.error {
    background: rgba(220, 38, 38, 0.1);
    border-left: 4px solid var(--error);
}

/* Document Cards */
.document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-md);
}

.document-card {
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    transition: var(--transition-base);
    background: white;
}

.document-card:hover {
    border-color: var(--navy-primary);
    box-shadow: var(--shadow-md);
}

.document-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--navy-primary), var(--navy-light));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: var(--space-md);
}

.document-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-md);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--grey-200);
}

/* Transaction Filters */
.transaction-filters {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}

.filter-group {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--grey-300);
    border-radius: var(--radius-md);
    background: white;
    font-size: var(--font-size-sm);
}

/* Time Display */
.time-display {
    font-family: 'Space Grotesk', monospace;
    color: var(--grey-600);
}

.time-display .date {
    font-size: var(--font-size-sm);
}

.time-display .time {
    font-size: var(--font-size-base);
    font-weight: 600;
}

/* ===== PAGE SPECIFIC STYLES ===== */
/* Homepage Hero */
.hero {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: linear-gradient(135deg, var(--navy-primary) 0%, var(--navy-light) 100%);
    opacity: 0.02;
    transform: rotate(15deg);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--grey-200);
}

.feature {
    display: flex;
    gap: var(--space-md);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--navy-primary), var(--navy-light));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

/* Dashboard Header */
.dashboard-header {
    background: linear-gradient(135deg, var(--navy-primary) 0%, var(--navy-dark) 100%);
    color: white;
    padding: var(--space-2xl) 0;
    margin-bottom: var(--space-xl);
}

.client-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.client-welcome h1 {
    color: white;
    margin-bottom: var(--space-xs);
}

.client-welcome p {
    color: rgba(255, 255, 255, 0.8);
}

.client-badges {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.client-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

/* Portfolio Chart */
.portfolio-chart {
    height: 300px;
    position: relative;
}

.asset-breakdown {
    margin-top: var(--space-lg);
}

.asset-item {
    display: flex;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--grey-200);
}

.asset-item:last-child {
    border-bottom: none;
}

.asset-color {
    width: 16px;
    height: 16px;
    border-radius: var(--radius-sm);
    margin-right: var(--space-sm);
}

.asset-details {
    flex: 1;
}

.asset-percentage {
    font-weight: 600;
    color: var(--navy-primary);
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl) var(--space-md);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
}

.security-notice {
    margin-top: var(--space-lg);
    padding: var(--space-md);
    background: var(--grey-100);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--navy-primary);
}

/* Profile Sections */
.profile-section {
    margin-bottom: var(--space-xl);
}

.profile-field {
    margin-bottom: var(--space-md);
}

.field-label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 600;
    color: var(--grey-700);
}

.field-value {
    padding: 0.75rem 1rem;
    background: var(--grey-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--grey-200);
}

.field-value.editable {
    background: white;
    border-color: var(--grey-300);
}

/* Transfer Steps */
.transfer-step {
    display: none;
}

.transfer-step.active {
    display: block;
}

.amount-input {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--navy-primary);
    text-align: center;
    border: none;
    background: none;
    width: 100%;
    outline: none;
    border-bottom: 2px solid var(--grey-300);
    padding-bottom: 0.5rem;
    transition: var(--transition-base);
}

.amount-input:focus {
    border-bottom-color: var(--navy-primary);
}

.amount-input::placeholder {
    color: var(--grey-300);
}

.amount-presets {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    margin-top: var(--space-md);
    flex-wrap: wrap;
}

.amount-preset {
    padding: 0.5rem 1rem;
    border: 1px solid var(--grey-300);
    border-radius: var(--radius-md);
    background: white;
    cursor: pointer;
    transition: var(--transition-base);
    flex-shrink: 0;
}

.amount-preset:hover {
    border-color: var(--navy-primary);
    background: var(--grey-50);
}

.amount-preset.active {
    background: var(--navy-primary);
    color: white;
    border-color: var(--navy-primary);
}

/* Mobile Specific Enhancements */
@media (max-width: 768px) {
    /* Typography Adjustments */
    h1 {
        font-size: var(--font-size-3xl);
    }
    
    h2 {
        font-size: var(--font-size-2xl);
    }
    
    h3 {
        font-size: var(--font-size-xl);
    }
    
    .text-lead {
        font-size: var(--font-size-base);
    }
    
    /* Mobile Navigation */
    .mobile-nav-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: var(--space-lg);
        gap: 0;
        transform: translateY(-100%);
        opacity: 0;
        transition: var(--transition-base);
        box-shadow: var(--shadow-xl);
        z-index: 1000;
        height: calc(100vh - 72px);
        overflow-y: auto;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    .nav-link {
        padding: var(--space-md) 0;
        width: 100%;
        border-bottom: 1px solid var(--grey-200);
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .nav-link.active::after {
        display: none;
    }
    
    /* Mobile Bottom Navigation */
    .mobile-bottom-nav {
        display: block;
    }
    
    .dashboard-nav {
        display: none;
    }
    
    /* Hero Section */
    .hero {
        padding: 6rem 0 3rem;
    }
    
    .hero-features {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .feature {
        gap: var(--space-sm);
    }
    
    /* Dashboard Header */
    .client-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    /* Cards */
    .card-header,
    .card-body,
    .card-footer {
        padding: var(--space-md);
    }
    
    /* Document Grid */
    .document-grid {
        grid-template-columns: 1fr;
    }
    
    /* Account Grid */
    .grid-cols-3,
    .grid-cols-2 {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    /* Tables */
    .table-container {
        border-radius: var(--radius-md);
        margin: 0 calc(var(--space-md) * -1);
        width: calc(100% + var(--space-md) * 2);
        border-left: none;
        border-right: none;
    }
    
    .table {
        min-width: 600px;
    }
    
    /* Modals */
    .modal {
        margin: 0;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        max-height: 80vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: var(--space-md);
    }
    
    /* Progress Steps */
    .progress-steps {
        margin-bottom: var(--space-lg);
    }
    
    .step-label {
        font-size: var(--font-size-sm);
    }
    
    /* Transfer Amount Input */
    .amount-input {
        font-size: var(--font-size-3xl);
    }
    
    /* Amount Presets */
    .amount-presets {
        gap: var(--space-xs);
    }
    
    .amount-preset {
        padding: 0.5rem 0.75rem;
        font-size: var(--font-size-sm);
    }
    
    /* Button Groups */
    .btn-group {
        display: flex;
        flex-direction: column;
        gap: var(--space-sm);
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    /* Forms */
    .form-group {
        margin-bottom: var(--space-sm);
    }
    
    /* Container Padding */
    .container {
        padding: 0 var(--space-sm);
    }
    
    /* Section Spacing */
    .section {
        padding: var(--space-xl) 0;
    }
    
    /* Mobile-only utility */
    .mobile-only {
        display: block !important;
    }
    
    .desktop-only {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
    
    .desktop-only {
        display: block !important;
    }
}

@media (max-width: 640px) {
    /* Even smaller adjustments */
    .hero {
        padding: 5rem 0 2.5rem;
    }
    
    .stat-value {
        font-size: var(--font-size-2xl);
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    .progress-step {
        gap: var(--space-xs);
    }
    
    .step-connector {
        min-width: 20px;
        margin: 0 var(--space-xs);
    }
}

@media (max-width: 480px) {
    /* Extra small devices */
    .hero {
        padding: 4rem 0 2rem;
    }
    
    .feature-icon {
        width: 40px;
        height: 40px;
    }
    
    .client-badge {
        padding: 0.375rem 0.75rem;
        font-size: var(--font-size-xs);
    }
    
    .amount-input {
        font-size: var(--font-size-2xl);
    }
    
    .inactivity-card {
        padding: var(--space-lg);
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: var(--success); }
.text-error { color: var(--error); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-sm); }
.gap-3 { gap: var(--space-md); }
.gap-4 { gap: var(--space-lg); }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }

.w-100 { width: 100%; }
.flex-1 { flex: 1; }

/* Print Styles */
@media print {
    .navbar,
    .dashboard-nav,
    .mobile-nav-toggle,
    .mobile-bottom-nav,
    .btn,
    .modal-overlay,
    .inactivity-warning {
        display: none !important;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    body {
        background: white;
        color: black;
        font-size: 12pt;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .stat-value {
        font-size: 14pt;
    }
}

/* Add this to your existing CSS */
@media (max-width: 768px) {
    #transfers-section .card-body {
        padding-bottom: 120px !important; /* Extra space for buttons */
        min-height: 70vh; /* Ensure enough height */
    }
}

/* Update ONLY mobile bottom nav for 6 buttons */
@media (max-width: 768px) {
    .mobile-bottom-nav nav {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 0.25rem;
    }
    
    .mobile-bottom-nav a {
        font-size: 0.6rem;
        padding: 0.375rem 0.25rem;
        min-height: 60px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        border-radius: var(--radius-sm);
    }
    
    .mobile-bottom-nav i {
        font-size: 1.1rem;
        margin-bottom: 0.125rem;
    }
    
    /* Adjust content padding for mobile bottom nav */
    main .container {
        padding-bottom: 80px !important;
    }
    
    /* Ensure mobile bottom nav has enough space */
    .mobile-bottom-nav {
        padding: 0.5rem var(--space-sm) !important;
        padding-bottom: calc(0.5rem + var(--safe-area-bottom)) !important;
        height: auto !important;
    }
    
    /* Active state for mobile nav */
    .mobile-bottom-nav a.active {
        color: var(--navy-primary);
        background: rgba(10, 35, 66, 0.1);
        font-weight: 600;
    }
}

/* For very small screens */
@media (max-width: 400px) {
    .mobile-bottom-nav a {
        font-size: 0.55rem;
    }
    
    .mobile-bottom-nav i {
        font-size: 1rem;
    }
}

/* Mobile-specific adjustments when header is hidden */
@media (max-width: 768px) {
    /* When header is hidden via inline style */
    .dashboard-header[style*="display: none"] + main .container {
        padding-top: var(--space-sm) !important;
        margin-top: -50px !important;
    }
    
    /* Ensure sections have proper spacing on mobile */
    .dashboard-section:not(.hidden) {
        min-height: calc(100vh - 72px - 90px); /* Account for top nav and bottom nav */
    }
    
    /* Specific adjustments for sections without header */
    #transactions-section .card-body,
    #transfers-section .card-body,
    #documents-section .card-body {
        padding-bottom: 90px; /* Extra space for mobile bottom nav */
    }
    
    /* Transfer section specific adjustments */
    #transfers-section .transfer-step {
        padding-bottom: 20px;
    }
    
    /* Table adjustments for mobile */
    #transactions-section .table-container {
        margin: 0 -0.5rem;
        width: calc(100% + 1rem);
    }
}

/* Keep desktop EXACTLY as it was - no changes */
@media (min-width: 769px) {
    /* Desktop stays completely unchanged */
    .dashboard-header {
        display: block !important; /* Force show on desktop */
    }
    
    .mobile-bottom-nav {
        display: none !important; /* Hide mobile nav on desktop */
    }
}

/* Fix mobile bottom nav height and position */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        height: auto !important;
        min-height: 70px !important;
        padding: 0.5rem var(--space-sm) !important;
        padding-bottom: calc(0.5rem + var(--safe-area-bottom)) !important;
    }
    
    .mobile-bottom-nav nav {
        height: 100%;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 0.25rem;
    }
    
    .mobile-bottom-nav a {
        padding: 0.375rem 0.25rem !important;
        min-height: 50px !important;
        max-height: 55px;
        font-size: 0.6rem !important;
        line-height: 1.2;
    }
    
    .mobile-bottom-nav i {
        font-size: 1rem !important;
        margin-bottom: 0.125rem !important;
    }
    
    /* Reduce grid gap for smaller screens */
    @media (max-width: 400px) {
        .mobile-bottom-nav nav {
            gap: 0.125rem;
        }
        
        .mobile-bottom-nav a {
            font-size: 0.55rem !important;
            padding: 0.25rem 0.125rem !important;
        }
        
        .mobile-bottom-nav i {
            font-size: 0.9rem !important;
        }
    }
}

/* Ensure content has proper bottom padding */
@media (max-width: 768px) {
    main .container {
        padding-bottom: 85px !important; /* Space for mobile nav */
    }
    
    /* Individual section adjustments */
    .dashboard-section {
        min-height: calc(100vh - 72px - 85px) !important;
        padding-bottom: 85px !important;
    }
    
    /* Card body adjustments */
    .card-body {
        padding-bottom: 90px !important;
    }
    
    /* Specific adjustments for sections with tables */
    #transactions-section .card-body {
        padding-bottom: 100px !important;
    }
    
    /* Transfer section needs extra space */
    #transfers-section .card-body {
        padding-bottom: 100px !important;
        min-height: calc(100vh - 72px - 85px) !important;
    }
    
    /* Document grid adjustments */
    #documents-section .card-body {
        padding-bottom: 100px !important;
    }
    
    /* Ensure tables are scrollable and visible */
    .table-container {
        margin-bottom: 20px;
        max-height: 60vh;
        overflow-y: auto;
    }
}

/* Amount input styling */
.amount-input {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--navy-primary);
    text-align: center;
    border: none;
    background: none;
    width: 100%;
    outline: none;
    border-bottom: 2px solid var(--grey-300);
    padding-bottom: 0.5rem;
    transition: var(--transition-base);
}

.amount-input:focus {
    border-bottom-color: var(--navy-primary);
}

.amount-input::placeholder {
    color: var(--grey-300);
}

/* Amount validation error */
#amountError {
    transition: var(--transition-base);
}

/* Mobile adjustments for amount input */
@media (max-width: 768px) {
    .amount-input {
        font-size: var(--font-size-3xl);
    }
}

/* Mobile-specific transaction improvements */
@media (max-width: 768px) {
    #transactions-section .table-container {
        border-radius: var(--radius-md);
        margin: 0 calc(var(--space-sm) * -1);
        width: calc(100% + var(--space-sm) * 2);
        border-left: none;
        border-right: none;
        background: transparent;
    }
    
    #transactions-section .table {
        min-width: 100% !important;
        border: none;
        background: transparent;
    }
    
    #transactions-section .table thead {
        display: none;
    }
    
    #transactions-section .table tbody tr {
        display: block;
        margin-bottom: var(--space-sm);
        background: white;
        border-radius: var(--radius-lg);
        padding: var(--space-md);
        box-shadow: var(--shadow-sm);
        border: 1px solid var(--grey-200);
    }
    
    #transactions-section .table tbody tr:last-child {
        margin-bottom: 0;
    }
    
    #transactions-section .table tbody tr td {
        display: block;
        width: 100% !important;
        border: none;
        padding: 0;
    }
    
    #transactions-section .table tbody tr td:first-child {
        padding-top: 0;
    }
    
    #transactions-section .table tbody tr td:last-child {
        padding-bottom: 0;
        border-bottom: none;
    }
    
    /* Transaction filters mobile optimization */
    #transactions-section .transaction-filters {
        flex-direction: column;
        gap: var(--space-sm);
        margin-bottom: var(--space-md);
    }
    
    #transactions-section .filter-group {
        width: 100%;
        flex-wrap: wrap;
    }
    
    #transactions-section .filter-select {
        flex: 1;
        min-width: 150px;
    }
    
    #transactions-section .btn-group {
        display: flex;
        gap: var(--space-xs);
    }
    
    #transactions-section .btn-group .btn {
        flex: 1;
        justify-content: center;
    }
    
    /* Pagination mobile optimization */
    #transactions-section .text-center .flex {
        flex-wrap: wrap;
        gap: var(--space-xs);
    }
    
    #transactions-section .btn-outline.btn-small {
        padding: 0.375rem 0.75rem;
        font-size: var(--font-size-xs);
    }
    
    #transactions-section #pageInfo {
        order: -1;
        width: 100%;
        text-align: center;
        margin-bottom: var(--space-xs);
    }
    
    /* Card header adjustments for mobile */
    #transactions-section .card-header {
        padding: var(--space-md);
    }
    
    #transactions-section .card-body {
        padding: var(--space-md);
    }
    
    /* Ensure proper scrolling */
    #transactions-section .table-container {
        max-height: none;
        overflow-y: visible;
    }
}

/* Extra small device optimizations */
@media (max-width: 480px) {
    #transactions-section .table tbody tr {
        padding: var(--space-sm);
    }
    
    #transactions-section .transaction-filters {
        gap: var(--space-xs);
    }
    
    #transactions-section .filter-select {
        min-width: 120px;
        padding: 0.375rem 0.75rem;
        font-size: var(--font-size-xs);
    }
    
    #transactions-section .btn {
        padding: 0.5rem 0.75rem;
        font-size: var(--font-size-sm);
    }
    
    /* Transaction details mobile optimization */
    #transactions-section .table tbody tr td > div > div:first-child {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }
    
    #transactions-section .table tbody tr td > div > div:first-child > div:last-child {
        align-self: flex-end;
    }
}

/* Hover effects for mobile */
@media (max-width: 768px) {
    #transactions-section .table tbody tr {
        transition: var(--transition-base);
    }
    
    #transactions-section .table tbody tr:active {
        transform: scale(0.995);
        box-shadow: var(--shadow-md);
        background: var(--grey-50);
    }
}

/* Ensure desktop stays unchanged */
@media (min-width: 769px) {
    #transactions-section .table thead .mobile-only {
        display: none !important;
    }
    
    #transactions-section .table tbody tr td {
        display: table-cell;
        width: auto;
        padding: 1rem;
    }
}