/* Custom styles for Trust Wallet Trade */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1f2937;
    --light-color: #f8f9fa;
    --sidebar-width: 280px;
    --topbar-height: 70px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    color: #1f2937;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.text-gradient {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, #f093fb 100%);
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="60" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="60" cy="30" r="1.5" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    animation: float 20s ease-in-out infinite;
}

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

.stats-counter {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: transform 0.3s ease;
}

.hover-lift:hover .feature-icon {
    transform: scale(1.1);
}

.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    background: white;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.hover-lift:hover {
    transform: translateY(-10px) !important;
}

.testimonial-card {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

.pricing-card {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.pricing-card.popular {
    border: 3px solid var(--primary-color);
    transform: scale(1.05);
}

.pricing-card.popular::before {
    content: 'Most Popular';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 1;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animate {
    opacity: 1;
    transform: translateY(0);
}

.btn {
    border-radius: 999px;
    padding: 0.75rem 1.4rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
    position: relative;
    overflow: hidden;
    min-height: 44px; /* Touch target size */
    box-shadow: 0 6px 14px rgba(102, 126, 234, 0.12);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.14);
}

.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;
}

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

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-toggler {
    border: 1px solid rgba(15, 76, 129, 0.18);
    border-radius: 12px;
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    margin-left: auto;
}

.navbar-toggler:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(102, 126, 234, 0.14);
}

.navbar-toggler-icon {
    width: 22px;
    height: 2px;
    background-color: transparent;
    display: block;
    position: relative;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after,
.navbar-toggler-icon span {
    content: '';
    width: 22px;
    height: 2px;
    background-color: var(--dark-color);
    position: absolute;
    left: 0;
}

.navbar-toggler-icon::before {
    top: -7px;
}

.navbar-toggler-icon::after {
    top: 7px;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        width: 100%;
    }

    .navbar-collapse.show {
        position: relative;
        z-index: 1050;
    }

    .navbar-nav {
        width: 100%;
        background: rgba(0, 0, 0, 0.95);
        padding: 0.75rem 0.5rem;
    }

    .navbar-nav .nav-item {
        width: 100%;
    }

    .navbar-nav .nav-link,
    .navbar-nav .btn {
        width: 100%;
        justify-content: flex-start;
    }

    .navbar-nav .btn {
        margin-left: 0 !important;
    }
}

.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    min-height: 44px; /* Touch target size */
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    transform: translateY(-2px);
}

.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
}

.table td {
    vertical-align: middle;
    border-color: #e9ecef;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

footer {
    margin-top: 4rem;
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
}

/* Dashboard Layout */
.dashboard-shell {
    display: flex;
    min-height: 100vh;
    background: var(--light-color);
}

/* Sidebar Toggle Button */
.sidebar-toggle-btn {
    position: relative;
    border: 1px solid rgba(15, 76, 129, 0.18);
    background: white;
    color: var(--primary-color);
    border-radius: 999px;
    padding: 0.45rem;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    min-width: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.sidebar-toggle-btn i {
    font-size: 1.2rem;
    line-height: 1;
}

.sidebar-toggle-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(29, 78, 216, 0.18);
}

.sidebar-toggle-btn:active {
    transform: translateY(0);
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--dark-color) 0%, #2d3748 100%);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1050;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.03)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.03)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.02)"/><circle cx="10" cy="50" r="0.5" fill="rgba(255,255,255,0.02)"/><circle cx="90" cy="30" r="0.5" fill="rgba(255,255,255,0.02)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    pointer-events: none;
}

.sidebar-brand {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.sidebar-brand a {
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.sidebar-brand a:hover {
    transform: scale(1.02);
}

.sidebar-nav {
    padding: 1rem 0;
    position: relative;
    z-index: 1;
}

/* Enhanced animations and interactions */
.sidebar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.5rem;
    margin: 0.25rem 0.5rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    min-height: 48px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
    cursor: pointer;
}

.sidebar-nav .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;
}

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

.sidebar-nav .nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(8px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.sidebar-nav .nav-link.active {
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    border-color: var(--primary-color);
    transform: translateX(4px);
    animation: activePulse 2s ease-in-out infinite;
}

@keyframes activePulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4); }
    50% { box-shadow: 0 4px 20px rgba(102, 126, 234, 0.6); }
}

.sidebar-nav .nav-link i {
    width: 20px;
    margin-right: 12px;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.sidebar-nav .nav-link:hover i {
    transform: scale(1.1);
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 100;
}

/* Collapsed state for desktop */
.sidebar.collapsed {
    transform: translateX(-100%);
}

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

/* Mobile sidebar overlay */
.sidebar-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.sidebar-mobile-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Body class for mobile sidebar */
body.sidebar-open-mobile {
    overflow: hidden;
}

body.sidebar-open-mobile .sidebar-mobile-overlay {
    opacity: 1;
    visibility: visible;
}

.topbar {
    min-height: var(--topbar-height);
    background: white;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 0.75rem;
}

.topbar-title h4 {
    margin: 0;
    font-weight: 600;
    color: var(--dark-color);
}

.topbar-title small {
    color: #6c757d;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}

.notification-pill {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Offcanvas Sidebar for Mobile */
.offcanvas {
    width: min(220px, 78vw) !important;
    max-width: 220px !important;
}

.offcanvas-body .sidebar {
    position: static;
    height: auto;
    width: 100%;
}

/* Transfer page styles */
.bg-light-gray {
    background: #f5f6fa;
}

.transfer-shell {
    min-height: 100vh;
}

.transfer-card {
    max-width: 760px;
    background: #ffffff;
    border-radius: 28px;
    padding: 2rem;
}

.transfer-header {
    align-items: flex-start;
}

.transfer-header h2 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.badge-danger {
    background: #f8d7da;
    color: #842029;
}

.transfer-form {
    gap: 1.5rem;
}

.transfer-section .section-label {
    letter-spacing: 0.16em;
}

.form-control,
.form-select,
.form-control-plaintext {
    border-radius: 18px;
    border: 1px solid #e8eaef;
}

.form-control:focus,
.form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.15rem rgba(59, 130, 246, 0.15);
}

.form-control-plaintext {
    background: #ffffff;
    padding: 1rem;
}

.transfer-card .border-bottom {
    border-color: #ebedf3 !important;
}

.crypto-transfer-back {
    color: #374151;
    font-weight: 600;
}

.crypto-transfer-back:hover {
    color: #1d4ed8;
}

.btn-primary {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.btn-primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

.transfer-footer a:hover {
    color: #0f172a;
}

/* Passive Earn page */
.passive-shell,
.package-shell {
    min-height: 100vh;
}

.passive-card,
.package-card {
    max-width: 1100px;
    background: #ffffff;
    border-radius: 28px;
    padding: 2rem;
}

.passive-header,
.package-header {
    align-items: center;
}

.passive-header h1,
.package-header h1 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.passive-back,
.package-back {
    color: #374151;
    font-weight: 600;
    text-decoration: none;
}

.passive-back:hover,
.package-back:hover {
    color: #1d4ed8;
}

.passive-intro {
    border-radius: 22px;
    background: #f8fafc;
}

/* Loading animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

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

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

/* Responsive Design */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(220px, 78vw);
        max-width: 220px;
        transform: translateX(-100%);
        z-index: 1060;
        box-shadow: 2px 0 18px rgba(0,0,0,0.18);
        transition: transform 0.3s ease, visibility 0.3s ease;
        visibility: hidden;
        overflow-y: auto;
        background: #111827;
    }

    .sidebar.show {
        transform: translateX(0);
        visibility: visible;
    }

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

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

    .topbar {
        height: auto;
        padding: 0.75rem 0.9rem;
    }

    .topbar .container-fluid {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.75rem;
    }

    .topbar-title {
        flex: 1 1 100%;
        min-width: 0;
        position: static !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        width: 100%;
    }

    .topbar-title h4 {
        font-size: 1rem;
        margin-bottom: 0.15rem;
    }

    .topbar-title small {
        display: block;
        font-size: 0.95rem;
        color: #6c757d;
    }

    .topbar .d-flex.align-items-center.ms-auto.gap-3 {
        flex: 1 1 100%;
        justify-content: flex-start;
        width: 100%;
    }

    .avatar {
        width: 32px;
        height: 32px;
    }

    .sidebar-toggle-btn {
        padding: 0.45rem;
        min-width: 38px;
        min-height: 38px;
        margin-left: 0;
    }

    /* Enhanced mobile sidebar styling */
    .sidebar-toggle-btn {
        background: white;
        color: var(--primary-color);
        border-color: rgba(15, 76, 129, 0.18);
    }

    .navbar-toggler,
    .sidebar-toggle-btn {
        z-index: 1100;
    }

    .navbar-nav .nav-link,
    .navbar-nav .btn {
        word-break: break-word;
        white-space: normal;
    }

    .sidebar-nav .nav-link {
        white-space: normal;
        word-break: break-word;
    }

    .sidebar {
        left: -100%;
    }

    .sidebar.show {
        left: 0;
    }

    html, body {
        overflow-x: hidden;
    }

    .sidebar-toggle-btn:hover {
        background: rgba(102, 126, 234, 0.12);
        border-color: rgba(15, 76, 129, 0.25);
    }

    /* Add overlay for mobile */
    .dashboard-shell::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        pointer-events: none;
    }

    .dashboard-shell.sidebar-open::before {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .global-nav-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .display-5 {
        font-size: 2rem;
    }

    .display-4 {
        font-size: 1.8rem;
    }

    .btn {
        padding: 0.625rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .stats-counter {
        font-size: 2rem;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
    }

    .card {
        margin-bottom: 1rem;
    }

    .table-responsive {
        font-size: 0.875rem;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .topbar-title h4 {
        font-size: 1.25rem;
    }

    .topbar-title small {
        display: none;
    }

    .avatar {
        width: 32px;
        height: 32px;
    }

    .notification-pill {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .pricing-card.popular {
        transform: none;
    }

    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-content {
        border-radius: 12px;
    }

    /* Mobile navigation improvements */
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        min-height: 44px;
    }

    /* Improve touch targets */
    .dropdown-item {
        padding: 0.75rem 1rem;
        min-height: 44px;
    }

    .btn-close {
        width: 44px;
        height: 44px;
    }

    /* Form improvements for mobile */
    .form-control, .form-select {
        font-size: 1rem; /* Prevent zoom on iOS */
    }

    /* Table improvements for mobile */
    .table td, .table th {
        padding: 0.75rem 0.5rem;
    }

    /* Card improvements */
    .card-body {
        padding: 1.25rem;
    }

    /* Alert improvements */
    .alert {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    /* Sidebar mobile improvements */
    .sidebar {
        width: 240px;
        max-width: 80vw;
        box-shadow: 2px 0 14px rgba(0, 0, 0, 0.15);
    }

    .sidebar-nav .nav-link {
        padding: 0.8rem 1rem;
        margin: 0.35rem 0.25rem;
        font-size: 0.95rem;
    }

    .sidebar-brand {
        padding: 1.25rem 1rem;
    }

    .sidebar-brand a {
        font-size: 1.35rem;
    }

    /* Topbar mobile improvements */
    .topbar {
        height: auto;
        padding: 0.5rem 0.9rem;
    }

    .topbar .container-fluid {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.75rem;
    }

    .topbar-title {
        flex: 1 1 100%;
        min-width: 0;
        position: static !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        width: 100%;
    }

    .topbar-title h4 {
        font-size: 1rem;
        margin-bottom: 0.15rem;
    }

    .topbar-title small {
        display: block;
        font-size: 0.88rem;
        color: #6c757d;
    }

    .topbar .d-flex.align-items-center.ms-auto.gap-3 {
        flex: 1 1 100%;
        justify-content: flex-start;
        gap: 0.75rem;
    }

    .sidebar-toggle-btn {
        padding: 0.45rem;
        min-width: 38px;
        min-height: 38px;
    }

    .sidebar-toggle-btn i {
        font-size: 1.2rem;
    }

    .global-nav-toggle {
        display: none;
        position: fixed;
        top: 1rem;
        left: 1rem;
        width: 42px;
        height: 42px;
        border-radius: 50%;
        border: 1px solid rgba(15, 76, 129, 0.18);
        background: white;
        color: var(--primary-color);
        z-index: 1200;
        align-items: center;
        justify-content: center;
        box-shadow: 0 10px 22px rgba(0,0,0,0.12);
        transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    }

    .global-nav-toggle:hover {
        transform: translateY(-1px);
        box-shadow: 0 12px 26px rgba(0,0,0,0.16);
    }

    .global-nav-toggle i {
        font-size: 1.1rem;
    }

    .global-nav-toggle {
        display: flex;
    }

    /* Transfer page mobile adjustments */
    .transfer-card {
        width: 100%;
        margin: 0 auto;
        padding: 1.5rem;
        max-width: 760px;
    }

    .transfer-header {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .transfer-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .transfer-footer .d-flex.gap-3 {
        flex-direction: column;
    }

    .transfer-footer .d-flex.gap-3 a {
        width: 100%;
    }

    #transfer-form .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .display-5 {
        font-size: 1.75rem;
    }

    .display-4 {
        font-size: 1.5rem;
    }

    .btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }

    .stats-counter {
        font-size: 1.75rem;
    }

    .feature-icon {
        width: 50px;
        height: 50px;
    }

    .card-header h5 {
        font-size: 1.1rem;
    }

    .table {
        font-size: 0.8rem;
    }

    /* Stack buttons vertically on very small screens */
    .d-flex.gap-3 {
        flex-direction: column;
    }

    .d-flex.gap-3 .btn {
        margin-bottom: 0.5rem;
    }

    /* Transfer page small screen adjustments */
    .transfer-card {
        padding: 1rem;
    }

    .transfer-header {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .transfer-header .badge-danger {
        align-self: flex-start;
        width: 100%;
        text-align: center;
        padding-top: 0.85rem;
        padding-bottom: 0.85rem;
    }

    .transfer-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .transfer-footer .d-flex.gap-3 {
        flex-direction: column;
    }

    .transfer-footer .d-flex.gap-3 a {
        width: 100%;
    }

    #transfer-form .btn {
        width: 100%;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Focus states for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Print styles */
@media print {
    .sidebar,
    .topbar,
    .btn,
    .navbar {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }
}