/* ===================================================
   ميكنة تقارير الجودة - MUST
   style.css — Main Stylesheet
   =================================================== */

:root {
  --navy: #002147;
  --gold: #C9A84C;
  --gold-light: #E8C96A;
  --white: #ffffff;
  --light-bg: #f4f6fa;
  --gray: #6b7280;
  --border: #e2e8f0;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --card-shadow: 0 4px 24px rgba(0,33,71,0.10);
}

* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:'Cairo',sans-serif; background:var(--light-bg); color:var(--navy); direction:rtl; }

/* ===================== NAVBAR (MUST Alumni Style) ===================== */

/* Sticky wrapper */
.must-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
}

/* ---- TOP BAR ---- */
.must-topbar {
  background: #002147;
  border-bottom: 1px solid rgba(201,168,76,0.25);
}
.must-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}
.topbar-link {
  color: rgba(255,255,255,0.72);
  font-size: 0.78rem;
  font-weight: 500;
  font-family: 'Cairo', sans-serif;
  text-decoration: none;
  padding: 0.45rem 1.1rem;
  border-left: 1px solid rgba(255,255,255,0.12);
  transition: color 0.2s, background 0.2s;
  display: inline-block;
}
.topbar-link:first-child { border-left: none; }
.topbar-link:hover { color: var(--gold); background: rgba(201,168,76,0.08); }
.topbar-link.active { color: var(--gold); font-weight: 700; }

/* ---- MAIN NAV ---- */
.must-nav {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  min-height: 76px;
  gap: 1rem;
}

/* Logo */
.must-nav-logo {
  display: flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.must-nav-logo img {
  height: 56px;
  width: auto;
}

/* Nav links */
.must-nav-links {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex: 1;
  justify-content: center;
}
.must-dropdown { position: relative; display: flex; align-items: stretch; }
.must-nav-link {
  color: #002147;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: 'Cairo', sans-serif;
  background: none;
  border: none;
  padding: 0 1.1rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  border-bottom: 3px solid transparent;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  height: 76px;
}
.must-nav-link--has-arrow::after {
  content: '▾';
  font-size: 0.65rem;
  margin-right: 2px;
  opacity: 0.6;
}
.must-nav-link:hover,
.must-nav-link.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* Right side (search + auth) */
.must-nav-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}
.must-search-btn {
  background: none;
  border: none;
  color: #002147;
  cursor: pointer;
  padding: 0.45rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.must-search-btn:hover { background: var(--light-bg); color: var(--gold); }

.must-nav-auth { display: flex; gap: 0.5rem; align-items: center; }

/* Search slide-down */
.must-search-bar {
  background: #f4f6fa;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 2rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.must-search-bar.open {
  max-height: 60px;
  padding: 0.6rem 2rem;
}
.must-search-bar input {
  flex: 1;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.45rem 1rem;
  font-family: 'Cairo', sans-serif;
  font-size: 0.9rem;
  direction: rtl;
  background: white;
  outline: none;
}
.must-search-bar input:focus { border-color: var(--gold); }
.must-search-bar button {
  background: var(--navy);
  border: none;
  border-radius: 6px;
  color: white;
  padding: 0.48rem 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background 0.2s;
}
.must-search-bar button:hover { background: var(--gold); }

/* Keep old nav-auth button styles working */
.must-nav-auth .btn-login {
  padding: 0.42rem 1.1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Cairo', sans-serif;
  transition: all 0.2s;
  border: 1.5px solid var(--navy);
  color: var(--navy);
  background: transparent;
}
.must-nav-auth .btn-login:hover { background: var(--navy); color: white; }
.must-nav-auth .btn-signup {
  padding: 0.42rem 1.1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Cairo', sans-serif;
  transition: all 0.2s;
  background: var(--gold);
  color: var(--navy);
  border: 1.5px solid var(--gold);
}
.must-nav-auth .btn-signup:hover { background: var(--gold-light); }

/* ===================== BUTTONS ===================== */
.btn-login {
  padding:0.45rem 1.2rem; border-radius:6px; font-size:0.88rem; font-weight:600;
  cursor:pointer; font-family:'Cairo',sans-serif; transition:all 0.2s;
  border:1.5px solid var(--gold); color:var(--gold); background:transparent;
}
.btn-login:hover { background:var(--gold); color:var(--navy); }
.btn-signup {
  padding:0.45rem 1.2rem; border-radius:6px; font-size:0.88rem; font-weight:600;
  cursor:pointer; font-family:'Cairo',sans-serif; transition:all 0.2s;
  background:var(--gold); color:var(--navy); border:1.5px solid var(--gold);
}
.btn-signup:hover { background:var(--gold-light); }
.btn-logout {
  padding:0.45rem 1.2rem; border-radius:6px; font-size:0.88rem; font-weight:600;
  cursor:pointer; font-family:'Cairo',sans-serif; transition:all 0.2s;
  background:rgba(220,38,38,0.15); color:#f87171; border:1.5px solid #f87171;
}
.btn-logout:hover { background:#dc2626; color:white; }
.btn-primary {
  background:var(--navy); color:var(--white); border:none;
  padding:0.75rem 2.5rem; border-radius:8px; font-size:0.95rem; font-weight:700;
  cursor:pointer; font-family:'Cairo',sans-serif; transition:all 0.2s;
  display:inline-flex; align-items:center; gap:0.5rem;
}
.btn-primary:hover { background:#003366; transform:translateY(-1px); }
.btn-gold {
  background:var(--gold); color:var(--navy); border:none;
  padding:0.75rem 2.5rem; border-radius:8px; font-size:0.95rem; font-weight:700;
  cursor:pointer; font-family:'Cairo',sans-serif; transition:all 0.2s;
}
.btn-gold:hover { background:var(--gold-light); }
.btn-outline {
  background:transparent; color:var(--navy); border:1.5px solid var(--navy);
  padding:0.65rem 1.8rem; border-radius:8px; font-size:0.9rem; font-weight:600;
  cursor:pointer; font-family:'Cairo',sans-serif; transition:all 0.2s;
}
.btn-outline:hover { background:var(--navy); color:white; }
.user-greeting { color:var(--navy); font-size:0.85rem; font-weight:600; display:flex; align-items:center; gap:6px; }
.role-badge {
  font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 20px;
  font-family: 'Cairo', sans-serif; letter-spacing: 0.3px;
}
.role-admin  { background: rgba(0,33,71,0.12); color: var(--navy); }
.role-viewer { background: rgba(201,168,76,0.18); color: #8a6a10; }

/* ===================== PAGES ===================== */
.page { display:none; }
.page.active { display:block; }

/* ===================== SLIDER ===================== */
.slider-container {
  position:relative; width:100%; height:460px; overflow:hidden;
  background:var(--navy);
}
.slide {
  position:absolute; inset:0; opacity:0; transition:opacity 0.8s ease;
  display:flex; align-items:center; justify-content:center;
}
.slide.active { opacity:1; }
.slide img { width:100%; height:100%; object-fit:cover; }
.slide-overlay {
  position:absolute; inset:0;
  background:linear-gradient(135deg, rgba(0,33,71,0.82) 0%, rgba(0,33,71,0.45) 60%, transparent 100%);
  display:flex; align-items:center; padding:3rem 4rem;
}
.slide-text { color:var(--white); max-width:600px; }
.slide-text h1 { font-size:2.4rem; font-weight:900; line-height:1.3; margin-bottom:0.8rem; }
.slide-text h1 span { color:var(--gold); }
.slide-text p { font-size:1.05rem; color:rgba(255,255,255,0.85); line-height:1.7; }
.slider-dots {
  position:absolute; bottom:20px; left:50%; transform:translateX(-50%);
  display:flex; gap:8px;
}
.dot {
  width:10px; height:10px; border-radius:50%;
  background:rgba(255,255,255,0.4); cursor:pointer; transition:all 0.3s;
  border:none;
}
.dot.active { background:var(--gold); transform:scale(1.3); }
.slider-btn {
  position:absolute; top:50%; transform:translateY(-50%);
  background:rgba(0,33,71,0.5); border:1.5px solid rgba(201,168,76,0.5);
  color:var(--gold); width:42px; height:42px; border-radius:50%;
  font-size:1.2rem; cursor:pointer; transition:all 0.2s;
  display:flex; align-items:center; justify-content:center;
}
.slider-btn:hover { background:var(--gold); color:var(--navy); }
.slider-btn.prev { right:1rem; }
.slider-btn.next { left:1rem; }

/* ===================== HOME PAGE ===================== */
.stat-row {
  display:grid; grid-template-columns:repeat(4,1fr); gap:1rem;
  padding:1.5rem 3rem; background:var(--white); border-bottom:1px solid var(--border);
}
.stat-item { text-align:center; padding:1rem; border-radius:10px; background:var(--light-bg); }
.stat-item .val { font-size:2rem; font-weight:900; color:var(--navy); }
.stat-item .lbl { font-size:0.78rem; color:var(--gray); margin-top:0.3rem; }
.section-title { text-align:center; padding:2.5rem 1rem 1rem; }
.section-title h2 { font-size:1.8rem; font-weight:800; color:var(--navy); }
.section-title p { color:var(--gray); margin-top:0.5rem; }
.gold-line {
  width:60px; height:4px; background:var(--gold); border-radius:2px;
  margin:0.8rem auto 0;
}
.quick-cards {
  display:grid; grid-template-columns:repeat(3,1fr); gap:1.5rem;
  padding:2rem 3rem; max-width:1200px; margin:0 auto;
}
.quick-card {
  background:var(--white); border-radius:14px; padding:1.8rem;
  box-shadow:var(--card-shadow); border-top:4px solid var(--gold);
  cursor:pointer; transition:all 0.25s; text-align:center;
}
.quick-card:hover { transform:translateY(-4px); box-shadow:0 8px 32px rgba(0,33,71,0.15); }
.quick-card .icon { font-size:2.5rem; margin-bottom:1rem; }
.quick-card h3 { font-size:1rem; font-weight:700; color:var(--navy); margin-bottom:0.5rem; }
.quick-card p { font-size:0.82rem; color:var(--gray); line-height:1.6; }

/* ===================== PAGE HEADER ===================== */
.page-header {
  background:linear-gradient(135deg, var(--navy) 0%, #003366 100%);
  padding:2.5rem 3rem; display:flex; align-items:center; gap:1rem;
}
.page-header h2 { color:var(--white); font-size:1.6rem; font-weight:800; }
.page-header p { color:rgba(255,255,255,0.7); font-size:0.9rem; margin-top:0.3rem; }
.page-header-icon { font-size:2.5rem; }
.breadcrumb { color:var(--gold-light); font-size:0.8rem; margin-bottom:0.3rem; }

/* ===================== FORMS ===================== */
.form-container {
  max-width:860px; margin:2rem auto; background:var(--white);
  border-radius:16px; box-shadow:var(--card-shadow); overflow:hidden;
}
.form-section { padding:2rem 2.5rem; border-bottom:1px solid var(--border); }
.form-section:last-child { border-bottom:none; }
.form-section-title {
  font-size:1rem; font-weight:700; color:var(--navy);
  margin-bottom:1.2rem; display:flex; align-items:center; gap:0.5rem;
}
.form-section-title::after { content:''; flex:1; height:1px; background:var(--border); }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
.form-grid.cols3 { grid-template-columns:1fr 1fr 1fr; }
.form-group { display:flex; flex-direction:column; gap:0.4rem; }
.form-group.full { grid-column:1/-1; }
label { font-size:0.85rem; font-weight:600; color:var(--navy); }
label .req { color:#dc2626; }
input[type=text], input[type=date], input[type=email], input[type=password],
select, textarea {
  padding:0.65rem 0.9rem; border:1.5px solid var(--border); border-radius:8px;
  font-family:'Cairo',sans-serif; font-size:0.88rem; color:var(--navy);
  background:var(--white); transition:border 0.2s; outline:none; direction:rtl;
}
input:focus, select:focus, textarea:focus { border-color:var(--gold); }
textarea { resize:vertical; min-height:90px; }
.form-actions { display:flex; gap:1rem; justify-content:flex-start; flex-wrap:wrap; }

/* ===================== INDICATORS TABLE ===================== */
.indicators-table { width:100%; border-collapse:collapse; }
.indicators-table th {
  background:var(--navy); color:var(--white); padding:0.7rem 1rem;
  font-size:0.82rem; font-weight:600; text-align:right;
}
.indicators-table td { padding:0.6rem 1rem; border-bottom:1px solid var(--border); font-size:0.85rem; }
.indicators-table tr:hover td { background:#f8faff; }
.radio-group { display:flex; gap:1rem; align-items:center; flex-wrap:wrap; }
.radio-group label { font-weight:400; font-size:0.82rem; display:flex; align-items:center; gap:0.3rem; cursor:pointer; }
.radio-group input[type=radio] { width:14px; height:14px; }

/* ===================== REPORT VIEW TABLE ===================== */
.report-table-wrapper { overflow-x:auto; padding:1.5rem 2.5rem; }
.report-table { width:100%; border-collapse:collapse; font-size:0.82rem; min-width:900px; }
.report-table th {
  background:var(--navy); color:white; padding:0.65rem 0.7rem;
  text-align:right; white-space:nowrap; font-size:0.78rem;
}
.report-table td { padding:0.55rem 0.7rem; border-bottom:1px solid var(--border); }
.report-table tr:nth-child(even) td { background:#f8faff; }
.status-yes { color:var(--success); font-weight:700; }
.status-no { color:var(--danger); font-weight:700; }

/* ===================== FILTER BAR ===================== */
.filter-bar {
  display:flex; gap:1rem; align-items:center; flex-wrap:wrap;
  padding:1.2rem 2.5rem; background:var(--white); border-bottom:1px solid var(--border);
}
.filter-bar select, .filter-bar input { min-width:150px; }
.filter-bar label { font-size:0.82rem; font-weight:600; white-space:nowrap; }
.filter-item { display:flex; flex-direction:column; gap:0.3rem; }

/* ===================== TABS ===================== */
.tabs { display:flex; border-bottom:2px solid var(--border); padding:0 2.5rem; background:var(--white); }
.tab-btn {
  padding:1rem 1.5rem; border:none; background:transparent; cursor:pointer;
  font-family:'Cairo',sans-serif; font-size:0.88rem; font-weight:600;
  color:var(--gray); border-bottom:2px solid transparent; margin-bottom:-2px; transition:all 0.2s;
}
.tab-btn.active { color:var(--navy); border-bottom-color:var(--gold); }
.tab-btn:hover { color:var(--navy); }
.tab-content { display:none; }
.tab-content.active { display:block; }

/* ===================== STANDARDS ===================== */
.standards-grid { display:grid; grid-template-columns:1fr 1fr; gap:1.5rem; padding:2rem 2.5rem; }
.standard-card { border:1.5px solid var(--border); border-radius:12px; overflow:hidden; transition:all 0.2s; }
.standard-card:hover { border-color:var(--gold); box-shadow:0 4px 16px rgba(201,168,76,0.2); }
.standard-card-header {
  background:var(--navy); color:var(--white);
  padding:0.8rem 1.2rem; display:flex; align-items:center; gap:0.7rem;
}
.standard-card-header .num {
  background:var(--gold); color:var(--navy); width:28px; height:28px;
  border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-size:0.8rem; font-weight:800; flex-shrink:0;
}
.standard-card-header .name { font-size:0.88rem; font-weight:700; }
.standard-card-header .ind-count { font-size:0.75rem; color:var(--gold-light); margin-top:2px; }
.standard-card-body { padding:1.2rem; }
.ind-row { display:flex; align-items:center; gap:0.7rem; padding:0.4rem 0; border-bottom:1px solid #f1f1f1; }
.ind-row:last-child { border-bottom:none; }
.ind-num { font-size:0.75rem; color:var(--gray); min-width:35px; }
.ind-name { flex:1; font-size:0.82rem; }
.ind-select {
  font-size:0.78rem; padding:0.3rem 0.5rem; border:1px solid var(--border);
  border-radius:6px; font-family:'Cairo',sans-serif;
}
.notes-field { margin-top:0.8rem; }
.notes-field textarea { width:100%; font-size:0.82rem; min-height:60px; }
.notes-field label { font-size:0.78rem; color:var(--gray); margin-bottom:0.3rem; display:block; }

/* ===================== MODAL ===================== */
.modal-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,0.5); z-index:2000;
  display:none; align-items:center; justify-content:center; padding:1rem;
}
.modal-overlay.open { display:flex; }
.modal {
  background:var(--white); border-radius:16px; width:100%; max-width:480px;
  padding:2rem; box-shadow:0 20px 60px rgba(0,0,0,0.25); animation:slideUp 0.3s ease;
}
@keyframes slideUp { from{transform:translateY(30px);opacity:0} to{transform:translateY(0);opacity:1} }
.modal h3 { font-size:1.3rem; font-weight:800; color:var(--navy); margin-bottom:1.5rem; text-align:center; }
.modal-logo { text-align:center; margin-bottom:1rem; }
.modal-logo img { height:60px; }
.modal .form-group { margin-bottom:1rem; }
.modal-footer { text-align:center; margin-top:1rem; font-size:0.85rem; color:var(--gray); }
.modal-footer a { color:var(--navy); font-weight:600; cursor:pointer; }
.modal-close-area { text-align:left; margin-bottom:1rem; }
.modal-close-btn { background:none; border:none; font-size:1.4rem; cursor:pointer; color:var(--gray); }

/* ===================== TOAST ===================== */
.toast {
  position:fixed; bottom:2rem; left:50%; transform:translateX(-50%) translateY(100px);
  background:var(--navy); color:white; padding:0.9rem 2rem; border-radius:10px;
  font-size:0.9rem; font-weight:600; z-index:3000;
  transition:transform 0.4s ease; box-shadow:0 4px 20px rgba(0,0,0,0.3);
  border-right:4px solid var(--gold);
}
.toast.show { transform:translateX(-50%) translateY(0); }
.toast.success { border-right-color:var(--success); }
.toast.error { border-right-color:#dc2626; }

/* ===================== FOOTER ===================== */
footer {
  background:var(--navy); color:rgba(255,255,255,0.7);
  text-align:center; padding:1.5rem; font-size:0.82rem; margin-top:3rem;
}
footer span { color:var(--gold); font-weight:600; }

/* ===================== RESPONSIVE ===================== */
@media(max-width:768px) {
  .quick-cards { grid-template-columns:1fr; padding:1rem; }
  .form-grid { grid-template-columns:1fr; }
  .form-grid.cols3 { grid-template-columns:1fr; }
  .standards-grid { grid-template-columns:1fr; }
  .page-header { padding:1.5rem; flex-direction:column; align-items:flex-start; }
  nav { padding:0 1rem; }
  .nav-link { display:none; }
  .slide-text h1 { font-size:1.6rem; }
  .slider-container { height:300px; }
  .report-table-wrapper { padding:1rem; }
  .filter-bar { padding:1rem; }
  .tabs { padding:0 1rem; overflow-x:auto; }
  .stat-row { grid-template-columns:1fr 1fr; padding:1rem; }
}

/* ===================== GUEST ABOUT SECTION ===================== */
.guest-about {
  background: var(--white);
  padding: 3.5rem 3rem;
  border-top: 1px solid var(--border);
}
.guest-about-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}
.guest-about-img {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.5rem;
}
.guest-logo-circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--light-bg);
  border: 3px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,33,71,0.10);
}
.guest-logo-circle img { width: 100%; height: auto; }

.guest-about-content { flex: 1; }
.guest-about-content h2 {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 0;
}

.guest-about-block { margin-bottom: 1.3rem; }
.guest-about-block h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.35rem;
}
.guest-about-block p {
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.75;
}

.guest-values {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.guest-values li {
  font-size: 0.92rem;
  color: #374151;
  padding-right: 1.2rem;
  position: relative;
}
.guest-values li::before {
  content: '◆';
  color: var(--gold);
  font-size: 0.55rem;
  position: absolute;
  right: 0;
  top: 0.35rem;
}

.btn-login-cta {
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 2rem;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(0,33,71,0.18);
}
.btn-login-cta:hover {
  background: var(--gold);
  color: var(--navy);
  transform: translateY(-2px);
}
