/* United Trading User Portal - Modern Blue Theme */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: radial-gradient(1200px 600px at 20% 10%, #0d1426 0%, #0a1120 55%, #080e1a 100%);
    color: var(--text-primary);
    min-height: 100vh;
}

/* Modern Blue Color Palette */
:root {
    /* Primary Colors - Rich Blue Gradient */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;

    /* Glass / Panel Colors for Dark */
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover: rgba(255, 255, 255, 0.06);

    /* Text Colors - Dark Theme */
    --text-primary: #e6edf3;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-dark: #f8fafc;
    --text-card: #e6edf3; /* light text on dark cards */
    --text-card-secondary: #9aa4b2;

    /* Card Colors - Dark */
    --card-bg: #0f172a;
    --card-bg-hover: #111b2f;
    --card-border: rgba(255, 255, 255, 0.08);
    --card-shadow: rgba(2, 6, 23, 0.5);

    /* Neutral Colors */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Semantic Colors */
    --success-50: #f0fdf4;
    --success-500: #22c55e;
    --success-600: #16a34a;
    --success-700: #15803d;
    --warning-50: #fffbeb;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    --error-50: #fef2f2;
    --error-500: #ef4444;
    --error-600: #dc2626;

    /* Derived and Alias Tokens (for component styles) */
    /* Backgrounds */
    --primary-bg: #0a1120;
    --secondary-bg: #0f172a; /* matches card surface */
    /* Borders */
    --border-color: var(--card-border);
    /* Accents */
    --accent-color: var(--primary-500);
    /* Semantic color aliases */
    --success-color: var(--success-500);
    --warning-color: var(--warning-500);
    --error-color: var(--error-500);
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-medium: 250ms ease;
    /* Shadows (aliases) */
    --shadow-medium: 0 8px 16px -4px rgb(0 0 0 / 0.12);
    --shadow-heavy: 0 24px 48px -12px rgb(0 0 0 / 0.18);
    /* Gradients */
    --sidebar-gradient-end: var(--primary-700);

    /* Component Variables - Organic Curves */
    --sidebar-width: 280px;
    --header-height: 64px;
    --bottom-nav-height: 64px;
    --border-radius: 16px;
    --border-radius-lg: 24px;
    --border-radius-xl: 32px;
    --border-radius-organic: 20px 28px 24px 20px;
    /* Alias for legacy usage */
    --border-radius-large: var(--border-radius-lg);
    --shadow-sm: 0 2px 8px 0 rgb(0 0 0 / 0.08);
    --shadow-md: 0 8px 16px -4px rgb(0 0 0 / 0.12), 0 4px 8px -2px rgb(0 0 0 / 0.08);
    --shadow-lg: 0 16px 32px -8px rgb(0 0 0 / 0.15), 0 8px 16px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 24px 48px -12px rgb(0 0 0 / 0.18), 0 12px 24px -8px rgb(0 0 0 / 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /*background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);*/
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
    padding: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid var(--text-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-spinner p {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

/* App Container */
.app-container {
    min-height: 100vh;
    display: flex;
    /*background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);*/
    position: relative;
}

.app-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(59, 130, 246, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Authentication Container */
.auth-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-600) 100%);
    padding: 1rem;
    position: relative;
    z-index: 1;
}

/* Main Container */
.main-container {
    width: 100%;
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform var(--transition);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

/* Sidebar Header */
.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-primary);
}

.sidebar-header .logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin: 0;
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Sidebar Navigation - Organic Curves */
.sidebar-nav {
    flex: 1;
    padding: 1.5rem 0;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 0.75rem;
    padding: 0 1.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    border-radius: 18px 24px 20px 16px;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    background: transparent;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
    transform: translateX(4px);
    box-shadow: none;
    text-shadow: none;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    font-weight: 700;
    box-shadow: none;
    border: 1px solid var(--glass-border);
    text-shadow: none;
}

.nav-link .nav-icon {
    margin-right: 0.75rem;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--glass-bg);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.user-avatar {
    position: relative;
    width: 45px;
    height: 45px;
    margin-right: 0.75rem;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.avatar-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.user-email {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    background: transparent;
    min-height: 100vh;
    transition: margin-left var(--transition);
    position: relative;
    z-index: 1;
}

.sidebar.collapsed+.main-content {
    margin-left: 0;
}

/* Mobile Bottom Navigation */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    z-index: 1000;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.1);
}

.bottom-nav-list {
    display: flex;
    height: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
}

.bottom-nav-item {
    flex: 1;
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem;
    border-radius: 12px;
    margin: 0.5rem;
}

.bottom-nav-link:hover,
.bottom-nav-link.active {
    color: var(--text-primary);
    background: var(--glass-hover);
    transform: translateY(-2px);
}

.bottom-nav-link .nav-icon {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

/* Cards - Organic Curved Design */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--border-radius-organic);
    padding: 2rem;
    box-shadow: 0 10px 24px -8px var(--card-shadow), 0 6px 12px -6px var(--card-shadow);
    border: 1px solid var(--card-border);
    transition: var(--transition);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-organic) var(--border-radius-organic) 0 0;
}

.card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: var(--transition);
}

.card:hover {
    background: var(--card-bg-hover);
    box-shadow: 0 16px 32px -12px var(--card-shadow), 0 8px 16px -8px var(--card-shadow);
    transform: translateY(-4px);
    border-color: rgba(15, 23, 42, 0.18);
}

.card:hover::after {
    opacity: 1;
}

.card-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(15, 23, 42, 0.12);
    border-radius: var(--border-radius);
}

.card-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-card);
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    line-height: 1.3;
}

.card:hover .card-title {
    color: var(--text-dark);
}

.card-subtitle {
    font-size: 1rem;
    color: var(--text-card-secondary);
    font-weight: 600;
    line-height: 1.4;
}

.card:hover .card-subtitle {
    color: var(--gray-600);
}

.card-body {
    color: var(--text-card);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.6;
}

.card:hover .card-body {
    color: var(--text-dark);
}

/* Buttons - Organic Curved Design */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border: 2px solid transparent;
    border-radius: 16px 20px 18px 14px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    min-height: 52px;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
    box-shadow: none;
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.10);
    transform: translateY(-2px);
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.14);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(0);
    text-shadow: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.14);
}

.btn-success {
    background: var(--success-600);
    color: white;
    border-color: var(--success-600);
}

.btn-success:hover {
    background: var(--success-700);
    border-color: var(--success-700);
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Forms - Organic Design */
.form-group {
    margin-bottom: 2rem;
}

.form-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.form-control {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 14px 18px 16px 12px;
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.form-control:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.15), var(--shadow-md);
    background: rgba(255, 255, 255, 1);
    transform: scale(1.02);
}

.form-control::placeholder {
    color: var(--gray-500);
    font-weight: 500;
}

/* Login Form */
.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-400), var(--primary-600), var(--primary-800));
}

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

.login-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-header p {
    color: var(--text-secondary);
    font-weight: 500;
}

.login-form {
    width: 100%;
}

.error-message {
    background: var(--error-50);
    border: 1px solid var(--error-200);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    color: var(--error-600);
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Page Styles - Organic Header */
.page-header {
    margin-bottom: 2.5rem;
    padding: 2.5rem 3rem;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 24px 32px 28px 20px;
    border: 2px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    /*background: linear-gradient(135deg, var(--primary-400), var(--primary-600), var(--primary-500));*/
    border-radius: 24px 32px 0 0;
}

.page-header h1 {
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #ffffff, rgba(255, 255, 255, 0.85));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    line-height: 1.5;
}

.page-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--gray-700);
}

.page-loading .spinner {
    margin-bottom: 1rem;
}

.page-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    text-align: center;
}

.error-content h1 {
    font-size: 4rem;
    font-weight: 700;
    color: var(--gray-300);
    margin-bottom: 1rem;
}

.error-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.error-content p {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Profile Info */
.profile-info {
    display: grid;
    gap: 1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row label {
    font-weight: 500;
    color: var(--gray-700);
}

.info-row span {
    color: var(--gray-900);
    font-weight: 500;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Notifications */
.notifications-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9997;
    max-width: 400px;
}

.notification {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary-600);
    animation: slideIn 0.3s ease;
}

.notification.success {
    border-left-color: var(--success-600);
}

.notification.error {
    border-left-color: var(--error-600);
}

.notification.warning {
    border-left-color: var(--warning-600);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.notification-content p {
    margin: 0;
    flex: 1;
    color: var(--gray-800);
    font-weight: 500;
}

.notification-close {
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    margin-left: 1rem;
    line-height: 1;
}

.notification-close:hover {
    color: var(--gray-600);
}

/* Icons */
.icon-dashboard::before {
    content: "📊";
}

.icon-cards::before {
    content: "💳";
}

.icon-commissions::before {
    content: "💰";
}

.icon-profile::before {
    content: "👤";
}

.icon-logout::before {
    content: "🚪";
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.d-flex {
    display: flex;
}

.d-inline-flex {
    display: inline-flex;
}

.flex-column {
    flex-direction: column;
}

.align-items-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

.justify-content-between {
    justify-content: space-between;
}

/* Text Colors for Better Readability */
.text-primary {
    color: var(--primary-600);
}

.text-secondary {
    color: var(--gray-600);
}

.text-success {
    color: var(--success-600);
}

.text-warning {
    color: var(--warning-600);
}

.text-error {
    color: var(--error-600);
}

.text-muted {
    color: var(--gray-500);
}

/* Background Colors */
.bg-primary {
    background-color: var(--primary-600);
    color: white;
}

.bg-secondary {
    background-color: var(--gray-100);
    color: var(--gray-800);
}

.bg-success {
    background-color: var(--success-600);
    color: white;
}

.bg-warning {
    background-color: var(--warning-600);
    color: white;
}

.bg-error {
    background-color: var(--error-600);
    color: white;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-bottom: calc(var(--bottom-nav-height) + 1rem);
    }

    .bottom-nav {
        display: block;
    }

    .card {
        padding: 1rem;
    }

    .btn {
        min-height: 48px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .login-card {
        margin: 1rem;
        padding: 1.5rem;
    }

    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .error-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .notifications-container {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }

    .main-content {
        padding: 0.75rem;
        padding-bottom: calc(var(--bottom-nav-height) + 0.75rem);
    }

    .card {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }

    .page-header {
        margin-bottom: 1.5rem;
    }
}

/* Print Styles */
@media print {

    .sidebar,
    .bottom-nav,
    .notifications-container {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
        padding: 0;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--primary-600);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 0.75rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .main-content {
        padding-top: 4rem;
    }
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

@media (max-width: 768px) {
    .sidebar-overlay.active {
        display: block;
    }
}

/* Enhanced Focus States for Accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* High Contrast Text for Better Readability */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-card);
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    line-height: 1.3;
}

p,
span,
div {
    color: var(--text-card);
    font-weight: 500;
    line-height: 1.5;
}

/* Ensure text readability in all states */
.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card h6 {
    color: var(--text-card);
}

.card:hover h1,
.card:hover h2,
.card:hover h3,
.card:hover h4,
.card:hover h5,
.card:hover h6 {
    color: var(--text-dark);
}

.card p,
.card span,
.card div {
    color: var(--text-card);
}

.card:hover p,
.card:hover span,
.card:hover div {
    color: var(--text-dark);
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-900);
}

.table td {
    color: var(--gray-800);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

/* Badge Styles - Organic Curves */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-radius: 16px 20px 18px 14px;
    backdrop-filter: blur(12px);
    border: 2px solid transparent;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.badge:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.badge-primary {
    background: rgba(59, 130, 246, 0.25);
    color: var(--text-primary);
    border-color: rgba(59, 130, 246, 0.4);
}

.badge-success {
    background: rgba(34, 197, 94, 0.25);
    color: #ffffff;
    border-color: rgba(34, 197, 94, 0.4);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.25);
    color: #ffffff;
    border-color: rgba(245, 158, 11, 0.4);
}

.badge-error {
    background: rgba(239, 68, 68, 0.25);
    color: #ffffff;
    border-color: rgba(239, 68, 68, 0.4);
}

/* Enhanced Card Styles for Better Visual Hierarchy */
.card-balance {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--primary-700);
    margin: 1.5rem 0;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    line-height: 1.1;
}

.card:hover .card-balance {
    color: var(--primary-800);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.card .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(30, 41, 59, 0.08);
    border-radius: var(--border-radius);
}

.card-type {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-card-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px 16px 14px 10px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.card:hover .card-type {
    color: var(--gray-700);
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.card-updated {
    font-size: 0.9rem;
    color: var(--text-card-secondary);
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: rgba(107, 114, 128, 0.1);
    border-radius: 10px 14px 12px 8px;
    border: 1px solid rgba(107, 114, 128, 0.2);
}

.card:hover .card-updated {
    color: var(--gray-600);
    background: rgba(107, 114, 128, 0.15);
    border-color: rgba(107, 114, 128, 0.3);
}

/* Refresh Button Styling - Organic */
.refresh-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 2px solid var(--glass-border);
    color: var(--text-primary);
    padding: 1rem 2rem;
    border-radius: 12px 16px 14px 10px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.refresh-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.refresh-btn:hover::before {
    left: 100%;
}

.refresh-btn:hover {
    background: var(--glass-hover);
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 255, 255, 0.5);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Dashboard Grid Enhancement */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Mobile Menu Toggle Enhancement */
.mobile-menu-toggle {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.mobile-menu-toggle:hover {
    background: var(--glass-hover);
    transform: scale(1.05);
}

/* Additio
nal Organic Design Elements */
.organic-container {
    border-radius: var(--border-radius-organic);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.organic-container:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Enhanced Text Readability Classes */
.text-readable {
    color: var(--text-card) !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.text-readable-hover:hover {
    color: var(--text-dark) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Organic Shapes for Visual Interest */
.shape-blob-1 {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}

.shape-blob-2 {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}

.shape-blob-3 {
    border-radius: 40% 60% 60% 40% / 60% 40% 40% 60%;
}

/* Improved Focus States for All Interactive Elements */
.nav-link:focus,
.btn:focus,
.form-control:focus,
.refresh-btn:focus {
    outline: 3px solid rgba(255, 255, 255, 0.6);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.2);
}

/* Enhanced Card Content Readability */
.card-content {
    color: var(--text-card);
    font-weight: 600;
    line-height: 1.6;
}

.card:hover .card-content {
    color: var(--text-dark);
}

.card-amount {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-card);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card:hover .card-amount {
    color: var(--text-dark);
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

/* Organic Loading Animation */
@keyframes organic-pulse {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
        border-radius: 50%;
    }

    25% {
        transform: scale(1.1) rotate(90deg);
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    50% {
        transform: scale(1.05) rotate(180deg);
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    75% {
        transform: scale(1.15) rotate(270deg);
        border-radius: 40% 60% 60% 40% / 60% 40% 40% 60%;
    }
}

.organic-spinner {
    animation: organic-pulse 2s ease-in-out infinite;
}

/* Improved Mobile Responsiveness for Organic Design */
@media (max-width: 768px) {
    .card {
        border-radius: var(--border-radius-lg);
        padding: 1.5rem;
    }

    .page-header {
        border-radius: var(--border-radius-lg);
        padding: 1.5rem 2rem;
    }

    .btn {
        border-radius: var(--border-radius);
        padding: 0.875rem 1.5rem;
    }

    .nav-link {
        border-radius: var(--border-radius);
        padding: 1rem 1.25rem;
    }
}

/* Ensure all text elements have proper contrast */
.card .text-muted {
    color: var(--text-card-secondary) !important;
}

.card:hover .text-muted {
    color: var(--gray-600) !important;
}

.card .small {
    color: var(--text-card-secondary) !important;
    font-weight: 600 !important;
}

.card:hover .small {
    color: var(--gray-600) !important;
}