﻿/**
 * Aror University – Faculty Portal Dashboard CSS
 *
 * Covers: login page, forgot-password page, and the faculty dashboard
 * (update profile, publications, grants, password). The dashboard is
 * integrated inside the site layout (uses get_header/get_footer).
 *
 * CSS prefixes:
 *   fd-      faculty dashboard general
 *   fd-auth- login / forgot-password standalone pages
 *   fd-dash- dashboard chrome (hero bar, sidebar, nav)
 */

/* ─── Design Tokens ─────────────────────────────────────────────── */
:root {
  --fd-brown:      #783c1e;
  --fd-copper:     #b87333;
  --fd-dark:       #1a1a2e;
  --fd-card-bg:    #ffffff;
  --fd-text:       #3a3a4a;
  --fd-muted:      #888;
  --fd-border:     #e0e0e8;
  --fd-success:    #28a745;
  --fd-pending:    #e67e22;
  --fd-radius:     10px;
  --fd-shadow:     0 2px 12px rgba(0,0,0,.08);
  --fd-transition: .2s ease;
  --fd-copper-rgb: 184,115,51;
}

/* ═══════════════════════════════════════════════════════════════════
   1. SHARED / UTILITY (used on auth pages AND dashboard)
   ═══════════════════════════════════════════════════════════════════ */

.fd-alert {
  padding: .85rem 1.1rem;
  border-radius: var(--fd-radius);
  font-size: .88rem;
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: 1.2rem;
}
.fd-alert-success { background: #d4edda; color: #155724; border-left: 4px solid var(--fd-success); }
.fd-alert-danger  { background: #f8d7da; color: #721c24; border-left: 4px solid #dc3545; }
.fd-alert-warning { background: #fff3cd; color: #856404; border-left: 4px solid var(--fd-pending); }
.fd-alert-info    { background: #d1ecf1; color: #0c5460; border-left: 4px solid #17a2b8; }

/* Card */
.fd-card {
  background: var(--fd-card-bg);
  border-radius: var(--fd-radius);
  box-shadow: var(--fd-shadow);
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.fd-card-header {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .9rem 1.4rem;
  border-bottom: 1px solid var(--fd-border);
  background: #fafafa;
}
.fd-card-header i { color: var(--fd-copper); font-size: 1rem; }
.fd-card-header h2 {
  font-size: .95rem;
  font-weight: 600;
  color: var(--fd-brown);
  margin: 0;
  flex: 1;
}
.fd-card-body { padding: 1.3rem 1.4rem; }

/* Form rows */
.fd-form-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: .8rem; }
.fd-form-row .fd-field { flex: 1; min-width: 180px; }
.fd-field label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: #555;
  margin-bottom: .3rem;
}
.fd-field label i { margin-right: .3rem; color: var(--fd-copper); }
.fd-field .form-control {
  border-radius: 8px;
  border: 1.5px solid var(--fd-border);
  padding: .5rem .7rem;
  font-size: .875rem;
  color: var(--fd-text);
  transition: border-color var(--fd-transition), box-shadow var(--fd-transition);
  width: 100%;
}
/* Fix for select dropdowns - prevent text cutoff */
.fd-field select.form-control {
  padding: .5rem .7rem;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23333' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 12px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.fd-field .form-control:focus {
  border-color: var(--fd-copper);
  box-shadow: 0 0 0 3px rgba(var(--fd-copper-rgb),.18);
  outline: none;
}
.fd-field .form-control[readonly] { background: #f5f5f7; color: var(--fd-muted); cursor: not-allowed; }

/* Save bar */
.fd-save-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .75rem;
  padding: .9rem 1.4rem;
  border-top: 1px solid var(--fd-border);
  background: #fafafa;
}

/* Buttons */
.btn-fd-primary {
  background: var(--fd-brown);
  color: #fff !important;
  border: none;
  padding: .58rem 1.5rem;
  border-radius: var(--fd-radius);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--fd-transition), transform .1s ease;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  text-decoration: none !important;
}
.btn-fd-primary:hover  { background: #5e2e16; color: #fff !important; }
.btn-fd-primary:active { transform: scale(.98); }

.btn-fd-outline {
  background: transparent;
  color: var(--fd-brown);
  border: 1.5px solid var(--fd-brown);
  padding: .55rem 1.2rem;
  border-radius: var(--fd-radius);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--fd-transition);
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  text-decoration: none;
}
.btn-fd-outline:hover { background: var(--fd-brown); color: #fff; }

.btn-fd-sm { padding: .35rem .85rem; font-size: .78rem; }
.btn-fd-danger { background: #dc3545; color: #fff; border-color: #dc3545; }
.btn-fd-danger:hover { background: #b02a37; color: #fff; }

/* Status badges */
.fd-badge { display: inline-block; padding: .25em .7em; border-radius: 50px; font-size: .72rem; font-weight: 600; }
.fd-badge-pending  { background: #fff3cd; color: #856404; }
.fd-badge-approved { background: #d4edda; color: #155724; }
.fd-badge-rejected { background: #f8d7da; color: #721c24; }

/* Repeater items */
.fd-repeater-item {
  background: #f9f9fb;
  border: 1.5px solid var(--fd-border);
  border-radius: var(--fd-radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  position: relative;
}
.fd-repeater-item:last-child { margin-bottom: 0; }
.fd-repeater-remove {
  position: absolute;
  top: .65rem;
  right: .7rem;
  background: none;
  border: none;
  color: #dc3545;
  font-size: .85rem;
  cursor: pointer;
  opacity: .7;
  transition: opacity var(--fd-transition);
}
.fd-repeater-remove:hover { opacity: 1; }
.fd-repeater-empty { text-align: center; color: var(--fd-muted); font-size: .88rem; padding: 1.5rem; }

/* Page-section heading */
.fd-page-header { margin-bottom: 1.4rem; }
.fd-page-header h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--fd-brown);
  margin-bottom: .3rem;
}
.fd-page-header p { color: var(--fd-muted); font-size: .88rem; margin: 0; }

/* Password strength */
.fd-password-strength { height: 5px; background: var(--fd-border); border-radius: 3px; margin-top: .45rem; overflow: hidden; }
.fd-password-strength-bar { height: 100%; border-radius: 3px; width: 0; transition: width .3s ease, background .3s ease; }
.fd-strength-weak   { width: 30% !important; background: #dc3545; }
.fd-strength-fair   { width: 65% !important; background: #ffc107; }
.fd-strength-strong { width: 100% !important; background: var(--fd-success); }

/* Photo upload */
.fd-photo-wrap {
  display: flex;
  align-items: flex-start;
  gap: 1.4rem;
  flex-wrap: wrap;
}
.fd-photo-preview-container {
  position: relative;
  flex-shrink: 0;
}
.fd-photo-preview {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--fd-border);
  display: block;
}
.fd-photo-overlay {
  position: absolute;
  bottom: 3px;
  right: 3px;
  width: 30px;
  height: 30px;
  background: var(--fd-brown);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .75rem;
  cursor: pointer;
  border: 2px solid #fff;
  transition: background var(--fd-transition);
}
.fd-photo-overlay:hover { background: var(--fd-copper); }
.fd-photo-info { font-size: .83rem; color: var(--fd-muted); padding-top: .4rem; }

/* ═══════════════════════════════════════════════════════════════════
   2. LOGIN & FORGOT PASSWORD PAGES (standalone, full-screen)
   ═══════════════════════════════════════════════════════════════════ */

.fd-auth-body {
  background: linear-gradient(135deg, var(--fd-dark) 0%, #2c1a0e 60%, var(--fd-brown) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Poppins", sans-serif;
  position: relative;
  overflow: hidden;
}

.fd-auth-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .25;
  pointer-events: none;
}
.fd-auth-blob-1 { width: 430px; height: 430px; background: var(--fd-copper); top: -120px; right: -80px; }
.fd-auth-blob-2 { width: 300px; height: 300px; background: var(--fd-brown); bottom: -80px; left: -60px; }

.fd-auth-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  margin: 2rem;
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 18px;
  padding: 2.5rem 2.2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  color: #fff;
}

.fd-auth-logo { text-align: center; margin-bottom: 1.5rem; }
.fd-auth-logo img { height: 65px; }
.fd-auth-title  { text-align: center; font-size: 1.35rem; font-weight: 700; color: #fff; margin-bottom: .3rem; }
.fd-auth-subtitle { text-align: center; font-size: .82rem; color: rgba(255,255,255,.6); margin-bottom: 1.8rem; }

.fd-auth-field { margin-bottom: 1.1rem; }
.fd-auth-field label { display: block; font-size: .8rem; font-weight: 600; color: rgba(255,255,255,.75); margin-bottom: .35rem; letter-spacing: .03em; }
.fd-auth-input-wrap { position: relative; }
.fd-auth-input-wrap .fd-auth-icon { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,.4); font-size: .9rem; pointer-events: none; }
.fd-auth-input-wrap input {
  width: 100%;
  background: rgba(255,255,255,.1);
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: 8px;
  padding: .72rem .9rem .72rem 2.5rem;
  color: #fff;
  font-size: .9rem;
  font-family: "Poppins", sans-serif;
  transition: border-color var(--fd-transition), box-shadow var(--fd-transition);
  outline: none;
}
.fd-auth-input-wrap input::placeholder { color: rgba(255,255,255,.35); }
.fd-auth-input-wrap input:focus { border-color: var(--fd-copper); box-shadow: 0 0 0 3px rgba(var(--fd-copper-rgb),.3); background: rgba(255,255,255,.14); }

.fd-auth-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.4rem; font-size: .82rem; }
.fd-auth-remember { display: flex; align-items: center; gap: .4rem; color: rgba(255,255,255,.7); cursor: pointer; }
.fd-auth-forgot { color: var(--fd-copper); text-decoration: none; font-weight: 500; }
.fd-auth-forgot:hover { text-decoration: underline; color: var(--fd-copper); }

.fd-auth-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--fd-brown), var(--fd-copper));
  color: #fff;
  border: none;
  padding: .85rem;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .04em;
  transition: opacity var(--fd-transition), transform .1s ease;
  font-family: "Poppins", sans-serif;
}
.fd-auth-submit:hover  { opacity: .92; text-decoration: none; color: #fff; }
.fd-auth-submit:active { transform: scale(.98); }

.fd-auth-back { text-align: center; margin-top: 1.2rem; font-size: .82rem; color: rgba(255,255,255,.55); }
.fd-auth-back a { color: var(--fd-copper); text-decoration: none; font-weight: 500; }
.fd-auth-back a:hover { text-decoration: underline; }

.fd-auth-alert { padding: .75rem 1rem; border-radius: 8px; font-size: .84rem; margin-bottom: 1.2rem; display: flex; align-items: center; gap: .5rem; }
.fd-auth-alert-error   { background: rgba(220,53,69,.2); border: 1px solid rgba(220,53,69,.4); color: #ffb3ba; }
.fd-auth-alert-success { background: rgba(40,167,69,.2);  border: 1px solid rgba(40,167,69,.4);  color: #b3ffca; }

/* ═══════════════════════════════════════════════════════════════════
   3. DASHBOARD HERO BAR  (replaces old fd-topbar)
   ═══════════════════════════════════════════════════════════════════ */

.fd-hero-bar {
  background: var(--fd-brown);
  padding: .75rem 0;
  border-bottom: 3px solid var(--fd-copper);
}
.fd-hero-links { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.fd-hero-link {
  font-size: .8rem;
  color: rgba(255,255,255,.8);
  text-decoration: none;
  padding: .35rem .8rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.25);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  transition: all var(--fd-transition);
}
.fd-hero-link:hover { background: rgba(255,255,255,.12); color: #fff; }
.fd-hero-logout { border-color: rgba(255,120,120,.4); color: #ffaaaa; }
.fd-hero-logout:hover { background: rgba(255,0,0,.15); color: #ffaaaa; }

/* ═══════════════════════════════════════════════════════════════════
   4. DASHBOARD SIDEBAR  (in-column, not fixed)
   ═══════════════════════════════════════════════════════════════════ */

.fd-dash-sidebar {
  background: #fff;
  border-radius: var(--fd-radius);
  box-shadow: var(--fd-shadow);
  overflow: hidden;
  position: sticky;
  top: 20px;
}

/* Profile block */
.fd-dash-profile {
  background: linear-gradient(135deg, var(--fd-brown), #5e2e16);
  padding: 1.5rem 1rem 1.2rem;
  text-align: center;
}
.fd-dash-avatar-wrap { position: relative; display: inline-block; margin-bottom: .65rem; }
.fd-dash-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,.4);
  display: block;
}
.fd-dash-avatar-edit {
  position: absolute;
  bottom: 2px;
  right: 1px;
  width: 24px;
  height: 24px;
  background: var(--fd-copper);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .62rem;
  cursor: pointer;
  border: 2px solid #fff;
  transition: background var(--fd-transition);
}
.fd-dash-avatar-edit:hover { background: #c88a44; }
.fd-dash-name { font-size: .92rem; font-weight: 700; color: #fff; margin: 0 0 .2rem; line-height: 1.3; }
.fd-dash-role { font-size: .75rem; color: rgba(255,255,255,.65); margin: 0 0 .75rem; }
.fd-dash-view-link {
  display: inline-block;
  font-size: .75rem;
  color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 20px;
  padding: .25rem .75rem;
  text-decoration: none;
  transition: all var(--fd-transition);
}
.fd-dash-view-link:hover { background: rgba(255,255,255,.15); color: #fff; }

/* Sidebar nav */
.fd-dash-nav { padding: .6rem 0; }
.fd-dash-nav-group {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #aab;
  padding: .6rem 1.1rem .25rem;
}
.fd-dash-nav-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem 1.1rem;
  font-size: .845rem;
  color: #444;
  text-decoration: none !important;
  transition: all var(--fd-transition);
  border-left: 3px solid transparent;
  position: relative;
}
.fd-dash-nav-item i { color: #999; font-size: .85rem; width: 16px; text-align: center; flex-shrink: 0; transition: color var(--fd-transition); }
.fd-dash-nav-item:hover { background: rgba(var(--fd-copper-rgb),.08); color: var(--fd-brown); border-left-color: rgba(var(--fd-copper-rgb),.4); }
.fd-dash-nav-item:hover i { color: var(--fd-copper); }
.fd-dash-nav-item.active { background: rgba(var(--fd-copper-rgb),.12); color: var(--fd-brown); font-weight: 600; border-left-color: var(--fd-copper); }
.fd-dash-nav-item.active i { color: var(--fd-copper); }

/* Pending badge in nav */
.fd-dash-badge {
  margin-left: auto;
  background: var(--fd-copper);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  border-radius: 20px;
  padding: 0 .5em;
  min-width: 18px;
  text-align: center;
  line-height: 18px;
  height: 18px;
}

.fd-dash-nav-footer {
  border-top: 1px solid var(--fd-border);
  padding: .5rem 0;
}

/* ═══════════════════════════════════════════════════════════════════
   5. DASHBOARD OVERVIEW  (stats, pending panel, quick actions)
   ═══════════════════════════════════════════════════════════════════ */

.fd-stats-row { margin-bottom: 1.4rem; }
.fd-stat-card {
  display: block;
  background: #fff;
  border-radius: var(--fd-radius);
  box-shadow: var(--fd-shadow);
  padding: 1.1rem .9rem;
  text-align: center;
  text-decoration: none !important;
  color: var(--fd-text) !important;
  transition: box-shadow var(--fd-transition), transform var(--fd-transition);
  margin-bottom: 1rem;
}
.fd-stat-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.12); transform: translateY(-2px); }
.fd-stat-icon { font-size: 1.3rem; color: var(--fd-copper); margin-bottom: .4rem; }
.fd-stat-num { font-size: 1.5rem; font-weight: 700; color: var(--fd-brown); line-height: 1; margin-bottom: .25rem; }
.fd-stat-label { font-size: .75rem; color: var(--fd-muted); }

.fd-pending-panel {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-left: 4px solid var(--fd-pending);
  border-radius: var(--fd-radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1.4rem;
}
.fd-pending-title { font-weight: 700; font-size: .88rem; color: #795548; margin-bottom: .5rem; }
.fd-pending-title i { margin-right: .4rem; }
.fd-pending-list { margin: 0; padding-left: 1.2rem; font-size: .84rem; color: #666; }
.fd-pending-list li { margin-bottom: .25rem; }

.fd-quick-grid { margin-bottom: .5rem; }
.fd-quick-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 1rem .5rem;
  background: #fafafa;
  border: 1.5px solid var(--fd-border);
  border-radius: var(--fd-radius);
  text-decoration: none !important;
  color: var(--fd-text) !important;
  font-size: .82rem;
  font-weight: 500;
  transition: all var(--fd-transition);
  text-align: center;
}
.fd-quick-tile i { font-size: 1.2rem; color: var(--fd-copper); }
.fd-quick-tile:hover { border-color: var(--fd-copper); background: rgba(var(--fd-copper-rgb),.06); color: var(--fd-brown) !important; }
.fd-quick-tile:hover i { color: var(--fd-brown); }

/* ═══════════════════════════════════════════════════════════════════
   6. RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 991px) {
  .fd-dash-sidebar { position: static; margin-bottom: 1.5rem; }
  .fd-stat-num { font-size: 1.25rem; }
}

@media (max-width: 575px) {
  .fd-card-body { padding: 1rem; }
  .fd-save-bar { flex-direction: column; align-items: stretch; }
  .fd-save-bar .btn-fd-primary,
  .fd-save-bar .btn-fd-outline { justify-content: center; }
  .fd-form-row { flex-direction: column; }
  .fd-form-row .fd-field { min-width: 0; }
  .fd-auth-card { margin: 1rem; padding: 2rem 1.4rem; }
  .fd-hero-bar .d-flex { flex-direction: column; align-items: flex-start !important; gap: .75rem; }
}