/* ==========================================
   WALLET - Altın Takip Uygulaması
   Mobile-First Dark Theme CSS
   ========================================== */

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

/* ==========================================
   CSS Variables / Design Tokens
   ========================================== */
:root {
    --bg-primary: #0a0a14;
    --bg-secondary: #12121e;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --bg-glass: rgba(255, 255, 255, 0.06);
    --bg-glass-strong: rgba(255, 255, 255, 0.1);
    --bg-input: rgba(255, 255, 255, 0.06);
    --gold-100: #fef3c7;
    --gold-200: #fde68a;
    --gold-300: #fcd34d;
    --gold-400: #fbbf24;
    --gold-500: #f59e0b;
    --gold-600: #d97706;
    --gold-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
    --gold-glow: 0 0 30px rgba(245, 158, 11, 0.15);
    --text-primary: #f0f0f5;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --green: #22c55e;
    --green-bg: rgba(34, 197, 94, 0.12);
    --red: #ef4444;
    --red-bg: rgba(239, 68, 68, 0.12);
    --blue: #3b82f6;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-gold: rgba(245, 158, 11, 0.3);
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-modal: 0 25px 50px rgba(0, 0, 0, 0.5);
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   Reset & Base
   ========================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

input,
button,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ==========================================
   LOGIN PAGE
   ========================================== */
.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(217, 119, 6, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(180, 83, 9, 0.04) 0%, transparent 50%);
    animation: bgFloat 20s ease-in-out infinite;
    z-index: 0;
}

@keyframes bgFloat {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(-3%, 2%) rotate(1deg);
    }

    66% {
        transform: translate(2%, -1%) rotate(-1deg);
    }
}

.login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px 28px;
    box-shadow: var(--shadow-card);
    animation: slideUp 0.6s var(--transition-slow);
    transition: all 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: var(--gold-gradient);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #000;
    box-shadow: var(--gold-glow);
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
    }

    50% {
        box-shadow: 0 0 40px rgba(245, 158, 11, 0.25);
    }
}

.login-logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-logo p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 4px;
}

/* ==========================================
   FORM ELEMENTS
   ========================================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.form-input.error {
    border-color: var(--red);
    animation: shake 0.4s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-6px);
    }

    40%,
    80% {
        transform: translateX(6px);
    }
}

.form-select {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.form-select:focus {
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.form-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
    -webkit-tap-highlight-color: transparent;
    min-height: 48px;
    user-select: none;
}

.btn-primary {
    width: 100%;
    background: var(--gold-gradient);
    color: #000;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
    transform: translateY(-1px);
}

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

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

.btn-secondary {
    background: var(--bg-glass-strong);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8125rem;
    min-height: 36px;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

.btn-gold {
    background: var(--gold-gradient);
    color: #000;
    font-weight: 600;
    border: none;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.btn-gold:hover {
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.login-error {
    display: none;
    background: var(--red-bg);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--red);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    margin-bottom: 20px;
    text-align: center;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.login-error.visible {
    display: block;
}

/* ==========================================
   DASHBOARD LAYOUT
   ========================================== */
.dashboard {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: calc(20px + var(--safe-bottom));
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: calc(12px + var(--safe-top)) 16px 12px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-logo {
    width: 36px;
    height: 36px;
    background: var(--gold-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #000;
}

.header-title {
    font-size: 1.125rem;
    font-weight: 700;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-user {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-right: 4px;
}

.header-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1.1rem;
}

.header-btn:hover {
    background: var(--bg-glass-strong);
    color: var(--text-primary);
}

.header-btn.refreshing {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.main-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
}

/* ==========================================
   HOME HERO (public page)
   ========================================== */
.home-hero {
    text-align: center;
    padding: 28px 0 8px;
}

.home-hero h1 {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-hero p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 4px;
}

/* ==========================================
   PORTFOLIO CAROUSEL (scroll-snap)
   ========================================== */
.carousel-wrapper {
    position: relative;
    margin-bottom: 8px;
}

.carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* NO gap — slides are exactly 100% */
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: start;
    /* Padding-right gives visual gap without breaking snap */
    padding-right: 0;
}

/* second slide gets left padding so it looks separate */
.carousel-slide:last-child {
    padding-left: 0;
}

/* give inner content some spacing */
.carousel-slide>* {
    margin: 0;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 12px 0 0;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.carousel-dot.active {
    background: var(--gold-500);
    width: 20px;
    border-radius: 4px;
}

/* ==========================================
   PORTFOLIO SUMMARY CARD
   ========================================== */
.portfolio-card {
    background: var(--gold-gradient);
    border-radius: var(--radius-xl);
    padding: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--gold-glow);
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.portfolio-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.portfolio-card::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 160px;
    height: 160px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.portfolio-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.portfolio-value {
    font-size: 2rem;
    font-weight: 800;
    color: #000;
    margin: 8px 0 4px;
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
}

.portfolio-profit {
    font-size: 0.9375rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.portfolio-profit.positive {
    color: rgba(0, 80, 0, 0.8);
}

.portfolio-profit.negative {
    color: rgba(160, 0, 0, 0.8);
}

.portfolio-count {
    margin-top: 16px;
    font-size: 0.8125rem;
    color: rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}

/* Chart card (carousel slide 2) */
.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 20px 16px;
    min-height: 170px;
    display: flex;
    flex-direction: column;
}

.chart-card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.chart-wrapper {
    position: relative;
    flex: 1;
    min-height: 180px;
}

/* ==========================================
   SECTION TITLES
   ========================================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    margin-top: 24px;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title .icon {
    font-size: 1.1rem;
    color: var(--gold-500);
}

.update-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==========================================
   PRICE CARDS — Satış büyük, Alış küçük
   ========================================== */
.price-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 8px;
}

.price-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.price-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-gold);
}

.price-card.yk-card {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(180, 83, 9, 0.04) 100%);
    border-color: rgba(245, 158, 11, 0.15);
}

.price-card-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.price-card-source {
    font-size: 0.625rem;
    color: var(--text-muted);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

/* Satış = büyük, üstte */
.price-card-sell-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.price-card-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gold-400);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.price-card.yk-card .price-card-value {
    font-size: 1.5rem;
}

/* Alış = küçük, altta */
.price-card-buy {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.price-card-buy span {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==========================================
   GROUPED ASSETS (accordion)
   ========================================== */
.asset-group {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 10px;
    transition: all var(--transition-fast);
    overflow: hidden;
}

.asset-group:hover {
    background: var(--bg-card-hover);
}

.asset-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.asset-group-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.asset-group-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.asset-group-summary {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.asset-group-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    margin-left: 12px;
}

.asset-group-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.asset-group-profit {
    font-size: 0.8125rem;
    font-weight: 600;
}

.asset-group-profit.profit {
    color: var(--green);
}

.asset-group-profit.loss {
    color: var(--red);
}

.asset-group-chevron {
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: transform var(--transition-normal);
    display: inline-block;
}

.asset-group.expanded .asset-group-chevron {
    transform: rotate(180deg);
}

/* Detail items — hidden by default, revealed on expand */
.asset-group-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.asset-group.expanded .asset-group-details {
    max-height: 5000px;
}

.asset-detail-item {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.15);
}

.asset-detail-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.asset-detail-item-qty {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.asset-detail-item-date {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.asset-detail-item-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.asset-detail-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.asset-detail-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 1px;
}

.asset-detail-value.profit {
    color: var(--green);
}

.asset-detail-value.loss {
    color: var(--red);
}

.asset-detail-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.asset-detail-profit {
    font-size: 0.875rem;
    font-weight: 700;
}

.asset-detail-profit.profit {
    color: var(--green);
}

.asset-detail-profit.loss {
    color: var(--red);
}

.asset-detail-actions {
    display: flex;
    gap: 6px;
}

.asset-detail-actions .btn {
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

/* ==========================================
   MODAL
   ========================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 24px 20px calc(24px + var(--safe-bottom));
    transform: translateY(100%);
    transition: transform var(--transition-slow);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-handle {
    width: 40px;
    height: 4px;
    background: var(--bg-glass-strong);
    border-radius: var(--radius-full);
    margin: 0 auto 20px;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.modal .form-group {
    margin-bottom: 16px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.modal-actions .btn {
    flex: 1;
}

/* ==========================================
   FAB
   ========================================== */
.fab {
    position: fixed;
    bottom: calc(24px + var(--safe-bottom));
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--gold-gradient);
    border: none;
    border-radius: 50%;
    color: #000;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.fab:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.4);
}

.fab:active {
    transform: scale(0.95);
}

/* ==========================================
   EMPTY STATE
   ========================================== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 0.9375rem;
    margin-bottom: 4px;
}

.empty-state-sub {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ==========================================
   LOADING
   ========================================== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, rgba(255, 255, 255, 0.08) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--gold-400);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.page-loader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ==========================================
   TOAST
   ========================================== */
.toast-container {
    position: fixed;
    top: calc(16px + var(--safe-top));
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    width: calc(100% - 32px);
    max-width: 400px;
    pointer-events: none;
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    box-shadow: var(--shadow-card);
    animation: toastIn 0.3s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.success {
    border-color: rgba(34, 197, 94, 0.3);
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.3);
}

.toast.removing {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* ==========================================
   UTILITIES
   ========================================== */
.text-gold {
    color: var(--gold-400);
}

.text-green {
    color: var(--green);
}

.text-red {
    color: var(--red);
}

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

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

.mt-2 {
    margin-top: 8px;
}

.hidden {
    display: none !important;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (min-width: 768px) {
    .login-card {
        padding: 48px 36px;
    }

    .modal {
        border-radius: var(--radius-xl);
        margin-bottom: 20px;
        max-height: 80vh;
    }

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

    .fab {
        bottom: 32px;
        right: calc(50% - 300px + 20px);
    }
}

@media (max-height: 500px) {
    .login-page {
        justify-content: flex-start;
        padding-top: 20px;
    }

    .login-card {
        padding: 24px 20px;
    }
}