  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Tajawal", sans-serif;
  }

  body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f8f9fa;

  }

  /* ====== Content ====== */
  main {
    flex-grow: 1;
    padding: 20px;
  }


  footer { 
    background: #1F64A5; 
    color: #fff; 
    text-align: center; 
    padding: 10px; 
    margin-top: 30px; 
  }

  h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
  }

  a {
    text-decoration:none ;
  }
      
  .navbar { 
      background: #1F64A5; 
    }

  .navbar .dropdown-menu { 
      text-align: right; 
    }

        /* تنسيق روابط الناف بار */
    .navbar .nav-link {
      color: #fff; /* اللون الأساسي */
      margin: 0 5px;
      transition: all 0.3s ease;
    }

    /* Hover */
    .navbar .nav-link:hover {
      background-color: #1a4f80; /* لون أزرق أغمق */
      border-radius: 5px;
      padding: 3px 6px;
      color: #ffdd57; /* لون النص يتغير */
    }

    /* Current / Active */
    .navbar .nav-link.active {
      background-color: #ffdd57; /* أصفر مثل اللوجو */
      color: #1a4f80; /* نص أزرق */
      border-radius: 5px;
      padding: 5px 10px;
    }

    .nav-item a {
      font-size: 14px ;
    }

    .card-stat {
      color: #fff;
    }
    .card-stat i {
      font-size: 2rem;
    }
    
    .card-header {
      background: #1F64A5;
      color: #fff;
      font-weight: bold;
    }

    .card-header h5 {
      color: #555;
    }

    .btn-primary {
      background-color: #1F64A5;
      border: none;
    }
    .btn-primary:hover {
      background-color: #1F64A5;
    }

    .btn-outline-secondary{
      margin-bottom: 8px;
    }

    .close-btn {
      position: absolute;
      top: 15px;
      left: 15px;
      font-size: 18px;
      cursor: pointer;
      color: #888;
      transition: color 0.2s;
    }
    .close-btn:hover {
      color: #dc3545;
    }


    table.dataTable thead {
      background-color: #1F64A5;
      color: #fff;
    }
    table.dataTable td {
      white-space: nowrap; /* يمنع النص من الانتقال لسطر جديد */
    }

    #planTable {
      width: 100% !important;
    }
    #planTable th {
      text-align: right !important;
    }
    #planTable th,
    #planTable td {
      text-align: right;
    }


    .schedule-container {
      overflow-x: auto;
      white-space: nowrap;
      padding: 20px;
      border-radius: 10px;
      background: white;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .doctor-name {
      background-color: #1F64A5;
      color: white;
      font-weight: 600;
      padding: 20px 10px;
      border-radius: 10px;
      text-align: center;
      min-width: 150px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .schedule-row {
      display: flex;
      align-items: center;
      margin-bottom: 15px;
    }

    .appointments {
      display: flex;
      gap: 10px;
      flex-wrap: nowrap;
      overflow-x: auto;
      padding: 10px 0;
      flex-grow: 1;
    }

    .appointment-card {
      background-color: #f2f2f2;
      border: 2px dashed #ccc;
      border-radius: 12px;
      min-width: 130px;
      text-align: center;
      padding: 6px;
      font-size: 13px;
      box-shadow: 0 1px 2px rgba(0,0,0,0.1);
      height: 75px;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .appointment-card.booked-green {
      background-color: #d1ffd1;
      border: 3px solid #90ee90;
    }

    .appointment-card.booked-pink {
      background-color: #ffe6ff;
      border: 3px solid #ff80ff;
    }

    .appointment-card.booked-gray {
      background-color: #cccccc;
      border: 3px solid #999;
    }

    .time {
      font-weight: bold;
      color: #000;
    }

    .patient {
      font-size: 14px;
      color: #111;
    }

    .phone {
      font-size: 13px;
      color: #333;
    }
  
    .disabled-link {
      pointer-events: none;
      opacity: 0.5;
    }

    .actions {
      white-space: nowrap;
    }

    .actions i, 
    .actions a {
        margin: 0 2px;  
        font-size: 14px;
        cursor: pointer;
    }

    
    .dataTables_filter { float: left !important; text-align: left !important; }
    .dataTables_paginate { float: right !important; }

    .readonly-field {
      background-color: #f1f1f1;  /* رمادي فاتح */
      color: #555;               /* لون خط غامق شوي */
    }
    
    .details-panel {
      position: fixed; top: 0; right: -400px; width: 350px; height: 100%;
      background: #fff; box-shadow: -3px 0 10px rgba(0,0,0,0.2);
      padding: 20px; transition: right 0.3s ease;
      z-index: 9999; overflow-y: auto;
    }

    .details-panel.active { 
      right: 0; 
    }
   

    .breadcrumb {
      background: transparent; /* بدون خلفية */
      margin-bottom: 1rem;
    }

    .breadcrumb-item a {
      text-decoration: none;
      color: #1a4f80; /* الأزرق */
    }

    .breadcrumb-item a:hover {
      color: #ff9900; /* برتقالي من اللوجو */
    }

    .breadcrumb-item.active {
      color: #555; /* الرمادي الغامق */
      font-weight: bold;
    }


    .login-container {
      display: flex;
      height: 100vh;
    }
    .login-image {
      flex: 1;
      background: url('/imgs/login.jpg') 
                  no-repeat center center;
      background-size: cover;
    }
    .login-form {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 2rem;
    }
    .login-box {
      width: 100%;
      max-width: 400px;
    }



    .grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 20px;
    }

    .reports-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      gap: 16px;
  }

  .card-box {
      height: 140px; /* 👈 كل الكروت نفس الطول */
      border-radius: 12px;
      color: #fff;
      padding: 16px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      text-align: center;
      transition: all 0.25s ease;
      box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  }

  .card-box i {
      font-size: 28px;
      margin-bottom: 10px;
  }

  .card-box span {
      font-size: 14px;
      line-height: 1.4;
      display: -webkit-box;
      -webkit-line-clamp: 3;   /* 👈 حد أقصى 3 أسطر */
      -webkit-box-orient: vertical;
      overflow: hidden;
  }

  .card-box:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 18px rgba(0,0,0,0.15);
  }

    /* الألوان */
    .patients     { background: linear-gradient(135deg, #3498db, #2980b9); }
    .appointment  { background: linear-gradient(135deg, #2ecc71, #27ae60); }
    .treatment    { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
    .receipts     { background: linear-gradient(135deg, #e67e22, #d35400); }
    .advance      { background: linear-gradient(135deg, #1abc9c, #16a085); }
    .refund       { background: linear-gradient(135deg, #e74c3c, #c0392b); }
    
    /* ألوان إضافية لتقارير كثيرة */
    .clinic       { background: linear-gradient(135deg, #34495e, #2c3e50); }
    .doctors      { background: linear-gradient(135deg, #f39c12, #e67e22); }
    .finance      { background: linear-gradient(135deg, #7f8c8d, #636e72); }
    .summary      { background: linear-gradient(135deg, #6c5ce7, #4834d4); }
        
    .page-title {
      text-align: center;
      margin: 20px 0;
      color: #0d6efd;
    }
    
    .services-list {
      max-height: 400px;
      overflow-y: auto;
      padding: 20px;
    }

    .status {
      padding: 5px 10px;
      border-radius: 6px;
      color: #fff;
      font-weight: bold;
    }
    .status-confirmed { background-color: #28a745; }
    .status-pending   { background-color: #ffc107; color: #000; }
    .status-cancelled { background-color: #dc3545; }
    .actions i {
      margin: 0 4px;
      cursor: pointer;
      font-size: 16px;
    }
    .actions i:hover {
      opacity: 0.7;
    }

    .total-box {
      background: #f1f1f1;
      border-radius: 8px;
      padding: 10px;
      margin-top: 10px;
    }
   
    .section-title { background: #0d47a1; color: #fff; padding: 6px; font-weight: bold; }


 
    
    .custom-file-upload {
      background-color: #f8f9fa;
      cursor: pointer;
      transition: all 0.3s;
  }
  .custom-file-upload:hover {
      background-color: #eef5ff;
      border-color: #0d6efd;
  }
  .file-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: #fff;
      border: 1px solid #e3e3e3;
      padding: 10px 15px;
      border-radius: 10px;
      margin-bottom: 8px;
      box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  }
  .file-item i {
      font-size: 1.5rem;
  }
  .file-item img {
      width: 40px;
      height: 40px;
      object-fit: cover;
      border-radius: 5px;
      margin-right: 10px;
  }

  .form-control {
    border-color: #333 ;
  }

  .booked-cell {
    vertical-align: top;
    min-width: 140px;
  }
  
  .booked-cell > div {
    border-radius: 6px;
  }