[hidden] {
  display: none !important;
}

:root {
  color-scheme: light;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-soft: #eafaf1;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #1f5fbf;
  --primary-dark: #14468f;
  --secondary: #0f766e;
  --success: #10b981;
  --danger: #ef4444;
  --warning-bg: #fffbeb;
  --warning-line: #f59e0b;
  --shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.06), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.010em;
  background: radial-gradient(circle at 0% 0%, rgba(31, 95, 191, 0.05) 0%, transparent 45%),
              radial-gradient(circle at 100% 100%, rgba(15, 118, 110, 0.06) 0%, transparent 45%),
              #f8fafc;
  background-attachment: fixed;
}

button,
input,
select,
textarea {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.app-shell {
  width: min(1220px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.app-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 28px 0 22px;
}

.header-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--secondary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  letter-spacing: 0.05em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.08;
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2 {
  margin-bottom: 0;
  font-size: 1.25rem;
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--primary-dark);
}

.header-copy p:last-child {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
}

.header-badge {
  min-width: 170px;
  padding: 14px 16px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff 0%, #f0fdfa 100%);
  box-shadow: var(--shadow);
}

.header-badge span,
.header-badge strong {
  display: block;
}

.header-badge span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.header-badge strong {
  background: linear-gradient(135deg, #0f766e 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 800;
}

.app-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.column {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.text-gradient {
  background: linear-gradient(135deg, #1e3a8a 0%, #0d9488 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-gradient-alt {
  background: linear-gradient(135deg, #0f766e 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08);
}

.privacy-card {
  background: linear-gradient(135deg, #ffffff 0%, #f0fbf8 100%);
}

.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  background: #e7f7f4;
  color: #0b5f59;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.is-muted {
  border-color: var(--line);
  background: #f5f7fb;
  color: var(--muted);
}

.status-pill.is-soft {
  border-color: #d7e6ff;
  background: #edf4ff;
  color: var(--primary);
}

.status-pill.is-working {
  border-color: #c9dcff;
  background: #e8f1ff;
  color: var(--primary-dark);
}

.privacy-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: #36445a;
}

.stacked-form {
  display: grid;
  gap: 14px;
}

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

.form-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

label {
  color: #1e3a8a;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 11px 16px;
  outline: none;
  font-size: 0.95rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(31, 95, 191, 0.08);
}

.input-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.field-help,
.inline-status,
.result-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.inline-status.is-error {
  color: var(--danger);
}

.inline-status.is-success {
  color: var(--success);
}

.button-row,
.modal-actions,
.history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

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

.button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 10px 20px;
  font-weight: 700;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  text-decoration: none;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.btn-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  transition: transform 0.15s ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.button:active:not(:disabled) {
  transform: translateY(1px);
}

.button-primary {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: #ffffff;
  border: 1px solid #1d4ed8;
  border-bottom: 3px solid #1e3a8a;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.button-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.button-primary:active:not(:disabled) {
  border-bottom: 1px solid #1e3a8a;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.button-secondary {
  border: 1px solid #cbd5e1;
  border-bottom: 3px solid #94a3b8;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  color: #334155;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), inset 0 1px 0 #ffffff;
}

.button-secondary:hover:not(:disabled) {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-color: #94a3b8;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08), inset 0 1px 0 #ffffff;
}

.button-secondary:active:not(:disabled) {
  border-bottom: 1px solid #94a3b8;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), inset 0 1px 0 #ffffff;
}

.button-success {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  border: 1px solid #059669;
  border-bottom: 3px solid #064e3b;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

.button-success:hover:not(:disabled) {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.button-success:active:not(:disabled) {
  border-bottom: 1px solid #064e3b;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.button-ghost {
  border: 1px solid #e2e8f0;
  border-bottom: 3px solid #cbd5e1;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  color: #64748b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.button-ghost:hover:not(:disabled) {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-color: #cbd5e1;
  color: #0f172a;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
}

.button-ghost:active:not(:disabled) {
  border-bottom: 1px solid #cbd5e1;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.02);
}

#logoutBtn {
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-bottom: 3px solid #fca5a5;
  background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
  color: #ef4444;
}

#logoutBtn:hover:not(:disabled) {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-color: #fca5a5;
  color: #dc2626;
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.08);
}

#logoutBtn:active:not(:disabled) {
  border-bottom: 1px solid #fca5a5;
}

.button-danger {
  background: linear-gradient(135deg, #dc2626 0%, #f87171 100%);
  color: #ffffff;
  border: 1px solid #dc2626;
  border-bottom: 3px solid #7f1d1d;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

.button-danger:hover:not(:disabled) {
  background: linear-gradient(135deg, #ef4444 0%, #fca5a5 100%);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.button-danger:active:not(:disabled) {
  border-bottom: 1px solid #7f1d1d;
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.compact-button {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 0.9rem;
}

.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.warning-box {
  border: 1px solid var(--warning-line);
  border-radius: var(--radius);
  background: var(--warning-bg);
  color: #6f4b00;
  padding: 12px;
  font-size: 0.92rem;
}

.result-card {
  position: sticky;
  top: 16px;
}

.result-output {
  min-height: 260px;
  max-height: 460px;
  overflow: auto;
  margin: 14px 0;
  border: 1px solid #d8e2ed;
  border-radius: var(--radius);
  background: #f8fafc;
  color: #1d2a3e;
  padding: 14px;
  font-family: Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.94rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.history-card {
  min-height: 320px;
}

.history-actions {
  margin-bottom: 14px;
}

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

.history-empty {
  border: 1px dashed #bcc9d6;
  border-radius: var(--radius);
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

.history-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px 20px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.history-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px -8px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.history-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.history-title {
  margin: 0;
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}

.history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
}

/* Các chip đặc biệt của ca trực và ưu tiên */
.meta-chip.shift-sang {
  background: #e0f2fe;
  color: #0369a1;
}
.meta-chip.shift-chieu {
  background: #ffedd5;
  color: #c2410c;
}
.meta-chip.shift-dem {
  background: #f3e8ff;
  color: #6b21a8;
}

.meta-chip.priority-cao {
  background: #fee2e2;
  color: #b91c1c;
}
.meta-chip.priority-trung {
  background: #fef3c7;
  color: #b45309;
}
.meta-chip.priority-thap {
  background: #f0fdf4;
  color: #15803d;
}

.history-text {
  color: #334155;
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.toast-region {
  position: fixed;
  z-index: 20;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 36px));
}

.toast {
  border: 1px solid var(--line);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 14px 35px rgba(25, 38, 56, 0.16);
  padding: 12px 14px;
}

.toast.is-error {
  border-left-color: var(--danger);
}

.toast.is-success {
  border-left-color: var(--success);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal[hidden] {
  display: flex !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-panel, .author-modal-panel, .settings-modal-panel {
  width: min(540px, 100%);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  padding: 20px;
  transform: scale(1) translateY(0);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal[hidden] .modal-panel,
.modal[hidden] .author-modal-panel,
.modal[hidden] .settings-modal-panel {
  transform: scale(0.96) translateY(10px);
}

.sensitive-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding-left: 20px;
}

@media (max-width: 980px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .result-card {
    position: static;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 16px;
  }

  .app-header {
    grid-template-columns: 1fr;
    padding-top: 14px;
  }

  .header-badge {
    min-width: 0;
  }

  .form-grid,
  .ai-actions {
    grid-template-columns: 1fr;
  }

  .input-action-row {
    grid-template-columns: 1fr;
  }

  .compact-button {
    width: 100%;
  }

  .button-row,
  .history-actions,
  .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .file-button {
    width: 100%;
  }

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

  .result-output {
    min-height: 220px;
  }
}

/* Visit Counter Card styling */
.visit-counter-card {
  background: linear-gradient(135deg, #ffffff 0%, #f4faf8 100%);
}

.counter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.counter-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  border-radius: var(--radius);
  border: 1px solid #d9e2ec;
  transition: transform 150ms ease, box-shadow 150ms ease;
  background: #ffffff;
}

.counter-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.counter-val {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 4px;
}

.counter-lbl {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

/* Colors for Medicare Style */
.counter-item.total {
  border-color: rgba(15, 118, 110, 0.18);
  background: #f0fdfa;
}
.counter-item.total .counter-val {
  color: #0f766e;
}

.counter-item.today {
  border-color: rgba(217, 119, 6, 0.18);
  background: #fffbeb;
}
.counter-item.today .counter-val {
  color: #d97706;
}

.counter-item.mine {
  border-color: rgba(3, 105, 161, 0.18);
  background: #f0f9ff;
}
.counter-item.mine .counter-val {
  color: #0369a1;
}

/* Pulse animation for active badge */
.pulse-indicator {
  position: relative;
  padding-left: 18px;
}

.pulse-indicator::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(23, 114, 69, 0.7);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0% {
    transform: translateY(-50%) scale(0.95);
    box-shadow: 0 0 0 0 rgba(23, 114, 69, 0.7);
  }
  70% {
    transform: translateY(-50%) scale(1);
    box-shadow: 0 0 0 6px rgba(23, 114, 69, 0);
  }
  100% {
    transform: translateY(-50%) scale(0.95);
    box-shadow: 0 0 0 0 rgba(23, 114, 69, 0);
  }
}

/* Responsive adjustment for counter grid */
@media (max-width: 480px) {
  .counter-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* Login Screen styles */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 10% 20%, rgba(224, 242, 254, 0.6) 0%, rgba(240, 253, 244, 0.6) 90%), linear-gradient(135deg, #e0f2fe 0%, #f0fdf4 100%);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.login-wrapper::before, .login-wrapper::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 1;
  opacity: 0.5;
}

.login-wrapper::before {
  width: 300px;
  height: 300px;
  background: #bae6fd;
  top: -50px;
  left: -50px;
}

.login-wrapper::after {
  width: 400px;
  height: 400px;
  background: #bbf7d0;
  bottom: -100px;
  right: -100px;
}

.login-card {
  position: relative;
  z-index: 10;
  width: min(440px, 100%);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.02);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.login-header {
  text-align: center;
}

.login-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #ffffff;
  margin-bottom: 20px;
  box-shadow: 0 8px 16px -4px rgba(31, 95, 191, 0.3);
}

.login-header h1 {
  font-size: 1.95rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.login-header p {
  color: var(--muted);
  margin: 0;
  font-size: 0.94rem;
  font-weight: 500;
}

.login-footer {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  padding-top: 18px;
  margin-top: 8px;
}

/* Header Buttons styling */
.header-actions-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.header-buttons {
  display: flex;
  gap: 8px;
}

/* Author Modal Panel styling */
.author-modal-panel {
  position: relative;
  width: min(540px, 100%);
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  border: none;
  background: var(--surface);
}

.author-modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 24px;
  font-weight: 300;
  line-height: 28px;
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease;
}

.author-modal-close:hover {
  background: rgba(255, 255, 255, 0.35);
}

.author-banner {
  height: 150px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.author-avatar-container {
  position: relative;
  height: 0;
  display: flex;
  justify-content: center;
}

.author-avatar {
  position: absolute;
  top: -65px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 5px solid #ffffff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.14);
  object-fit: cover;
  background: #ffffff;
}

.author-info {
  padding: 85px 28px 28px;
  text-align: center;
}

.author-info h2 {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
}

.author-subtitle {
  color: var(--secondary);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 26px 0;
  letter-spacing: 0.3px;
}

.author-details-list {
  display: grid;
  gap: 12px;
  text-align: left;
  margin-bottom: 24px;
}

.author-detail-item {
  display: flex;
  gap: 16px;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 14px 18px;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.author-detail-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.author-detail-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
}

.author-detail-icon.is-green {
  background: #e6f4ea;
}

.author-detail-icon.is-blue {
  background: #e8f0fe;
}

.author-detail-icon.is-orange {
  background: #fef3c7;
}

.author-detail-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.author-detail-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.8px;
}

.author-detail-value {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}

.author-footer {
  text-align: center;
  border-top: 1px solid #e2e8f0;
  padding-top: 18px;
  margin-top: 24px;
}

.author-footer p {
  margin: 3px 0;
  font-size: 0.82rem;
  color: var(--muted);
}

@media (max-width: 720px) {
  .header-actions-group {
    align-items: stretch;
    width: 100%;
  }
  
  .header-buttons {
    flex-direction: column;
    gap: 8px;
  }
}

/* Settings Modal Specific Styling */
.settings-modal-panel {
  width: min(640px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 !important;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
  position: relative;
}

.settings-modal-panel .author-modal-close {
  position: absolute;
  top: 15px;
  right: 18px;
  background: none;
  border: none;
  font-size: 28px;
  font-weight: 300;
  cursor: pointer;
  color: var(--muted);
  z-index: 10;
  line-height: 1;
  padding: 0;
  transition: color 150ms ease;
}

.settings-modal-panel .author-modal-close:hover {
  color: var(--ink);
}

.settings-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
}

.settings-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.settings-modal-body .card {
  box-shadow: none;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.settings-modal-body .card:hover {
  transform: none;
  box-shadow: none;
}

