@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap");

:root {
  --font-primary: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-secondary: "Plus Jakarta Sans", sans-serif;
  
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-input: #f1f5f9;
  --border-color: #e2e8f0;
  --border-glowing: #cbd5e1;
  
  --color-text-primary: #0f172a;
  --color-text-muted: #64748b;
  --color-text-dim: #94a3b8;
  
  --color-primary: #0f766e;
  --color-primary-glow: rgba(15, 118, 110, .1);
  --color-success: #10b981;
  --color-danger: #ef4444;
  --color-warning: #f59e0b;
  --color-button-text: #ffffff;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, .05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .05), 0 2px 4px -2px rgba(0, 0, 0, .05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .04), 0 4px 6px -4px rgba(0, 0, 0, .04);
}

/* Dark mode theme properties */
body.dark {
  --bg-main: #0a0a0b;
  --bg-card: #161618;
  --bg-input: #202023;
  --border-color: rgba(255, 255, 255, .08);
  --border-glowing: rgba(255, 255, 255, .15);
  
  --color-text-primary: #f3f4f6;
  --color-text-muted: #a1a1aa;
  --color-text-dim: #71717a;
  
  --color-primary: #14b8a6;
  --color-primary-glow: rgba(20, 184, 166, .15);
  --color-success: #10b981;
  --color-danger: #f87171;
  --color-warning: #fbbf24;
  --color-button-text: #0f172a;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, .5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .4), 0 2px 4px -2px rgba(0, 0, 0, .4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .4), 0 4px 6px -4px rgba(0, 0, 0, .4);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font-primary);
  color: var(--color-text-primary);
  background: var(--bg-main);
  transition: background-color .2s, color .2s;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  zoom: 90%;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  width: min(1360px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 10px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  height: 100%;
  min-height: 0;
}

.app-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  padding: 10px 0 4px;
  border-top: 1px solid var(--border-color);
  color: var(--color-text-muted);
  background: var(--bg-main);
  flex-shrink: 0;
  margin-top: 12px;
  z-index: 10;
}

/* TOP BAND HEADER */
.top-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--color-primary);
  color: var(--color-button-text);
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s;
}

.brand-mark svg {
  width: 20px;
  height: 20px;
}

h1 {
  font-size: 1.25rem;
  line-height: 1.1;
  margin: 0;
  font-weight: 700;
}

.brand p {
  margin: 0;
  font-family: var(--font-primary);
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-strip {
  font-family: var(--font-primary);
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
  padding: 0 12px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  font-size: 0.85rem;
  font-weight: 500;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--color-success);
  box-shadow: 0 0 6px var(--color-success);
}

.status-dot.offline {
  background: var(--color-danger);
  box-shadow: 0 0 6px var(--color-danger);
}

/* BUTTONS */
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--color-text-primary);
  min-height: 36px;
  padding: 0 14px;
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.icon-button:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.icon-button svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.icon-button.active-tool {
  border-color: var(--color-primary);
  background: var(--color-primary-glow);
  color: var(--color-primary);
}

.danger-button {
  color: var(--color-danger);
}
.danger-button:hover {
  border-color: var(--color-danger) !important;
  color: var(--color-danger) !important;
  background: rgba(239, 68, 68, 0.05);
}

.icon-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--color-text-primary);
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.icon-only:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* WORKSPACE GRID */
.admin-workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 10px;
  flex-grow: 1;
  min-height: 0;
}

/* CARDS & PANELS */
.address-band {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-card);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  transition: background-color 0.2s, border-color 0.2s;
  min-width: 0;
}

.address-editor {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.eyebrow {
  font-family: var(--font-primary);
  display: block;
  margin-bottom: 6px;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.muted {
  font-family: var(--font-primary);
  color: var(--color-text-muted);
}

/* INPUT ROW */
.address-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  margin-bottom: 12px;
}

.qty-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.address-local-input {
  flex: 1 1 240px;
  min-height: 40px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--color-text-primary);
  font-family: var(--font-primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.address-local-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.compact-password {
  width: 100px;
  min-height: 40px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--color-text-primary);
  font-family: var(--font-primary);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0 10px;
  outline: none;
  transition: border-color 0.2s;
}
.compact-password:focus {
  border-color: var(--color-primary);
}

.address-at {
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-dim);
  user-select: none;
}

.address-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

/* DROPDOWN PREFIX SELECTOR */
.custom-domain-dropdown {
  position: relative;
  flex: 1 1 260px;
  transition: flex 0.2s ease;
}

.custom-domain-dropdown.manual-active {
  flex: 0 0 140px;
}

#prefix-display-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  text-align: left;
}

.domain-dropdown-trigger {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--color-text-primary);
  font-family: var(--font-primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0 32px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: border-color 0.2s;
  user-select: none;
}
.domain-dropdown-trigger:hover {
  border-color: var(--color-primary);
}

.dropdown-arrow-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translatey(-50%);
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  transition: transform 0.2s;
}

body.dark .dropdown-arrow-icon {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.domain-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  min-width: 260px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 4px;
  gap: 2px;
}

.domain-dropdown-item {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-primary);
  font-family: var(--font-primary);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 8px 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}
.domain-dropdown-item:hover {
  background: var(--bg-input);
  color: var(--color-primary);
}
.domain-dropdown-item.active {
  background: var(--color-primary-glow);
  color: var(--color-primary);
  font-weight: 700;
}

/* CUSTOM SWITCH SLIDER */
.switch-container {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.switch-container input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: relative;
  width: 40px;
  height: 20px;
  background-color: var(--border-color);
  border-radius: 34px;
  transition: background-color 0.2s;
}

.switch-slider::before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.switch-container input:checked + .switch-slider {
  background-color: var(--color-primary);
}

.switch-container input:checked + .switch-slider::before {
  transform: translateX(20px);
}

.switch-label {
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 600;
}

/* FORMS GRID */
.admin-modal-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.01);
}

body.dark .admin-modal-section {
  background: rgba(255, 255, 255, 0.01);
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.field-group label {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  gap: 12px;
}

@media (max-width: 600px) {
  .metrics-row {
    grid-template-columns: 1fr;
  }
}


.field-group input, .field-group select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--color-text-primary);
  padding: 0 12px;
  font-family: var(--font-primary);
  font-size: 0.88rem;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s;
}

.field-group input:focus, .field-group select:focus {
  border-color: var(--color-primary);
}

.joined-input {
  display: flex;
  align-items: center;
  gap: 6px;
}
.joined-input input {
  flex-grow: 1;
}

.open-mailbox-btn {
  font-family: var(--font-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.85rem;
  min-height: 28px;
  padding: 0 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.open-mailbox-btn:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-glow);
}

/* ERROR BANDS */
.error-band {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--color-danger);
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.05);
  color: var(--color-danger);
  padding: 10px 12px;
  font-size: 0.85rem;
  font-weight: 500;
}
.error-band svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* VIEW TOGGLES */
.view-toggle {
  display: inline-flex;
  align-self: center;
  gap: 2px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2px;
  background: var(--bg-input);
  flex-shrink: 0;
}

.view-toggle button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-primary);
  padding: 6px 12px;
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.view-toggle button.active {
  background: var(--color-primary);
  color: var(--color-button-text);
}

/* CONSOLE WORKSPACE */
.mail-client {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mail-workspace {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-card);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s, border-color 0.2s;
}

.inbox-toolbar {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-color);
  padding: 8px 16px;
  background: rgba(0,0,0,0.01);
}

body.dark .inbox-toolbar {
  background: rgba(255,255,255,0.01);
}

.inbox-toolbar h2 {
  font-size: 1rem;
  margin: 0;
  font-weight: 700;
}

.inbox-toolbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.mail-badge {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-color);
  border-radius: 99px;
  background: var(--bg-card);
  color: var(--color-text-primary);
  padding: 0 12px;
  font-size: 0.8rem;
  white-space: nowrap;
}

.mail-badge svg {
  width: 14px;
  height: 14px;
}

.mail-badge.active {
  border-color: var(--color-primary);
  background: var(--color-primary-glow);
  color: var(--color-primary);
}

/* TERMINAL CONSOLE BOX */
.console-box {
  width: 100%;
  height: 220px;
  border: 1px solid #27272a;
  background: #0d0d10;
  border-radius: 8px;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.8rem;
  color: #ffffff;
  padding: 12px 14px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 3px;
  scroll-behavior: smooth;
}

.console-line {
  margin: 0;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.line-eligible {
  color: #4caf50; /* Vibrant Green */
}
.line-redeemed {
  color: #ff6900; /* Xiaomi Orange */
  font-weight: bold;
}
.line-error {
  color: #ef4444; /* Soft Red */
}
.line-pending {
  color: #f59e0b; /* Amber */
}
.line-dim {
  color: #71717a; /* Muted gray */
}
.line-link {
  color: #38bdf8; /* Sky Blue */
  text-decoration: underline;
  cursor: pointer;
}

/* PROGRESS BAR */
.progress-bar-track {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 99px;
  transition: width 0.3s ease;
}

.privacy-note {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--color-text-muted);
  padding: 8px 12px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-container {
  padding: 0 14px 14px;
  overflow-x: auto;
  overflow-y: auto;
  max-height: 250px;
}

/* TABLES (HISTORY) */
.history-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  font-size: 0.78rem;
  text-align: left;
  table-layout: fixed;
}

/* Column widths */
.history-table col.col-imei    { width: 145px; }
.history-table col.col-status  { width: 95px; }
.history-table col.col-email   { width: 170px; }
.history-table col.col-activity{ width: auto; }
.history-table col.col-date    { width: 100px; }
.history-table col.col-time    { width: 85px; }
.history-table col.col-link    { width: 120px; }
.history-table col.col-actions { width: 60px; }

.history-table th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-input);
  color: var(--color-text-muted);
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 5px 8px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-table td {
  padding: 5px 8px;
  border-bottom: 1px solid var(--border-color);
  color: var(--color-text-primary);
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Prevent wrapping on compact columns */
.history-table td.col-imei,
.history-table th.col-imei {
  font-family: "Consolas", monospace;
  font-size: 0.78rem;
  white-space: nowrap;
}

.history-table td.col-status,
.history-table td.col-date,
.history-table td.col-time,
.history-table td.col-actions,
.history-table th.col-status,
.history-table th.col-date,
.history-table th.col-time,
.history-table th.col-actions {
  white-space: nowrap;
}

/* Activity and Email wrap gracefully */
.history-table td.col-activity,
.history-table td.col-email,
.history-table td.col-link {
  white-space: normal;
  word-break: break-word;
  line-height: 1.4;
}

.history-table td.col-actions {
  text-align: center;
}

.history-table tr:last-child td {
  border-bottom: 0;
}

.history-table tr:hover td {
  background: rgba(0, 0, 0, 0.015);
}

body.dark .history-table tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.redeemed {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
}

.status-badge.failed {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
}

.empty-row {
  padding: 24px !important;
}

.text-center {
  text-align: center;
}

/* MODAL / BACKDROPS */
.modal-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal {
  width: min(720px, 100%);
  max-height: min(700px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modal-zoom-in 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.auth-modal {
  width: min(400px, 100%);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.01);
}

body.dark .modal-header {
  background: rgba(255, 255, 255, 0.01);
}

.modal-header h2 {
  font-size: 1.1rem;
  margin: 0;
  font-weight: 700;
}

.modal-close-btn {
  border: 0;
  background: transparent;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  color: var(--color-text-muted);
}
.modal-close-btn:hover {
  color: var(--color-text-primary);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@keyframes modal-zoom-in {
  0% { opacity: 0; transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1); }
}

/* TOASTS */
.toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translate(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2000;
  pointer-events: none;
}

.toast-message {
  pointer-events: auto;
  min-width: 280px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toast-slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.toast-success {
  border-left: 4px solid var(--color-success);
}
.toast-info {
  border-left: 4px solid var(--color-primary);
}
.toast-error {
  border-left: 4px solid var(--color-danger);
}

@keyframes toast-slide-in {
  0% { opacity: 0; transform: translate(-50%, 12px) scale(0.95); }
  100% { opacity: 1; transform: translate(0, 0) scale(1); }
}

/* RESPONSIVE LAYOUT */
@media (min-width: 990px) {
  .admin-workspace {
    grid-template-columns: 1.1fr 0.9fr;
    grid-template-rows: auto 1fr;
    min-height: 0;
  }
  .address-band {
    grid-row: 1 / span 2;
    height: 100%;
    overflow-y: auto;
  }
  .mail-client {
    grid-column: 2;
    height: 100%;
    min-height: 0;
  }
  .mail-workspace {
    flex-grow: 1;
    height: 100%;
    min-height: 0;
  }
  .history-container {
    max-height: none;
    flex-grow: 1;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: 100%;
    padding: 12px;
  }
  .top-band {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .status-strip {
    align-self: flex-start;
  }
  .top-actions {
    justify-content: space-between;
  }
  .address-input-row {
    flex-direction: column;
    align-items: stretch;
  }
  .qty-input-wrapper {
    width: 100%;
  }
  .address-actions {
    margin-left: 0;
    width: 100%;
  }
  .address-actions button {
    flex: 1;
    justify-content: center;
  }
  .address-at {
    display: none;
  }
  .compact-password {
    width: 100%;
  }
}
