/* ===== ALLTEXT.COM — SHARED STYLES ===== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --brand: #0c0b0e;
  --brand-dark: #134a7a;
  --brand-darker: #0d3459;
  --brand-light: #e8f2fb;
  --accent: #facc15;
  --accent-dark: #d4891a;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --text-dark: #1e2d3d;
  --text-mid: #4a5568;
  --text-light: #8896a5;
  --border: #d0dff0;
  --bg-page: #f0f4f8;
  --sidebar-w: 240px;
  --gradient-start: #1e1a22;
  --gradient-end: #0a090c;
  --gold-start: #f7d875;
  --gold-end: #e9b92b;
  --gold-gradient: linear-gradient(
    145deg,
    var(--gold-start),
    var(--gold-end)
  );
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg-page);
  color: var(--text-dark);
  min-height: 100vh;
}

/* ===== TOP NAV ===== */
.top-nav {
  background: var(--brand);
  background-image: radial-gradient(
    circle at 20% 30%,
    var(--gradient-start) 0%,
    var(--gradient-end) 90%
  );
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(26,95,158,.25);
}
.top-nav .brand {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .5px;
  text-decoration: none;
}
.top-nav .brand span { var(--accent); background: var(--gold-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.top-nav .nav-links { display: flex; align-items: center; gap: .5rem; }
.top-nav .nav-links a {
  color: rgba(255,255,255,.82);
  text-decoration: none;
  font-size: .85rem;
  padding: .35rem .85rem;
  border-radius: 6px;
  transition: .15s;
}
.top-nav .nav-links a:hover { background: rgba(255,255,255,.15); color: #fff; }
.top-nav .nav-links a.btn-nav {
    background: var(--gold-gradient);
  color: #fff;
  font-weight: 600;
}
.top-nav .nav-links a.btn-nav:hover { background: var(--accent-dark); }

/* ===== AUTH PAGES ===== */
.auth-bg {
  min-height: calc(100vh - 58px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(140deg, #e8f2fb 0%, #f0f4f8 60%, #dceefa 100%);
}
.auth-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 32px rgba(26,95,158,.13);
  padding: 2.5rem 2.25rem;
  width: 100%;
  max-width: 450px;
}
.auth-card .card-icon {
  width: 52px; height: 52px;
  background: var(--brand-light);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--brand);
  margin-bottom: 1rem;
}
.auth-card h2 { font-size: 1.4rem; font-weight: 700; color: var(--text-dark); margin-bottom: .2rem; }
.auth-card .subtitle { color: var(--text-light); font-size: .85rem; margin-bottom: 1.5rem; }
.auth-card hr { border-color: var(--border); margin: 1.2rem 0; }

.form-label { font-size: .82rem; font-weight: 600; color: var(--text-mid); margin-bottom: .3rem; }
.form-control {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: .55rem .9rem;
  font-size: .88rem;
  font-family: 'Poppins', sans-serif;
  color: var(--text-dark);
  width: 100%;
  transition: .15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(26,95,158,.1);
}
.form-group { margin-bottom: 1rem; }

.btn-primary-full {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .65rem 1.5rem;
  font-weight: 600;
  font-size: .9rem;
  font-family: 'Poppins', sans-serif;
  width: 100%;
  cursor: pointer;
  transition: .2s;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  margin-top: .5rem;
}
.btn-primary-full:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-primary-full:active { transform: scale(.98); }

.auth-switch { text-align: center; margin-top: 1.1rem; font-size: .85rem; color: var(--text-light); }
.auth-switch a { color: var(--brand); font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

.input-icon-wrap { position: relative; }
.input-icon-wrap i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--text-light); font-size: .9rem; }
.input-icon-wrap .form-control { padding-left: 2.4rem; }

/* ===== DASHBOARD ===== */
.dash-layout { display: flex; min-height: calc(100vh - 58px); }

.sidebar {
  width: var(--sidebar-w);
  background: var(--brand-darker);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.sidebar .user-block {
  padding: 1.2rem 1.1rem .9rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar .avatar {
  width: 46px; height: 46px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; color: #fff;
  margin-bottom: .5rem;
}
.sidebar .uname { font-size: .9rem; font-weight: 600; color: #fff; }
.sidebar .urole { font-size: .72rem; color: rgba(255,255,255,.5); }
.sidebar nav { padding: .5rem 0; flex: 1; }
.sidebar nav a {
  display: flex; align-items: center; gap: .75rem;
  padding: .62rem 1.1rem;
  color: rgba(255,255,255,.72);
  text-decoration: none;
  font-size: .84rem;
  border-left: 3px solid transparent;
  transition: .15s;
}
.sidebar nav a i { width: 18px; text-align: center; font-size: .88rem; }
.sidebar nav a:hover, .sidebar nav a.active {
  background: rgba(255,255,255,.09);
  color: #fff;
  border-left-color: var(--accent);
}
.sidebar .sidebar-footer {
  padding: .75rem 1.1rem;
  border-top: 1px solid rgba(255,255,255,.1);
}
.sidebar .sidebar-footer a {
  display: flex; align-items: center; gap: .6rem;
  color: rgba(255,255,255,.55);
  text-decoration: none;
  font-size: .82rem;
}
.sidebar .sidebar-footer a:hover { color: #fff; }

.dash-main { flex: 1; padding: 1.75rem; overflow: auto; }
.page-header { margin-bottom: 1.5rem; }
.page-header h3 { font-size: 1.15rem; font-weight: 700; color: var(--text-dark); }
.page-header p { font-size: .82rem; color: var(--text-light); margin-top: .15rem; }

.stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  border-left: 4px solid var(--brand);
  box-shadow: 0 1px 6px rgba(0,0,0,.05);
}
.stat-card .stat-val { font-size: 1.9rem; font-weight: 700; color: var(--brand); line-height: 1.1; }
.stat-card .stat-lbl { font-size: .73rem; color: var(--text-light); text-transform: uppercase; letter-spacing: .6px; margin-top: .15rem; }
.stat-card.green { border-left-color: var(--success); }
.stat-card.green .stat-val { color: var(--success); }
.stat-card.amber { border-left-color: var(--accent); }
.stat-card.amber .stat-val { color: var(--accent-dark); }
.stat-card.red { border-left-color: var(--danger); }
.stat-card.red .stat-val { color: var(--danger); }

.card-box {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,.05);
  overflow: hidden;
}
.card-box-header {
  padding: .85rem 1.2rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-box-header h5 { font-size: .88rem; font-weight: 700; color: var(--text-dark); }

.data-table { width: 100%; border-collapse: collapse; font-size: .83rem; }
.data-table th {
  background: #f7fafd;
  color: var(--text-mid);
  font-weight: 600;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: .65rem 1rem;
  text-align: left;
  border-bottom: 1.5px solid var(--border);
}
.data-table td {
  padding: .65rem 1rem;
  border-bottom: 1px solid #f0f4f8;
  color: var(--text-dark);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f7fbff; }

.badge { padding: 3px 10px; border-radius: 20px; font-size: .72rem; font-weight: 600; }
.badge-pending { background: #fff3cd; color: #856404; }
.badge-review { background: #cce5ff; color: #004085; }
.badge-done { background: #d4edda; color: #155724; }

.btn-sm {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: .75rem;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  font-weight: 500;
  transition: .15s;
  text-decoration: none;
  display: inline-block;
}
.btn-sm:hover { background: var(--brand-dark); }
.btn-sm.outline {
  background: #fff;
  color: var(--brand);
  border: 1.5px solid var(--brand);
}
.btn-sm.outline:hover { background: var(--brand-light); }

/* ===== EDITOR ===== */
.editor-wrap { display: flex; flex-direction: column; height: calc(100vh - 58px); }
.editor-toolbar {
  background: #fff;
  border-bottom: 1.5px solid var(--border);
  padding: .5rem 1rem;
  display: flex; align-items: center; gap: .4rem;
  flex-wrap: wrap;
}
.editor-toolbar .job-label { font-size: .82rem; font-weight: 700; color: var(--brand); margin-right: .4rem; }
.tb-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 9px;
  font-size: .82rem;
  cursor: pointer;
  color: var(--text-mid);
  font-family: 'Poppins', sans-serif;
  transition: .15s;
}
.tb-btn:hover { background: var(--brand-light); color: var(--brand); border-color: #a8c8e8; }
.tb-sep { width: 1px; height: 22px; background: var(--border); margin: 0 .2rem; }

.editor-body { flex: 1; display: flex; overflow: hidden; }
.editor-left {
  width: 220px;
  background: #fff;
  border-right: 1.5px solid var(--border);
  padding: .85rem;
  flex-shrink: 0;
  overflow-y: auto;
}
.editor-left h6 {
  font-size: .72rem; font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase; letter-spacing: .6px;
  margin-bottom: .65rem;
}
.job-item {
  padding: .5rem .7rem;
  border-radius: 7px;
  cursor: pointer;
  margin-bottom: 3px;
  border-left: 3px solid transparent;
  transition: .15s;
}
.job-item:hover, .job-item.active {
  background: var(--brand-light);
  border-left-color: var(--brand);
}
.job-item .ji-title { font-size: .82rem; font-weight: 600; color: var(--text-dark); }
.job-item .ji-sub { font-size: .72rem; color: var(--text-light); margin-top: 1px; }

.editor-center {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  overflow-y: auto;
  background: var(--bg-page);
}
.doc-paper {
  flex: 1;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  font-size: .88rem;
  line-height: 1.8;
  color: var(--text-dark);
  outline: none;
  min-height: 220px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.doc-meta { font-size: .75rem; color: var(--text-light); text-align: right; }

.editor-right {
  width: 195px;
  background: #fff;
  border-left: 1.5px solid var(--border);
  padding: .85rem;
  flex-shrink: 0;
  overflow-y: auto;
}
.editor-right h6 {
  font-size: .72rem; font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase; letter-spacing: .6px;
  margin-bottom: .65rem;
}
.info-row { font-size: .8rem; color: var(--text-mid); margin-bottom: .4rem; display: flex; justify-content: space-between; }
.info-row span { font-weight: 600; color: var(--text-dark); }
.action-divider { border: none; border-top: 1px solid var(--border); margin: .75rem 0; }

.btn-approve {
  background: var(--success);
  color: #fff; border: none;
  border-radius: 8px;
  padding: .5rem 1rem;
  font-size: .83rem; font-weight: 600;
  font-family: 'Poppins', sans-serif;
  width: 100%; cursor: pointer;
  transition: .15s;
  display: flex; align-items: center; justify-content: center; gap: .4rem;
}
.btn-approve:hover { background: #218838; }
.btn-reject {
  background: #fff;
  color: var(--danger);
  border: 1.5px solid var(--danger);
  border-radius: 8px;
  padding: .45rem 1rem;
  font-size: .83rem; font-weight: 600;
  font-family: 'Poppins', sans-serif;
  width: 100%; cursor: pointer;
  margin-top: .45rem;
  transition: .15s;
  display: flex; align-items: center; justify-content: center; gap: .4rem;
}
.btn-reject:hover { background: var(--danger); color: #fff; }

/* ===== APPROVED PAGE ===== */
.approved-wrap {
  min-height: calc(100vh - 58px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 2.5rem 1rem;
  background: linear-gradient(140deg, #e8f2fb 0%, #f0f4f8 60%, #dceefa 100%);
}
.approved-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 32px rgba(26,95,158,.13);
  padding: 2rem;
  max-width: 640px;
  width: 100%;
}
.approved-icon {
  width: 60px; height: 60px;
  background: #d4edda;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: var(--success);
  margin-bottom: 1rem;
}
.approved-card h2 { font-size: 1.25rem; font-weight: 700; color: #155724; }
.approved-card .sub { color: var(--text-light); font-size: .85rem; margin-bottom: 1.5rem; }
.doc-view {
  background: #fafcff;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  font-size: .88rem;
  line-height: 1.8;
  color: var(--text-dark);
  margin-bottom: 1.25rem;
}
.doc-view h4 { font-size: .95rem; color: var(--brand); margin-bottom: .75rem; font-weight: 700; }
.doc-meta-row {
  display: flex; gap: 1rem; flex-wrap: wrap;
  font-size: .78rem; color: var(--text-light);
  padding-top: .75rem;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}
.btn-row { display: flex; gap: .75rem; flex-wrap: wrap; }
.btn-download {
  background: var(--brand); color: #fff;
  border: none; border-radius: 8px;
  padding: .5rem 1.2rem;
  font-size: .85rem; font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer; text-decoration: none;
  transition: .15s;
}
.btn-download:hover { background: var(--brand-dark); color: #fff; }
.btn-back {
  background: #fff; color: var(--brand);
  border: 1.5px solid var(--brand);
  border-radius: 8px;
  padding: .5rem 1.2rem;
  font-size: .85rem; font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer; text-decoration: none;
  transition: .15s;
}
.btn-back:hover { background: var(--brand-light); }

/* ===== BOOTSTRAP GRID HELPERS ===== */
.row { display: flex; flex-wrap: wrap; margin: 0 -8px; }
.col { flex: 1; padding: 0 8px; }
.col-3 { width: 25%; padding: 0 8px; }
.g-3 > * { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: .5rem; }
.mt-3 { margin-top: 1rem; }
.mt-2 { margin-top: .5rem; }
.me-1 { margin-right: .25rem; }
.me-2 { margin-right: .5rem; }
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-2 { gap: .5rem; }
.w-100 { width: 100%; }
.text-center { text-align: center; }
