:root {
    --bg-dark: #0b0d17;
    --card-bg: rgba(255, 255, 255, 0.04);
    --border-color: rgba(255, 255, 255, 0.1);
    --accent-purple: #7047eb;
    --accent-green: #00e676;
    --accent-blue: #00d2ff;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --font-main: 'Outfit', sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Hide content by default on protected pages to prevent flicker */
body:not(.auth-ready):not(.login-page) .container,
body:not(.auth-ready).login-page .login-container {
    opacity: 0;
    pointer-events: none;
}

.container, .login-container {
    transition: opacity 0.4s ease-in-out;
}

/* Background Effects */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 10% 20%, rgba(112, 71, 235, 0.1) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(0, 210, 255, 0.1) 0%, transparent 40%);
    z-index: -1;
}

.glow-bg::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    background: var(--accent-purple);
    filter: blur(250px);
    opacity: 0.05;
    transform: translate(-50%, -50%);
}

/* Layout Container */
.container {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    gap: 30px;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 40px);
    position: sticky;
    top: 20px;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
}

.sidebar::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.logo i {
    font-size: 28px;
    color: var(--accent-purple);
    text-shadow: 0 0 20px rgba(112, 71, 235, 0.6);
}

.logo h2 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    margin-bottom: 30px;
}

.avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.user-info .welcome {
    font-size: 11px;
    color: var(--text-secondary);
}

.user-info .username {
    font-weight: 600;
    font-size: 14px;
}

nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 20px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: 15px;
    transition: var(--transition-smooth);
}

.nav-item:hover, .nav-item.active {
    background: rgba(112, 71, 235, 0.1);
    color: var(--text-primary);
}

.nav-item.active {
    border: 1px solid rgba(112, 71, 235, 0.3);
}

.global-rate-box {
    margin-top: auto;
    padding: 20px;
    background: linear-gradient(to right bottom, rgba(112, 71, 235, 0.1), transparent);
    border-radius: 20px;
    text-align: center;
}

.global-rate-box p {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.rate-badge {
    color: var(--accent-purple);
    font-weight: 800;
    font-size: 18px;
}

/* Main Content Styling */
.content {
    flex-grow: 1;
    padding-top: 10px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

header h2 {
    font-size: 14px;
    color: var(--accent-purple);
    font-weight: 600;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

header h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 5px;
}

header p {
    color: var(--text-secondary);
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-right {
    gap: 10px;
}

.date-chip {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Base Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    padding: 25px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.purple { background: rgba(112, 71, 235, 0.2); color: var(--accent-purple); }
.stat-icon.green { background: rgba(0, 230, 118, 0.2); color: var(--accent-green); }
.stat-icon.blue { background: rgba(0, 210, 255, 0.2); color: var(--accent-blue); }

.stat-info h3 {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.stat-info .value {
    font-size: 24px;
    font-weight: 800;
}

/* Portfolio Utilization */
.utilization-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 40px;
}

.util-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
}

.util-header h2 { font-size: 18px; }
.util-header .percentage { font-size: 38px; font-weight: 800; letter-spacing: -2px; }
.util-header .percentage.healthy { color: var(--accent-green); }
.util-header .percentage.warning { color: coral; }

.progress-container {
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--accent-purple), var(--accent-blue));
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(112, 71, 235, 0.5);
    transition: width 1s ease-in-out;
}

.util-footer {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 13px;
}

/* CC Grid Layout */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-title h2 { font-size: 22px; font-weight: 700; }

.btn-add {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: var(--accent-purple);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-family: inherit;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 10px 20px rgba(112, 71, 235, 0.2);
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(112, 71, 235, 0.4);
}

#btnGeneratePDF {
    background: rgba(0, 210, 255, 0.1);
    color: #00d2ff;
    border: 1px solid rgba(0, 210, 255, 0.2);
    box-shadow: none;
}

#btnGeneratePDF:hover {
    background: rgba(0, 210, 255, 0.2);
    box-shadow: 0 10px 25px rgba(0, 210, 255, 0.1);
}

.cc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.card-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 25px;
    position: relative;
    overflow: hidden;
}

.card-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.05), transparent);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.owner-pill {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.card-actions {
    color: var(--text-secondary);
    cursor: pointer;
}

.bank-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 25px;
}

.card-balance {
    margin-bottom: 25px;
}

.card-balance .label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.card-balance .val {
    font-size: 28px;
    font-weight: 800;
}

.card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.detail .label {
    display: block;
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.detail .val {
    font-weight: 600;
    font-size: 14px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-footer p {
    font-size: 12px;
    color: var(--text-secondary);
}

.card-footer strong {
    color: var(--accent-green);
    font-size: 14px;
}

/* Animations */
@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

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

.animate-in {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
    animation-delay: var(--d, 0s);
}

/* Login Page Specifics */
.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-box {
    background: var(--card-bg);
    backdrop-filter: blur(40px);
    border: 1px solid var(--border-color);
    padding: 50px 40px;
    border-radius: 32px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.login-box .logo {
    justify-content: center;
    margin-bottom: 30px;
}

.login-box h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.login-box .subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 40px;
}

.input-group-modern {
    text-align: left;
    margin-bottom: 25px;
}

.input-group-modern label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-group-modern input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: white;
    font-family: inherit;
    font-size: 15px;
    transition: var(--transition-smooth);
}

.input-group-modern input:focus {
    outline: none;
    border-color: var(--accent-purple);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(112, 71, 235, 0.2);
}

.btn-login {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--accent-purple), #5c39c4);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(112, 71, 235, 0.4);
}

.error-msg {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
    color: #ff3b30;
    padding: 15px;
    border-radius: 16px;
    font-size: 14px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-note {
    margin-top: 30px;
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Google Auth & Separator */
.separator {
    text-align: center;
    margin: 25px 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.separator::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.separator span {
    position: relative;
    background: #121212; /* Dark background matching the page */
    padding: 0 15px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    z-index: 2;
    text-transform: uppercase;
}

.btn-google {
    width: 100%;
    padding: 14px;
    background: white;
    color: #1f1f1f;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.btn-google:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.1);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 13, 23, 0.8);
    backdrop-filter: blur(15px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 100%;
    max-width: 480px;
    background: linear-gradient(180deg, rgba(30, 32, 45, 0.95) 0%, rgba(11, 13, 23, 0.98) 100%);
    border: 1px solid rgba(112, 71, 235, 0.3);
    border-radius: 32px;
    padding: 0;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(112, 71, 235, 0.1);
    position: relative;
    transform: scale(0.92) translateY(30px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 90vh;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-header {
    background: rgba(255, 255, 255, 0.02);
    padding: 35px 40px 25px 40px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.modal-header-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    letter-spacing: -0.5px;
}

.modal-header h2 i {
    color: var(--accent-purple);
    background: rgba(112, 71, 235, 0.15);
    padding: 10px;
    border-radius: 12px;
    font-size: 18px;
    box-shadow: 0 0 15px rgba(112, 71, 235, 0.2);
}

.modal-header p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.btn-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px 40px 40px 40px;
}

.input-modern {
    margin-bottom: 25px;
}

.input-modern label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.input-modern input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: white;
    font-family: inherit;
    font-size: 15px;
    transition: var(--transition-smooth);
}

.input-modern input:focus {
    outline: none;
    border-color: var(--accent-purple);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 20px rgba(112, 71, 235, 0.15);
}

.modal-footer {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.btn-save-tx {
    flex-grow: 2;
    background: linear-gradient(135deg, var(--accent-purple), #5c39c4);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition-smooth);
    box-shadow: 0 10px 20px rgba(112, 71, 235, 0.2);
}

.btn-save-tx:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(112, 71, 235, 0.4);
}

.btn-save-tx:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-delete-tx {
    flex-grow: 1;
    background: rgba(255, 59, 48, 0.05);
    color: #ff3b30;
    border: 1px solid rgba(255, 59, 48, 0.2);
    padding: 16px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-delete-tx:hover {
    background: rgba(255, 59, 48, 0.15);
    border-color: rgba(255, 59, 48, 0.4);
    transform: translateY(-2px);
}

.btn-delete-tx:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}
.btn-google img {
    height: 18px;
    width: 18px;
}

/* Custom Transaction Modal - Ultra Modern */
.tx-modal {
    padding: 0;
    max-width: 400px;
    background: radial-gradient(circle at top right, rgba(30,32,45,0.4), var(--bg-dark));
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
}

.modal-header-centered {
    position: relative;
    padding: 30px 30px 15px;
    text-align: center;
}

.icon-circle {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, rgba(112, 71, 235, 0.15), rgba(0, 210, 255, 0.1));
    border: 1px solid rgba(112, 71, 235, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-purple);
    font-size: 24px;
    box-shadow: 0 10px 30px rgba(112, 71, 235, 0.15);
}

.modal-header-centered h2 {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.5px;
}

.btn-close-abs {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-close-abs:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    transform: rotate(90deg);
}

.modal-body-pad {
    padding: 0 35px 25px;
}

.amount-display-group {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    padding: 15px 20px;
    margin-bottom: 25px;
    transition: var(--transition-smooth);
}

.amount-display-group:focus-within {
    background: rgba(112, 71, 235, 0.05);
    border-color: rgba(112, 71, 235, 0.3);
}

.currency-symbol {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-right: 15px;
}

.amount-huge {
    background: transparent;
    border: none;
    color: white;
    font-size: 42px;
    font-weight: 800;
    width: 160px;
    text-align: left;
    outline: none;
    font-family: inherit;
    padding: 0;
}

.amount-huge:focus {
    outline: none;
}
/* Hide arrows in number input */
.amount-huge::-webkit-outer-spin-button,
.amount-huge::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-modern-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-modern-icon .icon-prefix {
    position: absolute;
    left: 20px;
    color: var(--text-secondary);
    font-size: 16px;
    pointer-events: none;
}

.input-modern-icon input, .input-modern-icon select {
    width: 100%;
    padding: 14px 20px 14px 45px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    color: white;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
    appearance: none;
    -webkit-appearance: none;
}

.input-modern-icon select option {
    background: var(--bg-dark);
    color: white;
}

.input-modern-icon input:focus, .input-modern-icon select:focus {
    border-color: var(--accent-purple);
    background: rgba(112, 71, 235, 0.05);
    outline: none;
    box-shadow: 0 0 20px rgba(112, 71, 235, 0.1);
}

.modal-actions-stacked {
    padding: 0 35px 35px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-save-primary {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--accent-purple), #5c39c4);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(112, 71, 235, 0.2);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-save-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(112, 71, 235, 0.4);
}

.btn-delete-ghost {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: rgba(255, 59, 48, 0.7);
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-delete-ghost:hover {
    color: #ff3b30;
    background: rgba(255, 59, 48, 0.05);
    border-radius: 12px;
}

.animate-in {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUpFade 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: var(--d, 0s);
}

@keyframes slideUpFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        gap: 20px;
        padding: 15px;
    }
    .sidebar {
        width: 240px;
    }
}

/* Mobile Unified Top Nav */
.mobile-top-nav {
    display: none;
    position: sticky;
    top: 0;
    width: 100%;
    padding: 15px 25px;
    background: rgba(11, 13, 23, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    justify-content: space-between;
    align-items: center;
}

.mobile-top-nav .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
}

.mobile-top-nav .logo i {
    font-size: 22px;
    color: var(--accent-purple);
}

.mobile-top-nav .logo span {
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.5px;
}

/* Hamburger Layout Refinements */
.mobile-menu-btn {
    position: relative; /* Inside top-nav */
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.05);
    color: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.mobile-menu-btn:active {
    transform: scale(0.9);
}

/* Grid Layout for Transaction Forms */
.grid-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

@media (max-width: 1024px) {
    .grid-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .scanner-aside {
        order: -1; /* Put scanner at top on mobile for easier access */
    }

    .form-container {
        padding: 25px !important;
    }
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    z-index: 1050;
    opacity: 0;
    transition: var(--transition-smooth);
    pointer-events: none;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: all;
}

@media (max-width: 1024px) {
    .mobile-top-nav {
        display: flex;
    }
    
    .container {
        flex-direction: column;
        padding: 0;
    }
    
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .sidebar {
        position: fixed !important;
        left: -300px !important;
        top: 0 !important;
        height: 100vh !important;
        width: 280px !important;
        z-index: 1100 !important;
        background: #0f1220 !important;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        border-radius: 0 24px 24px 0 !important;
        box-shadow: 20px 0 50px rgba(0,0,0,0.5);
    }
    
    .sidebar.active {
        left: 0 !important;
    }
    
    .content {
        width: 100% !important;
        padding: 20px !important;
        margin-top: 0 !important;
    }
    
    .content header {
        margin-top: 10px !important;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column !important;
        align-items: flex-start !important;
        margin-bottom: 30px !important;
        gap: 20px !important;
    }
    header h1 {
        font-size: 26px;
    }
    .header-left, .header-right {
        width: 100% !important;
    }
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    .util-header .percentage {
        font-size: 32px;
    }
    .header-right {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 12px !important;
        margin-top: 10px !important;
    }
    .quick-actions a, .header-right button, .header-right a {
        flex: 1 1 140px !important;
        min-width: 140px;
        justify-content: center;
        padding: 12px 15px !important;
    }
    .filters-container {
        grid-template-columns: 1fr !important;
    }
    .transactions-table-container {
        padding: 15px !important;
    }
    .cc-grid {
        grid-template-columns: 1fr !important;
    }
}


@media (max-width: 480px) {
    .stat-card {
        padding: 20px;
    }
    .stat-info .value {
        font-size: 22px !important;
    }
    .card-balance .val {
        font-size: 24px;
    }
}

