/* =====================================================================
   الهوية البصرية — مركز المها لطب الأسنان
   الألوان من اللوجو: أزرق #3d7cc9 · سماوي #7ec5ea · أبيض
   ===================================================================== */
:root {
    --maha-blue: #3d7cc9;
    --maha-blue-dark: #2c5f9e;
    --maha-sky: #7ec5ea;
    --maha-bg: #f2f7fb;
    --bs-primary: #3d7cc9;
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    background-color: var(--maha-bg);
}

/* الترويسة بألوان الهوية */
.navbar.bg-primary {
    background: linear-gradient(135deg, var(--maha-blue-dark) 0%, var(--maha-blue) 60%, #4f93da 100%) !important;
    box-shadow: 0 2px 10px rgba(45, 95, 158, 0.25);
}
.navbar-brand img {
    height: 38px;
    width: auto;
    background: #fff;
    border-radius: 8px;
    padding: 2px;
}

/* أزرار وروابط أساسية بلون الهوية */
.btn-primary {
    background-color: var(--maha-blue);
    border-color: var(--maha-blue);
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--maha-blue-dark);
    border-color: var(--maha-blue-dark);
}
a { color: var(--maha-blue); }

/* بطاقات أعصر: زوايا وظلال ناعمة */
.card {
    border-radius: 10px;
    border-color: #e3ecf4;
    box-shadow: 0 1px 4px rgba(45, 95, 158, 0.06);
}
.card-header {
    background-color: #fbfdff;
    border-bottom-color: #e3ecf4;
    font-weight: 600;
}

/* الأرقام والهواتف بأرقام لاتينية ثابتة الاتجاه */
.num, .phone {
    direction: ltr;
    unicode-bidi: embed;
    font-variant-numeric: tabular-nums;
}

/* جداول البيانات: كل عمود يتوسط تحت عنوانه مباشرة،
   وأعمدة النصوص (أسماء/أوصاف) تأخذ text-start لمحاذاة اليمين */
.table th,
.table td {
    text-align: center;
    vertical-align: middle;
}
.table th.text-start,
.table td.text-start {
    text-align: start !important;
}

/* بطاقة تسجيل الدخول */
.login-card {
    max-width: 420px;
    margin: 6vh auto 0;
}
.login-logo {
    max-width: 190px;
    display: block;
    margin: 0 auto 8px;
}

/* تظليل نتائج البحث المطابقة */
mark {
    background: #ffe89a;
    padding: 0 2px;
    border-radius: 3px;
    font-weight: 700;
}

/* =====================================================================
   تعليقات/تحديثات التذكرة — نمط موحد واضح (شبيه بتعليقات فيسبوك)
   ===================================================================== */
.comment {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    align-items: flex-start;
}
.comment-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--maha-sky);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(45, 95, 158, 0.2);
}
.comment-body {
    min-width: 0;
    flex: 1;
}
.comment-bubble {
    background: #eef3f8;
    border-radius: 16px;
    padding: 9px 15px;
    display: inline-block;
    max-width: 100%;
}
.comment-author {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--maha-blue-dark);
    margin-bottom: 2px;
}
.comment-text {
    font-size: 1.02rem;
    line-height: 1.65;
    color: #1c2733;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.comment-time {
    font-size: 0.75rem;
    color: #8a95a1;
    margin-top: 3px;
    padding-inline-start: 15px;
}
.comment-close .comment-bubble {
    background: #fdeaea;
    border: 1px solid #f5c2c2;
}

/* تحديث نظامي (تغيير حالة/أهمية آلي) — سطر خفيف في الوسط، بلا فقاعة */
.comment-system {
    text-align: center;
    color: #8a95a1;
    font-size: 0.82rem;
    font-style: italic;
    margin: 8px 0;
}
.comment-system span {
    background: #f4f6f9;
    border-radius: 12px;
    padding: 3px 12px;
}

/* أعمدة الكانبان في لوحة الورديات */
.kanban-col {
    background: #fff;
    min-height: 120px;
}
.ticket-card {
    border-inline-start: 4px solid #dbe7f1;
}

/* تذكرة راكدة بلا تحديث +24 ساعة */
.ticket-stale {
    border-inline-start-color: #dc3545 !important;
    background: #fff8f8;
}

/* تذكرة متأخرة عن موعد استحقاقها */
.ticket-overdue {
    border-inline-start-color: #dc3545 !important;
    box-shadow: 0 0 0 1px rgba(220, 53, 69, 0.35);
}
