/* =============================================
   petiteimg — Neumorphism Design System
   ============================================= */

:root {
  --bg: #e4e8ee;
  --shadow-dark: #c2c7d1;
  --shadow-light: #ffffff;
  --text-primary: #2d3142;
  --text-secondary: #6b7094;
  --text-muted: #9da2b9;
  --accent: #ffb7b8;
  --accent-hover: #ff9d9c;
  --accent-soft: rgba(255, 183, 184, 0.15);
  --accent-text: #2d3142;
  --gradient: linear-gradient(135deg, #ffe1e1, #ffc3c3, #ff9d9c);
  --success: #10b981;
  --danger: #ef4444;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
}

[data-theme="dark"] {
  --bg: #2b2f3a;
  --shadow-dark: #1f222b;
  --shadow-light: #373c4a;
  --text-primary: #e2e5f0;
  --text-secondary: #8e92aa;
  --text-muted: #5c6078;
  --accent: #ffc3c3;
  --accent-hover: #ffb7b8;
  --accent-soft: rgba(255, 195, 195, 0.15);
  --accent-text: #1a1e2e;
  --gradient: linear-gradient(135deg, #ffd1d1, #ffb7b8, #ff9d9c);
  --success: #34d399;
  --danger: #f87171;
}

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

/* --- Scrollbar --- */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ffe1e1, #ffc3c3, #ff9d9c);
  border-radius: 4px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb,
[data-theme="dark"]::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ffd1d1, #ffb7b8, #ff9d9c);
}

/* --- Base --- */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s ease, color 0.3s ease;
}

#app {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}

/* --- Site Header --- */
.site-header {
  width: 100%;
  padding: 0 24px;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 20px 0;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.header-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.site-header h1 {
  font-family: 'Quicksand', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-link:hover {
  color: var(--text-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.btn-login {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: var(--gradient);
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-xs);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
  transition: box-shadow 0.2s ease, transform 0.1s ease;
}

.btn-login:hover {
  box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
  transform: translateY(-1px);
}

.btn-login:active {
  box-shadow: 1px 1px 3px var(--shadow-dark), -1px -1px 3px var(--shadow-light);
  transform: translateY(0);
}

/* --- Theme Toggle --- */
.theme-toggle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
  transition: box-shadow 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
  color: var(--accent);
}

.theme-toggle:active {
  box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
}

.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* --- Dropzone --- */
#dropzone {
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: box-shadow 0.25s ease;
  position: relative;
  box-shadow: inset 4px 4px 10px var(--shadow-dark), inset -4px -4px 10px var(--shadow-light);
}

#dropzone:hover {
  box-shadow: inset 5px 5px 12px var(--shadow-dark), inset -5px -5px 12px var(--shadow-light);
}

#dropzone.drag-over {
  box-shadow: inset 5px 5px 12px var(--shadow-dark), inset -5px -5px 12px var(--shadow-light), 0 0 0 3px var(--accent-soft);
}

#dropzone .dropzone-icon {
  color: var(--text-muted);
  margin-bottom: 16px;
  display: block;
}

#dropzone .dropzone-icon svg {
  width: 48px;
  height: 48px;
  margin: 0 auto;
  display: block;
}

#dropzone p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 500;
}

#dropzone .dropzone-sub {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

#file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* --- File List --- */
#file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border-radius: var(--radius-xs);
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-primary);
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
  transition: box-shadow 0.2s ease;
}

.file-chip:hover {
  box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
}

.file-chip .file-size {
  color: var(--text-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.file-chip .remove-file {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 0 2px;
  line-height: 1;
  transition: color 0.15s;
}

.file-chip .remove-file:hover {
  color: var(--danger);
}

/* --- Operations --- */
#operations {
  margin-top: 28px;
}

.op-toggles {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.op-toggle {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  background: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.2s ease, color 0.2s ease;
  user-select: none;
  box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
}

.op-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.op-toggle:hover {
  color: var(--text-primary);
}

.op-toggle.active {
  box-shadow: inset 3px 3px 7px var(--shadow-dark), inset -3px -3px 7px var(--shadow-light);
  color: var(--accent);
}

/* --- Panels --- */
.panel {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 10px;
  box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
}

.panel label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 10px;
}

#panel-compress .toggle-label {
  margin-top: 0;
}

#compress-custom {
  margin-top: 16px;
}

/* --- Slider --- */
.slider-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.slider-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--bg);
  box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
  outline: none;
  cursor: pointer;
}

.slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
  cursor: pointer;
  border: 3px solid var(--accent);
  transition: border-color 0.15s;
}

.slider-row input[type="range"]::-webkit-slider-thumb:hover {
  border-color: var(--accent-hover);
}

.slider-row input[type="range"]::-moz-range-track {
  height: 8px;
  border-radius: 4px;
  background: var(--bg);
  box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
  border: none;
}

.slider-row input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
  cursor: pointer;
  border: 3px solid var(--accent);
}

.slider-row span {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 40px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* --- Dimension Inputs --- */
.dimension-row {
  display: flex;
  align-items: end;
  gap: 12px;
}

.dimension-row label {
  flex: 1;
}

.dim-x {
  color: var(--text-muted);
  font-size: 18px;
  padding-bottom: 10px;
}

input[type="number"],
select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: none;
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
  transition: box-shadow 0.2s ease;
}

input[type="number"]:focus,
select:focus {
  box-shadow: inset 3px 3px 7px var(--shadow-dark), inset -3px -3px 7px var(--shadow-light), 0 0 0 2px var(--accent-soft);
}

input[type="number"]::placeholder {
  color: var(--text-muted);
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7094' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

[data-theme="dark"] select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238e92aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* --- Toggle Label (checkbox) --- */
.toggle-label {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}

.toggle-label input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--bg);
  box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.toggle-label input[type="checkbox"]:checked {
  background: var(--accent);
  box-shadow: 2px 2px 5px var(--shadow-dark), -2px -2px 5px var(--shadow-light);
}

.toggle-label input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 3px;
  width: 6px;
  height: 10px;
  border: solid var(--accent-text);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* --- Format Buttons --- */
.format-btns {
  display: flex;
  gap: 10px;
}

.format-btn {
  flex: 1;
  padding: 12px;
  background: var(--bg);
  border: none;
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: box-shadow 0.2s ease, color 0.2s ease;
  letter-spacing: 0.03em;
  font-family: inherit;
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
}

.format-btn:hover {
  color: var(--text-primary);
}

.format-btn.active {
  box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
  color: var(--accent);
}

/* --- Crop --- */
.crop-mode-toggle {
  display: flex;
  background: var(--bg);
  border-radius: var(--radius-xs);
  padding: 4px;
  margin-bottom: 16px;
  box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
}

.crop-mode {
  flex: 1;
  padding: 8px 14px;
  background: none;
  border: none;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.crop-mode.active {
  background: var(--bg);
  color: var(--text-primary);
  box-shadow: 2px 2px 5px var(--shadow-dark), -2px -2px 5px var(--shadow-light);
}

#crop-preset {
  margin-bottom: 10px;
}

.dim-hint {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* --- Process Button --- */
.btn-primary {
  width: 100%;
  margin-top: 24px;
  padding: 18px;
  background: var(--gradient);
  border: none;
  border-radius: var(--radius);
  color: var(--accent-text);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -0.01em;
  box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
  transition: box-shadow 0.2s ease, transform 0.1s ease, opacity 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 7px 7px 14px var(--shadow-dark), -7px -7px 14px var(--shadow-light);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  box-shadow: 2px 2px 5px var(--shadow-dark), -2px -2px 5px var(--shadow-light);
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary.processing {
  pointer-events: none;
  opacity: 0.7;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 0.5; }
}

/* --- Results --- */
#results {
  margin-top: 28px;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 13px;
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
  transition: box-shadow 0.2s ease;
}

.result-item:hover {
  box-shadow: 4px 4px 9px var(--shadow-dark), -4px -4px 9px var(--shadow-light);
}

.result-item.error {
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light), inset 0 0 0 2px rgba(239, 68, 68, 0.15);
}

.result-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-sizes {
  color: var(--text-secondary);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.result-sizes .savings {
  color: var(--success);
  font-weight: 700;
  margin-left: 8px;
}

.result-error {
  color: var(--danger);
  font-size: 13px;
}

/* --- Result Layout --- */
.result-left {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.result-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.format-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.format-jpeg { background: #fef3c7; color: #92400e; }
.format-png { background: #d1fae5; color: #065f46; }
.format-webp { background: #dbeafe; color: #1e40af; }

[data-theme="dark"] .format-jpeg { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
[data-theme="dark"] .format-png { background: rgba(52, 211, 153, 0.2); color: #34d399; }
[data-theme="dark"] .format-webp { background: rgba(96, 165, 250, 0.2); color: #60a5fa; }

.result-item.processing {
  opacity: 0.7;
}

/* --- Download Button --- */
.btn-download-sm {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  background: var(--bg);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 2px 2px 4px var(--shadow-dark), -2px -2px 4px var(--shadow-light);
  transition: color 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
}

.btn-download-sm:hover {
  color: var(--accent);
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
}

.btn-download-sm:active {
  box-shadow: inset 1px 1px 3px var(--shadow-dark), inset -1px -1px 3px var(--shadow-light);
}

/* --- Panel Hint --- */
.panel-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 8px 0 0;
}

/* --- Download All ZIP --- */
.result-zip-row {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.btn-download-zip {
  padding: 10px 24px;
  background: var(--gradient);
  color: var(--accent-text);
  border: none;
  border-radius: var(--radius-xs);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
  transition: box-shadow 0.2s ease, transform 0.1s ease;
}

.btn-download-zip:hover {
  box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
  transform: translateY(-1px);
}

.btn-download-zip:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

/* --- File Chip Clear All --- */
.file-chip-clear {
  cursor: pointer;
  background: none;
  border: 1px dashed var(--text-muted);
  color: var(--text-muted);
  font-weight: 500;
  font-family: inherit;
  font-size: 13px;
  box-shadow: none;
}

.file-chip-clear:hover {
  border-color: var(--danger);
  color: var(--danger);
  box-shadow: none;
}

/* --- File Chip Toggle --- */
.file-chip-toggle {
  cursor: pointer;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-weight: 600;
  font-family: inherit;
  border: none;
  font-size: 13px;
}

.file-chip-toggle:hover {
  background: var(--accent);
  color: var(--accent-text);
}

/* --- Batch Results Card --- */
.batch-card {
  background: var(--bg);
  border-radius: var(--radius-sm);
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
  overflow: hidden;
}

.batch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.batch-header:hover {
  background: var(--accent-soft);
}

.batch-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.batch-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.batch-chevron {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.batch-progress-wrap {
  height: 4px;
  background: var(--shadow-dark);
  overflow: hidden;
}

.batch-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--gradient);
  transition: width 0.3s ease;
}

.batch-detail {
  padding: 8px 12px 12px;
}

.batch-detail .result-item {
  box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
}

/* --- Site Footer --- */
.site-footer {
  margin-top: 56px;
  padding: 0 24px;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 0 24px;
}

.footer-inner::before {
  content: '';
  display: block;
  height: 2px;
  background: var(--gradient);
  border-radius: 1px;
  opacity: 0.25;
  margin-bottom: 8px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 24px;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-brand {
  flex: 1;
}

.footer-brand-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
}

.footer-status-dot {
  width: 8px;
  height: 8px;
  background: #34d399;
  border-radius: 50%;
  flex-shrink: 0;
}

.footer-brand-name span {
  font-family: 'Quicksand', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.footer-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.footer-brand p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  position: relative;
}

.footer-bottom::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient);
  opacity: 0.15;
}

.footer-bottom span {
  font-size: 11px;
  color: var(--text-muted);
}

.footer-ic {
  display: flex;
  align-items: center;
  opacity: 0.4;
  transition: opacity 0.2s;
}

.footer-ic:hover {
  opacity: 0.7;
}

.footer-ic img {
  height: 20px;
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 8px 8px 20px var(--shadow-dark), -8px -8px 20px var(--shadow-light);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--shadow-dark);
}

.modal-header h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 4px var(--shadow-dark), -2px -2px 4px var(--shadow-light);
  transition: color 0.15s, box-shadow 0.15s;
}

.modal-close:hover {
  color: var(--accent);
}

.modal-close:active {
  box-shadow: inset 1px 1px 3px var(--shadow-dark), inset -1px -1px 3px var(--shadow-light);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ffe1e1, #ffc3c3, #ff9d9c);
  border-radius: 3px;
}

[data-theme="dark"] .modal-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ffd1d1, #ffb7b8, #ff9d9c);
}

.modal-body h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 20px 0 8px;
}

.modal-body h3:first-child {
  margin-top: 0;
}

.modal-body p {
  margin-bottom: 8px;
}

.modal-body ul {
  margin: 0 0 8px 20px;
}

.modal-body a {
  color: var(--accent);
  text-decoration: none;
}

.modal-body a:hover {
  text-decoration: underline;
}

.cookie-status-box {
  margin-top: 4px;
  padding: 14px 18px;
  border-radius: var(--radius-xs);
  box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cookie-status-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.cookie-status-value {
  font-weight: 700;
  font-size: 13px;
}

.cookie-status-value.accepted { color: var(--success); }
.cookie-status-value.declined { color: var(--danger); }
.cookie-status-value.not-set { color: var(--text-muted); }

.cookie-reset-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 2px 2px 4px var(--shadow-dark), -2px -2px 4px var(--shadow-light);
  transition: color 0.15s, box-shadow 0.15s;
}

.cookie-reset-btn:hover {
  color: var(--accent);
}

.cookie-reset-btn:active {
  box-shadow: inset 1px 1px 3px var(--shadow-dark), inset -1px -1px 3px var(--shadow-light);
}

/* --- Cookie Banner --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  padding: 16px 24px;
  background: var(--bg);
  box-shadow: 0 -4px 16px var(--shadow-dark);
}

.cookie-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cookie-inner p {
  font-size: 13px;
  color: var(--text-secondary);
  flex: 1;
}

.cookie-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 8px 18px;
  border: none;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: box-shadow 0.2s ease, color 0.2s ease;
}

.cookie-btn.accept {
  background: var(--gradient);
  color: var(--accent-text);
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
}

.cookie-btn.accept:active {
  box-shadow: 1px 1px 3px var(--shadow-dark), -1px -1px 3px var(--shadow-light);
}

.cookie-btn.decline {
  background: var(--bg);
  color: var(--text-secondary);
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
}

.cookie-btn.decline:hover {
  color: var(--text-primary);
}

.cookie-btn.decline:active {
  box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
}

/* --- Dark Mode Overrides --- */
[data-theme="dark"] .btn-primary { color: #fff; }
[data-theme="dark"] .btn-login { color: #fff; }
[data-theme="dark"] .toggle-label input:checked::after { border-color: #fff; }
[data-theme="dark"] .cookie-btn.accept { color: #fff; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-done {
  animation: popIn 0.3s ease-out;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--shadow-dark);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Auth User (header) --- */
.auth-user {
  position: relative;
}

.auth-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  background: var(--gradient);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-primary);
  font-family: inherit;
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
  transition: box-shadow 0.2s ease;
}

.auth-trigger:hover {
  box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
}

.auth-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.auth-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.auth-trigger svg {
  color: var(--text-secondary);
}

.auth-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  padding: 6px 0;
  z-index: 100;
}

.auth-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.15s ease;
}

.auth-dropdown-item svg {
  color: currentColor;
  opacity: 0.6;
  flex-shrink: 0;
}

.auth-dropdown-item:hover {
  background: rgba(255, 183, 184, 0.12);
}

.auth-dropdown-danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

.auth-dropdown-divider {
  height: 1px;
  background: var(--text-muted);
  opacity: 0.2;
  margin: 4px 12px;
}

.auth-dropdown-danger {
  color: var(--danger);
}

/* --- Auth Card (login page) --- */
.auth-card {
  max-width: 420px;
  margin: 60px auto;
  padding: 48px 40px;
  background: var(--bg);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
}

.auth-card h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.auth-card-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.5;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 24px;
  background: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
  transition: box-shadow 0.2s ease, transform 0.1s ease;
}

.btn-google:hover {
  box-shadow: 7px 7px 14px var(--shadow-dark), -7px -7px 14px var(--shadow-light);
  transform: translateY(-1px);
}

.btn-google:active {
  box-shadow: 2px 2px 5px var(--shadow-dark), -2px -2px 5px var(--shadow-light);
  transform: translateY(0);
}

.btn-google svg {
  flex-shrink: 0;
}

.auth-legal {
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.auth-legal a {
  color: var(--accent);
  text-decoration: none;
}

.auth-legal a:hover {
  text-decoration: underline;
}

/* --- Pricing --- */
.pricing-header {
  text-align: center;
  margin-bottom: 40px;
}

.pricing-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.pricing-header p {
  font-size: 15px;
  color: var(--text-secondary);
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.pricing-card {
  position: relative;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
  display: flex;
  flex-direction: column;
}

.pricing-card-pro {
  box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light), inset 0 0 0 2px var(--accent-soft);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient);
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

[data-theme="dark"] .pricing-badge {
  color: #fff;
}

.pricing-card-header {
  margin-bottom: 24px;
}

.pricing-card-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.pricing-amount {
  font-size: 40px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.pricing-period {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.pricing-features li svg {
  color: var(--success);
  flex-shrink: 0;
}

.btn-pricing {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
  transition: box-shadow 0.2s ease, transform 0.1s ease;
}

.btn-pricing:hover {
  box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
  transform: translateY(-1px);
}

.btn-pricing-pro {
  background: var(--gradient);
  color: var(--accent-text);
}

[data-theme="dark"] .btn-pricing-pro {
  color: #fff;
}

.btn-pricing-free {
  background: var(--bg);
  color: var(--text-secondary);
  border: 2px solid var(--border);
  cursor: default;
  pointer-events: none;
  opacity: 0.7;
}

.btn-pricing-current {
  background: var(--bg);
  color: var(--text-secondary);
  border: 2px solid var(--border);
  cursor: default;
  pointer-events: none;
  opacity: 0.7;
}

.btn-pricing-current:hover {
  transform: none;
}

/* --- Enterprise CTA --- */
.pricing-enterprise {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
}

.pricing-enterprise h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.pricing-enterprise > p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.enterprise-contact {
  margin-top: 16px;
}

.enterprise-contact a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.enterprise-contact a:hover {
  text-decoration: underline;
}

/* --- Dashboard --- */
.dash-loading {
  text-align: center;
  padding: 60px 0;
  color: var(--text-muted);
  font-size: 14px;
}

.dash-section {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
}

.dash-section h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.dash-section-header h2 {
  margin-bottom: 0;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.dash-stat {
  padding: 16px;
  border-radius: var(--radius-xs);
  box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
  text-align: center;
}

.dash-stat-value {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}

.dash-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-small {
  padding: 8px 18px;
  background: var(--gradient);
  color: var(--accent-text);
  border: none;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
  transition: box-shadow 0.2s ease, transform 0.1s ease;
}

.btn-small:hover {
  box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
  transform: translateY(-1px);
}

.btn-small:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

[data-theme="dark"] .btn-small {
  color: #fff;
}

/* --- Key actions --- */
.key-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-reveal,
.btn-copy {
  padding: 6px 14px;
  background: var(--bg);
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: inherit;
  cursor: pointer;
  box-shadow: 2px 2px 4px var(--shadow-dark), -2px -2px 4px var(--shadow-light);
  transition: box-shadow 0.15s, color 0.15s;
  white-space: nowrap;
}

.btn-reveal:hover,
.btn-copy:hover {
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
  color: var(--accent);
}

.key-prefix.key-revealed {
  font-size: 12px;
  word-break: break-all;
}

/* --- Key rows --- */
.key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: var(--radius-xs);
  margin-bottom: 8px;
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
}

.key-row.key-revoked {
  opacity: 0.5;
}

.key-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.key-prefix {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 600;
}

.key-name {
  font-size: 13px;
  color: var(--text-muted);
}

.key-badge-revoked {
  font-size: 11px;
  font-weight: 700;
  color: var(--danger);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.btn-revoke {
  padding: 6px 14px;
  background: var(--bg);
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--danger);
  font-family: inherit;
  cursor: pointer;
  box-shadow: 2px 2px 4px var(--shadow-dark), -2px -2px 4px var(--shadow-light);
  transition: box-shadow 0.15s;
}

.btn-revoke:hover {
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
}

.dash-empty {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 13px;
}

/* --- Subscription Info --- */
.dash-subscription {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
  margin-bottom: 20px;
}

.dash-subscription-text {
  font-size: 13px;
  color: var(--text-secondary);
}

/* --- Upgrade CTA --- */
.dash-upgrade {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  margin-bottom: 20px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  gap: 16px;
}

.dash-upgrade-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-upgrade-text strong {
  font-size: 14px;
  color: var(--text-primary);
}

.dash-upgrade-text span {
  font-size: 13px;
  color: var(--text-secondary);
}

.dash-upgrade-btn {
  flex-shrink: 0;
  padding: 8px 20px;
  background: var(--gradient);
  color: var(--accent-text);
  border: none;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
  transition: box-shadow 0.2s, transform 0.1s;
}

.dash-upgrade-btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.dash-upgrade-btn:hover {
  box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
  transform: translateY(-1px);
}

/* --- Delete button (revoked keys) --- */
.btn-delete {
  padding: 6px 14px;
  background: var(--bg);
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: inherit;
  cursor: pointer;
  box-shadow: 2px 2px 4px var(--shadow-dark), -2px -2px 4px var(--shadow-light);
  transition: box-shadow 0.15s, color 0.15s;
}

.btn-delete:hover {
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
  color: var(--danger);
}

/* --- Confirm Modal --- */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.confirm-dialog {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 380px;
  width: 90%;
  box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
  animation: popIn 0.2s ease-out;
}

.confirm-message {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 24px;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.confirm-btn {
  padding: 8px 20px;
  border: none;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.1s;
}

.confirm-cancel {
  background: var(--bg);
  color: var(--text-secondary);
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
}

.confirm-cancel:hover {
  box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
}

.confirm-ok {
  background: var(--gradient);
  color: var(--accent-text);
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
}

.confirm-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
}

.confirm-danger:hover,
.confirm-ok:hover {
  transform: translateY(-1px);
  box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
}

/* --- API Usage Log Table --- */
.log-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  font-size: 13px;
}

.log-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 14px 8px;
}

.log-table tbody tr {
  background: var(--bg);
  border-radius: var(--radius-xs);
  box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
}

.log-table td {
  padding: 10px 14px;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.log-table td:first-child { border-radius: var(--radius-xs) 0 0 var(--radius-xs); }
.log-table td:last-child { border-radius: 0 var(--radius-xs) var(--radius-xs) 0; }

.log-time {
  color: var(--text-muted);
  white-space: nowrap;
}

.log-format {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--accent-soft);
  color: var(--accent-hover);
  margin-right: 6px;
}

.log-savings-pos {
  color: var(--success);
  font-weight: 600;
}

.log-savings-neg {
  color: var(--danger);
  font-weight: 600;
}

/* --- Documentation --- */
.docs-layout {
  display: flex;
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 32px 80px;
  gap: 48px;
}

.docs-sidebar {
  position: sticky;
  top: 96px;
  align-self: flex-start;
  width: 200px;
  flex-shrink: 0;
}

.docs-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs-nav-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 16px 12px 6px;
}

.docs-nav-label:first-child {
  padding-top: 0;
}

.docs-nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  position: relative;
}

.docs-nav-link:hover {
  color: var(--text-primary);
  background: var(--accent-soft);
}

.docs-nav-link.active {
  color: var(--accent-hover);
  background: var(--accent-soft);
  font-weight: 600;
}

.docs-content {
  flex: 1;
  min-width: 0;
}

.docs-section {
  padding-bottom: 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--shadow-dark);
  scroll-margin-top: 88px;
}

.docs-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.docs-section h2 {
  font-family: 'Quicksand', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.docs-section h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 28px;
  margin-bottom: 10px;
}

.docs-section p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.docs-section ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.docs-section li {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.docs-section a {
  color: var(--accent-hover);
  text-decoration: none;
  font-weight: 500;
}

.docs-section a:hover {
  text-decoration: underline;
}

.docs-section code {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 12.5px;
  background: var(--accent-soft);
  color: var(--text-primary);
  padding: 2px 6px;
  border-radius: 4px;
}

.docs-callout {
  padding: 16px 20px;
  border-radius: var(--radius-xs);
  background: var(--accent-soft);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 12px;
  box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
}

.docs-callout strong {
  color: var(--text-primary);
}

.docs-endpoint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-xs);
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
}

.docs-endpoint code {
  font-size: 14px;
  font-weight: 600;
  background: none;
  padding: 0;
}

.docs-method {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 4px;
  color: #fff;
  flex-shrink: 0;
}

.docs-method-post {
  background: var(--accent-hover);
  color: var(--accent-text);
}

.docs-method-get {
  background: var(--success);
}

.docs-code {
  margin: 12px 0 16px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
}

.docs-code-header {
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--shadow-dark);
}

.docs-code pre {
  padding: 16px;
  margin: 0;
  overflow-x: auto;
}

.docs-code code {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-primary);
  background: none;
  padding: 0;
  border-radius: 0;
}

.docs-table-wrap {
  margin: 12px 0 16px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.docs-table th {
  text-align: left;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--shadow-dark);
}

.docs-table td {
  padding: 10px 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--shadow-dark);
}

.docs-table tr:last-child td {
  border-bottom: none;
}

.docs-table td code {
  font-size: 12px;
}

/* --- Prism Syntax Highlighting (petiteimg theme) --- */
.docs-code code[class*="language-"],
.docs-code pre[class*="language-"] {
  text-shadow: none;
}

.docs-code .token.comment,
.docs-code .token.prolog,
.docs-code .token.doctype,
.docs-code .token.cdata {
  color: var(--text-muted);
  font-style: italic;
}

.docs-code .token.punctuation {
  color: var(--text-secondary);
}

.docs-code .token.property,
.docs-code .token.tag,
.docs-code .token.boolean,
.docs-code .token.number,
.docs-code .token.constant,
.docs-code .token.symbol {
  color: #e06c75;
}

[data-theme="dark"] .docs-code .token.property,
[data-theme="dark"] .docs-code .token.tag,
[data-theme="dark"] .docs-code .token.boolean,
[data-theme="dark"] .docs-code .token.number,
[data-theme="dark"] .docs-code .token.constant,
[data-theme="dark"] .docs-code .token.symbol {
  color: #ff9d9c;
}

.docs-code .token.selector,
.docs-code .token.attr-name,
.docs-code .token.string,
.docs-code .token.char,
.docs-code .token.builtin {
  color: #50a14f;
}

[data-theme="dark"] .docs-code .token.selector,
[data-theme="dark"] .docs-code .token.attr-name,
[data-theme="dark"] .docs-code .token.string,
[data-theme="dark"] .docs-code .token.char,
[data-theme="dark"] .docs-code .token.builtin {
  color: #98c379;
}

.docs-code .token.operator,
.docs-code .token.entity,
.docs-code .token.url,
.docs-code .language-css .token.string,
.docs-code .style .token.string {
  color: #a626a4;
}

[data-theme="dark"] .docs-code .token.operator,
[data-theme="dark"] .docs-code .token.entity,
[data-theme="dark"] .docs-code .token.url,
[data-theme="dark"] .docs-code .language-css .token.string,
[data-theme="dark"] .docs-code .style .token.string {
  color: #c678dd;
}

.docs-code .token.atrule,
.docs-code .token.attr-value,
.docs-code .token.keyword {
  color: #4078f2;
}

[data-theme="dark"] .docs-code .token.atrule,
[data-theme="dark"] .docs-code .token.attr-value,
[data-theme="dark"] .docs-code .token.keyword {
  color: #61afef;
}

.docs-code .token.function,
.docs-code .token.class-name {
  color: #c18401;
}

[data-theme="dark"] .docs-code .token.function,
[data-theme="dark"] .docs-code .token.class-name {
  color: #e5c07b;
}

.docs-code .token.important,
.docs-code .token.bold {
  font-weight: bold;
}

.docs-code .token.italic {
  font-style: italic;
}

/* --- LLM Prompt Button & Modal --- */
.docs-llm-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 10px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--gradient);
  color: var(--accent-text);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
  transition: box-shadow 0.15s, transform 0.15s;
  width: 100%;
}

.docs-llm-btn:hover {
  box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
  transform: translateY(-1px);
}

.modal-wide {
  max-width: 720px;
}

.llm-prompt-wrap {
  position: relative;
  border-radius: var(--radius-xs);
  box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
  overflow: hidden;
}

.llm-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 5px 14px;
  border: none;
  border-radius: 6px;
  background: var(--bg);
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 2px 2px 4px var(--shadow-dark), -2px -2px 4px var(--shadow-light);
  transition: color 0.15s, box-shadow 0.15s;
  z-index: 1;
}

.llm-copy-btn:hover {
  color: var(--accent-hover);
}

.llm-prompt-text {
  margin: 0;
  padding: 16px;
  padding-top: 40px;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-y: auto;
  max-height: 55vh;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

@media (max-width: 768px) {
  .docs-layout {
    flex-direction: column;
    padding: 32px 20px 60px;
    gap: 0;
  }

  .docs-sidebar {
    position: relative;
    top: 0;
    width: 100%;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--shadow-dark);
    overflow-x: auto;
  }

  .docs-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .docs-nav-label {
    display: none;
  }

  .docs-nav-link {
    white-space: nowrap;
    font-size: 12px;
    padding: 6px 10px;
  }
}

@media (max-width: 480px) {
  .docs-layout {
    padding: 24px 16px 40px;
  }

  .docs-endpoint {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .docs-table-wrap {
    overflow-x: auto;
  }

  .docs-table {
    min-width: 480px;
  }
}

/* --- Docs Tabbed Code Examples --- */
.docs-tabs {
  margin: 12px 0 16px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
}

.docs-tabs-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--shadow-dark);
  overflow-x: auto;
  scrollbar-width: none;
}

.docs-tabs-bar::-webkit-scrollbar {
  display: none;
}

.docs-tab {
  padding: 8px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}

.docs-tab:hover {
  color: var(--text-secondary);
}

.docs-tab.active {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

.docs-tab-panel {
  display: none;
}

.docs-tab-panel.active {
  display: block;
}

.docs-tab-panel pre {
  padding: 16px;
  margin: 0;
  overflow-x: auto;
}

.docs-tab-panel code {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-primary);
  background: none;
  padding: 0;
  border-radius: 0;
}

/* --- Utilities --- */
.hidden {
  display: none !important;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  #app {
    padding: 32px 20px 48px;
  }

  .header-nav {
    gap: 16px;
  }

  .footer-content {
    flex-wrap: wrap;
    gap: 20px;
  }

  .footer-brand {
    flex-basis: 100%;
  }

  .footer-brand p {
    max-width: 100%;
  }

  .modal {
    max-height: 90vh;
    margin: 12px;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .auth-card {
    margin: 40px auto;
    padding: 36px 28px;
  }

  .dash-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .key-actions {
    flex-wrap: wrap;
  }

  .key-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .key-info {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  #app {
    padding: 24px 16px 40px;
  }

  .site-header h1 {
    font-size: 19px;
  }

  .header-logo {
    width: 42px;
    height: 42px;
  }

  .header-nav {
    display: none;
  }

  .theme-toggle {
    width: 28px;
    height: 28px;
  }

  #dropzone {
    padding: 36px 20px;
  }

  .op-toggles {
    flex-wrap: wrap;
    gap: 8px;
  }

  .op-toggle {
    flex: 1 1 45%;
    padding: 10px 12px;
    font-size: 12px;
  }

  .panel {
    padding: 20px;
  }

  .dimension-row {
    flex-direction: column;
    gap: 8px;
  }

  .dim-x {
    display: none;
  }

  .format-btns {
    gap: 8px;
  }

  .result-item {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .result-right {
    justify-content: space-between;
  }

  .cookie-inner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .cookie-status-box {
    flex-direction: column;
    gap: 8px;
  }

  .site-footer {
    padding: 0 16px;
  }

  .footer-col {
    flex: 1;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* --- Toast Notifications --- */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  pointer-events: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-width: 360px;
}

.toast.toast-visible {
  opacity: 1;
  transform: translateX(0);
}

.toast-error {
  background: #ef4444;
}

.toast-success {
  background: #10b981;
}

.toast-info {
  background: #3b82f6;
}

/* --- Announcement Bubble --- */
.announce-bubble {
  position: fixed;
  bottom: 28px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: 6px 6px 14px var(--shadow-dark), -6px -6px 14px var(--shadow-light);
  z-index: 900;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.announce-bubble.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.announce-tail {
  position: absolute;
  bottom: -8px;
  right: 36px;
  width: 18px;
  height: 18px;
  background: var(--bg);
  border-radius: 0 0 4px 0;
  transform: rotate(45deg);
  box-shadow: 4px 4px 8px var(--shadow-dark);
}

.announce-msg {
  font-size: 13.5px;
  color: var(--text-primary);
  line-height: 1.3;
}

.announce-msg strong {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.announce-close {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  box-shadow: 2px 2px 5px var(--shadow-dark), -2px -2px 5px var(--shadow-light);
  transition: color 0.15s, box-shadow 0.15s;
}

.announce-close:hover {
  color: var(--text-primary);
}

.announce-close:active {
  box-shadow: inset 1px 1px 3px var(--shadow-dark), inset -1px -1px 3px var(--shadow-light);
}

@media (max-width: 480px) {
  .announce-bubble {
    right: 14px;
    bottom: 14px;
    left: 14px;
  }
  .announce-tail {
    right: 28px;
  }
}

/* --- Admin Panel --- */
#app.admin-app {
  max-width: 1000px;
}

.admin-search {
  padding: 8px 16px;
  background: var(--bg);
  border: none;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-family: inherit;
  color: var(--text-primary);
  box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
  outline: none;
  width: 280px;
  transition: box-shadow 0.2s;
}

.admin-search:focus {
  box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light), 0 0 0 2px var(--accent-soft);
}

.admin-search::placeholder {
  color: var(--text-muted);
}

.admin-table {
  border-spacing: 0 8px;
}

.admin-table thead th {
  white-space: nowrap;
}

.admin-user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.admin-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  flex-shrink: 0;
}

.admin-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.admin-user-email {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.admin-tier-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-tier-free {
  background: var(--accent-soft);
  color: var(--text-muted);
}

.admin-tier-pro {
  background: var(--gradient);
  color: var(--accent-text);
}

[data-theme="dark"] .admin-tier-pro {
  color: #fff;
}

.admin-tier-unlimited {
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  color: #fff;
}

.admin-tier-succeeded {
  background: var(--success);
  color: #fff;
}

.admin-num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.admin-date {
  white-space: nowrap;
  color: var(--text-muted);
}

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

.admin-action-btn {
  padding: 5px 12px;
  background: var(--bg);
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: inherit;
  cursor: pointer;
  box-shadow: 2px 2px 4px var(--shadow-dark), -2px -2px 4px var(--shadow-light);
  transition: box-shadow 0.15s, color 0.15s;
  white-space: nowrap;
}

.admin-action-btn:hover {
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
  color: var(--accent);
}

.admin-action-gift {
  color: var(--accent-hover);
}

.admin-link {
  color: var(--accent-hover);
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
}

.admin-link:hover {
  text-decoration: underline;
}

/* --- Admin Chart --- */
.admin-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 160px;
  padding: 0 4px;
}

.admin-chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.admin-chart-bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.admin-chart-bar {
  width: 100%;
  max-width: 40px;
  background: var(--gradient);
  border-radius: 6px 6px 0 0;
  min-height: 2px;
  position: relative;
  transition: height 0.3s ease;
}

.admin-chart-val {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.admin-chart-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 600;
}

/* --- Gift Modal --- */
.gift-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gift-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-xs);
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  transition: box-shadow 0.15s;
}

.gift-option:hover {
  box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
}

.gift-option input[type="radio"] {
  accent-color: var(--accent-hover);
}

.gift-days-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.gift-days-input {
  width: 80px;
  padding: 6px 10px;
  background: var(--bg);
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-primary);
  box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
  outline: none;
}

.gift-days-input:focus {
  box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light), 0 0 0 2px var(--accent-soft);
}

@media (max-width: 768px) {
  .admin-app {
    max-width: 100%;
  }

  .admin-search {
    width: 100%;
    margin-top: 12px;
  }

  .dash-section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-table {
    display: block;
    overflow-x: auto;
  }

  .admin-actions {
    flex-wrap: wrap;
  }
}
