/* Root and Body styles moved to theme.css */
a {
    color: inherit;
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

a:hover {
    opacity: 0.8;
}

/* =========================================
   LAYOUT
   ========================================= */

.app-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-primary);
}

.sidebar {
    width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    padding: var(--space-xl) var(--space-lg);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transition: left var(--transition-base);
    overflow-y: auto;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: var(--space-xl);
    background: transparent;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    flex-wrap: wrap;
    row-gap: 12px;
}

.app-footer {
    margin-top: auto;
    padding: 18px 0 6px;
    text-align: center;
    font-size: 11px;
    line-height: 1.4;
    color: var(--text-tertiary);
}

.app-footer-inner {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.7);
}

.app-footer-address {
    font-family: var(--font-mono);
    opacity: 0.9;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    width: 100%;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(27, 22, 16, 0.35);
    backdrop-filter: blur(4px);
    z-index: 999;
}

.sidebar-overlay.show {
    display: block;
}

/* =========================================
   CARDS
   ========================================= */

/* .card moved to components.css */

.card-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid var(--glass-border-strong);
    border-radius: var(--radius-2xl);
    padding: var(--space-lg);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.card-glass::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(160px 120px at 18% 18%, rgba(255, 255, 255, 0.55), transparent 60%),
        radial-gradient(160px 120px at 80% 20%, rgba(255, 255, 255, 0.35), transparent 60%);
    opacity: 0.8;
    pointer-events: none;
}

.card-glass>* {
    position: relative;
    z-index: 1;
}

.card-glass:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--glass-border-light);
}

/* .news-card moved to components.css */

/* =========================================
   SEARCH / TOPBAR
   ========================================= */

.topbar {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.searchbar-wrap {
    position: relative;
    flex: 1;
    min-width: 260px;
    max-width: 560px;
}

.searchbar {
    width: 100%;
    height: 46px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-primary);
    padding: 0 16px 0 44px;
    outline: none;
    transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.searchbar::placeholder {
    color: var(--text-tertiary);
}

.searchbar:focus {
    border-color: rgba(76, 122, 168, 0.6);
    background: var(--bg-layer-1);
    box-shadow: 0 0 0 4px rgba(76, 122, 168, 0.12);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 14px;
    pointer-events: none;
}

/* Global dropdown base (Dashboard search, Add asset search, etc.) */
.search-results {
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    z-index: 50;

    max-height: 340px;
    overflow-y: auto;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: var(--shadow-lg);
}

.search-results>div {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.search-results>div:last-child {
    border-bottom: none;
}

@media (max-width: 768px) {
    .searchbar-wrap {
        max-width: 100%;
    }
}

/* =========================================
   BUTTONS
   ========================================= */

/* Buttons moved to components.css */

/* =========================================
   FORMS
   ========================================= */

/* Forms moved to components.css */

/* =========================================
   HERO SECTIONS
   ========================================= */

.hero-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    margin-bottom: var(--space-xl);
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.hero-eyebrow {
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-gold);
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-md);
    background: linear-gradient(135deg, var(--text-heading), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* =========================================
   FILTER TABS
   ========================================= */

.filter-tabs {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
    padding: 6px;
    background: var(--surface);
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
}

.filter-tab,
.filter-tabs .tab-link {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.filter-tab:hover,
.filter-tabs .tab-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.filter-tab.active,
.filter-tabs .tab-link.active {
    background: var(--bg-highlight);
    color: var(--text-heading);
    border-color: var(--border);
}

/* =========================================
   GRID SYSTEMS
   ========================================= */

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {

    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   LOADING SKELETONS
   ========================================= */

.skeleton {
    background: linear-gradient(90deg,
            var(--bg-secondary) 25%,
            var(--bg-tertiary) 50%,
            var(--bg-secondary) 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    border-radius: var(--radius-lg);
}

.skeleton-card {
    height: 350px;
}

.skeleton-text {
    height: 20px;
    margin-bottom: var(--space-sm);
}

/* =========================================
   UTILITIES
   ========================================= */

.text-primary {
    color: var(--text-primary);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-tertiary {
    color: var(--text-tertiary);
}

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

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

.text-metric {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-heading);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-info {
    color: var(--info);
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

.uppercase {
    text-transform: uppercase;
}

.capitalize {
    text-transform: capitalize;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
}

.col-6 {
    flex: 1 1 320px;
    min-width: 280px;
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.mb-sm {
    margin-bottom: var(--space-sm);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.mb-xl {
    margin-bottom: var(--space-xl);
}

.mt-sm {
    margin-top: var(--space-sm);
}

.mt-md {
    margin-top: var(--space-md);
}

.mt-lg {
    margin-top: var(--space-lg);
}

.mt-xl {
    margin-top: var(--space-xl);
}

/* =========================================
   SIDEBAR STYLES
   ========================================= */

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-2xl);
}

.logo i {
    color: var(--accent-gold);
}

/* =========================================
   LANGUAGE TOGGLE
   ========================================= */

.lang-toggle {
    font-size: 13px;
    font-weight: 700;
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.lang-toggle a {
    color: var(--text-tertiary);
    transition: color var(--transition-fast);
}

.lang-toggle a.active {
    color: var(--accent-gold);
}

/* =========================================
   MOBILE RESPONSIVE
   ========================================= */

.mobile-only {
    display: none;
}

@media (max-width: 1024px) {
    .sidebar {
        left: calc(var(--sidebar-width) * -1);
        box-shadow: var(--shadow-xl);
    }

    .sidebar.open {
        left: 0;
    }

    .main-content {
        margin-left: 0;
        padding: var(--space-lg);
    }

    .mobile-only {
        display: block;
    }

    .hero-section {
        padding: var(--space-lg);
    }

    .filter-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .app-topbar h2 {
        font-size: 1.05rem;
    }
}

/* =========================================
   BADGE STYLES
   ========================================= */

.badge-stocks {
    background: rgba(74, 158, 255, 0.15);
    color: var(--accent-blue);
}

.badge-crypto {
    background: rgba(213, 157, 74, 0.18);
    color: var(--warning);
}

.badge-metals {
    background: rgba(212, 175, 55, 0.15);
    color: var(--accent-gold);
}

.badge-fx {
    background: rgba(61, 143, 131, 0.15);
    color: var(--accent-green);
}
