/* =========================================
   1. المتغيرات والإعدادات العامة (Variables & Reset)
   ========================================= */
:root {
  --green-900: #0b3b2e;
  --green-700: #0f5a44;
  --green-50: #eef7f3;
  --gold-600: #caa24a;
  --text: #0f172a;
  --muted: #64748b;
  --card: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 12px 40px rgba(2, 6, 23, .10);
  --radius: 18px;
  --urgent-red: #ef4444;
  --urgent-bg: #fef2f2;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Cairo", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, var(--green-50), #ffffff);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1200px;
  margin: auto;
  padding: 16px;
}

/* =========================================
   2. الشريط العلوي (Topbar)
   ========================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  max-width: 1200px;
  margin: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
}

.brand img {
  width: 45px; /* تم التعديل ليكون مناسباً أكثر */
  height: 45px;
  object-fit: contain;
}

.brand b { display: block; font-size: 14px; }
.brand span { display: block; font-size: 12px; color: var(--muted); }

.search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 12px;
  box-shadow: 0 6px 18px rgba(2, 6, 23, .06);
  transition: box-shadow 0.2s;
}

.search:focus-within {
  box-shadow: 0 6px 20px rgba(15, 90, 68, .15);
  border-color: var(--green-700);
}

.search input {
  border: 0;
  outline: 0;
  width: 100%;
  font-size: 14px;
  background: transparent;
}

.topbar-reg {
  display: flex;
  gap: 6px;
  margin-left: 10px; /* تم تعديل الاتجاه للغة العربية */
}

/* =========================================
   3. الأزرار (Buttons)
   ========================================= */
.btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 10px 24px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: .2s;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn.primary {
  border-color: blue;
  background: blue;
  color: #fff;
  box-shadow: 0 4px 12px rgba(15, 90, 68, 0.2);
}

.btn.outline {
  background: #fff;
  border-color: rgba(15, 90, 68, .25);
  color: var(--green-900);
}

.btn.warn {
  border-color: rgba(202, 162, 74, .35);
  background: rgba(202, 162, 74, .10);
  color: #7a5a12;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.mini-btn {
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
  transition: 0.2s;
}

.mini-btn:hover { background: #f1f5f9; color: var(--green-900); }
.mini-btn.gold:hover { border-color: var(--gold-600); color: #854d0e; }

/* أزرار شفافة للهيرو */
.btn.hero-btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  backdrop-filter: blur(4px);
  font-size: 13px;
  padding: 8px 16px;
}
.btn.hero-btn-secondary:hover { background: rgba(255, 255, 255, 0.25); transform: translateY(-2px); }

.btn.hero-btn-gold {
  background: rgba(202, 162, 74, 0.2);
  border: 1px solid rgba(202, 162, 74, 0.5);
  color: #fff;
  backdrop-filter: blur(4px);
  font-size: 13px;
  padding: 8px 16px;
}
.btn.hero-btn-gold:hover { background: rgba(202, 162, 74, 0.3); transform: translateY(-2px); }

/* =========================================
   4. قسم الهيرو المصلح (Hero Section Fixed)
   ========================================= */
.hero {
  position: relative;
  width: 100%;
  height: clamp(600px, 85vh, 920px);
  overflow: hidden;
  background: #000; /* خلفية سوداء تظهر أثناء تحميل الفيديو */
}

.hero .hero-media {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 1; /* الفيديو في الطبقة السفلية */
}

.hero .hero-media iframe {
  width: 100vw;
  height: 56.25vw; /* نسبة 16:9 */
  min-height: 100vh;
  min-width: 177.77vh;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hero .hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2; /* الطبقة الملونة فوق الفيديو */
  /* تم تعديل الألوان لتكون شفافة (0.7 و 0.8) بدلاً من صلبة */
  background: linear-gradient(135deg, rgba(4, 56, 141, 0.8) 0%, rgba(15, 90, 68, 0.7) 100%);
}

.hero .hero-inner {
  position: relative;
  z-index: 3; /* المحتوى فوق كل شيء */
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}
/* =========================================
   5. لوحة التحكم والفلاتر (Dashboard Panel)
   ========================================= */
.dashboard-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: -60px;
  position: relative; z-index: 10;
  box-shadow: var(--shadow);
  display: flex; flex-wrap: wrap; gap: 20px;
  align-items: center; justify-content: space-between;
}

.dashboard-title h3 { margin: 0; font-size: 18px; }
.dashboard-title span { font-size: 13px; color: var(--muted); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; flex: 1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 160px; flex: 1; }

label { font-size: 12px; color: var(--muted); font-weight: 800; margin-bottom: 4px; }

select, input.reg-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  background: #f8fafc;
  transition: border-color 0.2s;
  font-family: inherit;
}
select:focus, input.reg-input:focus { border-color: var(--green-700); background: #fff; }

.kpis { display: flex; gap: 10px; flex-wrap: wrap; }
.kpi {
  border: 3px solid #006c35;
  border-radius: 14px;
  padding: 10px 16px;
  background: #f8fafc;
  min-width: 140px;
  text-align: center;
}
.kpi b { font-size: 20px; display: block; color: var(--green-900); }
.kpi span { display: block; color: var(--muted); font-size: 12px; }

/* =========================================
   6. الشبكة والبطاقات (Grid & Cards)
   ========================================= */
.grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.2s;
}
.card:hover { transform: translateY(-4px); }

/* Urgent Case Styles */
.card.urgent {
  border: 2px solid var(--urgent-red);
  background: var(--urgent-bg);
  animation: pulseBorder 2s infinite;
}
@keyframes pulseBorder {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.badge.urgent-badge {
  background: var(--urgent-red);
  color: #fff; border: 0;
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4);
  animation: shake 3s infinite;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(2px); }
}

.card-top {
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(15, 90, 68, .06), transparent);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}

.case-img {
  width: 100%; height: 180px;
  object-fit: cover; display: block;
  border-bottom: 1px solid var(--border);
  background-color: #f8fafc;
}

.org { display: flex; gap: 10px; align-items: center; min-width: 0; }
.org img {
  width: 36px; height: 36px; border-radius: 12px;
  border: 1px solid var(--border);
  object-fit: cover; background: #fff;
}
.org b {
  font-size: 16px; font-weight: 900;
  color: var(--green-900);
  max-width: 260px;
  line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; text-overflow: ellipsis;
}
.org span { font-size: 12px; color: var(--muted); display: block; }

.card-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.title { margin: 0; font-size: 16px; line-height: 1.5; }
.meta { display: flex; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: 11px; }
.meta span { border: 2px dashed #3b82f6;; padding: 4px 8px; border-radius: 999px; background: #fff; }

.progress {
  margin-top: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  background: #fff;
}
.bar {
  height: 10px; border-radius: 999px;
  background: rgba(15, 90, 68, .10);
  overflow: hidden; border: 1px solid rgba(15, 90, 68, .12);
  margin-top: 8px;
}
.bar > div {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--green-700), var(--gold-600));
  transition: width 0.5s ease;
}

.card-actions {
  padding: 16px; border-top: 1px solid var(--border); display: block;
}
.card-actions .btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.card-actions .btn { flex: 1; text-align: center; }

.empty {
  margin-top: 16px;
  border: 1px dashed rgba(100, 116, 139, .35);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center; color: var(--muted);
  background: #fff;
  width: 100%;
}

/* =========================================
   7. النوافذ المنبثقة (Modals)
   ========================================= */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(2, 6, 23, .5);
  backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  padding: 16px; z-index: 99;
  animation: fadeIn 0.2s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: min(980px, 100%);
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 30px 90px rgba(2, 6, 23, .30);
  overflow: hidden;
  display: flex; flex-direction: column;
  max-height: 90vh;
  transition: width 0.3s;
}

.modal-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: linear-gradient(180deg, rgba(15, 90, 68, .06), transparent);
}
.modal-body { padding: 46px; overflow-y: auto; }
.modal-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; }

.box {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  background: #fff;
}
.box h3 { margin: 0 0 10px; font-size: 13px; color: var(--muted); }

.row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed rgba(100, 116, 139, .25); }
.row:last-child { border-bottom: 0; }
.divider { border: 0; border-top: 1px solid var(--border); margin: 12px 0; }

.drug {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  background: #fff;
  display: flex; gap: 12px; align-items: center;
  margin-bottom: 8px;
}
.drug-img {
  width: 50px; height: 50px; border-radius: 8px;
  object-fit: cover; background: #f8fafc; border: 1px solid var(--border);
}
.pill {
  display: inline-block; font-size: 11px;
  border: 1px solid rgba(100, 116, 139, .25);
  border-radius: 999px; padding: 2px 6px;
  background: #fff; color: var(--muted);
}

.notice {
  margin-top: 10px;
  border: 1px solid rgba(202, 162, 74, .35);
  background: rgba(202, 162, 74, .10);
  color: #7a5a12;
  border-radius: 14px; padding: 10px;
  font-size: 12px; line-height: 1.7;
}

/* Payment Styles */
.payment-methods { display: flex; gap: 12px; margin-bottom: 20px; margin-top: 10px; }
.method-option {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
  font-size: 13px; font-weight: 700; color: var(--muted);
}
.method-option:hover { border-color: var(--green-700); }
.method-option.active {
  border-color: var(--green-700);
  background: rgba(15, 90, 68, .04);
  color: var(--green-900);
  box-shadow: 0 4px 12px rgba(15, 90, 68, .1);
}

/* Helpers */
.hidden-col { display: none !important; }
.payment-focus .modal-grid { grid-template-columns: 1fr; }
.payment-focus .modal { width: min(500px, 100%); }
.reg-modal-container { width: min(500px, 100%); }

/* Floating Button */
.float-btn {
  position: fixed; top: 50%; right: 0; transform: translateY(-50%);
  background: linear-gradient(to bottom, var(--green-900), var(--green-700));
  color: white; padding: 10px 16px;
  border-radius: 20px 0 0 20px;
  cursor: pointer; z-index: 90;
  font-weight: 700; font-size: 13px;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
  transition: padding 0.2s;
}
.float-btn:hover { padding-right: 20px; }

/* Responsive */
@media (max-width: 900px) {
  .topbar-reg { display: none; }
  .brand { min-width: auto; }
  .brand span { display: none; }
  .hero { height: clamp(620px, 85vh, 850px); }
  .hero .hero-inner { text-align: center; align-items: center; }
  .hero .hero-actions { justify-content: center; }
  .modal-grid { grid-template-columns: 1fr; }
}


/* تنسيقات لوحة التحكم */
.dashboard-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
    min-height: 80vh;
}

/* .sidebar {
    background: #1e293b;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.sidebar-menu a {
    display: block;
    padding: 12px;
    color: #555;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 5px;
    transition: 0.3s;
    font-weight: bold;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background: var(--primary);
    color: #fff;
} */

.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: center;
    border-top: 4px solid var(--primary);
}

.stat-card h3 { font-size: 2.5em; margin: 10px 0; color: #333; }
.stat-card span { color: #777; font-size: 0.9em; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.data-table th, .data-table td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid #eee;
}

.data-table th { background: #f8f9fa; color: #555; }

/* Status Badges */
.badge { padding: 5px 10px; border-radius: 15px; font-size: 0.8em; font-weight: bold; }
.badge.approved { background: #d4edda; color: #155724; }
.badge.rejected { background: #f8d7da; color: #721c24; }
.badge.pending { background: #fff3cd; color: #856404; }
.badge.completed { background: #cce5ff; color: #004085; }




    /* تنسيق خاص لصفحة الدخول */
    .login-container {
        max-width: 450px;
        margin: 50px auto;
        background: #fff;
        border-radius: 15px;
        box-shadow: 0 5px 20px rgba(0,0,0,0.05);
        overflow: hidden;
    }
    .login-tabs {
        display: flex;
        background: #f8f9fa;
        border-bottom: 1px solid #eee;
    }
    .login-tab {
        flex: 1;
        padding: 15px;
        text-align: center;
        cursor: pointer;
        font-weight: bold;
        color: #777;
        transition: 0.3s;
    }
    .login-tab.active {
        background: #fff;
        color: var(--primary);
        border-top: 3px solid var(--primary);
    }
    .login-body {
        padding: 30px;
    }
    .form-group {
        margin-bottom: 15px;
        text-align: right;
    }
    .hidden { display: none; }

    /* ====================================
   Enhanced Dropdown Menu Styles
   ==================================== */

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    max-width: 320px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 8px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 8px;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Section Title */
.dropdown-section-title {
    padding: 12px 16px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 0.5px;
    border-top: 1px solid #f0f0f0;
    margin-top: 8px;
}

.dropdown-section-title:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 8px;
}

/* Dropdown Item */
.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    margin: 2px 0;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: var(--primary, #006C35);
    transform: translateX(-2px);
}

.dropdown-item:active {
    transform: translateX(-2px) scale(0.98);
}

/* Dropdown Item Icon */
.dropdown-item-icon {
    font-size: 18px;
    margin-left: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Danger Item (Logout) */
.dropdown-item.danger {
    color: #dc3545;
}

.dropdown-item.danger:hover {
    background: #fff5f5;
    color: #c82333;
}

/* Divider */
.dropdown-divider {
    height: 1px;
    background: #e9ecef;
    margin: 8px 0;
}

/* Badge for notifications */
.dropdown-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #dc3545;
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    margin-right: auto;
}

.dropdown-badge.success {
    background: #28a745;
}

.dropdown-badge.warning {
    background: #ffc107;
    color: #333;
}

.dropdown-badge.info {
    background: #17a2b8;
}

/* Dropdown Animation */
@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .dropdown-menu {
        min-width: 260px;
        right: 0;
        left: auto;
    }
    
    .dropdown-item {
        font-size: 13px;
        padding: 10px 14px;
    }
    
    .dropdown-item-icon {
        font-size: 16px;
        margin-left: 10px;
    }
}


/* تنسيقات نافذة الدفع */
.payment-modal {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 16px;
    padding: 0;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.payment-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.payment-body { padding: 20px; }
.amount-presets {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.amount-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}
.amount-btn:hover, .amount-btn.active {
    border-color: var(--primary);
    background: #f0fdf4;
    color: var(--primary);
    font-weight: bold;
}
.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}
.pm-card {
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
}
.pm-card.active { border-color: var(--primary); background: #f9f9f9; }
.case-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9em;
}

/* ==================== TOAST SYSTEM ==================== */
#toast-container {
    position: fixed;
    top: 20px;
    left: 20px; /* في العربية نضعها يسار الشاشة لعدم تغطية القوائم */
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 300px;
    max-width: 400px;
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    transform: translateX(-100%);
    animation: slideInLeft 0.3s forwards;
    border-right: 4px solid transparent; /* الشريط الملون يمين الرسالة */
    direction: rtl;
}

.toast.hiding {
    animation: slideOutLeft 0.3s forwards;
}

@keyframes slideInLeft {
    from { transform: translateX(-120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutLeft {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-120%); opacity: 0; }
}

/* الأيقونات */
.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-left: 12px;
    font-size: 20px;
}

/* المحتوى */
.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* زر الإغلاق */
.toast-close {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    margin-right: 10px;
    transition: 0.2s;
}

.toast-close:hover { color: #333; }

/* شريط التقدم */
.toast-progress {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 3px;
    background: rgba(0,0,0,0.1);
    width: 100%;
}

.toast-progress-bar {
    height: 100%;
    width: 100%;
    background: currentColor; /* يأخذ لون النص الحالي */
    animation: progress linear forwards;
}

@keyframes progress {
    from { width: 100%; }
    to { width: 0%; }
}

/* ==================== THEMES ==================== */
/* Success */
.toast.success { border-right-color: #10B981; }
.toast.success .toast-icon { color: #10B981; }
.toast.success .toast-progress-bar { background: #10B981; }

/* Error */
.toast.error { border-right-color: #EF4444; }
.toast.error .toast-icon { color: #EF4444; }
.toast.error .toast-progress-bar { background: #EF4444; }

/* Warning */
.toast.warning { border-right-color: #F59E0B; }
.toast.warning .toast-icon { color: #F59E0B; }
.toast.warning .toast-progress-bar { background: #F59E0B; }

/* Info */
.toast.info { border-right-color: #3B82F6; }
.toast.info .toast-icon { color: #3B82F6; }
.toast.info .toast-progress-bar { background: #3B82F6; }

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    .dropdown-menu {
        background: #2d2d2d;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }
    
    .dropdown-item {
        color: #e0e0e0;
    }
    
    .dropdown-item:hover {
        background: #3d3d3d;
        color: #4ade80;
    }
    
    .dropdown-section-title {
        color: #999;
        border-top-color: #404040;
    }
    
    .dropdown-divider {
        background: #404040;
    }
}




    /* =========================================
   13. Responsive Design
   ========================================= */
@media (max-width: 1200px) {
  .container {
    padding: 0 var(--space-4);
  }
}

@media (max-width: 992px) {
  .topbar-nav {
    display: none;
  }
  
  .brand {
    min-width: auto;
  }
  
  .brand-text span {
    display: none;
  }
}

@media (max-width: 768px) {
  :root {
    font-size: 14px;
  }
  
  .hero h1 {
    font-size: 32px;
  }
  
  .hero p {
    font-size: 16px;
  }
  
  .hero-actions,
  .hero-register-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .btn {
    width: 100%;
  }
  
  .dashboard-panel {
    padding: var(--space-4);
  }
  
  .filters {
    grid-template-columns: 1fr;
  }
  
  .cases-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-container {
    max-width: 100%;
    border-radius: var(--radius-lg);
  }
}

@media (max-width: 480px) {
  .topbar-inner {
    gap: var(--space-2);
    padding: var(--space-2);
  }
  
  .brand img {
    width: 40px;
    height: 40px;
  }
  
  .search {
    padding: 8px 12px;
  }
}

/* =========================================
   14. Animations
   ========================================= */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* =========================================
   15. Print Styles
   ========================================= */
@media print {
  .topbar,
  .hero,
  .btn,
  .modal-overlay {
    display: none !important;
  }
  
  .container {
    max-width: 100%;
  }
  
  * {
    background: white !important;
    color: black !important;
  }
}
