/* Public website foundation. Admin pages use the workspace design. */
:root {
    --bg: #fcfaf7;
    --bg-alt: #f5f2ed;
    --surface: #ffffff;
    --surface-border: #e9e5e0;
    --text: #1a2a33;
    --text-muted: #64748b;
    --brand: #0f4c81;
    --brand-light: #e8f0f6;
    --accent: #b8860b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0ea5e9;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
    --elevation-glass: 0 8px 32px 0 rgba(15, 23, 42, 0.04);
    --radius-full: 9999px;
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    direction: rtl;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Cairo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    text-align: right;
    background-color: var(--bg);
    line-height: 1.625;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text);
}

h1 { font-size: 1.875rem; letter-spacing: -0.01em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

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

button, input, select, textarea {
    font: inherit;
    color: inherit;
}
.panel {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.eyebrow {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.35rem;
}
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 800;
    font-size: 0.875rem;
    cursor: pointer;
    border: 1px solid transparent;
}

.button-primary {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 4px 10px rgba(15, 76, 129, 0.2);
}

.button-primary:hover {
    filter: brightness(1.1);
}

.button-secondary {
    background: var(--surface);
    color: var(--brand);
    border-color: var(--brand-light);
}

.button-secondary:hover {
    background: var(--brand-light);
}
input, select, textarea {
    background: #fff;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.85rem;
    width: 100%;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-light);
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #e0f2fe; color: #075985; }
.empty-state {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
}

.empty-state h2 {
    font-size: 4rem;
    color: var(--brand-light);
    margin-bottom: var(--space-sm);
}

.empty-state p {
    font-size: 0.95rem;
}
.flash {
    animation: flashIn 0.3s ease;
}

@keyframes flashIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
:root {
    --bg: #f6f0e6;
    --bg-alt: #eee4d5;
    --surface: rgba(255, 251, 245, 0.92);
    --surface-strong: #fffdfa;
    --surface-border: rgba(18, 38, 49, 0.12);
    --text: #122631;
    --text-muted: #5d6c76;
    --brand: #0e4f5c;
    --brand-deep: #083843;
    --brand-light: #d8eaed;
    --accent: #c28b38;
    --accent-soft: #efe0bf;
    --success: #1f7a64;
    --warning: #c97713;
    --danger: #b55342;
    --info: #0c7590;
    --shadow-sm: 0 10px 30px rgba(16, 31, 43, 0.05);
    --shadow-md: 0 18px 44px rgba(16, 31, 43, 0.08);
    --shadow-lg: 0 30px 60px rgba(16, 31, 43, 0.12);
}

body {
    font-family: "Alexandria", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(194, 139, 56, 0.11), transparent 28%),
        radial-gradient(circle at bottom right, rgba(14, 79, 92, 0.14), transparent 26%),
        linear-gradient(180deg, #f8f2e9 0%, #f3ebde 100%);
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(14, 79, 92, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 79, 92, 0.025) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 75%);
}

h1, h2, h3, h4, h5, h6 {
    font-family: "El Messiri", "Alexandria", sans-serif;
}

.panel {
    background: var(--surface);
    backdrop-filter: blur(16px);
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-sm);
}

.flash-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
    background: var(--surface-strong);
    border: 1px solid rgba(18, 38, 49, 0.08);
}

.flash-card i {
    width: 18px;
    height: 18px;
}

.full-span {
    grid-column: 1 / -1;
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

:root {
    --focus-ring: rgba(194, 139, 56, 0.22);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--focus-ring);
}

.button {
    min-height: 44px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

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

.button:active {
    transform: translateY(0);
}
html[dir="ltr"] {
    direction: ltr;
}

body {
    text-align: start;
}

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

html[dir="ltr"] body {
    text-align: left;
}

html[dir="rtl"] .public-header,
html[dir="rtl"] .public-nav {
    direction: rtl;
}

html[dir="ltr"] .public-header,
html[dir="ltr"] .public-nav {
    direction: ltr;
}

.public-header {
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: 0 10px 30px rgba(16, 31, 43, 0.06);
}

html[dir="ltr"] .public-nav {
    justify-content: flex-start;
}

.public-toolbar,
.public-lang-switcher {
    flex-wrap: wrap;
}

@media (max-width: 900px) {

    .public-header {
        grid-template-columns: 1fr auto;
        align-items: start;
    }

    .public-toolbar {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 640px) {

    .public-toolbar .button {
        width: 100%;
    }

    .public-lang-switcher {
        width: 100%;
        justify-content: flex-start;
    }
}
