:root {
  --bg: #050b10;
  --panel: #101820;
  --panel-2: #131d27;
  --line: #2a3540;
  --text: #f6f2ea;
  --muted: #b8c0c9;
  --gold: #c7a04a;
  --gold-2: #8d7134;
  --green: #2c6f48;
  --danger: #a84242;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: #050b10;
  color: var(--text);
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.is-hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.eyebrow {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.login-view {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(5, 11, 16, 0.96), rgba(5, 11, 16, 0.72)),
    radial-gradient(circle at 28% 24%, rgba(199, 160, 74, 0.16), transparent 34%),
    radial-gradient(circle at 82% 12%, rgba(64, 87, 105, 0.2), transparent 30%),
    #050b10;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  padding: 40px 24px;
  position: relative;
}

.login-backdrop {
  border: 1px solid rgba(199, 160, 74, 0.2);
  height: min(72vw, 760px);
  left: -180px;
  opacity: 0.42;
  position: absolute;
  top: -220px;
  transform: rotate(-18deg);
  width: min(72vw, 760px);
}

.login-stage {
  align-items: stretch;
  display: grid;
  gap: 0;
  grid-template-columns: minmax(360px, 1.1fr) minmax(360px, 440px);
  max-width: 1040px;
  position: relative;
  width: 100%;
}

.login-intro {
  background:
    linear-gradient(145deg, rgba(15, 24, 33, 0.96), rgba(7, 13, 20, 0.94)),
    linear-gradient(90deg, rgba(199, 160, 74, 0.08), transparent);
  border: 1px solid rgba(199, 160, 74, 0.18);
  border-radius: 8px 0 0 8px;
  box-shadow: var(--shadow);
  min-height: 560px;
  padding: 54px;
}

.login-logo {
  display: block;
  height: 118px;
  margin-bottom: 34px;
  width: 118px;
}

.login-intro h1 {
  font-size: clamp(2.45rem, 4vw, 3.75rem);
  line-height: 1.04;
  margin: 0 0 22px;
  max-width: 100%;
}

.login-copy {
  color: #d4d9de;
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0;
  max-width: 560px;
}

.request-link {
  align-items: center;
  background: rgba(199, 160, 74, 0.12);
  border: 1px solid rgba(199, 160, 74, 0.55);
  border-radius: 6px;
  color: var(--gold);
  display: inline-flex;
  font-weight: 800;
  margin-top: 34px;
  min-height: 44px;
  padding: 10px 16px;
  text-decoration: none;
}

.request-link:hover {
  background: rgba(199, 160, 74, 0.2);
  color: #f4d789;
}

.login-social {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.login-social > span {
  color: #d4d9de;
  font-size: 0.94rem;
}

.login-social a {
  align-items: center;
  color: var(--text);
  display: inline-flex;
  font-weight: 700;
  gap: 8px;
  text-decoration: none;
}

.login-social a:hover {
  color: var(--gold);
}

.social-icon {
  height: 22px;
  object-fit: contain;
  width: 22px;
}

.login-panel {
  align-content: center;
  background: rgba(11, 17, 24, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  box-shadow: var(--shadow);
  display: grid;
  gap: 20px;
  min-height: 560px;
  padding: 48px;
}

.login-panel-head {
  display: block;
  margin-bottom: 8px;
}

.login-panel-head h2 {
  font-size: 1.75rem;
  line-height: 1.1;
  margin: 0 0 6px;
}

.login-panel-head p {
  color: var(--muted);
  margin: 0;
}

label {
  color: var(--muted);
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
}

input,
textarea {
  background: #071017;
  border: 1px solid #2c3946;
  border-radius: 6px;
  color: var(--text);
  min-height: 50px;
  padding: 12px 14px;
}

textarea {
  min-height: 118px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--gold);
  outline: none;
}

.login-panel button,
.card-button,
.small-button {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  border: 0;
  border-radius: 6px;
  color: #101010;
  font-weight: 700;
  min-height: 48px;
  padding: 10px 16px;
}

.login-panel button {
  margin-top: 6px;
}

.login-actions {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.login-actions button {
  background: transparent;
  border: 1px solid rgba(199, 160, 74, 0.45);
  color: var(--gold);
  flex: 1;
  min-height: 40px;
}

.login-actions button:hover {
  background: rgba(199, 160, 74, 0.12);
}

.form-message {
  color: #ffcf77;
  min-height: 20px;
  margin: 0;
}

.request-modal {
  align-items: center;
  background: rgba(2, 6, 9, 0.78);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 20;
}

.request-card {
  background: linear-gradient(150deg, rgba(18, 28, 38, 0.98), rgba(7, 13, 19, 0.98));
  border: 1px solid rgba(199, 160, 74, 0.32);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.56);
  max-height: calc(100vh - 48px);
  max-width: 560px;
  overflow: auto;
  padding: 34px;
  position: relative;
  width: 100%;
}

.request-card h2 {
  font-size: 2rem;
  line-height: 1.1;
  margin: 0 0 12px;
}

.request-copy {
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 24px;
}

.request-form {
  display: grid;
  gap: 16px;
}

.request-form button {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  border: 0;
  border-radius: 6px;
  color: #101010;
  font-weight: 800;
  min-height: 48px;
  padding: 10px 16px;
}

.modal-close {
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: var(--text);
  display: grid;
  height: 34px;
  place-items: center;
  position: absolute;
  right: 18px;
  top: 18px;
  width: 34px;
}

.portal-view {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: rgba(4, 11, 16, 0.92);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 18px 14px;
}

.brand-lockup {
  align-items: center;
  color: var(--gold);
  display: flex;
  font-family: Georgia, serif;
  font-size: 1.05rem;
  gap: 12px;
  line-height: 1.2;
  margin: 0 0 28px;
}

.brand-logo {
  height: 74px;
  width: 74px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  display: flex;
  min-height: 44px;
  padding: 10px 14px;
  text-align: left;
}

.nav-item:hover,
.nav-item.is-active {
  background: linear-gradient(135deg, rgba(199, 160, 74, 0.92), rgba(112, 88, 39, 0.92));
  color: #fff;
}

.sidebar-footer {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
}

.nav-item.ghost {
  color: var(--muted);
}

.workspace {
  min-width: 0;
  padding: 24px 32px 40px;
}

.topbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.topbar h2 {
  font-size: 1.95rem;
  line-height: 1.15;
  margin: 0 0 6px;
}

.user-menu {
  align-items: center;
  display: flex;
  gap: 14px;
}

.user-menu span {
  color: var(--muted);
  display: block;
  font-size: 0.9rem;
}

.notification-dot {
  background: #df4c42;
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.avatar {
  align-items: center;
  background: linear-gradient(135deg, #2b3540, #654f25);
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: grid;
  font-weight: 800;
  height: 52px;
  place-items: center;
  width: 52px;
}

.content-grid {
  display: grid;
  gap: 18px;
}

.summary-grid,
.quick-grid,
.module-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.dashboard-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
}

.card {
  background: linear-gradient(150deg, rgba(21, 31, 42, 0.96), rgba(10, 17, 24, 0.96));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
  padding: 20px;
}

.metric-card {
  display: grid;
  gap: 18px;
  min-height: 150px;
}

.metric-card h3,
.card h3 {
  margin: 0;
}

.metric-body {
  align-items: center;
  display: flex;
  gap: 16px;
}

.metric-icon {
  align-items: center;
  background: rgba(199, 160, 74, 0.16);
  border: 1px solid rgba(199, 160, 74, 0.44);
  border-radius: 50%;
  color: var(--gold);
  display: grid;
  font-size: 1.3rem;
  height: 58px;
  place-items: center;
  width: 58px;
}

.metric-value {
  color: var(--gold);
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
}

.card-button {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  width: 100%;
}

.calendar-card {
  grid-column: 1 / -1;
}

.calendar-head,
.card-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.day-label,
.day-cell {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 54px;
  padding: 8px;
}

.day-label {
  color: var(--muted);
  min-height: 32px;
}

.event-pill {
  background: rgba(199, 160, 74, 0.16);
  border-radius: 5px;
  color: #ffd777;
  display: block;
  font-size: 0.78rem;
  margin-top: 6px;
  padding: 4px 6px;
}

.event-pill.green {
  background: rgba(44, 111, 72, 0.72);
  color: #eaffef;
}

.list {
  display: grid;
  gap: 12px;
}

.list-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 4px;
  padding: 0 0 12px;
}

.list-row strong {
  color: var(--text);
}

.quick-card {
  align-items: center;
  display: flex;
  gap: 14px;
  min-height: 86px;
}

.quick-card .metric-icon {
  background: transparent;
  border: 0;
  font-size: 1.6rem;
}

.module-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.admin-list {
  display: grid;
  gap: 14px;
}

.admin-row {
  align-items: flex-start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 34%);
}

.admin-row p {
  line-height: 1.55;
}

.row-title {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.status-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  padding: 7px 10px;
}

.status-pill.status-ok {
  background: rgba(44, 111, 72, 0.26);
  border-color: rgba(100, 189, 132, 0.45);
  color: #c7f7d6;
}

.status-pill.status-warn {
  background: rgba(199, 160, 74, 0.18);
  border-color: rgba(199, 160, 74, 0.48);
  color: #ffd777;
}

.status-pill.status-danger {
  background: rgba(174, 62, 54, 0.22);
  border-color: rgba(226, 91, 80, 0.48);
  color: #ffb8b0;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.status-button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  min-height: 34px;
  padding: 7px 11px;
}

.status-button:hover,
.status-button.is-current {
  background: rgba(199, 160, 74, 0.2);
  border-color: rgba(199, 160, 74, 0.62);
  color: var(--gold);
}

.status-button:disabled {
  cursor: default;
  opacity: 0.72;
}

.placeholder-copy {
  color: var(--muted);
  line-height: 1.55;
  max-width: 760px;
}

.bar-link {
  color: var(--gold);
  font-weight: 700;
}

@media (max-width: 1100px) {
  .summary-grid,
  .quick-grid,
  .module-grid,
  .dashboard-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .portal-view {
    grid-template-columns: 1fr;
  }

  .login-view {
    align-items: flex-start;
    min-height: 100vh;
    padding: 18px;
  }

  .login-stage {
    grid-template-columns: 1fr;
  }

  .login-intro,
  .login-panel {
    border-radius: 8px;
    min-height: auto;
    padding: 28px;
  }

  .login-panel {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 14px;
  }

  .login-logo {
    height: 86px;
    margin-bottom: 22px;
    width: 86px;
  }

  .login-intro h1 {
    font-size: 2.25rem;
  }

  .sidebar {
    min-height: auto;
  }

  .workspace {
    padding: 20px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary-grid,
  .quick-grid,
  .module-grid,
  .admin-row,
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .status-actions {
    justify-content: flex-start;
  }
}
