/* MasterTime — Portail web FSJP Tanger */
* { box-sizing: border-box; margin: 0; }
:root {
  --blue: #2563eb; --navy: #0f2749; --bg: #f1f5f9; --ink: #0f172a;
  --muted: #64748b; --line: #e2e8f0; --green: #16a34a; --red: #dc2626;
  --gold: #d97706;
}
body {
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  background: var(--bg); color: var(--ink); min-height: 100vh;
}
a { color: var(--blue); text-decoration: none; }

header {
  background: linear-gradient(135deg, var(--navy), #1e4a8a);
  color: #fff; padding: 14px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
header img { height: 52px; background: #fff; border-radius: 8px; padding: 4px 8px; }
header .titles h1 { font-size: 20px; font-weight: 700; }
header .titles p { font-size: 13px; opacity: .85; }
header nav { margin-left: auto; display: flex; gap: 8px; }
header nav a {
  color: #fff; padding: 7px 14px; border-radius: 8px; font-size: 14px;
  background: rgba(255,255,255,.12); transition: background .15s;
}
header nav a:hover { background: rgba(255,255,255,.24); }

main { max-width: 1000px; margin: 24px auto; padding: 0 16px; }
.card {
  background: #fff; border-radius: 12px; padding: 20px;
  box-shadow: 0 1px 4px rgba(15,23,42,.08); margin-bottom: 16px;
}
.card h2 { font-size: 17px; margin-bottom: 12px; color: var(--navy); }

.notice {
  border-right: 4px solid var(--blue); padding: 12px 14px; margin-bottom: 10px;
  background: #f8fafc; border-radius: 8px;
}
.notice.urgent { border-color: var(--red); }
.notice .t { font-weight: 700; margin-bottom: 4px; }
.notice .ar { direction: rtl; text-align: right; font-family: 'Traditional Arabic', 'Segoe UI', serif; font-size: 16px; color: #334155; margin-top: 6px; }
.notice .date { font-size: 12px; color: var(--muted); margin-top: 6px; }

.btn {
  display: inline-block; background: var(--blue); color: #fff; border: 0;
  padding: 9px 18px; border-radius: 8px; font-size: 14px; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: #e2e8f0; color: var(--ink); }
.btn.danger { background: var(--red); }
.btn.small { padding: 5px 12px; font-size: 13px; }

select, input, textarea {
  font: inherit; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; width: 100%;
}
label { display: block; font-size: 13px; font-weight: 600; margin: 10px 0 4px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1; min-width: 160px; }

.edt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.day-col { background: #f8fafc; border-radius: 8px; padding: 8px; min-height: 90px; }
.day-col.today { outline: 2px solid var(--blue); background: #eff6ff; }
.day-col h3 { font-size: 13px; color: var(--navy); margin-bottom: 8px; text-transform: capitalize; }
.slot {
  background: var(--blue); color: #fff; border-radius: 6px; padding: 6px 8px;
  font-size: 12px; margin-bottom: 6px;
}
.slot .tm { font-weight: 700; }
.slot.reportee { background: var(--gold); }
.slot.ok { background: var(--green); }
.slot.idle { background: #64748b; }
.slot.off { background: #94a3b8; }
.slot.off .mod { text-decoration: line-through; }
.slot small { display: block; opacity: .9; }
.slot .btn.small { margin: 5px 4px 0 0; padding: 4px 10px; font-size: 12px; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: start; padding: 8px; border-bottom: 2px solid var(--line); color: var(--navy); font-size: 13px; }
.tbl td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge.blue { background: #dbeafe; color: #1d4ed8; }
.badge.green { background: #dcfce7; color: #15803d; }
.badge.gold { background: #fef3c7; color: #b45309; }
.badge.red { background: #fee2e2; color: #b91c1c; }
.badge.grey { background: #e2e8f0; color: #475569; }

.muted { color: var(--muted); font-size: 13px; }
.online { color: var(--green); font-weight: 600; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 30px 16px; }
.hidden { display: none !important; }
.err { color: var(--red); font-size: 13px; margin-top: 8px; }
.ok { color: var(--green); font-size: 13px; margin-top: 8px; }
@media (max-width: 640px) { header nav { margin-left: 0; } }
