﻿/* ===== Soft-Light Clinic Theme ===== */
/* ألوان هادئة فاتحة + تباين واضح للنصوص + أزرق موحّد */
:root {
    --bg: #f5f7fb; /* خلفية عامة فاتحة جداً */
    --surface: #ffffff; /* أسطح وبطاقات */
    --line: rgba(15,23,42,.08);
    --text: #0f172a; /* نص داكن مقروء */
    --muted: #475569; /* نص ثانوي */
    --primary: #2563eb; /* أزرق أساسي */
    --primary-hover: #1d4ed8;
    --radius: 16px;
    /* ===== Extra tokens (دمج من :root الثاني) ===== */
    --card-bg: #fff;
    --card-border: #e9ecef;
    --badge-fillers: #e3f2fd;
    --badge-botox: #fcefe3;
    --badge-skin: #eaf7f1;
    --chip: #f5f7fb;
}

/* خلفية ونص */
.lc-body {
    background: var(--bg);
    color: var(--text);
}

/* ===== Navbar (فاتح) ===== */
.lc-navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

    .lc-navbar .navbar-brand {
        color: var(--text);
        font-weight: 800;
    }

    .lc-navbar .nav-link {
        color: #334155;
        font-weight: 600;
    }

        .lc-navbar .nav-link.active,
        .lc-navbar .nav-link:hover {
            color: var(--text);
        }

.lc-badge {
    background: rgba(37,99,235,.12);
    color: #1d4ed8;
    border: 1px solid rgba(37,99,235,.25);
    font-weight: 700;
}

/* ===== Buttons ===== */
.lc-btn {
    background-color: var(--primary);
    color: #fff;
    border: 0;
    border-radius: 12px;
    font-weight: 700;
}

    .lc-btn:hover {
        background-color: var(--primary-hover);
    }

.btn-outline-secondary {
    border-radius: 12px;
}

/* ===== Forms ===== */
.form-control, .form-select {
    background-color: #ffffff;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 12px;
}

    .form-control::placeholder {
        color: #94a3b8;
    }

    .form-control:focus, .form-select:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 .25rem rgba(37,99,235,.15);
    }

/* ===== Cards / Tiles ===== */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 24px rgba(2,6,23,.05);
}

    .card .card-title, h1, h2, h3, h4 {
        color: var(--text);
        font-weight: 800;
    }

.text-muted {
    color: var(--muted) !important;
}

/* ===== Links ===== */
a, .link-primary {
    color: var(--primary);
}

    a:hover, .link-primary:hover {
        color: var(--primary-hover);
    }

/* ===== Footer (لاصق) ===== */
.lc-footer {
    border-top: 1px solid var(--line);
    background: var(--surface);
    padding: .75rem 0;
}

/* تحجيم حاوية مناسب */
.container {
    max-width: 1200px;
}

/* ===== Modern tables + mobile cards ===== */
.table-modern {
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 12px;
    overflow: hidden;
}

.list-card {
    background: var(--surface, #fff);
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 8px 20px rgba(2,6,23,.05);
}

    .list-card .badge {
        font-weight: 700;
    }





.visit-card {
    border: 1px solid var(--card-border);
    border-radius: 16px;
    background: var(--card-bg);
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    transition: transform .12s ease, box-shadow .12s ease;
}

    .visit-card:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(0,0,0,.08);
    }

.visit-title {
    font-weight: 600;
    font-size: 1.05rem;
}

.visit-meta {
    color: var(--muted);
    font-size: .9rem;
}

.badge-chip {
    background: var(--chip);
    border-radius: 12px;
    padding: .35rem .6rem;
    font-weight: 600;
}

.badge-fillers {
    background: var(--badge-fillers);
}

.badge-botox {
    background: var(--badge-botox);
}

.badge-skin {
    background: var(--badge-skin);
}

.note-box {
    background: #fafafa;
    border: 1px dashed #ddd;
    border-radius: 12px;
    padding: .65rem .8rem;
    color: #444;
    white-space: pre-wrap;
}

/* ---------- Modern Tables ---------- */
.table-card {
    border: 0;
    border-radius: .8rem;
    box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.10);
    overflow: hidden;
}

.table-modern {
    margin: 0;
}

    .table-modern thead th {
        background: #f8f9fa;
        font-weight: 600;
        border-bottom: 1px solid #e9ecef;
        vertical-align: middle;
    }

    .table-modern td, .table-modern th {
        vertical-align: middle;
    }

    .table-modern tbody tr:hover {
        background: #f9fbff;
    }

    .table-modern .actions {
        white-space: nowrap;
    }

    /* تذييل الإجمالي */
    .table-modern tfoot th, .table-modern tfoot td {
        background: #fcfcfd;
        border-top: 1px solid #eceff3;
        font-weight: 600;
    }

/* كابشن أعلى الجدول (اختياري) */
.table-caption {
    padding: .75rem 1rem .25rem 1rem;
    font-weight: 600;
}

/* شارات خفيفة للفئات/الحالات */
.badge-chip {
    background: #f1f3f5;
    color: #343a40;
    border-radius: 999px;
    padding: .35rem .6rem;
    font-weight: 600;
}

/* حجم أزرار أنظف */
.btn.btn-sm {
    padding: .25rem .5rem;
}

/* تحسين اللف (الهورز سكرول) */
.table-scroll {
    overflow: auto;
}

/* موبايل: تصغير المسافات قليلاً */
@media (max-width: 576px) {
    .table-modern td, .table-modern th {
        padding: .5rem .6rem;
    }
}


/* ===== Patch: make table-card the one that holds the border/radius, not the table itself ===== */
.table-card .table-modern {
    border: 0; /* منع إطار مزدوج */
    border-radius: 0; /* الزوايا على الكارد نفسه */
    overflow: visible; /* خلّي الجدول مريح داخل الحاوية */
}

/* الجدول داخل الكارد بدون فراغ سفلي */
.table-card .table {
    margin-bottom: 0;
}

/* سكرول أفقي سلس + عرض أدنى للجدول */
.table-scroll {
    overflow-x: auto;
}

    .table-scroll table {
        min-width: 680px; /* حسّنها حسب أعمدة جداولك */
    }


/* ===== Polishing for visit tables ===== */

/* رأس الجدول أوضح شوي */
.table-modern thead th {
    background: #f8fafc; /* أفتح من الافتراضي */
    border-bottom: 1px solid #e9ecef; /* خط سفلي خفيف */
    font-weight: 600;
    vertical-align: middle;
}

/* فواصل الصفوف أفتح */
.table-modern tbody td,
.table-modern tbody th {
    border-top: 1px solid rgba(15,23,42,.06);
}

/* صف الإجمالي: خط علوي خفيف وخلفية خفيفة جداً */
.table-modern tfoot th,
.table-modern tfoot td {
    background: #fbfcfe;
    border-top: 1px solid #e9ecef; /* بدل الخط الغامق */
    font-weight: 600;
}

/* محاذاة الأرقام لليمين (لو احتجتها في جداول ثانية) */
.table-modern .num {
    text-align: right;
}

/* عرض أدنى للجداول داخل السكرول (عدّل الرقم حسب أعمدتك) */
.table-scroll table {
    min-width: 720px;
}

/* تأكد دايمًا أن الجدول بلا فراغ سفلي داخل الكارد */
.table-card .table {
    margin-bottom: 0;
}

.toast-stack {
    position: fixed;
    right: 16px;
    top: 72px;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
}

.toast-card {
    background: #fff;
    border: 1px solid rgba(15,23,42,.12);
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 12px 28px rgba(2,6,23,.10);
}

