/* ============================================
   ALPHA FINANS DATA - Base / Reset Styles
   ============================================ */

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

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

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

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent-primary);
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
    font-size: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-text-primary);
}

h1 { font-size: var(--font-size-5xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-md); }

p {
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
}

::selection {
    background-color: rgba(0, 212, 255, 0.3);
    color: var(--color-text-primary);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border-secondary);
    border-radius: var(--radius-full);
}

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

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.container-wide {
    max-width: var(--container-wide);
}

.section {
    padding: var(--spacing-4xl) 0;
}

.section-title {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-md);
}

.section-subtitle {
    font-size: var(--font-size-md);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-2xl);
    max-width: 600px;
}

/* Utility */
.text-accent { color: var(--color-accent-primary); }
.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================
   RTL (Right-to-Left) Support - Arabic, Hebrew
   ============================================ */

[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .app-layout {
    direction: rtl;
}

[dir="rtl"] .app-sidebar {
    left: auto;
    right: 0;
    border-right: none;
    border-left: 1px solid var(--color-border-primary);
}

[dir="rtl"] .app-main {
    margin-left: 0;
    margin-right: var(--sidebar-width, 260px);
}

[dir="rtl"] .sidebar-collapsed ~ .app-main,
[dir="rtl"] .app-sidebar.collapsed ~ .app-main {
    margin-right: var(--sidebar-collapsed-width, 72px);
}

[dir="rtl"] .settings-tile-action {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .settings-chevron,
[dir="rtl"] .settings-profile-chevron {
    transform: scaleX(-1);
}

[dir="rtl"] .page-header {
    text-align: right;
}

[dir="rtl"] input,
[dir="rtl"] textarea {
    text-align: right;
}

[dir="rtl"] select {
    text-align: right;
    padding-left: 24px;
    padding-right: 8px;
}

[dir="rtl"] .text-right {
    text-align: left;
}

[dir="rtl"] .session-card-action {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .session-card {
    direction: rtl;
}

/* RTL sidebar nav items */
[dir="rtl"] .sidebar-nav-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .sidebar-nav-item svg {
    margin-right: 0;
    margin-left: 12px;
}

/* RTL for exchange grid and language grid */
[dir="rtl"] .exchange-item,
[dir="rtl"] .language-option {
    flex-direction: row-reverse;
}

[dir="rtl"] .language-option-info {
    text-align: right;
}

/* RTL toggle switch */
[dir="rtl"] .toggle-switch::before {
    left: auto;
    right: 3px;
}

[dir="rtl"] .toggle-switch.active::before {
    transform: translateX(-20px);
}
