/* ═══════════════════════════════════════════════════
   44 Fitness Center — Global Design System
   macOS Liquid Glass · shadcn/ui inspired
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Zain:ital,wght@0,200;0,300;0,400;0,700;0,800;0,900;1,300;1,400&display=swap');

/* ── CSS Custom Properties ─────────────────────── */
:root {
    --bg-base: #ffffff;
    --bg-surface: #ffffff;
    --bg-elevated: #f5f5f7;

    /* Glass */
    --glass-bg: rgba(0, 0, 0, 0.025);
    --glass-bg-hover: rgba(0, 0, 0, 0.05);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-border-strong: rgba(0, 0, 0, 0.14);
    --glass-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 2px 6px -1px rgba(0, 0, 0, 0.07), 0 10px 28px -4px rgba(0, 0, 0, 0.06);
    --glass-glow: inset 0 1px 0 rgba(255, 255, 255, 0.8);

    /* Accent — Apple blue */
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-muted: rgba(37, 99, 235, 0.1);
    --accent-glow: 0 0 20px rgba(37, 99, 235, 0.2);

    /* Semantic */
    --success: #16a34a;
    --success-muted: rgba(22, 163, 74, 0.1);
    --warning: #d97706;
    --warning-muted: rgba(217, 119, 6, 0.1);
    --danger: #dc2626;
    --danger-muted: rgba(220, 38, 38, 0.1);

    /* Typography */
    --text-primary: rgba(0, 0, 0, 0.88);
    --text-secondary: rgba(0, 0, 0, 0.55);
    --text-muted: rgba(0, 0, 0, 0.35);

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 28px;

    /* Transitions */
    --transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ─────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Zain', sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    color-scheme: light;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
}

input,
select,
textarea {
    font-family: inherit;
}

img,
svg {
    display: block;
}

/* ── Glass Utility ──────────────────────────────── */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(1.8);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    border: 1px solid var(--glass-border);
    /* box-shadow: var(--glass-shadow), var(--glass-glow); */
}

.glass-strong {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(32px) saturate(2);
    -webkit-backdrop-filter: blur(32px) saturate(2);
    border: 1px solid var(--glass-border-strong);
    /* box-shadow: var(--glass-shadow), var(--glass-glow); */
}

/* ── Buttons ────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border-color: var(--glass-border);
}

.btn-secondary:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-strong);
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--glass-border);
}

.btn-ghost:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
    border-color: var(--glass-border-strong);
}

.btn-danger {
    background: var(--danger-muted);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: var(--danger);
    color: #fff;
}

.btn-success {
    background: var(--success-muted);
    color: var(--success);
    border-color: rgba(34, 197, 94, 0.2);
}

.btn-success:hover {
    background: var(--success);
    color: #fff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 13px 28px;
    font-size: 1rem;
    border-radius: var(--radius-lg);
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
}

/* ── Form Controls ──────────────────────────────── */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

.input {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375rem;
    padding: 10px 14px;
    width: 100%;
    transition: var(--transition);
    outline: none;
}

.input::placeholder {
    color: var(--text-muted);
}

.input:hover {
    border-color: var(--glass-border-strong);
    background: var(--bg-elevated);
}

.input:focus {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.06);
    /* box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12); */
}

.input-icon-wrap {
    position: relative;
}

.input-icon-wrap .input {
    padding-left: 40px;
}

.input-icon-wrap .icon-left {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 18px;
    height: 18px;
    pointer-events: none;
}

select.input option {
    background: var(--bg-surface);
    color: var(--text-primary);
}

/* ── Custom Select Wrapper ──────────────────────── */
.select-wrap {
    position: relative;
    display: block;
}

.select-wrap select.input {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 36px;
    cursor: pointer;
}

.select-wrap .select-chevron {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

/* ── Badge ──────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.badge-blue {
    background: var(--accent-muted);
    color: var(--accent);
}

.badge-green {
    background: var(--success-muted);
    color: var(--success);
}

.badge-yellow {
    background: var(--warning-muted);
    color: var(--warning);
}

.badge-red {
    background: var(--danger-muted);
    color: var(--danger);
}

.badge-gray {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
}

/* ── Toast ──────────────────────────────────────── */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    max-width: 360px;
    pointer-events: all;
    animation: toastIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    backdrop-filter: blur(24px) saturate(1.8);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    border: 1px solid;
}

.toast.removing {
    animation: toastOut 0.2s ease-in both;
}

.toast-success {
    background: rgba(22, 163, 74, 0.1);
    border-color: rgba(22, 163, 74, 0.3);
    color: #15803d;
}

.toast-error {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.3);
    color: #b91c1c;
}

.toast-info {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.3);
    color: #1d4ed8;
}

.toast svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* ── Modal ──────────────────────────────────────── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.15s ease both;
}

.modal {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border-strong);
    border-radius: var(--radius-xl);
    /* box-shadow: 0 24px 64px rgba(0, 0, 0, 0.12), var(--glass-glow); */
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--glass-border);
}

.modal-title {
    font-size: 1.05rem;
    font-weight: 600;
}

.modal-close {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
    flex-shrink: 0;
}

.modal-close:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-footer {
    padding: 16px 24px 22px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid var(--glass-border);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ── Scrollbar ──────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.28);
}

/* ── Loader ─────────────────────────────────────── */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Utility ─────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.gap-4 {
    gap: 16px;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.78rem;
}

.text-muted {
    color: var(--text-secondary);
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.w-full {
    width: 100%;
}