: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 {
  height: 100%;
  overflow: hidden;
}

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

.app-shell {
  height: 100vh;
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button[hidden],
[hidden] {
  display: none !important;
}

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

.visually-hidden {
  height: 1px !important;
  opacity: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  position: absolute !important;
  width: 1px !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: 6px;
  font-size: 0.92rem;
}

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

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

input:focus,
textarea:focus,
select: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: 40px;
  padding: 8px 14px;
}

.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: 226px minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
}

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

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

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

.nav-list {
  display: grid;
  gap: 5px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.nav-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  display: flex;
  gap: 10px;
  font-size: 0.98rem;
  min-height: 38px;
  padding: 7px 10px;
  text-align: left;
  width: 100%;
}

.nav-item i {
  color: var(--gold);
  flex: 0 0 18px;
  font-size: 0.98rem;
  text-align: center;
}

.nav-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.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;
}

.nav-item:hover i,
.nav-item.is-active i {
  color: #15100a;
}

.nav-item.is-locked {
  color: rgba(184, 192, 201, 0.48);
}

.nav-item.is-locked i {
  color: rgba(184, 192, 201, 0.42);
}

.nav-item.is-locked:hover {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(184, 192, 201, 0.62);
}

.sidebar-footer {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding-top: 12px;
  flex: 0 0 auto;
}

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

.admin-nav {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  padding-bottom: 10px;
}

.sidebar-section-label {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0 10px 3px;
  text-transform: uppercase;
}

.workspace {
  height: 100vh;
  min-width: 0;
  overflow: auto;
  padding: 12px 18px 18px;
}

.workspace.calendar-workspace,
.workspace.dashboard-workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.workspace.calendar-workspace .topbar,
.workspace.dashboard-workspace .topbar {
  position: static;
}

.topbar {
  align-items: center;
  background: rgba(5, 11, 16, 0.94);
  border-bottom: 1px solid rgba(199, 160, 74, 0.16);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
  margin-left: -18px;
  margin-right: -18px;
  margin-top: -12px;
  padding: 10px 18px;
  position: sticky;
  top: 0;
  z-index: 5;
}

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

.mobile-menu-button {
  align-items: center;
  background: rgba(199, 160, 74, 0.12);
  border: 1px solid rgba(199, 160, 74, 0.42);
  border-radius: 7px;
  color: var(--gold);
  display: none;
  font-weight: 800;
  gap: 0;
  justify-content: center;
  min-height: 34px;
  padding: 6px 10px;
  width: 38px;
}

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

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

.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%;
  color: var(--text);
  display: grid;
  font-weight: 800;
  height: 42px;
  place-items: center;
  width: 42px;
}

.avatar-button {
  padding: 0;
}

.avatar-button:hover {
  box-shadow: 0 0 0 3px rgba(199, 160, 74, 0.18);
}

.avatar img,
.profile-avatar-preview img {
  border-radius: inherit;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.small-avatar {
  font-size: 0.82rem;
  height: 42px;
  width: 42px;
}

.content-grid {
  display: grid;
  gap: 12px;
  min-height: 0;
}

.bar-workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.bar-workspace .topbar {
  position: static;
}

.bar-page {
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
}

.bar-toolbar {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.bar-toolbar p {
  margin: 6px 0 0;
}

.bar-frame-shell {
  background: #050b10;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.bar-frame {
  border: 0;
  display: block;
  height: 100%;
  min-height: 620px;
  width: 100%;
}

.bar-fullscreen-exit {
  display: none;
}

.bar-frame-shell:fullscreen {
  background: #050b10;
  border: 0;
  border-radius: 0;
  height: 100vh;
  width: 100vw;
}

.bar-frame-shell:fullscreen .bar-frame {
  height: 100vh;
  min-height: 100vh;
}

.bar-frame-shell:fullscreen .bar-fullscreen-exit {
  display: block;
  position: fixed;
  right: 14px;
  top: 14px;
  z-index: 10;
}

.portal-view.bar-fullscreen-mode {
  display: block;
}

.portal-view.bar-fullscreen-mode .sidebar,
.portal-view.bar-fullscreen-mode .topbar {
  display: none;
}

.portal-view.bar-fullscreen-mode .workspace {
  height: 100vh;
  padding: 0;
}

.portal-view.bar-fullscreen-mode .bar-page {
  gap: 0;
}

.portal-view.bar-fullscreen-mode .bar-toolbar {
  background: rgba(5, 11, 16, 0.88);
  border-radius: 0 0 0 8px;
  box-shadow: none;
  padding: 8px 10px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 5;
}

.portal-view.bar-fullscreen-mode .bar-toolbar h3,
.portal-view.bar-fullscreen-mode .bar-toolbar p {
  display: none;
}

.portal-view.bar-fullscreen-mode .bar-frame-shell {
  border: 0;
  border-radius: 0;
  height: 100vh;
}

.portal-view.bar-fullscreen-mode .bar-frame {
  min-height: 100vh;
}

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

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

.dashboard-page {
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.dashboard-page .summary-grid {
  align-items: stretch;
}

.dashboard-page .metric-card {
  min-height: 86px;
}

.dashboard-page .dashboard-layout {
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.55fr);
  min-height: 0;
  overflow: hidden;
}

.dashboard-main {
  display: grid;
  gap: 8px;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.dashboard-side {
  align-content: start;
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

.dashboard-page .quick-grid {
  grid-auto-rows: 58px;
  grid-template-columns: repeat(3, minmax(0, 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: 12px;
}

.metric-card {
  display: grid;
  gap: 8px;
  min-height: 94px;
}

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

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

.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: 0.98rem;
  height: 36px;
  place-items: center;
  width: 36px;
}

.metric-icon i {
  line-height: 1;
}

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

.card-button {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  min-height: 34px;
  padding: 6px 10px;
  width: 100%;
}

.calendar-card {
  display: grid;
  grid-column: 1 / -1;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

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

.dashboard-page .calendar-card .calendar-head {
  margin-bottom: 0;
}

.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: 42px;
  padding: 6px;
}

.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: 4px;
  padding: 3px 5px;
}

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

.mobile-calendar-agenda {
  display: none;
}

.calendar-page {
  gap: 6px;
  height: calc(100vh - 82px);
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.calendar-tools {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.8fr);
}

.calendar-editor,
.calendar-category-editor {
  display: grid;
  gap: 8px;
}

.calendar-tools .calendar-editor {
  grid-template-columns: minmax(180px, 1fr) 130px 95px 95px 170px minmax(150px, 0.8fr) minmax(180px, 1fr) auto;
}

.calendar-editor h3,
.calendar-category-editor h3,
.calendar-message {
  grid-column: 1 / -1;
}

.calendar-editor-actions {
  display: flex;
  gap: 6px;
}

.calendar-message {
  margin: 0;
  min-height: 18px;
}

.calendar-category-editor {
  grid-template-columns: minmax(0, 1fr) 54px;
}

.calendar-category-editor button,
.calendar-category-list {
  grid-column: 1 / -1;
}

.calendar-category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.calendar-category-chip {
  align-items: center;
  background: color-mix(in srgb, var(--cat-color) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--cat-color) 62%, transparent);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  min-height: 22px;
  padding: 3px 8px;
}

.calendar-full-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.calendar-full-card .calendar-head {
  margin: 0;
  min-height: 38px;
  padding: 4px 10px;
}

.calendar-full-card .calendar-head h3 {
  font-size: 0.98rem;
  line-height: 1.1;
}

.calendar-head-actions {
  display: flex;
  gap: 6px;
}

.calendar-title-row {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.calendar-full-categories {
  border-bottom: 0;
  max-height: 27px;
  overflow: hidden;
  padding: 0;
}

.calendar-full-grid {
  flex: 1;
  grid-template-rows: 30px repeat(6, minmax(62px, 1fr));
  min-height: 0;
}

.calendar-full-grid .day-label {
  align-items: center;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  display: flex;
  font-weight: 800;
  justify-content: center;
  min-height: 30px;
  padding: 5px 6px;
}

.calendar-full-grid .weekend-head {
  background: rgba(199, 160, 74, 0.12);
}

.calendar-preview-grid {
  align-self: stretch;
  grid-template-rows: 28px repeat(var(--calendar-week-count, 6), minmax(0, 1fr));
  height: 100%;
  min-height: 0;
}

.preview-day {
  min-height: 0;
}

.preview-event {
  grid-template-columns: auto 1fr;
}

.preview-event strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-day {
  background: rgba(255, 255, 255, 0.015);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 0;
  overflow: visible;
  padding: 4px;
  position: relative;
  text-align: left;
  width: 100%;
}

.calendar-day:hover {
  background: rgba(199, 160, 74, 0.1);
}

.calendar-day.weekend-day {
  background: rgba(199, 160, 74, 0.065);
}

.calendar-day.outside-month {
  background: rgba(255, 255, 255, 0.025);
  opacity: 0.58;
}

.calendar-day-number {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.calendar-day-events {
  display: grid;
  gap: 2px;
  overflow: visible;
}

.calendar-event {
  background: color-mix(in srgb, var(--cat-color) 24%, rgba(10, 17, 24, 0.8));
  border: 1px solid color-mix(in srgb, var(--cat-color) 60%, transparent);
  color: var(--text);
  cursor: default;
  display: grid;
  gap: 2px;
  line-height: 1.18;
  margin: 0;
  padding: 3px 5px;
  position: relative;
  text-align: left;
}

.calendar-event span:first-child {
  color: #f2d27d;
  font-size: 0.68rem;
  font-weight: 800;
}

.calendar-event strong {
  color: var(--text);
  font-size: 0.74rem;
}

.calendar-event-popover {
  background: #111b25;
  border: 1px solid rgba(199, 160, 74, 0.52);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  color: var(--text);
  display: none;
  gap: 5px;
  left: 0;
  min-width: 240px;
  padding: 10px;
  position: absolute;
  top: calc(100% + 6px);
  z-index: 12;
}

.calendar-event:hover .calendar-event-popover,
.calendar-event:focus-within .calendar-event-popover,
.calendar-event:focus .calendar-event-popover {
  display: grid;
}

.calendar-event-popover small {
  color: #d0d8df;
}

.calendar-flyer-thumbnail {
  border: 1px solid rgba(199, 160, 74, 0.4);
  border-radius: 5px;
  max-height: 130px;
  max-width: 100%;
  object-fit: contain;
}

.calendar-popover-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.calendar-modal-card {
  max-width: 680px;
  padding: 24px;
}

.calendar-modal-card.calendar-editor {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.calendar-modal-card h2,
.calendar-modal-card .eyebrow,
.calendar-modal-card .calendar-editor-actions,
.calendar-modal-card .calendar-message,
.calendar-modal-card .calendar-category-list,
.calendar-modal-card .calendar-color-grid,
.calendar-modal-card .calendar-repeat-toggle,
.calendar-modal-card .calendar-flyer-control,
.calendar-modal-card button[data-calendar-category-save] {
  grid-column: 1 / -1;
}

.calendar-repeat-toggle,
.calendar-flyer-control {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-repeat-toggle {
  color: var(--text);
  font-weight: 700;
}

.calendar-repeat-toggle input {
  min-height: auto;
  width: auto;
}

.calendar-flyer-preview {
  color: var(--muted);
  font-size: 0.8rem;
}

.calendar-flyer-preview img {
  border: 1px solid rgba(199, 160, 74, 0.4);
  border-radius: 4px;
  display: block;
  height: 50px;
  object-fit: cover;
  width: 80px;
}

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

.document-toolbar {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 360px) auto;
  padding: 12px 14px;
}

.document-toolbar h3,
.document-toolbar p {
  margin: 0;
}

.document-toolbar input,
.document-toolbar .small-button {
  min-width: 0;
}

.document-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}

.document-tile {
  display: grid;
  gap: 12px;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  min-height: 164px;
  overflow: hidden;
  padding: 14px;
}

.document-tile p {
  margin: 0;
}

.document-tile-head {
  align-items: flex-start;
  display: grid;
  gap: 10px;
  grid-template-columns: 34px minmax(0, 1fr);
}

.document-icon {
  align-items: center;
  background: rgba(199, 160, 74, 0.13);
  border: 1px solid rgba(199, 160, 74, 0.32);
  border-radius: 6px;
  color: var(--gold);
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.document-thumb {
  flex: 0 0 auto;
  overflow: hidden;
}

.document-thumb img {
  display: block;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  object-fit: cover;
  width: 100%;
}

.document-title {
  display: block;
  font-size: 1rem;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.document-meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 4px;
}

.document-note {
  color: var(--text);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.document-mobile-toggle,
.document-mobile-download,
.document-mobile-side {
  display: none;
}

.document-upload-card {
  max-width: 720px;
}

.document-upload-form {
  grid-template-columns: 1fr;
}

.document-file-button {
  justify-self: start;
}

.document-file-name {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--muted);
  margin: 0;
  padding: 10px 12px;
}

.document-preview-card {
  max-width: min(1040px, calc(100vw - 48px));
  padding: 24px;
}

.document-preview-card h2 {
  font-size: 1.45rem;
  overflow-wrap: anywhere;
}

.document-preview-frame {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  height: min(72vh, 760px);
  overflow: hidden;
}

.document-preview-frame iframe {
  background: #fff;
  border: 0;
  height: 100%;
  width: 100%;
}

.document-preview-empty {
  align-items: center;
  color: var(--muted);
  display: grid;
  gap: 14px;
  height: 100%;
  justify-items: center;
  padding: 24px;
  text-align: center;
}

.protocol-year-list {
  display: grid;
  gap: 12px;
}

.protocol-year-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.protocol-year-card h3 {
  color: var(--gold);
  margin: 0;
}

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

.protocol-row {
  align-items: start;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.8fr) auto;
  padding-top: 12px;
}

.protocol-read-box {
  display: grid;
  gap: 5px;
}

.protocol-read-box p {
  margin: 0;
}

.protocol-mobile-side {
  display: none;
}

.protocol-upload-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 120px;
}

.topics-pdf-card {
  max-width: min(980px, calc(100vw - 48px));
}

.topics-pdf-frame,
.todos-pdf-frame {
  height: min(68vh, 700px);
}

.candidate-header {
  margin: 0;
}

.candidate-header .placeholder-copy {
  margin: 3px 0 0;
}

.candidate-list-card {
  padding: 14px;
}

.candidate-list-card h3,
.candidate-list-card .muted {
  margin: 0;
}

.candidate-list-card .muted {
  margin-top: 3px;
}

.candidate-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
}

.candidate-table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

.candidate-table th,
.candidate-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  padding: 10px 8px;
  text-align: left;
  vertical-align: middle;
}

.candidate-table th {
  color: var(--muted);
  font-size: 0.78rem;
}

.candidate-row {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 14px;
}

.candidate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.candidate-row p {
  margin: 5px 0 0;
}

.candidate-details {
  color: var(--text);
}

.candidate-modal-card {
  max-width: 1180px;
  overflow-x: hidden;
}

.candidate-form {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.candidate-flow {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  margin-top: 6px;
  padding-top: 14px;
}

.candidate-flow h3 {
  color: var(--gold);
  font-size: 0.96rem;
  margin: 8px 0 0;
}

.candidate-flow-row {
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(0, 1.1fr) 130px 150px minmax(0, 1.25fr) 118px;
  min-width: 0;
}

.candidate-flow-row > * {
  min-width: 0;
}

.candidate-flow-row:has(select[name="candidateBriefingMember"]) {
  grid-template-columns: minmax(0, 1fr) 130px auto minmax(0, 1.25fr);
}

.candidate-form input[name="candidateAddress"],
.candidate-form input[name="candidateReferral"],
.candidate-form textarea,
.candidate-form .calendar-editor-actions,
.candidate-form .form-message {
  grid-column: 1 / -1;
}

.calendar-color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-color-swatch {
  background: var(--swatch);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  height: 30px;
  min-height: 30px;
  padding: 0;
  width: 30px;
}

.calendar-color-swatch.is-active {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(199, 160, 74, 0.3);
}

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

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

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

.quick-card {
  align-items: center;
  color: var(--text);
  display: flex;
  gap: 9px;
  min-height: 0;
  height: 58px;
  text-align: left;
}

.quick-card .metric-icon {
  background: rgba(199, 160, 74, 0.13);
  border: 1px solid rgba(199, 160, 74, 0.35);
  font-size: 1rem;
  flex: 0 0 36px;
}

.quick-card strong {
  color: var(--text);
  font-size: 0.96rem;
}

.quick-card .muted {
  color: #d0d8df;
  font-size: 0.9rem;
}

.dashboard-page .quick-card {
  padding: 8px 10px;
}

.dashboard-page .quick-card .metric-icon {
  height: 32px;
  width: 32px;
}

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

.topics-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.topics-head {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.topics-head h3,
.topics-head p {
  margin: 0;
}

.topics-actions,
.topic-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.topics-form {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(240px, 1fr) minmax(180px, 260px) auto auto;
}

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

.topic-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  padding: 12px 14px;
}

.topic-number {
  align-items: center;
  background: rgba(199, 160, 74, 0.13);
  border: 1px solid rgba(199, 160, 74, 0.32);
  border-radius: 6px;
  color: var(--gold);
  display: inline-flex;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.topic-main strong {
  color: var(--text);
  display: block;
  overflow-wrap: anywhere;
}

.topic-main p {
  margin: 4px 0 0;
}

.electricity-panel {
  gap: 16px;
}

.electricity-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.electricity-summary > div,
.electricity-value {
  background: rgba(5, 13, 18, 0.38);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.electricity-summary strong,
.electricity-value strong {
  color: var(--text);
  font-size: 1.05rem;
}

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

.electricity-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(240px, 1fr) 170px 170px 150px 330px;
  padding: 12px 14px;
}

.electricity-row.is-locked {
  opacity: 0.9;
}

.electricity-main p {
  margin: 4px 0 0;
}

.electricity-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}

.electricity-actions .status-button {
  min-width: 92px;
}

.electricity-actions .status-button:first-child {
  min-width: 128px;
}

.electricity-form {
  display: grid;
  gap: 10px;
}

.loans-list {
  display: grid;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.loan-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1fr) 170px 130px 130px 230px 130px 150px 190px;
  min-width: 1390px;
  padding: 12px 14px;
}

.loan-main p {
  margin: 4px 0 0;
}

.loan-field {
  background: rgba(5, 13, 18, 0.34);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-height: 56px;
  padding: 9px 11px;
}

.loan-field strong {
  color: var(--text);
  font-size: 0.96rem;
  overflow-wrap: anywhere;
}

.loan-field select,
.loan-field input {
  min-height: 34px;
  padding: 6px 8px;
  width: 100%;
}

.loan-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}

.loan-form,
.loan-form-grid {
  display: grid;
  gap: 10px;
}

.loan-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dues-years {
  display: grid;
  gap: 10px;
}

.dues-year-card {
  padding: 0;
  overflow: hidden;
}

.dues-year-head {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--text);
  display: flex;
  font: inherit;
  justify-content: space-between;
  padding: 14px 16px;
  text-align: left;
  width: 100%;
}

.dues-year-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex: 1;
  font: inherit;
  justify-content: space-between;
  padding: 0;
  text-align: left;
}

.dues-year-head span,
.dues-year-toggle span {
  color: var(--gold);
  font-weight: 900;
}

.dues-table-wrap {
  overflow-x: auto;
  padding: 0 12px 12px;
}

.dues-table {
  border-collapse: collapse;
  min-width: 1680px;
  width: 100%;
}

.dues-table th,
.dues-table td {
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 5px 6px;
  text-align: left;
}

.dues-table th {
  background: rgba(143, 169, 217, 0.45);
  color: #050b10;
  font-weight: 900;
}

.dues-table th.dues-open-head {
  background: #e21b1b;
  color: #fff;
}

.dues-table tbody tr:nth-child(odd) td {
  background: rgba(143, 169, 217, 0.16);
}

.dues-table tbody tr:nth-child(even) td {
  background: rgba(143, 169, 217, 0.26);
}

.dues-table tr.is-inactive-member td {
  opacity: 0.48;
  filter: grayscale(0.55);
}

.dues-cell {
  background: transparent;
  border: 0;
  color: var(--text);
  font-weight: 800;
  min-height: 28px;
  padding: 2px 4px;
  text-align: right;
  width: 96px;
}

.dues-cell:focus {
  background: rgba(5, 13, 18, 0.85);
  outline: 2px solid rgba(199, 160, 74, 0.65);
}

.dues-open-value {
  color: #ff5b4f;
  font-weight: 900;
  min-width: 150px;
  text-align: right;
}

.dues-year-total {
  min-width: 150px;
  text-align: right;
}

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

.section-head {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 56px;
}

.section-head .placeholder-copy {
  margin: 0;
}

.member-list {
  display: grid;
  gap: 6px;
}

.member-mobile-tools,
.member-avatar,
.member-mobile-actions {
  display: none;
}

.member-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1.1fr) minmax(260px, 1fr) minmax(420px, 1.4fr) 74px;
  padding: 10px 12px;
}

.member-main p,
.member-contact span,
.user-meta p {
  margin: 0;
}

.member-contact {
  display: grid;
  gap: 2px;
}

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

.member-delete {
  justify-self: end;
}

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

.admin-row p {
  line-height: 1.38;
  margin: 5px 0;
}

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

.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.72rem;
  font-weight: 800;
  line-height: 1;
  padding: 5px 8px;
}

.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-info {
  background: rgba(143, 156, 255, 0.18);
  border-color: rgba(143, 156, 255, 0.5);
  color: #d7dcff;
}

.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: 6px;
  justify-content: flex-end;
}

.status-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  color: var(--text);
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 700;
  justify-content: center;
  min-height: 28px;
  padding: 5px 9px;
  text-decoration: none;
}

.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;
}

.danger-action {
  border-color: rgba(226, 91, 80, 0.48);
  color: #ffb8b0;
}

.ghost-button {
  background: transparent;
  border: 1px solid rgba(199, 160, 74, 0.45);
  color: var(--gold);
}

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

.profile-main-column,
.profile-side-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-side-column {
  align-content: start;
}

.profile-hero-card {
  align-items: center;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 54px !important;
  min-height: 0 !important;
  overflow: hidden;
  padding: 12px 14px !important;
  position: relative;
}

.profile-hero-bg {
  background:
    linear-gradient(90deg, rgba(8, 10, 12, 0.82), rgba(12, 14, 18, 0.56)),
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(42, 42, 42, 0.6), rgba(10, 12, 15, 0.96));
  inset: 0;
  position: absolute;
}

.profile-hero-avatar {
  align-items: center;
  background: linear-gradient(135deg, #1b232d, #0b1118);
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  color: var(--gold);
  display: grid;
  font-size: 2.4rem;
  font-weight: 900;
  height: 88px !important;
  overflow: hidden;
  place-items: center;
  position: relative;
  width: 88px !important;
  z-index: 1;
}

.profile-hero-avatar img,
.profile-gallery-item img,
.public-preview-avatar img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.profile-hero-info {
  display: grid;
  gap: 3px !important;
  position: relative;
  z-index: 1;
}

.profile-hero-info h2 {
  font-size: clamp(1.12rem, 1.4vw, 1.42rem) !important;
  margin: 0;
}

.profile-rank {
  align-items: center;
  color: var(--gold);
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
}

.profile-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px !important;
  margin-top: 2px !important;
}

.profile-hero-actions .small-button,
.profile-hero-actions .status-button {
  min-height: 30px !important;
  padding: 5px 10px !important;
}

.profile-hero-watermark {
  filter: grayscale(1);
  opacity: 0.16;
  position: relative;
  width: 46px !important;
  z-index: 1;
}

.profile-detail-card,
.profile-password-card {
  display: grid;
  gap: 18px;
}

.profile-block {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 12px;
  padding-bottom: 16px;
}

.profile-block:last-of-type {
  border-bottom: 0;
}

.profile-block-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.profile-block-head h3 {
  margin: 0;
}

.profile-form-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-form-grid label span {
  align-items: center;
  color: var(--muted);
  display: flex;
  gap: 8px;
  margin-bottom: 5px;
}

.profile-form-grid i,
.profile-edit-row i,
.profile-preview-facts i {
  color: var(--gold);
  width: 18px;
}

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

.profile-edit-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 24px minmax(0, 1fr) 150px auto;
}

.profile-gallery-edit {
  display: grid;
  gap: 8px !important;
  grid-template-columns: repeat(auto-fill, minmax(118px, 150px)) !important;
}

.profile-gallery-item {
  display: grid;
  align-content: start;
  gap: 6px !important;
}

.profile-gallery-actions {
  display: flex;
  flex-direction: column;
  gap: 5px !important;
}

.profile-gallery-actions .status-button {
  flex: 1;
  justify-content: center;
  min-height: 30px !important;
  padding: 5px 8px !important;
}

.profile-gallery-item img {
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  height: 112px !important;
  max-height: 112px !important;
  object-fit: cover !important;
  width: 112px !important;
}

.profile-gallery-item input {
  min-height: 32px !important;
  padding: 5px 8px !important;
  width: 100%;
}

.profile-share-card,
.profile-preview-card {
  display: grid;
  gap: 12px;
}

.profile-qr {
  background: #fff;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  display: block;
  justify-self: center;
  padding: 12px;
  width: 150px;
}

.profile-qr img {
  display: block;
  height: auto;
  width: 100%;
}

.profile-qr.is-copied {
  box-shadow: 0 0 0 3px rgba(143, 209, 158, 0.45);
}

.small-button.is-copied,
.profile-share-option.is-copied {
  border-color: rgba(143, 209, 158, 0.75);
  color: #c7f7d6;
}

.share-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 4px;
}

.profile-share-option {
  align-items: center;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  color: var(--text);
  display: flex;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  text-align: left;
}

.profile-share-option:hover {
  border-color: rgba(199, 160, 74, 0.45);
}

.profile-share-option i {
  color: var(--gold);
  width: 20px;
}

.profile-public-link,
.public-profile-preview a,
.profile-preview-facts a,
.public-profile-card a {
  color: var(--text) !important;
  text-decoration: none !important;
}

.profile-public-link {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 8px 10px;
  text-align: center;
  word-break: break-all;
}

.profile-detail-card .form-actions {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  justify-content: flex-start !important;
  margin-top: 0 !important;
  padding-top: 10px;
}

.profile-detail-card .form-actions .small-button {
  min-height: 34px !important;
  padding: 6px 14px !important;
  width: auto !important;
}

.public-profile-preview {
  background:
    linear-gradient(135deg, rgba(15, 20, 26, 0.94), rgba(8, 12, 16, 0.98)),
    radial-gradient(circle at 20% 0%, rgba(199, 160, 74, 0.16), transparent 28%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 18px;
}

.public-preview-head {
  align-items: center;
  display: flex;
  gap: 12px;
}

.public-preview-avatar {
  align-items: center;
  background: #101820;
  border: 2px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  color: var(--gold);
  display: grid;
  font-weight: 900;
  height: 72px;
  overflow: hidden;
  place-items: center;
  width: 72px;
}

.public-preview-head span {
  color: var(--gold);
  display: block;
  font-size: 0.86rem;
  margin-top: 2px;
}

.public-profile-preview h4,
.public-profile-preview p {
  margin: 0;
}

.profile-preview-facts {
  display: grid;
  gap: 7px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.profile-preview-facts li {
  align-items: center;
  display: flex;
  gap: 8px;
}

.profile-preview-facts .instagram i {
  color: #e959a5;
}

.profile-preview-facts .discord i {
  color: #8f9cff;
}

.profile-preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-preview-tags span {
  background: rgba(199, 160, 74, 0.12);
  border: 1px solid rgba(199, 160, 74, 0.38);
  border-radius: 999px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 8px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

.form-actions.left {
  justify-content: flex-start;
}

.user-rights-card {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(260px, 0.8fr) minmax(520px, 1.8fr) 170px;
  padding: 10px 14px;
}

.user-identity {
  align-items: flex-start;
  display: flex;
  gap: 9px;
}

.user-meta .row-title {
  margin-bottom: 2px;
}

.rights-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(5, minmax(118px, 1fr));
}

.toggle-line {
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: var(--text);
  display: flex;
  flex-direction: row;
  gap: 8px;
  min-height: 30px;
  padding: 5px 8px;
}

.rights-actions {
  align-items: stretch;
  display: grid;
  gap: 6px;
}

.rights-actions .small-button,
.rights-actions .status-button {
  min-height: 34px;
  width: 100%;
}

.confirm-card {
  max-width: 460px;
}

.confirm-target {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-weight: 800;
  padding: 10px 12px;
}

.danger-fill {
  background: linear-gradient(135deg, #d96b5e, #8a352f);
  color: #fff;
}

.cashbook-form {
  display: grid;
  gap: 8px;
  grid-template-columns: 130px minmax(170px, 1fr) minmax(160px, 0.9fr) 130px 120px 130px minmax(150px, 1fr) auto;
  padding: 10px;
}

.cashbook-form input,
.cashbook-form select,
.cashbook-form .small-button {
  min-height: 36px;
}

.cashbook-form .small-button {
  white-space: nowrap;
}

.cashbook-message {
  grid-column: 1 / -1;
  margin: 0;
  min-height: 18px;
}

.cashbook-table-wrap {
  overflow: auto;
  padding: 0;
}

.cashbook-table {
  border-collapse: collapse;
  min-width: 1120px;
  width: 100%;
}

.cashbook-table th,
.cashbook-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 7px 9px;
  text-align: left;
  vertical-align: middle;
}

.cashbook-table th {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 0.88rem;
}

.cashbook-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.025);
}

.cashbook-table tbody tr:hover {
  background: rgba(199, 160, 74, 0.08);
}

.money-in {
  color: #c7f7d6;
  font-weight: 800;
}

.money-out {
  color: #ffb8b0;
  font-weight: 800;
}

.cashbook-totals {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-end;
  padding: 10px 14px;
}

.toggle-line input {
  min-height: auto;
  width: auto;
}

.inline-error {
  border-color: rgba(226, 91, 80, 0.55);
  color: #ffb8b0;
}

.crop-card {
  max-width: 620px;
}

.crop-frame {
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%),
    #071017;
  background-size: 22px 22px;
  border: 1px solid rgba(199, 160, 74, 0.32);
  border-radius: 50%;
  height: 280px;
  margin: 18px auto;
  overflow: hidden;
  position: relative;
  width: 280px;
}

.crop-frame img {
  max-width: none;
  position: absolute;
  transform-origin: center;
}

.flyer-crop-card {
  max-width: 700px;
}

.flyer-crop-frame {
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%),
    #071017;
  background-size: 22px 22px;
  border: 1px solid rgba(199, 160, 74, 0.32);
  border-radius: 7px;
  height: auto;
  margin: 18px auto;
  overflow: hidden;
  position: relative;
  width: min(100%, 480px);
}

.flyer-crop-frame img {
  height: 100%;
  max-width: none;
  object-fit: cover;
  position: absolute;
  transform-origin: center;
  width: 100%;
}

.crop-controls {
  display: grid;
  gap: 14px;
}

.crop-controls input[type="range"] {
  accent-color: var(--gold);
  appearance: none;
  background: transparent;
  border: 0;
  min-height: 28px;
  padding: 0;
}

.crop-controls input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, rgba(199, 160, 74, 0.72), rgba(255, 255, 255, 0.12));
  border-radius: 999px;
  height: 6px;
}

.crop-controls input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  background: var(--gold);
  border: 2px solid #17120a;
  border-radius: 50%;
  height: 18px;
  margin-top: -6px;
  width: 18px;
}

.crop-controls input[type="range"]::-moz-range-track {
  background: linear-gradient(90deg, rgba(199, 160, 74, 0.72), rgba(255, 255, 255, 0.12));
  border-radius: 999px;
  height: 6px;
}

.crop-controls input[type="range"]::-moz-range-thumb {
  background: var(--gold);
  border: 2px solid #17120a;
  border-radius: 50%;
  height: 18px;
  width: 18px;
}

.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));
  }

  .member-row,
  .user-rights-card {
    grid-template-columns: 1fr;
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .rights-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .cashbook-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topics-form,
  .topic-row,
  .electricity-summary,
  .electricity-row,
  .loan-row,
  .loan-form-grid,
  .protocol-row,
  .protocol-upload-grid {
    grid-template-columns: 1fr;
  }

  .loan-row {
    min-width: 0;
  }

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

  .topics-actions,
  .topic-row-actions,
  .electricity-actions,
  .loan-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .calendar-tools,
  .calendar-editor {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-full-grid {
    grid-template-rows: 30px repeat(6, minmax(58px, 1fr));
  }
}

@media (max-width: 760px) {
  html,
  body,
  .app-shell {
    height: auto;
    overflow: visible;
  }

  .portal-view {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .mobile-menu-button {
    display: inline-flex;
  }

  .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 {
    display: none;
    height: auto;
    max-height: calc(100vh - 76px);
    min-height: auto;
    overflow: auto;
    padding: 10px;
    position: sticky;
    top: 0;
    z-index: 20;
  }

  .portal-view.mobile-menu-open .sidebar {
    display: flex;
  }

  .brand-lockup {
    display: none;
  }

  .nav-list,
  .admin-nav,
  .sidebar-footer {
    gap: 4px;
  }

  .nav-item {
    font-size: 0.92rem;
    min-height: 34px;
    padding: 6px 8px;
  }

  .nav-item span {
    white-space: normal;
  }

  .workspace {
    height: auto;
    overflow: visible;
    padding: 10px;
    width: 100%;
  }

  .topbar {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin: 0 0 10px;
    padding: 8px 0;
    position: sticky;
    top: 0;
    z-index: 15;
  }

  .topbar h2 {
    font-size: 1rem;
  }

  .topbar .muted {
    display: none;
  }

  .user-menu {
    gap: 7px;
  }

  .user-menu > div {
    display: none;
  }

  .content-grid {
    gap: 8px;
    overflow-x: hidden;
  }

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

  .dashboard-page .dashboard-layout,
  .dashboard-page .quick-grid {
    grid-template-columns: 1fr !important;
  }

  .dashboard-page .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .dashboard-page .calendar-card {
    display: none !important;
  }

  .dashboard-page .dashboard-activities-card {
    display: none !important;
  }

  .dashboard-page .dashboard-main {
    display: grid !important;
    grid-template-rows: auto !important;
  }

  .dashboard-page .dashboard-side {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .summary-grid,
  .quick-grid {
    gap: 8px;
  }

  .dashboard-page {
    height: auto;
    overflow: visible;
  }

  .dashboard-page .dashboard-layout,
  .dashboard-page .dashboard-main,
  .dashboard-page .dashboard-side {
    height: auto;
    min-height: 0;
    overflow: visible;
    width: 100%;
  }

  .dashboard-page .quick-grid {
    grid-auto-rows: auto;
  }

  .card,
  .metric-card,
  .quick-card {
    min-width: 0;
  }

  .dashboard-page .metric-card {
    gap: 5px !important;
    min-height: 0 !important;
    padding: 8px !important;
  }

  .dashboard-page .metric-card h3 {
    font-size: 0.92rem !important;
    line-height: 1.1 !important;
  }

  .dashboard-page .metric-body {
    gap: 6px !important;
  }

  .dashboard-page .metric-icon {
    font-size: 0.78rem !important;
    height: 28px !important;
    width: 28px !important;
  }

  .dashboard-page .metric-card .muted {
    font-size: 0.78rem !important;
    line-height: 1.15 !important;
  }

  .dashboard-page .metric-value {
    font-size: 1rem !important;
    line-height: 1.05 !important;
  }

  .dashboard-page .metric-card .card-button {
    font-size: 0.8rem !important;
    min-height: 28px !important;
    padding: 4px 6px !important;
  }

  .profile-hero-card,
  .profile-edit-row,
  .profile-gallery-edit {
    grid-template-columns: 1fr;
  }

  .profile-hero-card {
    justify-items: center;
    text-align: center;
  }

  .profile-hero-actions,
  .profile-block-head {
    justify-content: center;
  }

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

  .calendar-tools,
  .calendar-editor,
  .calendar-category-editor,
  .candidate-form,
  .candidate-flow-row {
    grid-template-columns: 1fr;
  }

  .calendar-full-card {
    min-height: auto;
  }

  .calendar-full-grid {
    min-width: 760px;
  }

  .calendar-full-card {
    overflow: auto;
  }

  .cashbook-table-wrap,
  .dues-table-wrap,
  .document-list,
  .protocol-year-card,
  .loan-list,
  .topics-list,
  .todos-list {
    max-width: 100%;
    overflow-x: auto;
  }

  input,
  select,
  textarea,
  button {
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  .dashboard-page .summary-grid {
    grid-template-columns: 1fr !important;
  }
}

.public-profile-open {
  justify-self: start;
  margin-top: 4px;
}

.public-profile-body {
  background:
    radial-gradient(circle at 18% 0%, rgba(199, 160, 74, 0.16), transparent 32%),
    #060b10;
  color: var(--text);
  min-height: 100vh;
}

.public-profile-page {
  margin: 0 auto;
  max-width: 980px;
  padding: 32px 18px;
}

.public-profile-card {
  display: grid;
  gap: 22px;
  padding: 24px;
}

.public-profile-hero {
  align-items: center;
  display: flex;
  gap: 22px;
}

.public-profile-photo {
  align-items: center;
  background: #101820;
  border: 2px solid rgba(255, 255, 255, 0.68);
  border-radius: 50%;
  color: var(--gold);
  display: grid;
  flex: 0 0 138px;
  font-size: 2.1rem;
  font-weight: 900;
  height: 138px;
  overflow: hidden;
  place-items: center;
  width: 138px;
}

.public-profile-photo img,
.public-profile-gallery img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.public-profile-hero h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  margin: 0 0 8px;
}

.public-profile-section {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 10px;
  padding-top: 18px;
}

.public-profile-section h2 {
  margin: 0;
}

.public-profile-gallery {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.public-profile-gallery figure {
  margin: 0;
}

.public-profile-gallery img {
  aspect-ratio: 1;
  border-radius: 8px;
}

.public-profile-gallery figcaption {
  color: var(--muted);
  margin-top: 6px;
}

/* Final profile layout overrides */
.profile-layout .profile-hero-card {
  align-items: center !important;
  display: grid !important;
  grid-template-columns: 74px minmax(0, 1fr) !important;
  min-height: unset !important;
  height: auto !important;
  max-height: none !important;
  padding: 8px 12px !important;
}

.profile-layout .profile-hero-avatar {
  height: 62px !important;
  width: 62px !important;
}

.profile-layout .profile-hero-info {
  gap: 2px !important;
}

.profile-layout .profile-hero-info h2 {
  font-size: 1.12rem !important;
  line-height: 1.1 !important;
}

.profile-layout .profile-hero-info p,
.profile-layout .profile-hero-info strong,
.profile-layout .profile-rank {
  font-size: 0.82rem !important;
  margin: 0 !important;
}

.profile-layout .profile-hero-actions {
  gap: 6px !important;
  margin-top: 6px !important;
}

.profile-layout .profile-hero-actions .small-button,
.profile-layout .profile-hero-actions .status-button {
  font-size: 0.8rem !important;
  line-height: 1 !important;
  min-height: 24px !important;
  padding: 3px 8px !important;
}

.profile-layout .profile-hero-watermark {
  display: none !important;
}

.profile-detail-card {
  gap: 10px !important;
  padding: 12px !important;
  align-content: start !important;
}

.profile-detail-card .profile-block:last-of-type {
  padding-bottom: 4px !important;
}

.profile-detail-card > .form-actions:last-of-type {
  align-self: start !important;
}

.profile-block {
  gap: 8px !important;
  padding-bottom: 10px !important;
}

.profile-gallery-edit {
  display: grid !important;
  gap: 10px !important;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
}

.profile-gallery-item {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  gap: 6px !important;
  padding: 8px;
}

.profile-gallery-item img {
  aspect-ratio: 4 / 3 !important;
  height: auto !important;
  max-height: none !important;
  object-fit: cover !important;
  width: 100% !important;
}

.profile-gallery-actions {
  display: grid !important;
  gap: 5px !important;
}

.profile-detail-card .form-actions {
  border-top: 0 !important;
  justify-content: flex-start !important;
  margin: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
}

.profile-detail-card .form-actions .small-button {
  font-size: 0.88rem !important;
  min-height: 30px !important;
  padding: 5px 12px !important;
  width: auto !important;
}

.profile-layout,
.profile-main-column,
.profile-side-column {
  align-items: stretch !important;
  align-content: start !important;
}

.profile-main-column {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  gap: 10px !important;
}

.profile-detail-card {
  min-height: 0 !important;
  height: auto !important;
}

.welcome-mobile {
  display: none;
}

.install-page {
  gap: 14px;
}

.install-link-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) auto;
  margin-top: 14px;
}

.install-link-row input {
  background: rgba(5, 13, 18, 0.92);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  min-height: 42px;
  padding: 0 12px;
}

.install-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.install-card {
  align-content: start;
  display: grid;
  gap: 10px;
}

.install-card .metric-icon {
  height: 42px;
  width: 42px;
}

.install-card h3 {
  margin: 0;
}

.install-card ol {
  color: var(--text);
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 22px;
}

.install-card li::marker {
  color: var(--gold);
  font-weight: 800;
}

@media (max-width: 760px) {
  .install-link-row {
    grid-template-columns: 1fr;
  }

  .install-grid {
    grid-template-columns: 1fr;
  }
}

/* Compact mobile polish: desktop remains untouched */
@media (max-width: 760px) {
  html {
    font-size: 14px;
  }

  body {
    min-width: 0;
  }

  .app-shell,
  .portal-view,
  .workspace,
  .content-grid {
    max-width: 100%;
    overflow-x: hidden;
  }

  .workspace {
    padding: 8px 6px 14px !important;
  }

  .topbar {
    background: rgba(7, 14, 20, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 9px;
    gap: 6px !important;
    grid-template-columns: 36px minmax(0, 1fr) 34px !important;
    margin-bottom: 8px !important;
    padding: 6px !important;
  }

  .mobile-menu-button {
    border-radius: 8px;
    grid-column: 3;
    grid-row: 1;
    height: 34px;
    min-height: 34px;
    padding: 0;
    width: 34px;
  }

  .topbar > div:first-of-type {
    grid-column: 2;
    min-width: 0;
  }

  .topbar .user-menu {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  .topbar h2 {
    font-size: 0.96rem !important;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .welcome-desktop {
    display: none;
  }

  .welcome-mobile {
    display: inline;
  }

  .avatar,
  .avatar img {
    height: 34px;
    width: 34px;
  }

  .sidebar {
    background: rgba(7, 14, 20, 0.98);
    border: 1px solid rgba(199, 160, 74, 0.24);
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
    display: none;
    gap: 4px !important;
    left: auto;
    max-height: calc(100dvh - 64px) !important;
    overflow-y: auto;
    padding: 7px !important;
    position: fixed !important;
    right: 8px;
    top: 56px !important;
    width: min(82vw, 310px);
    z-index: 60;
  }

  .portal-view.mobile-menu-open::after {
    background: rgba(0, 0, 0, 0.42);
    content: "";
    inset: 0;
    position: fixed;
    z-index: 50;
  }

  .portal-view.mobile-menu-open .sidebar {
    display: flex;
    z-index: 70;
  }

  .sidebar .nav-list,
  .sidebar .admin-nav,
  .sidebar .sidebar-footer {
    flex: 0 0 auto;
    min-height: auto !important;
    overflow: visible !important;
  }

  .sidebar .sidebar-footer {
    margin-top: 0 !important;
    padding-top: 6px !important;
  }

  .sidebar .admin-nav {
    margin-bottom: 4px !important;
    padding-bottom: 5px !important;
  }

  .nav-list,
  .admin-nav,
  .sidebar-footer {
    gap: 1px !important;
  }

  .sidebar-section-label {
    font-size: 0.72rem;
    margin-top: 4px;
    padding: 6px 8px 3px;
  }

  .nav-item {
    border-radius: 7px;
    font-size: 1rem !important;
    gap: 8px;
    min-height: 34px !important;
    padding: 5px 9px !important;
  }

  .nav-item i {
    flex: 0 0 19px;
    text-align: center;
    width: 19px;
  }

  .content-grid,
  .dashboard-main,
  .dashboard-side,
  .summary-grid,
  .quick-grid,
  .module-grid {
    gap: 7px !important;
  }

  .card {
    border-radius: 8px !important;
    box-shadow: none;
    padding: 9px !important;
  }

  .card h3,
  .section-head h3 {
    font-size: 1rem;
    line-height: 1.15;
  }

  .placeholder-copy,
  .muted {
    line-height: 1.35;
  }

  .section-head {
    gap: 7px !important;
    min-height: 0 !important;
  }

  .section-head .placeholder-copy {
    margin: 0;
  }

  .dashboard-page .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .dashboard-page .metric-card {
    gap: 4px !important;
    min-height: 0 !important;
    padding: 8px !important;
  }

  .dashboard-page .metric-card h3 {
    font-size: 0.86rem !important;
    min-height: 1.9em;
  }

  .dashboard-page .metric-body {
    align-items: center;
    gap: 5px !important;
  }

  .dashboard-page .metric-icon {
    flex: 0 0 26px;
    font-size: 0.74rem !important;
    height: 26px !important;
    width: 26px !important;
  }

  .dashboard-page .metric-card .muted {
    display: block;
    font-size: 0.72rem !important;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-page .metric-value {
    font-size: 0.96rem !important;
    line-height: 1.08 !important;
    overflow-wrap: anywhere;
  }

  .dashboard-page .metric-card .card-button {
    font-size: 0.76rem !important;
    min-height: 27px !important;
    padding: 3px 6px !important;
  }

  .dashboard-page .quick-grid {
    display: none !important;
  }

  .quick-card {
    align-items: center;
    border-radius: 8px !important;
    display: grid !important;
    gap: 8px !important;
    grid-template-columns: 30px minmax(0, 1fr);
    min-height: 46px !important;
    padding: 8px 10px !important;
  }

  .quick-card .metric-icon {
    font-size: 0.78rem !important;
    height: 30px !important;
    width: 30px !important;
  }

  .quick-card strong {
    font-size: 0.94rem !important;
    line-height: 1.1;
  }

  .quick-card .muted {
    font-size: 0.78rem !important;
    line-height: 1.15;
  }

  .dashboard-side .card-head {
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
  }

  .dashboard-side .card-head .small-button {
    font-size: 0.78rem;
    min-height: 30px;
    padding: 5px 8px;
    white-space: normal;
  }

  .dashboard-side .list-row {
    gap: 2px;
    padding: 7px 0;
  }

  .dashboard-side .list-row strong,
  .dashboard-side .bar-link {
    font-size: 0.95rem;
  }

  .small-button,
  .status-button,
  .card-button,
  button {
    border-radius: 7px;
  }

  .small-button,
  .status-button {
    min-height: 32px;
    padding: 6px 10px;
  }

  input,
  select,
  textarea {
    border-radius: 7px !important;
    min-height: 36px !important;
    padding: 7px 9px !important;
  }

  textarea {
    min-height: 74px !important;
  }

  .document-toolbar,
  .topics-head,
  .todos-head,
  .card-head {
    align-items: stretch;
    display: grid !important;
    gap: 7px !important;
    grid-template-columns: 1fr;
  }

  .document-toolbar .small-button,
  .topics-actions .small-button,
  .todos-actions .small-button,
  .card-head .small-button {
    width: 100%;
  }

  .candidate-table-wrap,
  .cashbook-table-wrap,
  .dues-table-wrap,
  .document-list,
  .protocol-year-card,
  .loan-list,
  .topics-list,
  .todos-list,
  .electricity-list {
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .candidate-table,
  .cashbook-table,
  .dues-table {
    font-size: 0.82rem;
  }

  .candidate-table th,
  .candidate-table td,
  .cashbook-table th,
  .cashbook-table td,
  .dues-table th,
  .dues-table td {
    padding: 6px 7px;
  }

  .profile-layout .profile-hero-card {
    grid-template-columns: 58px minmax(0, 1fr) !important;
    padding: 7px 9px !important;
  }

  .profile-layout .profile-hero-avatar {
    height: 52px !important;
    width: 52px !important;
  }

  .profile-layout .profile-hero-info h2 {
    font-size: 1rem !important;
  }

  .profile-layout .profile-hero-actions {
    gap: 5px !important;
  }

  .profile-layout .profile-hero-actions .small-button,
  .profile-layout .profile-hero-actions .status-button {
    min-height: 25px !important;
  }

  .profile-gallery-edit {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .profile-gallery-item {
    padding: 6px !important;
  }

  .profile-gallery-actions .small-button,
  .profile-gallery-actions .status-button {
    font-size: 0.76rem !important;
    min-height: 28px !important;
    padding: 4px 6px !important;
  }

  .install-link-row {
    gap: 7px !important;
    margin-top: 8px !important;
  }

  .install-card {
    gap: 7px !important;
  }

  .install-card ol {
    gap: 4px !important;
    padding-left: 18px !important;
  }

  .workspace.calendar-workspace {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }

  .calendar-page {
    gap: 8px !important;
    grid-template-rows: none !important;
    height: auto !important;
    overflow: visible !important;
  }

  .calendar-full-card {
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  .calendar-full-card .calendar-head {
    align-items: stretch !important;
    display: grid !important;
    gap: 7px !important;
    grid-template-columns: 1fr !important;
    min-height: 0 !important;
    padding: 8px !important;
  }

  .calendar-title-row {
    align-items: start !important;
    display: grid !important;
    gap: 5px !important;
  }

  .calendar-title-row h3 {
    font-size: 1.06rem !important;
  }

  .calendar-full-categories {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .calendar-category-chip {
    font-size: 0.66rem !important;
    min-height: 19px !important;
    padding: 2px 6px !important;
  }

  .calendar-head-actions {
    display: grid !important;
    gap: 6px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-head-actions .small-button,
  .calendar-head-actions .status-button {
    font-size: 0.78rem !important;
    min-height: 30px !important;
    padding: 5px 6px !important;
  }

  .calendar-head-actions .small-button {
    grid-column: 1 / -1;
  }

  .calendar-full-grid {
    flex: none !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    grid-template-rows: 24px repeat(6, minmax(43px, auto)) !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .calendar-full-grid .day-label {
    font-size: 0.68rem !important;
    min-height: 24px !important;
    padding: 3px 1px !important;
  }

  .calendar-full-grid .calendar-day {
    gap: 2px !important;
    min-height: 43px !important;
    overflow: hidden !important;
    padding: 3px 2px !important;
  }

  .calendar-full-grid .calendar-day-number {
    font-size: 0.68rem !important;
    line-height: 1 !important;
  }

  .calendar-full-grid .calendar-day-events {
    align-items: center;
    display: flex !important;
    flex-wrap: wrap;
    gap: 2px !important;
    overflow: hidden !important;
  }

  .calendar-full-grid .calendar-event {
    border-radius: 999px !important;
    display: block !important;
    font-size: 0 !important;
    height: 6px !important;
    line-height: 0 !important;
    margin: 0 !important;
    min-height: 6px !important;
    padding: 0 !important;
    width: 6px !important;
  }

  .calendar-full-grid .calendar-event span,
  .calendar-full-grid .calendar-event strong,
  .calendar-full-grid .calendar-event-popover {
    display: none !important;
  }

  .mobile-calendar-agenda {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: grid !important;
    gap: 7px;
    padding: 8px;
  }

  .mobile-calendar-agenda h3 {
    font-size: 1rem;
    margin: 0;
  }

  .mobile-calendar-event {
    background: rgba(5, 13, 18, 0.42);
    border: 1px solid color-mix(in srgb, var(--cat-color) 48%, rgba(255, 255, 255, 0.08));
    border-left: 4px solid var(--cat-color);
    border-radius: 8px;
    display: grid;
    gap: 7px;
    grid-template-columns: 82px minmax(0, 1fr);
    padding: 8px;
  }

  .mobile-calendar-date {
    display: grid;
    gap: 3px;
  }

  .mobile-calendar-date strong {
    color: var(--gold);
    font-size: 0.82rem;
    line-height: 1.1;
  }

  .mobile-calendar-date span,
  .mobile-calendar-main span,
  .mobile-calendar-main small {
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.25;
  }

  .mobile-calendar-main {
    display: grid;
    gap: 3px;
    min-width: 0;
  }

  .mobile-calendar-main > strong {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .mobile-calendar-main .calendar-flyer-thumbnail {
    max-height: 88px;
    object-fit: cover;
  }

  .mobile-calendar-actions {
    display: grid;
    gap: 6px;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-calendar-actions .status-button {
    min-height: 29px !important;
    padding: 4px 7px !important;
  }

  .cashbook-form,
  .loans-panel,
  .loan-form,
  .topics-panel.dues-panel,
  .mobile-compact-form-card {
    gap: 7px !important;
    padding-bottom: 9px !important;
  }

  .cashbook-form {
    padding: 9px !important;
  }

  .cashbook-message {
    min-height: 0 !important;
  }

  .loan-form .form-message,
  .topics-panel .form-message {
    min-height: 0 !important;
    margin: 0 !important;
  }

  .topics-form {
    gap: 7px !important;
  }

  .topics-form + .form-message,
  .cashbook-form .form-message,
  .loan-form .form-message {
    margin-bottom: 0 !important;
  }
}

@media (max-width: 420px) {
  .dashboard-page .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .dashboard-page .metric-card h3 {
    font-size: 0.8rem !important;
  }

  .dashboard-page .metric-value {
    font-size: 0.9rem !important;
  }

  .profile-gallery-edit {
    grid-template-columns: 1fr !important;
  }
}

/* Mobile calendar final: full calendar, no lower agenda/list */
@media (max-width: 760px) {
  .calendar-page {
    height: calc(100dvh - 62px) !important;
    min-height: calc(100dvh - 62px) !important;
  }

  .calendar-full-card {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    min-height: calc(100dvh - 74px) !important;
  }

  .calendar-full-card .calendar-head {
    padding: 7px !important;
  }

  .calendar-title-row {
    gap: 0 !important;
  }

  .calendar-title-row h3 {
    font-size: 1.02rem !important;
    line-height: 1.1 !important;
  }

  .calendar-full-categories {
    display: none !important;
  }

  .calendar-head-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .calendar-head-actions .small-button {
    display: none !important;
  }

  .calendar-full-grid {
    align-self: stretch !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    grid-template-rows: 23px repeat(6, minmax(0, 1fr)) !important;
    height: 100% !important;
    min-height: 0 !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .calendar-full-grid .day-label {
    font-size: 0.66rem !important;
    min-height: 23px !important;
    padding: 2px 1px !important;
  }

  .calendar-full-grid .calendar-day {
    gap: 2px !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 3px 2px !important;
  }

  .calendar-full-grid .calendar-day-number {
    color: var(--text) !important;
    font-size: 0.72rem !important;
    line-height: 1 !important;
  }

  .calendar-full-grid .calendar-day-events {
    align-content: start !important;
    display: grid !important;
    gap: 2px !important;
    overflow: hidden !important;
  }

  .calendar-full-grid .calendar-event {
    border-radius: 4px !important;
    display: block !important;
    font-size: 0.58rem !important;
    height: auto !important;
    line-height: 1.05 !important;
    margin: 0 !important;
    min-height: 16px !important;
    overflow: hidden !important;
    padding: 2px 3px !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
  }

  .calendar-full-grid .calendar-event span:first-child {
    color: #f2d27d !important;
    display: block !important;
    font-size: 0.52rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .calendar-full-grid .calendar-event strong {
    color: var(--text) !important;
    display: block !important;
    font-size: 0.58rem !important;
    line-height: 1.05 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .calendar-full-grid .calendar-event-popover,
  .mobile-calendar-agenda {
    display: none !important;
  }
}

/* Mobile members contact list */
@media (max-width: 760px) {
  .members-page {
    gap: 0 !important;
  }

  .members-page .members-head {
    display: none !important;
  }

  .member-mobile-tools {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px 8px 0 0;
    display: grid !important;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) 112px;
    padding: 7px;
  }

  .member-mobile-tools input {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 0 !important;
    border-radius: 4px !important;
    color: var(--text);
    font-size: 0.84rem;
    min-height: 34px !important;
    padding: 7px 9px !important;
  }

  .member-mobile-tools .small-button {
    align-items: center;
    background: rgba(199, 160, 74, 0.82);
    border: 0;
    border-radius: 4px !important;
    color: #15100a;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 900;
    gap: 5px;
    justify-content: center;
    min-height: 34px !important;
    padding: 6px !important;
    text-transform: uppercase;
  }

  .member-list {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-top: 0;
    border-radius: 0 0 8px 8px;
    gap: 0 !important;
    overflow: hidden;
  }

  .member-row {
    align-items: center !important;
    background: rgba(8, 15, 21, 0.92) !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.075) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: grid !important;
    gap: 8px !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    min-height: 62px !important;
    padding: 8px 9px !important;
  }

  .member-row:last-child {
    border-bottom: 0 !important;
  }

  .member-main {
    align-items: center;
    display: grid;
    gap: 9px;
    grid-template-columns: 42px minmax(0, 1fr);
    min-width: 0;
  }

  .member-avatar {
    align-items: center;
    background: rgba(199, 160, 74, 0.18);
    border: 1px solid rgba(199, 160, 74, 0.32);
    border-radius: 50%;
    color: var(--gold);
    display: grid !important;
    font-size: 0.8rem;
    font-weight: 900;
    height: 42px;
    overflow: hidden;
    place-items: center;
    width: 42px;
  }

  .member-avatar img {
    height: 100%;
    object-fit: cover;
    width: 100%;
  }

  .member-text,
  .member-row .row-title {
    min-width: 0;
  }

  .member-row .row-title {
    align-items: center;
    display: flex;
    gap: 6px;
  }

  .member-row .row-title strong {
    color: var(--text);
    display: block;
    font-size: 0.98rem;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .member-row .status-pill,
  .member-main p,
  .member-contact,
  .member-row > .status-actions,
  .member-row > .member-delete {
    display: none !important;
  }

  .member-mobile-actions {
    align-items: center;
    display: flex !important;
    gap: 7px;
    justify-content: flex-end;
  }

  .member-action-icon {
    align-items: center;
    background: rgba(199, 160, 74, 0.15);
    border: 1px solid rgba(199, 160, 74, 0.24);
    border-radius: 50%;
    color: var(--gold);
    display: inline-grid;
    font-size: 0.84rem;
    height: 27px;
    min-height: 27px;
    padding: 0;
    place-items: center;
    text-decoration: none;
    width: 27px;
  }

  .member-action-icon:active {
    transform: scale(0.96);
  }

  .member-action-icon.is-disabled,
  .member-action-icon:disabled {
    color: rgba(184, 192, 201, 0.32);
    opacity: 0.38;
  }
}

/* Mobile document repository: compact list view */
@media (max-width: 760px) {
  .document-toolbar {
    background: rgba(255, 255, 255, 0.035) !important;
    border-radius: 8px 8px 0 0 !important;
    display: grid !important;
    gap: 7px !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    padding: 7px !important;
  }

  .document-toolbar > div {
    display: none !important;
  }

  .document-toolbar input {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 0 !important;
    border-radius: 4px !important;
    font-size: 0.84rem;
    min-height: 34px !important;
  }

  .document-toolbar .small-button {
    border-radius: 4px !important;
    font-size: 0.74rem;
    min-height: 34px !important;
    padding: 6px 9px !important;
    white-space: nowrap;
    width: auto !important;
  }

  .document-grid {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-top: 0;
    border-radius: 0 0 8px 8px;
    display: grid !important;
    gap: 0 !important;
    grid-template-columns: 1fr !important;
    overflow: hidden;
  }

  .document-tile {
    align-items: center;
    background: rgba(8, 15, 21, 0.92) !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.075) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: grid !important;
    gap: 8px !important;
    grid-template-columns: minmax(0, 1fr) 28px !important;
    grid-template-rows: auto !important;
    min-height: 72px !important;
    padding: 7px 8px !important;
    position: relative;
  }

  .document-tile:last-child {
    border-bottom: 0 !important;
  }

  .document-tile-head {
    align-items: center !important;
    display: grid !important;
    gap: 9px !important;
    grid-template-columns: 52px minmax(0, 1fr) !important;
  }

  .document-thumb {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 3px !important;
    color: #b51f1f !important;
    height: 58px !important;
    overflow: hidden;
    width: 42px !important;
  }

  .document-thumb img {
    height: 100%;
    object-fit: cover;
    width: 100%;
  }

  .document-title {
    color: var(--text);
    font-size: 0.86rem !important;
    font-weight: 900;
    line-height: 1.12 !important;
    max-height: 2.25em;
    overflow: hidden;
  }

  .document-meta {
    color: rgba(226, 232, 240, 0.7);
    font-size: 0.72rem !important;
    line-height: 1.2;
    margin-top: 3px !important;
  }

  .document-note {
    color: rgba(226, 232, 240, 0.64);
    font-size: 0.72rem;
    grid-column: 1;
    line-height: 1.2;
    margin-left: 61px !important;
    margin-top: -13px !important;
    max-height: 1.25em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .document-actions {
    grid-column: 1 / -1;
    display: none !important;
  }

  .document-mobile-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    color: rgba(226, 232, 240, 0.72);
    display: grid !important;
    font-size: 0.9rem;
    height: 28px;
    justify-self: end;
    min-height: 28px;
    padding: 0;
    place-items: center;
    width: 28px;
  }
}

/* Mobile document row fine tuning */
@media (max-width: 760px) {
  .document-tile {
    grid-template-columns: minmax(0, 1fr) 30px !important;
    grid-template-rows: auto auto !important;
  }

  .document-note {
    grid-column: 1 !important;
    margin: -7px 0 0 61px !important;
    max-height: 2.5em !important;
    white-space: normal !important;
  }

  .document-mobile-side {
    align-items: center;
    align-self: stretch;
    display: grid !important;
    gap: 8px;
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-items: center;
  }

  .document-mobile-download,
  .document-mobile-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    color: rgba(226, 232, 240, 0.78);
    display: grid !important;
    font-size: 0.9rem;
    height: 28px;
    min-height: 28px;
    padding: 0;
    place-items: center;
    text-decoration: none;
    width: 28px;
  }

  .document-mobile-download {
    color: var(--gold);
  }

  .document-mobile-toggle {
    justify-self: center !important;
  }
}

/* Mobile protocols: compact document-like list */
@media (max-width: 760px) {
  .protocol-year-list {
    gap: 8px !important;
  }

  .protocol-year-card {
    background: rgba(8, 15, 21, 0.92) !important;
    border-radius: 8px !important;
    gap: 0 !important;
    overflow: hidden;
    padding: 0 !important;
  }

  .protocol-year-card > h3 {
    background: rgba(199, 160, 74, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.075);
    font-size: 0.95rem;
    padding: 8px 10px;
  }

  .protocol-list {
    gap: 0 !important;
  }

  .protocol-row {
    align-items: center !important;
    border-top: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.075);
    display: grid !important;
    gap: 8px !important;
    grid-template-columns: minmax(0, 1fr) 30px !important;
    min-height: 72px;
    padding: 7px 8px !important;
  }

  .protocol-row:last-child {
    border-bottom: 0;
  }

  .protocol-row .document-tile-head {
    align-items: center !important;
    gap: 9px !important;
    grid-template-columns: 52px minmax(0, 1fr) !important;
  }

  .protocol-row .document-icon {
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 3px !important;
    color: #b51f1f !important;
    height: 58px !important;
    width: 42px !important;
  }

  .protocol-row .document-title {
    font-size: 0.86rem !important;
    line-height: 1.12 !important;
  }

  .protocol-row .document-meta {
    font-size: 0.72rem !important;
    line-height: 1.2 !important;
  }

  .protocol-row .document-note {
    display: block;
    font-size: 0.72rem;
    margin: 3px 0 0 !important;
    max-height: 1.3em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .protocol-read-box {
    display: none !important;
  }

  .protocol-row .document-actions {
    display: none !important;
  }

  .protocol-mobile-side {
    align-items: center;
    align-self: stretch;
    display: grid !important;
    gap: 8px;
    grid-column: 2;
    grid-row: 1;
    justify-items: center;
  }

  .protocol-mobile-download,
  .protocol-mobile-preview {
    align-items: center;
    background: transparent;
    border: 0;
    color: rgba(226, 232, 240, 0.78);
    display: grid;
    font-size: 0.9rem;
    height: 28px;
    min-height: 28px;
    padding: 0;
    place-items: center;
    text-decoration: none;
    width: 28px;
  }

  .protocol-mobile-download {
    color: var(--gold);
  }
}

/* Mobile todos: compact row layout */
@media (max-width: 760px) {
  .todo-row {
    align-items: center !important;
    display: grid !important;
    gap: 6px 8px !important;
    grid-template-columns: 34px minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto !important;
    padding: 8px 9px !important;
  }

  .todo-row .topic-number {
    border-radius: 7px !important;
    font-size: 0.9rem !important;
    height: 32px !important;
    width: 32px !important;
  }

  .todo-row .topic-main {
    display: grid;
    gap: 3px;
    grid-column: 2 / 4;
    grid-row: 1 / 3;
    min-width: 0;
  }

  .todo-row .topic-main > strong {
    align-self: center;
    font-size: 0.96rem !important;
    line-height: 1.12 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .todo-row .todo-meta {
    display: block;
    font-size: 0.78rem !important;
    grid-row: 2;
    line-height: 1.2;
    margin: 0 !important;
    max-width: calc(100vw - 136px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .todo-row .topic-row-actions {
    align-items: center;
    display: flex !important;
    gap: 6px !important;
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
    min-width: 58px;
  }

  .todo-row .topic-row-actions .status-button {
    align-items: center;
    border-radius: 50% !important;
    display: grid;
    font-size: 0.75rem;
    height: 27px;
    min-height: 27px !important;
    min-width: 27px !important;
    padding: 0 !important;
    place-items: center;
    width: 27px;
  }

  .todo-row .topic-row-actions .status-button span {
    display: none !important;
  }
}

/* Mobile calendar visual style: compact iOS-like month view in BoW theme */
@media (max-width: 760px) {
  .calendar-page {
    background:
      radial-gradient(circle at 20% 0%, rgba(199, 160, 74, 0.12), transparent 32%),
      #071017;
    border-radius: 10px;
    height: calc(100dvh - 64px) !important;
    min-height: calc(100dvh - 64px) !important;
    padding: 0 !important;
  }

  .calendar-full-card {
    background: linear-gradient(180deg, rgba(14, 23, 32, 0.98), rgba(7, 14, 20, 0.98)) !important;
    border-color: rgba(199, 160, 74, 0.18) !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    min-height: calc(100dvh - 72px) !important;
  }

  .calendar-full-card .calendar-head {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: grid !important;
    gap: 8px !important;
    grid-template-columns: 1fr auto !important;
    padding: 10px 10px 8px !important;
  }

  .calendar-title-row {
    align-self: end;
    grid-column: 1;
  }

  .calendar-title-row h3 {
    color: var(--text);
    font-size: 1.85rem !important;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1 !important;
  }

  .calendar-head-actions {
    align-self: start;
    display: flex !important;
    gap: 6px !important;
    grid-column: 2;
  }

  .calendar-head-actions .status-button {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.12);
    border-radius: 999px !important;
    color: var(--text);
    font-size: 0 !important;
    height: 34px;
    min-height: 34px !important;
    padding: 0 !important;
    position: relative;
    width: 34px;
  }

  .calendar-head-actions .status-button[data-calendar-month="-1"]::before {
    content: "‹";
  }

  .calendar-head-actions .status-button[data-calendar-month="1"]::before {
    content: "›";
  }

  .calendar-head-actions .status-button::before {
    color: var(--gold);
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1;
  }

  .calendar-head-actions .small-button,
  .calendar-full-categories {
    display: none !important;
  }

  .calendar-full-grid {
    background: transparent;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    grid-template-rows: 26px repeat(6, minmax(0, 1fr)) !important;
    height: 100% !important;
    min-height: 0 !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .calendar-full-grid .day-label {
    background: rgba(255, 255, 255, 0.025) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: rgba(226, 232, 240, 0.72) !important;
    font-size: 0.66rem !important;
    font-weight: 900 !important;
    min-height: 26px !important;
    padding: 5px 0 3px !important;
    text-transform: uppercase;
  }

  .calendar-full-grid .calendar-day {
    background: rgba(255, 255, 255, 0.012) !important;
    border-color: rgba(255, 255, 255, 0.085) !important;
    display: grid !important;
    gap: 3px !important;
    grid-template-rows: 20px minmax(0, 1fr) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 4px 3px !important;
  }

  .calendar-full-grid .calendar-day.weekend-day {
    background: rgba(199, 160, 74, 0.045) !important;
  }

  .calendar-full-grid .calendar-day.outside-month {
    opacity: 0.38 !important;
  }

  .calendar-full-grid .calendar-day-number {
    align-items: center;
    color: var(--text) !important;
    display: inline-flex;
    font-size: 1rem !important;
    font-weight: 900;
    height: 20px;
    justify-content: center;
    justify-self: center;
    line-height: 1 !important;
    min-width: 20px;
  }

  .calendar-full-grid .calendar-day.has-events:not(.outside-month) .calendar-day-number {
    background: rgba(199, 160, 74, 0.9);
    border-radius: 999px;
    color: #15100a !important;
  }

  .calendar-full-grid .calendar-day-events {
    align-content: start !important;
    display: grid !important;
    gap: 2px !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .calendar-full-grid .calendar-event {
    background: color-mix(in srgb, var(--cat-color) 42%, rgba(255, 255, 255, 0.09)) !important;
    border: 1px solid color-mix(in srgb, var(--cat-color) 56%, transparent) !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    color: var(--text) !important;
    display: block !important;
    height: auto !important;
    line-height: 1.05 !important;
    margin: 0 !important;
    min-height: 18px !important;
    overflow: hidden !important;
    padding: 2px 3px !important;
    width: 100% !important;
  }

  .calendar-full-grid .calendar-event span:first-child {
    display: none !important;
  }

  .calendar-full-grid .calendar-event strong {
    color: var(--text) !important;
    display: block !important;
    font-size: clamp(0.54rem, 1.75vw, 0.66rem) !important;
    font-weight: 900 !important;
    line-height: 1.05 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .calendar-more-events {
    background: transparent;
    border: 0;
    color: rgba(226, 232, 240, 0.62);
    font-size: 0.62rem;
    font-weight: 900;
    min-height: 14px;
    padding: 0;
    text-align: center;
  }

  .calendar-full-grid .calendar-event-popover,
  .mobile-calendar-agenda {
    display: none !important;
  }
}
