/* Hawdl-Main Design System for Admin Panel */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

@font-face {
    font-family: 'Speda';
    src: url('../fonts/Speda.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Speda';
    src: url('../fonts/Speda-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Stone Palette */
    --stone-50: #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-300: #d6d3d1;
    --stone-400: #a8a29e;
    --stone-500: #78716c;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-800: #292524;
    --stone-900: #1c1917;

    /* Teal Primary Palette */
    --teal-50: #f0fdfa;
    --teal-100: #ccfbf1;
    --teal-200: #99f6e4;
    --teal-300: #5eead4;
    --teal-400: #2dd4bf;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --teal-700: #0f766e;
    --teal-800: #115e59;
    --teal-900: #134e4a;

    /* Semantic Statuses */
    --emerald-50: #ecfdf5;
    --emerald-200: #a7f3d0;
    --emerald-600: #059669;
    --emerald-700: #047857;

    --amber-50: #fffbeb;
    --amber-200: #fde68a;
    --amber-600: #d97706;
    --amber-700: #b45309;

    --rose-50: #fff1f2;
    --rose-200: #fecdd3;
    --rose-600: #e11d48;
    --rose-700: #be123c;

    --sky-50: #f0f9ff;
    --sky-200: #bae6fd;
    --sky-600: #0284c7;
    --sky-700: #0369a1;

    --radius: 8px;
    --radius-lg: 12px;
}

html {
    scroll-behavior: smooth;
    touch-action: manipulation;
}

body {
    font-family: 'Speda', 'DM Sans', sans-serif;
    color: var(--stone-900);
    background-color: var(--stone-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

[dir="rtl"] body, [dir="rtl"] * {
    font-family: 'Speda', 'DM Sans', sans-serif;
}

::selection {
    background: rgba(20, 184, 166, 0.3);
    color: #134e4a;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d6d3d1;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a29e;
}

/* Page transitions */
.page-transition {
    animation: pageIn 0.2s ease-out;
}

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

/* Stagger animation for cards */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    animation: staggerIn 0.4s ease-out forwards;
}

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

/* Row animation for tables */
.row-animate {
    opacity: 0;
    transform: translateY(10px);
    animation: rowIn 0.3s ease-out forwards;
}

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

/* Toast animations */
.toast-enter {
    animation: toastIn 0.3s ease-out;
}

.toast-exit {
    animation: toastOut 0.3s ease-in forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Modal animations */
.modal-overlay-show {
    opacity: 1 !important;
}

.modal-content-show {
    opacity: 1 !important;
    transform: scale(1) translateY(0) !important;
}

/* Mobile sidebar transitions */
.mobile-sidebar-open {
    transform: translateX(0) !important;
}

.mobile-overlay-show {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Active nav indicator */
[dir="rtl"] .nav-active-indicator {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background-color: #14b8a6;
    border-radius: 9999px 0 0 9999px;
}

[dir="ltr"] .nav-active-indicator {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background-color: #14b8a6;
    border-radius: 0 9999px 9999px 0;
}

/* Spinner for loading buttons */
.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

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

/* Card & Table styling helpers */
.admin-card {
    background-color: #ffffff;
    border: 1px solid #e7e5e4;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.2s ease;
}

.icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}
