/* ═══════════════════════════════════════════════════════
   STORAGE HUB — Dark Mode Glassmorphism Design
   ═══════════════════════════════════════════════════════ */

/* === Reset & Variables === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #06060f;
  --bg-secondary: #0d0d1a;
  --bg-card: rgba(15, 15, 35, 0.6);
  --bg-card-hover: rgba(20, 20, 50, 0.7);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-2: rgba(255, 255, 255, 0.06);
  --bg-input: rgba(255, 255, 255, 0.05);

  --border-color: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(139, 92, 246, 0.3);

  --text-primary: #e8e8f0;
  --text-secondary: #9898b0;
  --text-muted: #5e5e78;

  --accent-purple: #8b5cf6;
  --accent-purple-glow: rgba(139, 92, 246, 0.2);
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.2);
  --accent-green: #10b981;
  --accent-orange: #f59e0b;
  --accent-red: #ef4444;
  --accent-pink: #ec4899;

  --gradient-primary: linear-gradient(135deg, #8b5cf6, #06b6d4);
  --gradient-card: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(6, 182, 212, 0.04));
  --gradient-bg: radial-gradient(ellipse at 20% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(236, 72, 153, 0.04) 0%, transparent 50%);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--gradient-bg);
  pointer-events: none;
  z-index: 0;
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* === Header === */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 6, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  color: white;
  box-shadow: var(--shadow-glow);
}

.logo h1 {
  font-size: 1.35rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: var(--transition-normal);
  min-width: 240px;
}

.search-box:focus-within {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px var(--accent-purple-glow);
}

.search-box svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: var(--font-family);
  width: 100%;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

/* === Tab Navigation === */
.tab-nav {
  position: sticky;
  top: 77px;
  z-index: 90;
  background: rgba(6, 6, 15, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.tab-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  gap: 4px;
  position: relative;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-family);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-normal);
  position: relative;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-secondary);
}

.tab-btn.active {
  color: var(--accent-purple);
}

.tab-btn.active svg {
  filter: drop-shadow(0 0 6px var(--accent-purple-glow));
}

.tab-indicator {
  position: absolute;
  bottom: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px 2px 0 0;
  transition: var(--transition-slow);
  box-shadow: 0 0 8px var(--accent-purple-glow);
}

/* === Main Content === */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px;
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 180px);
}

.tab-content {
  display: none;
  animation: fadeSlideIn 0.35s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Tab Header === */
.tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.tab-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.tab-title h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.item-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 4px 10px;
  background: var(--bg-glass-2);
  border-radius: 20px;
}

.tab-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* === Filter Select === */
.filter-select {
  padding: 8px 32px 8px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239898b0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: var(--transition-normal);
}

.filter-select:focus {
  border-color: var(--accent-purple);
}

.filter-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-sm), 0 0 12px var(--accent-purple-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md), 0 0 20px var(--accent-purple-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-glass-2);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-icon {
  padding: 8px;
  background: var(--bg-glass-2);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
}

.btn-icon:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

/* === Cards Grid === */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

/* === Card === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition-normal);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.3), rgba(6, 182, 212, 0.2), transparent);
  opacity: 0;
  transition: var(--transition-normal);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(139, 92, 246, 0.15);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.card:hover::before {
  opacity: 1;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.card-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  opacity: 0;
  transition: var(--transition-fast);
}

.card:hover .card-actions {
  opacity: 1;
}

.card-action-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass-2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.card-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.card-action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--accent-red);
  border-color: rgba(239, 68, 68, 0.3);
}

.card-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag-active {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.tag-pending {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-orange);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.tag-completed {
  background: rgba(139, 92, 246, 0.12);
  color: var(--accent-purple);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.tag-language {
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.card-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}

.card-files {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* === Empty State === */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  gap: 16px;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* === Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-lg {
  max-width: 800px;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 0;
}

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass-2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  border-color: rgba(239, 68, 68, 0.3);
}

.modal-body {
  padding: 24px 28px 28px;
}

/* === Form Elements === */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-normal);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px var(--accent-purple-glow);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239898b0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

.form-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* === File Upload === */
.file-drop-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-normal);
  position: relative;
}

.file-drop-zone:hover,
.file-drop-zone.dragover {
  border-color: var(--accent-purple);
  background: var(--accent-purple-glow);
}

.file-drop-zone svg {
  color: var(--text-muted);
  margin-bottom: 8px;
}

.file-drop-zone p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.file-drop-zone p span {
  color: var(--accent-purple);
  text-decoration: underline;
  cursor: pointer;
}

.file-drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-glass-2);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}

.file-item-name {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-item-remove {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.file-item-remove:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--accent-red);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 28px;
}

/* === TempMail Layout === */
.tempmail-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  min-height: calc(100vh - 280px);
}

.tempmail-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tempmail-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tempmail-sidebar-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.tempmail-addresses {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.tempmail-addr-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  gap: 8px;
}

.tempmail-addr-item:hover {
  background: var(--bg-glass-2);
}

.tempmail-addr-item.active {
  background: var(--accent-purple-glow);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.tempmail-addr-info {
  flex: 1;
  min-width: 0;
}

.tempmail-addr-email {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tempmail-addr-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tempmail-addr-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  opacity: 0;
  transition: var(--transition-fast);
}

.tempmail-addr-item:hover .tempmail-addr-actions {
  opacity: 1;
}

.unread-badge {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-purple);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

.tempmail-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tempmail-inbox {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex: 1;
  overflow-y: auto;
}

.inbox-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inbox-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.inbox-email-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-fast);
  gap: 16px;
}

.inbox-email-item:last-child {
  border-bottom: none;
}

.inbox-email-item:hover {
  background: var(--bg-glass-2);
}

.inbox-email-item.unread {
  background: rgba(139, 92, 246, 0.04);
}

.inbox-email-item.unread .inbox-email-subject {
  font-weight: 600;
  color: var(--text-primary);
}

.inbox-email-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-purple);
  flex-shrink: 0;
  opacity: 0;
}

.inbox-email-item.unread .inbox-email-dot {
  opacity: 1;
}

.inbox-email-content {
  flex: 1;
  min-width: 0;
}

.inbox-email-from {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.inbox-email-subject {
  font-size: 0.9rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-email-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.tempmail-viewer {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 28px;
}

.email-detail-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.email-detail-subject {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.email-detail-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.email-detail-body {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.email-detail-body a {
  color: var(--accent-cyan);
}

/* === Detail View (inside detail modal) === */
.detail-section {
  margin-bottom: 24px;
}

.detail-section:last-child {
  margin-bottom: 0;
}

.detail-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.detail-value {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.6;
}

.detail-value pre {
  background: var(--bg-glass-2);
  padding: 16px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-tag {
  padding: 4px 12px;
  background: var(--bg-glass-2);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* === Toast === */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease forwards;
  animation-delay: 0s, 2.7s;
  min-width: 280px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.toast.toast-success {
  border-left: 3px solid var(--accent-green);
}

.toast.toast-error {
  border-left: 3px solid var(--accent-red);
}

.toast.toast-info {
  border-left: 3px solid var(--accent-cyan);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(40px);
  }
}

/* === Responsive === */
@media (max-width: 1024px) {
  .tempmail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 12px 16px;
  }

  .search-box {
    min-width: 160px;
  }

  .tab-nav-inner {
    padding: 0 16px;
    overflow-x: auto;
  }

  .tab-btn {
    padding: 12px 16px;
    font-size: 0.82rem;
  }

  .main-content {
    padding: 20px 16px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .tab-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal {
    max-height: 95vh;
  }

  .modal-body {
    padding: 20px;
  }
}

/* === Utilities === */
.text-muted {
  color: var(--text-muted);
}

.text-center {
  text-align: center;
}

.mt-16 {
  margin-top: 16px;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-glass-2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-family: var(--font-family);
  cursor: pointer;
  transition: var(--transition-fast);
}

.copy-btn:hover {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple);
  border-color: rgba(139, 92, 246, 0.3);
}

/* Loading spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Confirm dialog */
.confirm-dialog {
  text-align: center;
  padding: 12px 0;
}

.confirm-dialog p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.confirm-dialog .form-actions {
  justify-content: center;
}

/* === Earnings Recap === */
.earnings-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.earnings-total-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.earnings-total-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
}

.earnings-total-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.earnings-total-amounts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.earnings-amount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}

.earnings-currency {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-glass-2);
  padding: 3px 10px;
  border-radius: 20px;
}

.earnings-value {
  font-size: 1.3rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.earnings-project-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.earnings-project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.earnings-project-row:last-child {
  border-bottom: none;
}

.earnings-project-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
}

.earnings-project-amounts {
  font-size: 0.82rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Earnings Table */
.earnings-table-wrap {
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
}

.earnings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.earnings-table thead th {
  padding: 14px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
}

.earnings-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  vertical-align: middle;
}

.earnings-table tbody tr:hover {
  background: rgba(139, 92, 246, 0.04);
}

.earnings-table tbody tr:last-child td {
  border-bottom: none;
}

.earnings-date {
  color: var(--text-muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.earnings-amt {
  font-weight: 600;
  color: var(--accent-green);
}

.tag-airdrop {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.tag-script {
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.tag-trading {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-orange);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.tag-staking {
  background: rgba(139, 92, 246, 0.12);
  color: var(--accent-purple);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.tag-other {
  background: rgba(236, 72, 153, 0.12);
  color: var(--accent-pink);
  border: 1px solid rgba(236, 72, 153, 0.2);
}

@media (max-width: 768px) {
  .earnings-summary {
    grid-template-columns: 1fr;
  }
}