:root {
  color-scheme: light;
  --app-primary: #2563eb;
  --app-primary-dark: #1d4ed8;
  --app-danger: #ef4444;
  --app-danger-dark: #dc2626;
  --app-surface: rgba(255, 255, 255, 0.92);
  --app-surface-alt: rgba(255, 255, 255, 0.65);
  --app-border: rgba(15, 23, 42, 0.12);
  --app-text: #0f172a;
  --app-text-muted: #64748b;
  --app-radius: 1.25rem;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #1f2937 0%, #0f172a 55%, #020617 100%);
  color: var(--app-text);
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'tnum';
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.app-shell {
  min-height: 100vh;
  backdrop-filter: blur(14px);
}

.app-header {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(17, 24, 39, 0.95));
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
}

.navbar-brand {
  color: #fff !important;
}

.brand-logo {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1.35rem;
}

.brand-title {
  display: block;
  font-weight: 600;
  font-size: 1.15rem;
  color: #fff;
}

.brand-subtitle {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.current-time {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.85rem;
  line-height: 1.2;
}

.current-time__label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.25rem;
}

.current-time__value {
  font-variant-numeric: tabular-nums;
}

.mobile-current-time {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: #fff;
}

.page-content {
  flex: 1;
  padding-bottom: 4rem;
}

.page-header {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--app-radius);
  padding: 1.75rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.page-title {
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  margin: 0 0 0.35rem;
  font-weight: 600;
}

.page-subtitle {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  max-width: 48ch;
  font-size: 0.95rem;
}

.app-card,
.card {
  background: var(--app-surface);
  border-radius: var(--app-radius);
  border: 1px solid var(--app-border);
  box-shadow: 0 25px 45px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.app-card + .app-card,
.app-card + .card,
.card + .app-card,
.card + .card {
  margin-top: 1.5rem;
}

.card:not(.stack) {
  padding: 1.75rem 2rem;
}

.app-card__header,
.app-card__body,
.app-card__footer,
.card.stack {
  padding: 1.75rem 2rem;
}

.app-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.app-card__body {
  padding: 1.75rem 2rem;
}

.app-card__footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.app-card__title {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--app-text);
}

.app-card__subtitle {
  margin: 0;
  color: var(--app-text-muted);
  font-size: 0.95rem;
}

.app-card__stats {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  background: var(--app-surface-alt);
  border-radius: 18px;
  padding: 1.5rem;
  border: 1px dashed rgba(37, 99, 235, 0.35);
}

.app-card__stats .label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--app-text-muted);
  margin-bottom: 0.35rem;
}

.app-card__stats .value {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--app-text);
}

.section-title {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--app-text);
}

.description {
  margin: 0;
  color: var(--app-text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.info-card {
  background: var(--app-surface-alt);
  border-radius: 1.15rem;
  padding: 1.5rem;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  display: grid;
  gap: 1.25rem;
}

.curl {
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  font-family: 'JetBrains Mono', 'Fira Code', 'SFMono-Regular', ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.9rem;
  overflow-x: auto;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.2);
}

.curl code {
  white-space: pre;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

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

.code-block {
  background: rgba(15, 23, 42, 0.9);
  color: #e0f2fe;
  border-radius: 14px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.5;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.2);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--app-text);
}

.form-field input,
.form-field select,
.form-field textarea {
  border-radius: 0.85rem;
  border: 1px solid rgba(15, 23, 42, 0.15);
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.6);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-field .retention-control {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.form-field .retention-control input {
  flex: 1;
}

.form-field .retention-control select {
  min-width: 120px;
}

.form-field .field-hint {
  margin: -0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--app-text-muted);
}

.button,
.button:visited,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: linear-gradient(135deg, var(--app-primary), var(--app-primary-dark));
  border: none;
  color: #fff;
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 14px 35px rgba(37, 99, 235, 0.28);
}

.button:hover,
.button:focus-visible,
button.button:hover,
button.button:focus-visible {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.32);
}

.button.secondary {
  background: transparent;
  border: 1px solid rgba(37, 99, 235, 0.45);
  color: var(--app-primary);
  box-shadow: none;
}

.button.secondary:hover,
.button.secondary:focus-visible {
  background: rgba(37, 99, 235, 0.12);
}

.button.danger,
button.button.danger {
  background: linear-gradient(135deg, var(--app-danger), var(--app-danger-dark));
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.28);
}

.table-scroll {
  overflow-x: auto;
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table thead {
  background: rgba(148, 163, 184, 0.12);
  text-align: left;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.data-table th,
.data-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.data-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.06);
}

.data-table td.empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--app-text-muted);
}

.mobile-card-list {
  display: none;
}

.mobile-card {
  background: var(--app-surface);
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 1.25rem;
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12);
  display: grid;
  gap: 1rem;
}

.mobile-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-card__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.mobile-card__subtitle {
  margin: 0.25rem 0 0;
  color: var(--app-text-muted);
  font-size: 0.9rem;
}

.mobile-card__details {
  display: grid;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.mobile-card__details dt {
  font-weight: 600;
  color: var(--app-text-muted);
}

.mobile-card.empty {
  text-align: center;
  color: var(--app-text-muted);
}

.auth {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 160px);
  padding: 4rem 1.5rem;
}

.auth-card {
  background: var(--app-surface);
  border-radius: var(--app-radius);
  padding: 2.5rem;
  width: min(420px, 100%);
  box-shadow: 0 25px 45px rgba(15, 23, 42, 0.2);
  border: 1px solid var(--app-border);
  text-align: center;
}

.auth-card h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.8rem;
}

.auth-card button {
  width: 100%;
  border-radius: 999px;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, var(--app-primary), var(--app-primary-dark));
  border: none;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.3);
}

.auth-card button:hover,
.auth-card button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.32);
}

.alert {
  border-radius: 1rem;
  padding: 1rem 1.25rem;
}

.app-footer {
  color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 991.98px) {
  .app-card__header,
  .app-card__body,
  .app-card__footer {
    padding: 1.5rem;
  }

  .page-header {
    padding: 1.5rem;
  }
}

@media (max-width: 767.98px) {
  .page-header {
    border-radius: 1.15rem;
  }

  .app-card__header,
  .app-card__body,
  .app-card__footer,
  .card.stack {
    padding: 1.35rem;
  }

  .table-scroll {
    display: none;
  }

  .mobile-card-list {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
  }
}
