@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap'); /* استيراد خط القاهرة */

/* General Body and Typography */
:root{
  --accent:#0d6efd;
  --muted:#6c757d;
  --card-bg:#ffffff;
  --radius:14px;
}

body {
    font-family: 'Cairo', 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(180deg,#f7fbff 0%, #f4f7fb 100%);
    color:#222;
    direction: rtl;
    text-align: right;
    line-height: 1.6;
}

/* Header Styling */
header {
    background-color: #ffffff;
    color: #1f2937;
    padding: 1rem 0;
    text-align: center;
    box-shadow: 0 4px 12px rgba(16,24,40,0.06);
}

header h1 {
    color: #0d6efd;
    font-size: 1.8rem;
    margin: 0;
}

/* Navigation Bar (neutral by default - no green bar) */
nav {
    background: transparent !important;
    color: inherit;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: none !important;
}

nav a {
    color: var(--accent);
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 600;
}

/* Main Container for Content */
.container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 30px;
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(16,24,40,0.04);
    text-align: right;
}

@media (max-width: 768px) {
    .container {
        margin: 1rem auto;
        padding: 16px;
        border-radius: 10px;
    }

    input, select, textarea, button {
        font-size: 16px;
    }

    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Flash Messages */
.flash-message {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    opacity: 0.95;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Dashboard Grid (for Manager Dashboard) */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 1.5rem;
  align-items: stretch;
  padding: 6px 0;
}

.dashboard-card,
.stat-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,250,250,0.99));
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(16,24,40,0.06);
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
}

/* اعادة ضبط شبكة الكروت لتكون بجوار بعض وفي منتصف الصفحة */
.main-area .dashboard-grid {
  width: 100%;
  max-width: 980px;      /* ضبط عرض أقصى ليبقى المحتوى مركزيًا */
  margin: 0 auto;        /* يوسّط الشبكة أفقياً */
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); /* أعمدة ثابتة الحجم أدنى */
  gap: 22px;
  justify-content: center; /* يوسّط الأعمدة داخل المساحة المتاحة */
  align-items: stretch;
}

/* اجعل كل كارد له عرض مناسب للحفاظ على ترتيب أفقي */
.stat-card { max-width: 320px; width: 100%; }

/* Top row inside card */
.dashboard-card .card-top,
.stat-card .card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Existing simple icon bubble (kept for backwards compatibility) */
.stat-icon {
  width:56px;
  height:56px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
  color:#fff;
  border-radius:12px;
  flex: 0 0 56px;
  box-shadow: 0 8px 18px rgba(13,110,253,0.08);
  background: linear-gradient(135deg, var(--accent), #3b82f6);
}

/* 3D-like icons and depth effects (new) */
.icon-bubble {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  background-image:
    radial-gradient(120% 80% at 20% 20%, rgba(255,255,255,0.12), transparent 25%),
    linear-gradient(135deg, #2b6ef6 0%, #0ea5a4 100%);
  box-shadow:
    0 18px 30px rgba(2,6,23,0.10),
    0 6px 12px rgba(2,6,23,0.06);
  overflow: hidden;
}

.icon-bubble::before{
  content: "";
  position: absolute;
  top: 6%;
  left: 6%;
  width: 60%;
  height: 34%;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  filter: blur(6px);
  transform: rotate(-18deg);
  pointer-events: none;
}
.icon-bubble::after{
  content: "";
  position: absolute;
  bottom: -6px;
  left: 8%;
  width: 84%;
  height: 36%;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(0,0,0,0.06), rgba(0,0,0,0));
  filter: blur(8px);
  pointer-events: none;
}

/* 3D group (stacked persons) */
.icon-group { position:relative; width:64px; height:40px; display:flex; align-items:center; justify-content:flex-end; gap:0; }
.icon-group .ig {
  width:36px;
  height:36px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-size:14px;
  box-shadow: 0 10px 20px rgba(2,6,23,0.12), 0 4px 8px rgba(2,6,23,0.06);
  border:2px solid rgba(255,255,255,0.9);
  position: relative;
}
.icon-group .ig.i1 { background: linear-gradient(135deg,#0d6efd,#3b82f6); margin-right: -10px; z-index:3; transform: rotate(-6deg) translateY(-2px); }
.icon-group .ig.i2 { background: linear-gradient(135deg,#6c757d,#9ca3af); margin-right: -10px; z-index:2; transform: rotate(4deg); }
.icon-group .ig.i3 { background: linear-gradient(135deg,#10b981,#34d399); margin-right: 0; z-index:1; transform: rotate(-2deg) translateY(2px); }
.icon-group .ig::after{ content:""; position:absolute; top:6%; left:8%; width:36%; height:26%; border-radius:50%; background: rgba(255,255,255,0.24); filter: blur(4px); pointer-events:none; }

/* Present icon image styling (image inside a 3D-like bubble) */
.present-icon{
  width:56px;
  height:56px;
  border-radius:12px;
  object-fit:contain;
  box-shadow: 0 12px 26px rgba(2,6,23,0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.02));
  padding:8px;
  display:block;
}

/* Any .icon-bubble color helpers */
.icon-bubble.blue { background-image: radial-gradient(120% 80% at 20% 20%, rgba(255,255,255,0.12), transparent 25%), linear-gradient(135deg,#0d6efd,#3b82f6); }
.icon-bubble.green { background-image: radial-gradient(120% 80% at 20% 20%, rgba(255,255,255,0.12), transparent 25%), linear-gradient(135deg,#16a34a,#34d399); }
.icon-bubble.yellow { background-image: radial-gradient(120% 80% at 20% 20%, rgba(255,255,255,0.12), transparent 25%), linear-gradient(135deg,#f59e0b,#fbbf24); }
.icon-bubble.teal { background-image: radial-gradient(120% 80% at 20% 20%, rgba(255,255,255,0.12), transparent 25%), linear-gradient(135deg,#0ea5a4,#34d399); }

/* Small label and large number */
.stat-card h6, .dashboard-card h6 {
  margin:0;
  color:var(--muted);
  font-size:0.95rem;
  font-weight:600;
}
.stat-card .value, .dashboard-card .value, .stat-card h3 {
  margin:0;
  font-size:2rem;
  font-weight:800;
  color:#111827;
}

/* Footer area inside card for small notes / links */
.dashboard-card .card-foot,
.stat-card .card-foot {
  margin-top: 12px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  font-size:0.9rem;
  color:var(--muted);
}

/* Hover lift */
.dashboard-card:hover,
.stat-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(16,24,40,0.12);
  border-left-color: var(--accent);
}

/* Color variations helpers */
.stat-card.accent-green { border-left-color: #16a34a; }
.stat-card.accent-yellow { border-left-color: #f59e0b; }
.stat-card.accent-blue { border-left-color: #0d6efd; }
.stat-card.accent-teal { border-left-color: #0ea5a4; }

/* Big action buttons below cards */
.big-action-btns { gap: 12px; display:flex; flex-wrap:wrap; }
.big-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 12px;
  background: white;
  color: #111827;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(16,24,40,0.06);
  transition: transform .14s ease, box-shadow .14s ease;
  min-width: 160px;
  border: 1px solid rgba(13,110,253,0.06);
}
.big-btn:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(16,24,40,0.12);
}

/* أيقونة داخل الزر (3D-like) */
.btn-icon {
  width:48px;height:48px;border-radius:12px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:18px;
  box-shadow: 0 12px 22px rgba(2,6,23,0.12), inset 0 6px 12px rgba(255,255,255,0.06);
  background-image: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(0,0,0,0.04)), var(--btn-bg, linear-gradient(135deg,#0d6efd,#3b82f6));
  position: relative;
}

/* gradient helpers */
.bg-gradient-blue { --btn-bg: linear-gradient(135deg,#0d6efd,#3b82f6); }
.bg-gradient-green { --btn-bg: linear-gradient(135deg,#16a34a,#34d399); }
.bg-gradient-yellow { --btn-bg: linear-gradient(135deg,#f59e0b,#fbbf24); color:#111827; }
.bg-gradient-gray { --btn-bg: linear-gradient(135deg,#6c757d,#9ca3af); }
.bg-gradient-teal { --btn-bg: linear-gradient(135deg,#0ea5a4,#34d399); }

/* Responsive tweaks */
@media (max-width: 992px){
  .stat-icon, .icon-bubble, .present-icon { width:48px; height:48px; }
  .stat-card .value { font-size:1.8rem; }
}
@media (max-width: 600px) {
  .stat-card .value, .dashboard-card .value { font-size:1.6rem; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .big-action-btns { flex-direction: column; }
}

/* layout: center cards and center main action buttons, side actions on right */
.layout-row { display:flex; gap:24px; align-items:flex-start; justify-content:center; flex-direction: row-reverse; }
.main-area { flex:1 1 auto; display:flex; flex-direction:column; align-items:center; }
.center-actions { display:flex; gap:14px; flex-wrap:wrap; justify-content:center; align-items:center; margin-bottom:8px; }
.center-actions .big-btn { min-width:170px; }

/* side actions remain on the right */
.side-actions { width:240px; max-width:30%; position:sticky; top:100px; align-self:flex-start; display:flex; flex-direction:column; }
.side-actions .big-btn { justify-content:flex-start; text-align:right; }
.side-actions .big-btn .btn-text { text-align:right; }

/* ensure logout sticks to bottom */
.side-actions .d-flex.flex-column { height:100%; display:flex; flex-direction:column; }
.logout-btn { margin-top:auto; }

/* responsive: stack on small screens, center actions first then side actions */
@media (max-width:900px){
  .layout-row { flex-direction:column-reverse; }
  .main-area { order:0; width:100%; }
  .side-actions { position:static; width:100%; max-width:100%; order:1; margin-top:12px; }
  .center-actions { justify-content:center; }
}

/* Tables, forms and remaining styles (kept as in original) */
/* ...existing styles from your file below (kept unchanged) ... */

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
table th, table td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid #e0e0e0;
}
table th {
    background-color: #f2f2f2;
    color: #555;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.95em;
}
table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}
table tbody tr:hover {
    background-color: #f1f1f1;
}

/* Action Buttons */
.action-buttons a, .action-buttons button {
    display: inline-block;
    padding: 8px 15px;
    margin-left: 10px;
    border-radius: 5px;
    text-decoration: none;
    color: white;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.edit-btn { background-color: #ffc107; } /* Warning yellow */
.edit-btn:hover { background-color: #e0a800; transform: translateY(-2px); }
.delete-btn { background-color: #df0000; } /* Danger red */
.delete-btn:hover { background-color: #430808; transform: translateY(-2px); }
.approve-btn { background-color: #28a745; } /* Success green */
.approve-btn:hover { background-color: #0a4b1e; transform: translateY(-2px); }
.reject-btn { background-color: #6c757d; } /* Secondary gray */
.reject-btn:hover { background-color: #5a6268; transform: translateY(-2px); }
.view-btn { background-color: #17a2b8; } /* Info blue-green */
.view-btn:hover { background-color: #138496; transform: translateY(-2px); }
.add-btn { background-color: #007bff; } /* Primary blue */
.add-btn:hover { background-color: #0056b3; transform: translateY(-2px); }

/* Status Badges (for Leave Requests, Tasks) */
.status-pending {
    background-color: #ffc107; /* Yellow */
    color: #333;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85em;
}
.status-approved {
    background-color: #a75528; /* Green */
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85em;
}
.status-rejected {
    background-color: #dc3545; /* Red */
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85em;
}
.status-completed {
    background-color: #28a745; /* Green */
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85em;
}
.status-in-progress {
    background-color: #17a2b8; /* Blue-green */
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85em;
}

/* Back Link */
.back-link {
    display: inline-block;
    margin-top: 2rem;
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
    transition: text-decoration 0.3s ease;
}
.back-link:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: #2c3e50; /* Dark blue-gray, matches header */
    color: white;
    text-align: center;
    padding: 1.2rem 0;
    position: relative; /* Fixed for a consistent footer */
    bottom: 0;
    width: 100%;
    margin-top: 3rem; /* More space from content */
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
}

/* Big action buttons below cards */
.big-action-btns { gap: 12px; display:flex; flex-wrap:wrap; }
.big-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 12px;
  background: white;
  color: #111827;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(16,24,40,0.06);
  transition: transform .14s ease, box-shadow .14s ease;
  min-width: 160px;
  border: 1px solid rgba(13,110,253,0.06);
}
.big-btn:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(16,24,40,0.12);
}

/* أيقونة داخل الزر (3D-like) */
.btn-icon {
  width:48px;height:48px;border-radius:12px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:18px;
  box-shadow: 0 12px 22px rgba(2,6,23,0.12), inset 0 6px 12px rgba(255,255,255,0.06);
  background-image: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(0,0,0,0.04)), var(--btn-bg, linear-gradient(135deg,#0d6efd,#3b82f6));
  position: relative;
}

/* gradient helpers */
.bg-gradient-blue { --btn-bg: linear-gradient(135deg,#0d6efd,#3b82f6); }
.bg-gradient-green { --btn-bg: linear-gradient(135deg,#16a34a,#34d399); }
.bg-gradient-yellow { --btn-bg: linear-gradient(135deg,#f59e0b,#fbbf24); color:#111827; }
.bg-gradient-gray { --btn-bg: linear-gradient(135deg,#6c757d,#9ca3af); }
.bg-gradient-teal { --btn-bg: linear-gradient(135deg,#0ea5a4,#34d399); }

/* Responsive tweaks */
@media (max-width: 992px){
  .stat-icon, .icon-bubble, .present-icon { width:48px; height:48px; }
  .stat-card .value { font-size:1.8rem; }
}
@media (max-width: 600px) {
  .stat-card .value, .dashboard-card .value { font-size:1.6rem; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .big-action-btns { flex-direction: column; }
}

/* layout: center cards and center main action buttons, side actions on right */
.layout-row { display:flex; gap:24px; align-items:flex-start; justify-content:center; flex-direction: row-reverse; }
.main-area { flex:1 1 auto; display:flex; flex-direction:column; align-items:center; }
.center-actions { display:flex; gap:14px; flex-wrap:wrap; justify-content:center; align-items:center; margin-bottom:18px; }
.center-actions .big-btn { min-width:170px; }

/* side actions remain on the right */
.side-actions { width:240px; max-width:30%; position:sticky; top:100px; align-self:flex-start; display:flex; flex-direction:column; }
.side-actions .big-btn { justify-content:flex-start; text-align:right; }
.side-actions .big-btn .btn-text { text-align:right; }

/* ensure logout sticks to bottom */
.side-actions .d-flex.flex-column { height:100%; display:flex; flex-direction:column; }
.logout-btn { margin-top:auto; }

/* responsive: stack on small screens, center actions first then side actions */
@media (max-width:900px){
  .layout-row { flex-direction:column-reverse; }
  .main-area { order:0; width:100%; }
  .side-actions { position:static; width:100%; max-width:100%; order:1; margin-top:12px; }
  .center-actions { justify-content:center; }
}

/* Tables, forms and remaining styles (kept as in original) */
/* ...existing styles from your file below (kept unchanged) ... */

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
table th, table td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid #e0e0e0;
}
table th {
    background-color: #f2f2f2;
    color: #555;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.95em;
}
table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}
table tbody tr:hover {
    background-color: #f1f1f1;
}

/* Action Buttons */
.action-buttons a, .action-buttons button {
    display: inline-block;
    padding: 8px 15px;
    margin-left: 10px;
    border-radius: 5px;
    text-decoration: none;
    color: white;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.edit-btn { background-color: #ffc107; } /* Warning yellow */
.edit-btn:hover { background-color: #e0a800; transform: translateY(-2px); }
.delete-btn { background-color: #df0000; } /* Danger red */
.delete-btn:hover { background-color: #430808; transform: translateY(-2px); }
.approve-btn { background-color: #28a745; } /* Success green */
.approve-btn:hover { background-color: #0a4b1e; transform: translateY(-2px); }
.reject-btn { background-color: #6c757d; } /* Secondary gray */
.reject-btn:hover { background-color: #5a6268; transform: translateY(-2px); }
.view-btn { background-color: #17a2b8; } /* Info blue-green */
.view-btn:hover { background-color: #138496; transform: translateY(-2px); }
.add-btn { background-color: #007bff; } /* Primary blue */
.add-btn:hover { background-color: #0056b3; transform: translateY(-2px); }

/* Status Badges (for Leave Requests, Tasks) */
.status-pending {
    background-color: #ffc107; /* Yellow */
    color: #333;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85em;
}
.status-approved {
    background-color: #a75528; /* Green */
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85em;
}
.status-rejected {
    background-color: #dc3545; /* Red */
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85em;
}
.status-completed {
    background-color: #28a745; /* Green */
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85em;
}
.status-in-progress {
    background-color: #17a2b8; /* Blue-green */
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85em;
}

/* Back Link */
.back-link {
    display: inline-block;
    margin-top: 2rem;
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
    transition: text-decoration 0.3s ease;
}
.back-link:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: #2c3e50; /* Dark blue-gray, matches header */
    color: white;
    text-align: center;
    padding: 1.2rem 0;
    position: relative; /* Fixed for a consistent footer */
    bottom: 0;
    width: 100%;
    margin-top: 3rem; /* More space from content */
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
}

/* hide logo file if still referenced */
.site-logo { display: none !important; }

/* Big action buttons below cards */
.big-action-btns { gap: 12px; display:flex; flex-wrap:wrap; }
.big-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 12px;
  background: white;
  color: #111827;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(16,24,40,0.06);
  transition: transform .14s ease, box-shadow .14s ease;
  min-width: 160px;
  border: 1px solid rgba(13,110,253,0.06);
}
.big-btn:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(16,24,40,0.12);
}

/* أيقونة داخل الزر (3D-like) */
.btn-icon {
  width:48px;height:48px;border-radius:12px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:18px;
  box-shadow: 0 12px 22px rgba(2,6,23,0.12), inset 0 6px 12px rgba(255,255,255,0.06);
  background-image: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(0,0,0,0.04)), var(--btn-bg, linear-gradient(135deg,#0d6efd,#3b82f6));
  position: relative;
}

/* gradient helpers */
.bg-gradient-blue { --btn-bg: linear-gradient(135deg,#0d6efd,#3b82f6); }
.bg-gradient-green { --btn-bg: linear-gradient(135deg,#16a34a,#34d399); }
.bg-gradient-yellow { --btn-bg: linear-gradient(135deg,#f59e0b,#fbbf24); color:#111827; }
.bg-gradient-gray { --btn-bg: linear-gradient(135deg,#6c757d,#9ca3af); }
.bg-gradient-teal { --btn-bg: linear-gradient(135deg,#0ea5a4,#34d399); }

/* Responsive tweaks */
@media (max-width: 992px){
  .stat-icon, .icon-bubble, .present-icon { width:48px; height:48px; }
  .stat-card .value { font-size:1.8rem; }
}
@media (max-width: 600px) {
  .stat-card .value, .dashboard-card .value { font-size:1.6rem; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .big-action-btns { flex-direction: column; }
}

/* layout: center cards and center main action buttons, side actions on right */
.layout-row { display:flex; gap:24px; align-items:flex-start; justify-content:center; flex-direction: row-reverse; }
.main-area { flex:1 1 auto; display:flex; flex-direction:column; align-items:center; }
.center-actions { display:flex; gap:14px; flex-wrap:wrap; justify-content:center; align-items:center; margin-bottom:18px; }
.center-actions .big-btn { min-width:170px; }

/* side actions remain on the right */
.side-actions { width:240px; max-width:30%; position:sticky; top:100px; align-self:flex-start; display:flex; flex-direction:column; }
.side-actions .big-btn { justify-content:flex-start; text-align:right; }
.side-actions .big-btn .btn-text { text-align:right; }

/* ensure logout sticks to bottom */
.side-actions .d-flex.flex-column { height:100%; display:flex; flex-direction:column; }
.logout-btn { margin-top:auto; }

/* responsive: stack on small screens, center actions first then side actions */
@media (max-width:900px){
  .layout-row { flex-direction:column-reverse; }
  .main-area { order:0; width:100%; }
  .side-actions { position:static; width:100%; max-width:100%; order:1; margin-top:12px; }
  .center-actions { justify-content:center; }
}

/* Tables, forms and remaining styles (kept as in original) */
/* ...existing styles from your file below (kept unchanged) ... */

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
table th, table td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid #e0e0e0;
}
table th {
    background-color: #f2f2f2;
    color: #555;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.95em;
}
table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}
table tbody tr:hover {
    background-color: #f1f1f1;
}

/* Action Buttons */
.action-buttons a, .action-buttons button {
    display: inline-block;
    padding: 8px 15px;
    margin-left: 10px;
    border-radius: 5px;
    text-decoration: none;
    color: white;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Specific styles for Employee Attendance Page */
.attendance-form-container {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.attendance-form-container .form-group {
    margin-bottom: 1rem;
}

.attendance-form-container label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.attendance-form-container select,
.attendance-form-container input[type="date"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.attendance-form-container .button-group {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
}

.attendance-form-container button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    color: white;
    transition: background-color 0.3s ease;
}

.attendance-form-container .check-in-btn {
    background-color: #28a745;
}
.attendance-form-container .check-in-btn:hover {
    background-color: #218838;
}

.attendance-form-container .check-out-btn {
    background-color: #dc3545;
}
.attendance-form-container .check-out-btn:hover {
    background-color: #c82333;
}

/* Location Status messages */
.location-status {
    margin-top: 1rem;
    font-size: 0.9em;
    color: #555;
}
.location-status.error {
    color: #dc3545;
    font-weight: bold;
}
.location-status.success {
    color: #28a745;
    font-weight: bold; /* Added bold for success message too */
}

/* Specific table styles for attendance */
.attendance-table th, .attendance-table td {
    border: 1px solid #ddd; /* Match original inline style for cells */
    padding: 12px;
    text-align: right;
}

.attendance-table th {
    background-color: #007bff; /* Specific blue header for this table */
    color: white;
}
.attendance-table tr:nth-child(even) {
    background-color: #f2f2f2; /* Light grey for even rows */
}
.attendance-table tr:hover {
    background-color: #ddd; /* Hover effect */
}

/* Specific styles for Tasks List Page */
.tasks-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
.tasks-table th, .tasks-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: right;
}
.tasks-table th {
    background-color: #f2f2f2;
}

.action-buttons a, .action-buttons button {
    display: inline-block;
    padding: 5px 10px;
    margin-right: 5px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    cursor: pointer;
    border: none;
}
.action-buttons .edit-btn {
    background-color: #007bff;
    color: white;
}
.action-buttons .delete-btn {
    background-color: #dc3545;
    color: white;
}

.add-button {
    display: inline-block;
    background-color: #28a745;
    color: white;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 1rem;
}
.add-button:hover {
    background-color: #218838;
}

/* Status specific styles (assuming these are used consistently across tasks and leaves) */
.status-pending { background-color: #f7f6f5; color: #dea700; padding: 3px 8px; border-radius: 3px; font-size: 0.8em; }
.status-approved { background-color: #ffffff; color: rgb(46, 218, 26); padding: 3px 8px; border-radius: 3px; font-size: 0.8em; }
.status-rejected { background-color: #ffffff; color: rgb(223, 10, 10); padding: 3px 8px; border-radius: 3px; font-size: 0.8em; }
.status-in-progress { background-color: #ffffff; color: rgb(4, 4, 4); padding: 3px 8px; border-radius: 3px; font-size: 0.8em; }
.status-completed { background-color: #2fe45f; color: white; padding: 3px 8px; border-radius: 3px; font-size: 0.8em; }

/* Specific styles for Attendance Page */
.attendance-form {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.attendance-form .form-group {
    margin-bottom: 1rem;
}
.attendance-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}
.attendance-form select,
.attendance-form input[type="date"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
.attendance-form .button-group {
    display: flex;
    gap: 10px; /* مسافة بين الزرين */
    margin-top: 1rem;
}
.attendance-form button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    color: white;
    transition: background-color 0.3s ease;
}
.attendance-form .check-in-btn {
    background-color: #28a745; /* أخضر */
}
.attendance-form .check-in-btn:hover {
    background-color: #218838;
}
.attendance-form .check-out-btn {
    background-color: #dc3545; /* أحمر */
}
.attendance-form .check-out-btn:hover {
    background-color: #c82333;
}

.attendance-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}
.attendance-table th, .attendance-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: right;
}
.attendance-table th {
    background-color: #007bff;
    color: white;
}
.attendance-table tr:nth-child(even) {
    background-color: #f2f2f2;
}
.attendance-table tr:hover {
    background-color: #ddd;
}
.flash-message { /* Adding these to ensure they are available, though base.css might have similar */
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    color: white;
    font-weight: bold;
}
.flash-message.success {
    background-color: #28a745;
}
.flash-message.danger {
    background-color: #dc3545;
}
.location-status {
    margin-top: 1rem;
    font-size: 0.9em;
    color: #555;
}
.location-status.error {
    color: #dc3545;
    font-weight: bold;
}
.location-status.success {
    color: #28a745;
}

/* Specific styles for Leave Requests Page */
.leave-requests-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}
.leave-requests-table th, .leave-requests-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: right;
}
.leave-requests-table th {
    background-color: #007bff;
    color: white;
}
.leave-requests-table tr:nth-child(even) {
    background-color: #f2f2f2;
}
.leave-requests-table tr:hover {
    background-color: #ddd;
}
.add-button-container { /* This might be general, but ensuring it's here */
    text-align: left;
    margin-bottom: 1rem;
}
.add-button { /* This might be general, but ensuring it's here */
    background-color: #28a745; /* Green for leave request button */
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}
.add-button:hover { /* This might be general, but ensuring it's here */
    background-color: #218838;
}
/* Action buttons for leave requests */
.action-buttons a {
    display: inline-block;
    padding: 0.5rem 0.8rem;
    margin-left: 5px;
    border-radius: 4px;
    text-decoration: none;
    color: white;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}
.action-buttons .approve-btn {
    background-color: #28a745; /* أخضر */
}
.action-buttons .approve-btn:hover {
    background-color: #218838;
}
.action-buttons .reject-btn {
    background-color: #dc3545; /* أحمر */
}
.action-buttons .reject-btn:hover {
    background-color: #c82333;
}
.status-pending {
    color: orange;
    font-weight: bold;
}
.status-approved {
    color: green;
    font-weight: bold;
}
.status-rejected {
    color: red;
    font-weight: bold;
}

/* Specific styles for Employees List Page */
.employees-list-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}
.employees-list-table th, .employees-list-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: right;
}
.employees-list-table th {
    background-color: #007bff;
    color: white;
}
.employees-list-table tr:nth-child(even) {
    background-color: #f2f2f2;
}
.employees-list-table tr:hover {
    background-color: #ddd;
}
/* The add-button-container and add-button are general,
    but for the employee list, the button color is different */
.add-button-container .add-button {
    background-color: #007bff; /* Blue for add employee button */
}
.add-button-container .add-button:hover {
    background-color: #0056b3;
}
/* Action buttons for employee list */
.action-buttons .edit-btn {
    background-color: #ffc107; /* أصفر */
}
.action-buttons .edit-btn:hover {
    background-color: #e0a800;
}
.action-buttons .delete-btn {
    background-color: #dc3545; /* أحمر */
}
.action-buttons .delete-btn:hover {
    background-color: #c82333;
}

/* إزالة أي شريط ناڤر أخضر عبر عدم الحاجة (إذا كان موجوداً في css سابق) */
/* تأكد أن nav لا يظهر كلوحة ملونة */
nav { background: transparent !important; box-shadow: none !important; padding: 0; }

/* Notifications (shared) */
.notification-item { cursor: pointer; }
.notification-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.notification-toggle-icon { color: #9ca3af; transition: transform 0.2s ease; }
.notification-details { display: none; margin-top: 8px; font-size: 0.85rem; color: #4b5563; }
.notification-item.open .notification-details { display: block; }
.notification-item.open .notification-toggle-icon { transform: rotate(180deg); }
.notification-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.notification-actions { margin-top: 8px; }
.notification-actions .btn { padding: 4px 10px; font-size: 0.8rem; }
.notification-list { display: none; }
.notification-list.open { display: block; }

/* صف الأزرار الرئيسي: جنب بعض ومتجاوب */
.action-row { gap: 12px; }

/* اجعل الأزرار الكبيرة بشكل موحد أفقياً */
.action-row .big-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 12px;
  background: white;
  color: #111827;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(16,24,40,0.06);
  border: 1px solid rgba(13,110,253,0.06);
  min-width: 180px;
  justify-content: center;
}

/* أيقونات داخل أزرار الإجراءات */
.action-row .btn-icon { width:44px;height:44px;border-radius:10px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:18px; }

/* تدرجات الألوان المستخدمة (مكررة لتأكد الظهور) */
.bg-gradient-blue { background: linear-gradient(135deg,#0d6efd,#3b82f6); }
.bg-gradient-green { background: linear-gradient(135deg,#16a34a,#34d399); }
.bg-gradient-yellow { background: linear-gradient(135deg,#f59e0b,#fbbf24); }
.bg-gradient-gray { background: linear-gradient(135deg,#6c757d,#9ca3af); }

/* استجابة: تصدر بشكل عمودي على الشاشات الضيقة */
@media (max-width: 768px) {
  .action-row { flex-direction: column; align-items: stretch; }
  .action-row .big-btn { width: 100%; justify-content: flex-start; padding-left:18px; }
}

/* تحسينات لوحة الأدمن على الموبايل */
@media (max-width: 768px) {
    .layout-row { flex-direction: column-reverse; gap: 12px; }
    .main-area { width: 100%; align-items: stretch; }
    .side-actions { width: 100%; max-width: 100%; position: static; padding: 12px; }

    .center-actions { flex-direction: column; align-items: stretch; gap: 10px; }
    .center-actions .big-btn,
    .side-actions .big-btn {
        width: 100%;
        justify-content: flex-start;
        gap: 10px;
    }

    .dashboard-grid { grid-template-columns: 1fr; }
    .stat-card { max-width: 100%; }

    .notification-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .notification-item { padding: 10px; }
    .notification-message { font-size: 0.9rem; }
}