/* ============================================================
   PARSERIAS – Main Stylesheet
   AIFAESA, I.P. – Partners Forum
   Mobile-first design
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Lora:ital,wght@0,400;0,600;1,400&display=swap");

/* ---------- CSS Variables ---------- */
:root {
  --c-primary: #1a4731;
  --c-primary-d: #0e2c1e;
  --c-primary-l: #2d7a50;
  --c-gold: #c8973a;
  --c-gold-l: #e8b86d;
  --c-teal: #1e6b70;
  --c-surface: #f5f7f4;
  --c-white: #ffffff;
  --c-text: #1a1f1a;
  --c-text-muted: #5a6360;
  --c-border: #dce3dc;
  --c-danger: #c0392b;
  --c-success: #27ae60;
  --c-warn: #e67e22;

  --sidebar-w: 280px;
  --header-h: 56px;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);

  --font-sans: "Plus Jakarta Sans", sans-serif;
  --font-serif: "Lora", serif;

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--c-text);
  background: var(--c-surface);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}
button {
  cursor: pointer;
  font-family: inherit;
}
input,
textarea,
select {
  font-family: inherit;
}

/* ---------- App Shell ---------- */
#app-shell {
  display: flex;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: linear-gradient(
    170deg,
    var(--c-primary-d) 0%,
    var(--c-primary) 60%,
    #1e5c38 100%
  );
  color: var(--c-white);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transform: translateX(calc(-1 * var(--sidebar-w)));
  transition: transform var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
}

#sidebar.open {
  transform: translateX(0);
}

/* Desktop: sidebar always visible */
@media (min-width: 960px) {
  #sidebar {
    transform: translateX(0) !important;
  }
  #main-area {
    margin-left: var(--sidebar-w);
  }
  #sidebar-overlay {
    display: none !important;
  }
  #menu-toggle {
    display: none !important;
  }
}

#sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 199;
  backdrop-filter: blur(2px);
}
#sidebar-overlay.visible {
  display: block;
}

/* Sidebar header / branding */
.sidebar-brand {
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar-brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.sidebar-brand-logo .logo-badge {
  width: 38px;
  height: 38px;
  background: var(--c-gold);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--c-primary-d);
  flex-shrink: 0;
  letter-spacing: -0.5px;
}
.sidebar-brand h1 {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.02em;
}
.sidebar-brand p {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Sidebar profile card */
.sidebar-profile {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid var(--c-gold);
  object-fit: cover;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--c-gold);
  overflow: hidden;
}
.sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sidebar-profile-info {
  flex: 1;
  min-width: 0;
}
.sidebar-profile-info strong {
  display: block;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-profile-info span {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.5);
  display: block;
  margin-top: 1px;
}
.btn-edit-profile {
  margin: 0 20px 14px;
  display: block;
  text-align: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  transition: background var(--transition);
}
.btn-edit-profile:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Sidebar nav */
.sidebar-section-label {
  padding: 10px 20px 4px;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 600;
}

.sidebar-nav {
  list-style: none;
  padding: 0 10px;
}
.sidebar-nav li {
  margin-bottom: 2px;
}
.sidebar-nav a,
.sidebar-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  transition:
    background var(--transition),
    color var(--transition);
}
.sidebar-nav a:hover,
.sidebar-nav button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--c-white);
}
.sidebar-nav a.active,
.sidebar-nav button.active {
  background: rgba(200, 151, 58, 0.2);
  color: var(--c-gold-l);
}
.sidebar-nav .nav-icon {
  width: 18px;
  height: 18px;
  opacity: 0.75;
  flex-shrink: 0;
}

/* Articles list in sidebar */
.sidebar-articles {
  padding: 0 10px;
  flex: 1;
}
.sidebar-articles .article-link {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.77rem;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background var(--transition);
  line-height: 1.4;
}
.sidebar-articles .article-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--c-white);
}
.sidebar-articles .article-link.active {
  background: rgba(200, 151, 58, 0.15);
  color: var(--c-gold-l);
}
.sidebar-articles .article-link-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-gold);
  flex-shrink: 0;
  margin-top: 5px;
}
.sidebar-articles .article-link-main {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.sidebar-articles .article-link-title {
  min-width: 0;
}
.sidebar-articles .article-inst-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.35;
  color: #fff;
  flex-shrink: 0;
}
.sidebar-articles .article-inst-badge-danger {
  background: var(--c-danger);
}
.sidebar-articles .article-inst-badge-primary {
  background: var(--c-primary-l);
}
.sidebar-articles .article-inst-badge-warning {
  background: var(--c-warn);
  color: #2b1c06;
}

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: auto;
}
.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition);
}
.btn-logout:hover {
  color: #ff8080;
}

/* ---------- Top bar (mobile) ---------- */
#topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: var(--c-primary-d);
  color: var(--c-white);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 14px;
  z-index: 150;
  box-shadow: var(--shadow-md);
}
@media (min-width: 960px) {
  #topbar {
    display: none;
  }
}
#menu-toggle {
  background: none;
  border: none;
  color: var(--c-white);
  padding: 4px;
  display: grid;
  place-items: center;
}
#topbar-title {
  font-size: 0.88rem;
  font-weight: 600;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Main Content Area ---------- */
#main-area {
  flex: 1;
  min-height: 100vh;
  padding-top: var(--header-h);
  display: flex;
  flex-direction: column;
}
@media (min-width: 960px) {
  #main-area {
    padding-top: 0;
  }
}

#main-content {
  flex: 1;
  padding: 20px 16px 40px;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
}
@media (min-width: 960px) {
  #main-content {
    padding: 32px 32px 60px;
  }
}

/* ---------- Cards & Surfaces ---------- */
.card {
  background: var(--c-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-border);
  overflow: hidden;
}
.card-header {
  background: linear-gradient(
    135deg,
    var(--c-primary) 0%,
    var(--c-primary-l) 100%
  );
  color: var(--c-white);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.card-header h2 {
  font-size: 1rem;
  font-weight: 600;
}
.card-body {
  padding: 20px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--c-primary);
  color: var(--c-white);
}
.btn-primary:hover {
  background: var(--c-primary-l);
}
.btn-gold {
  background: var(--c-gold);
  color: var(--c-white);
}
.btn-gold:hover {
  background: var(--c-gold-l);
}
.btn-danger {
  background: var(--c-danger);
  color: var(--c-white);
}
.btn-danger:hover {
  opacity: 0.85;
}
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--c-border);
  color: var(--c-text);
}
.btn-outline:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
}
.btn-sm {
  padding: 5px 12px;
  font-size: 0.75rem;
}
.btn-icon {
  padding: 8px;
  border-radius: var(--radius-sm);
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background: var(--c-white);
  color: var(--c-text);
  transition: border-color var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--c-primary);
}
.form-control[readonly] {
  background: var(--c-surface);
}
textarea.form-control {
  min-height: 90px;
  resize: vertical;
}
.form-row {
  display: grid;
  gap: 14px;
}
@media (min-width: 540px) {
  .form-row-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}
thead th {
  background: var(--c-surface);
  color: var(--c-text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  padding: 10px 14px;
  border-bottom: 2px solid var(--c-border);
  text-align: left;
  white-space: nowrap;
}
tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--c-border);
  vertical-align: middle;
}
tbody tr:hover {
  background: var(--c-surface);
}
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-admin {
  background: rgba(26, 71, 49, 0.12);
  color: var(--c-primary);
}
.badge-member {
  background: rgba(30, 107, 112, 0.12);
  color: var(--c-teal);
}
.badge-active {
  background: rgba(39, 174, 96, 0.12);
  color: var(--c-success);
}
.badge-inactive {
  background: rgba(192, 57, 43, 0.12);
  color: var(--c-danger);
}
.badge-pub {
  background: rgba(26, 71, 49, 0.12);
  color: var(--c-primary);
}
.badge-draft {
  background: rgba(230, 126, 34, 0.12);
  color: var(--c-warn);
}

/* ---------- Landing / Article ---------- */
.landing-hero {
  background: linear-gradient(
    135deg,
    var(--c-primary-d) 0%,
    var(--c-primary) 100%
  );
  border-radius: var(--radius-lg);
  padding: 40px 28px;
  color: var(--c-white);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.landing-hero::before {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  border: 40px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  top: -80px;
  right: -60px;
}
.landing-hero::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  border: 30px solid rgba(200, 151, 58, 0.1);
  border-radius: 50%;
  bottom: -50px;
  left: -30px;
}
.landing-hero-label {
  display: inline-block;
  background: var(--c-gold);
  color: var(--c-primary-d);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 99px;
  margin-bottom: 16px;
}
.landing-hero h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 10px;
}
.landing-hero p {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
  max-width: 480px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--c-white);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  border: 1px solid var(--c-border);
}
.stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--c-primary);
  line-height: 1;
  display: block;
}
.stat-card .stat-label {
  font-size: 0.68rem;
  color: var(--c-text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Article display */
.article-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.article-title-row h1 {
  margin: 0;
  font-size: clamp(1rem, 2.6vw, 1.25rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}
.article-title-row .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--c-text-muted);
  margin-bottom: 16px;
}
.article-meta-sep {
  color: var(--c-border);
}

.article-hero {
  background: linear-gradient(135deg, var(--c-primary-d), var(--c-primary));
  border-radius: var(--radius-md);
  padding: 28px 24px;
  margin-bottom: 20px;
  color: var(--c-white);
}
.article-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 3.5vw, 1.6rem);
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}
.article-hero .subtitle {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  font-style: italic;
}
.article-summary {
  background: var(--c-surface);
  border-left: 3px solid var(--c-gold);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: 20px;
  color: var(--c-text-muted);
}

/* File viewer embed */
.article-file-viewer {
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 24px;
}
.article-file-viewer iframe {
  width: 100%;
  min-height: 500px;
  border: none;
  display: block;
}
.article-file-toolbar {
  background: var(--c-surface);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--c-border);
  font-size: 0.78rem;
  color: var(--c-text-muted);
}

/* ---------- Comments ---------- */
.comments-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px dashed var(--c-border);
}
.comments-section h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.comment-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--c-primary);
  color: var(--c-white);
  font-size: 0.75rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}
.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.comment-bubble {
  flex: 1;
  background: var(--c-surface);
  border-radius: 0 var(--radius-md) var(--radius-md) var(--radius-md);
  padding: 10px 14px;
  font-size: 0.84rem;
  line-height: 1.55;
}
.comment-bubble .comment-author {
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--c-primary);
  margin-bottom: 2px;
}
.comment-bubble .comment-time {
  font-size: 0.66rem;
  color: var(--c-text-muted);
  margin-left: 8px;
  font-weight: 400;
}
.comment-form {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  align-items: flex-end;
}
.comment-form textarea {
  flex: 1;
  min-height: 60px;
  resize: none;
}

/* ---------- Alerts & Toasts ---------- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-success {
  background: rgba(39, 174, 96, 0.1);
  color: #1a6b3c;
  border: 1px solid rgba(39, 174, 96, 0.25);
}
.alert-danger {
  background: rgba(192, 57, 43, 0.1);
  color: #8b1a13;
  border: 1px solid rgba(192, 57, 43, 0.25);
}
.alert-warn {
  background: rgba(230, 126, 34, 0.1);
  color: #8b5e1a;
  border: 1px solid rgba(230, 126, 34, 0.25);
}

.toast-container {
  position: fixed;
  bottom: 20px;
  right: 16px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--c-text);
  color: var(--c-white);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.3s ease;
  pointer-events: auto;
  max-width: 300px;
}
.toast.success {
  background: var(--c-success);
}
.toast.error {
  background: var(--c-danger);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Modals ---------- */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 500;
  backdrop-filter: blur(3px);
  place-items: center;
  padding: 16px;
}
.modal-backdrop.open {
  display: grid;
}
.modal {
  background: var(--c-white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.28s ease;
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 {
  font-size: 1rem;
  font-weight: 700;
}
.modal-body {
  padding: 20px 24px;
}
.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--c-border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.btn-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--c-text-muted);
  line-height: 1;
  padding: 2px;
}
.btn-close:hover {
  color: var(--c-danger);
}

/* ---------- Login page ---------- */
#login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(
    160deg,
    var(--c-primary-d) 0%,
    var(--c-primary) 50%,
    #1e5c38 100%
  );
  padding: 20px;
  position: relative;
  overflow: hidden;
}
#login-page::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  border: 80px solid rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  top: -180px;
  right: -180px;
}
#login-page::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border: 50px solid rgba(200, 151, 58, 0.08);
  border-radius: 50%;
  bottom: -100px;
  left: -80px;
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--c-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px 28px;
  position: relative;
  z-index: 1;
}
.login-brand {
  text-align: center;
  margin-bottom: 28px;
}
.login-badge {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-l));
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--c-gold);
  letter-spacing: -0.5px;
  border: 3px solid var(--c-gold);
}
.login-brand h1 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--c-primary-d);
}
.login-brand p {
  font-size: 0.72rem;
  color: var(--c-text-muted);
  margin-top: 3px;
}
.login-tab-row {
  display: flex;
  background: var(--c-surface);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 20px;
  gap: 3px;
}
.login-tab {
  flex: 1;
  padding: 7px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  color: var(--c-text-muted);
  border: none;
  background: none;
  transition: all var(--transition);
}
.login-tab.active {
  background: var(--c-white);
  color: var(--c-primary);
  box-shadow: var(--shadow-sm);
}

/* ---------- File upload UI ---------- */
.file-drop {
  border: 2px dashed var(--c-border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition:
    border-color var(--transition),
    background var(--transition);
  position: relative;
}
.file-drop:hover,
.file-drop.drag-over {
  border-color: var(--c-primary);
  background: rgba(26, 71, 49, 0.03);
}
.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.file-drop-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}
.file-drop p {
  font-size: 0.82rem;
  color: var(--c-text-muted);
}
.file-name-display {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--c-primary);
  font-weight: 600;
}

/* ---------- Avatar upload ---------- */
.avatar-upload {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.avatar-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--c-surface);
  border: 2px solid var(--c-border);
  object-fit: cover;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--c-primary);
  overflow: hidden;
  flex-shrink: 0;
}
.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Utility ---------- */
.text-muted {
  color: var(--c-text-muted);
}
.text-sm {
  font-size: 0.8rem;
}
.text-right {
  text-align: right;
}
.text-center {
  text-align: center;
}
.mt-4 {
  margin-top: 16px;
}
.mb-4 {
  margin-bottom: 16px;
}
.flex {
  display: flex;
}
.flex-wrap {
  flex-wrap: wrap;
}
.items-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}
.gap-2 {
  gap: 8px;
}
.gap-3 {
  gap: 12px;
}
.w-full {
  width: 100%;
}
.hidden {
  display: none !important;
}
.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--c-white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}
.section-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
}
.divider {
  border: none;
  border-top: 1px solid var(--c-border);
  margin: 20px 0;
}
