/* ================================================
   TEMPMAIL STYLE - AkbarStore Mail
   Dark Glassmorphism Theme
   ================================================ */

/* Import Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  color: #e2e8f0;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

/* ================================================
   ANIMATED BACKGROUND
   ================================================ */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.floating-shapes {
  position: relative;
  width: 100%;
  height: 100%;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  filter: blur(80px);
}

.shape-1 {
  width: 600px;
  height: 600px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  top: -200px;
  right: -200px;
  animation: floatShape1 20s ease-in-out infinite;
}

.shape-2 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #f093fb, #f5576c);
  bottom: -100px;
  left: -100px;
  animation: floatShape2 25s ease-in-out infinite;
}

.shape-3 {
  width: 350px;
  height: 350px;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: floatShape3 18s ease-in-out infinite;
}

@keyframes floatShape1 {
  0%, 100% { transform: translateY(0) translateX(0) rotate(0deg); }
  33% { transform: translateY(-40px) translateX(30px) rotate(120deg); }
  66% { transform: translateY(20px) translateX(-20px) rotate(240deg); }
}

@keyframes floatShape2 {
  0%, 100% { transform: translateY(0) translateX(0) rotate(0deg); }
  33% { transform: translateY(30px) translateX(-40px) rotate(-120deg); }
  66% { transform: translateY(-20px) translateX(30px) rotate(-240deg); }
}

@keyframes floatShape3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.2); }
}

/* ================================================
   INDEX / LANDING PAGE
   ================================================ */
body.email-page {
  background-image: url('https://wallpapers.com/images/featured/anime-scenery-ahd1eqpvwq8aoofp.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

body.email-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(14, 17, 26, 0.15);
  pointer-events: none;
  z-index: 0;
}

.main-container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.glass-card {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-header {
  text-align: center;
  padding: 40px 40px 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.logo-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.logo-icon svg {
  color: white;
}

.main-title {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.main-subtitle {
  color: #94a3b8;
  font-size: 0.95rem;
  font-weight: 400;
}

/* Features Box */
.features-box {
  margin: 0 30px;
  padding: 20px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 16px;
  margin-top: 20px;
}

.features-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.shield-icon {
  display: flex;
  align-items: center;
}

.features-title {
  color: #10b981;
  font-weight: 700;
  font-size: 0.95rem;
}

.features-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.features-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.check-icon {
  color: #10b981;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Email Form */
.email-form-section {
  padding: 30px;
}

.input-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.label-icon {
  font-size: 1.1rem;
}

.email-input-container {
  margin-bottom: 20px;
}

.email-input-simple {
  position: relative;
}

.input-field-wrapper {
  position: relative;
}

.input-field-wrapper.full-width {
  width: 100%;
}

.email-field {
  width: 100%;
  padding: 16px 20px;
  background: rgba(30, 41, 59, 0.8);
  border: 2px solid rgba(100, 116, 139, 0.3);
  border-radius: 14px;
  color: #f1f5f9;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s ease;
  outline: none;
}

.email-field::placeholder {
  color: #64748b;
}

.email-field:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
  background: rgba(30, 41, 59, 0.95);
}

/* Action Buttons */
.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-modern {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px 24px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-gradient {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
}

.btn-gradient:active {
  transform: translateY(0);
}

.btn-gradient:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Home Link */
.home-link-wrapper {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s;
}

.home-link:hover {
  color: #667eea;
}

/* Page Footer */
.page-footer {
  text-align: center;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

/* ================================================
   INBOX PAGE
   ================================================ */
body.inbox-page {
  background-image: url('https://wallpapers.com/images/featured/anime-scenery-ahd1eqpvwq8aoofp.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

body.inbox-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(14, 17, 26, 0.15);
  pointer-events: none;
  z-index: 0;
}

.inbox-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 30px 20px;
  display: flex;
  justify-content: center;
}

.inbox-container-modern {
  width: 100%;
  max-width: 900px;
  animation: fadeInUp 0.6s ease;
}

/* Inbox Header */
.inbox-header-modern {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 28px 32px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.inbox-title-section {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.inbox-icon-wrapper {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
  color: white;
}

.inbox-title-text h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #f1f5f9;
  margin-bottom: 8px;
}

.inbox-email-display {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.email-address-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.email-badge {
  background: rgba(102, 126, 234, 0.15);
  border: 1px solid rgba(102, 126, 234, 0.3);
  color: #93c5fd;
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.btn-copy-email {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-copy-email:hover {
  background: rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.4);
  color: #93c5fd;
}

.btn-copy-email.copied {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.copy-text {
  font-size: 0.8rem;
}

.permanent-badge-small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  color: #6ee7b7;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Inbox Actions */
.inbox-actions-modern {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-action:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #f1f5f9;
  transform: translateY(-1px);
}

.btn-test-sound {
  position: relative;
}

.btn-test-sound.sound-enabled {
  border-color: rgba(16, 185, 129, 0.3);
}

.sound-status {
  font-size: 0.9rem;
}

.btn-refresh svg {
  transition: transform 0.5s ease;
}

.btn-back, .btn-home {
  text-decoration: none;
}

/* Inbox Content */
.inbox-content {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  min-height: 400px;
  overflow: hidden;
}

/* Loading */
.loading-modern {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 20px;
  color: #94a3b8;
  font-size: 0.95rem;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(102, 126, 234, 0.2);
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state-modern {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 30px;
  text-align: center;
}

.empty-icon-wrapper {
  margin-bottom: 24px;
  opacity: 0.6;
}

.empty-state-modern h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 8px;
}

.empty-state-modern p {
  color: #94a3b8;
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.tips-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 14px;
  padding: 18px 22px;
  max-width: 420px;
  text-align: left;
}

.tips-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.tips-content {
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.tips-content strong {
  color: #93c5fd;
}

/* Email List */
.email-list-modern {
  padding: 8px;
}

.email-item-modern {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  margin: 4px 0;
  border-radius: 14px;
  transition: all 0.2s ease;
  cursor: pointer;
  animation: fadeInUp 0.4s ease both;
}

.email-item-modern:hover {
  background: rgba(255, 255, 255, 0.06);
}

.email-item-modern.unread {
  background: rgba(102, 126, 234, 0.08);
  border-left: 3px solid #667eea;
}

.email-item-modern.unread:hover {
  background: rgba(102, 126, 234, 0.12);
}

.email-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
}

.email-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.email-sender-modern {
  font-weight: 600;
  font-size: 0.95rem;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.email-subject-modern {
  font-size: 0.85rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-subject-modern .attachment-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 6px;
  font-weight: 600;
}

.email-meta-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.email-time-modern {
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
}

.email-status-modern {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-new {
  background: rgba(102, 126, 234, 0.2);
  color: #93c5fd;
}

.status-read {
  background: rgba(100, 116, 139, 0.15);
  color: #64748b;
}

/* ================================================
   DETAIL PAGE
   ================================================ */
body.detail-page {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}

body.detail-page::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
  animation: rotate 30s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

body.detail-page::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.15) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.detail-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 30px 20px;
  display: flex;
  justify-content: center;
}

.detail-container-modern {
  width: 100%;
  max-width: 900px;
  animation: fadeInUp 0.6s ease;
}

/* Detail Header */
.detail-header-modern {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 24px 32px;
  margin-bottom: 20px;
}

.detail-nav-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.3s;
  text-decoration: none;
}

.btn-back:hover {
  color: #667eea;
}

.btn-delete {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 10px;
  color: #f87171;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-delete:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

.btn-delete:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.detail-title-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.detail-icon-wrapper {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
  color: white;
}

.detail-title-text h1 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #f1f5f9;
  margin-bottom: 6px;
}

.email-badge-small {
  background: rgba(102, 126, 234, 0.15);
  border: 1px solid rgba(102, 126, 234, 0.3);
  color: #93c5fd;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Detail Content */
.detail-content-modern {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
}

.email-detail-card {
  padding: 0;
}

/* Email Header Detail */
.email-header-detail {
  padding: 30px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.email-subject-detail h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 24px;
  line-height: 1.4;
}

.email-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.email-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-label svg {
  color: #667eea;
}

.meta-value {
  color: #cbd5e1;
  font-size: 0.95rem;
  font-weight: 500;
  word-break: break-word;
}

/* Email Body Detail */
.email-body-detail {
  padding: 32px;
}

.email-content-wrapper-detail {
  border-radius: 12px;
  overflow: hidden;
}

.email-content-iframe-detail {
  width: 100%;
  min-height: 400px;
  border: none;
  border-radius: 12px;
  background: #1e293b;
}

.email-content-text-detail {
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.7;
  padding: 24px;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.email-content-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 20px;
  color: #64748b;
  text-align: center;
}

.email-content-empty svg {
  opacity: 0.4;
}

.email-view-toggle {
  margin-top: 16px;
  text-align: center;
}

.btn-toggle-html {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-toggle-html:hover {
  background: rgba(102, 126, 234, 0.15);
  border-color: rgba(102, 126, 234, 0.3);
  color: #93c5fd;
}

/* Attachments */
.email-attachments-section {
  padding: 24px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.attachments-header {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e2e8f0;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 16px;
}

.attachments-header svg {
  color: #667eea;
}

.attachments-grid-detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.attachment-item-detail {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  transition: background 0.2s;
}

.attachment-item-detail:hover {
  background: rgba(30, 41, 59, 0.8);
}

.attachment-icon {
  font-size: 1.4rem;
}

.attachment-info {
  flex: 1;
  min-width: 0;
}

.attachment-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-meta {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 2px;
}

.attachment-actions {
  display: flex;
  gap: 8px;
}

.btn-preview-attachment,
.btn-download-attachment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s;
}

.btn-preview-attachment {
  background: rgba(102, 126, 234, 0.15);
  color: #93c5fd;
}

.btn-preview-attachment:hover {
  background: rgba(102, 126, 234, 0.25);
}

.btn-download-attachment {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}

.btn-download-attachment:hover {
  background: rgba(16, 185, 129, 0.25);
}

/* Image Preview Modal */
.image-preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  cursor: pointer;
}

.image-preview-content {
  position: relative;
  z-index: 1;
  max-width: 90%;
  max-height: 90%;
  background: #1e293b;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.image-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  font-size: 0.9rem;
  font-weight: 600;
}

.btn-close-preview {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  transition: color 0.3s;
}

.btn-close-preview:hover {
  color: #f87171;
}

.image-preview-body {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-preview-body img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 8px;
}

/* Error Message */
.error-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 60px 30px;
  text-align: center;
  color: #94a3b8;
}

.error-message h3 {
  color: #f87171;
  font-size: 1.2rem;
}

.error-message .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
}

.error-message .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

/* Loading Spinner in Detail */
.email-detail-card .loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 60px 20px;
  color: #94a3b8;
}

.email-detail-card .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(102, 126, 234, 0.2);
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ================================================
   NOTIFICATION TOAST
   ================================================ */
.notification-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  padding: 14px 24px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10001;
  animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
  max-width: 90%;
}

.notification-toast.success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.notification-toast.error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.notification-toast.info {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

@keyframes slideDown {
  to { transform: translateX(-50%) translateY(0); }
}

@keyframes slideUp {
  to { transform: translateX(-50%) translateY(-100px); opacity: 0; }
}

/* ================================================
   ANIMATIONS
   ================================================ */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.spin {
  animation: spin 1s linear infinite;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 768px) {
  .inbox-header-modern {
    flex-direction: column;
    padding: 20px;
  }

  .inbox-actions-modern {
    width: 100%;
    justify-content: flex-start;
  }

  .inbox-title-section {
    flex-direction: column;
    align-items: flex-start;
  }

  .inbox-email-display {
    flex-direction: column;
    align-items: flex-start;
  }

  .email-meta-grid {
    grid-template-columns: 1fr;
  }

  .email-item-modern {
    padding: 12px 14px;
    gap: 12px;
  }

  .email-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 0.95rem;
    border-radius: 10px;
  }

  .detail-header-modern {
    padding: 20px;
  }

  .detail-nav-section {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .email-header-detail {
    padding: 20px;
  }

  .email-body-detail {
    padding: 20px;
  }

  .email-attachments-section {
    padding: 20px;
  }

  .features-list {
    grid-template-columns: 1fr;
  }

  .glass-card {
    border-radius: 18px;
  }

  .card-header {
    padding: 30px 24px 24px;
  }

  .email-form-section {
    padding: 24px;
  }

  .features-box {
    margin: 0 20px;
    margin-top: 16px;
  }

  .btn-action span:not(.sound-status) {
    display: none;
  }

  .attachment-actions {
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .inbox-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .inbox-title-text h1 {
    font-size: 1.3rem;
  }

  .email-sender-modern {
    font-size: 0.88rem;
  }

  .email-subject-modern {
    font-size: 0.8rem;
  }
}

/* ================================================
   SCROLLBAR STYLE
   ================================================ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.3);
}

::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.5);
}
