/* ========================================
   MASTER MAIL - COMPACT LAYOUT
   ======================================== */

:root {
  --color-bg: #f6fbff;
  --color-primary: #82cfe2;
  --color-primary-dark: #4aa0ba;
  --color-accent: #181819;
  --color-surface: #ffffff;
  --color-muted: #6f7a87;
  --color-border: #d9e6ef;
  --color-success: #10b981;
  --color-error: #ef4444;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

[data-theme="dark"] {
  --color-bg: #0a0e13;
  --color-surface: #1a2332;
  --color-accent: #ffffff;
  --color-muted: #c5d0de;
  --color-border: #2d3748;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Cairo", "Poppins", system-ui, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-accent);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ========================================
   PROMO BANNER - POS ADVERTISEMENT
   ======================================== */
.promo-banner {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1001;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
  padding: 0.5rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  border-radius: 50px;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
  overflow: hidden;
}

.promo-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 3s infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes shimmer {
  0% { transform: translateX(0); }
  100% { transform: translateX(50%); }
}

.promo-banner__content {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  position: relative;
  z-index: 1;
}

.promo-banner__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.2);
  border-radius: 8px;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(255,255,255,0); }
}

.promo-banner__icon i {
  color: white;
  font-size: 0.9rem;
}

.promo-banner__text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.promo-banner__text .highlight {
  background: rgba(255,255,255,0.2);
  padding: 0.15rem 0.5rem;
  border-radius: 15px;
  font-size: 0.7rem;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.promo-banner__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: white;
  color: #764ba2;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  white-space: nowrap;
}

.promo-banner__cta:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.promo-banner__cta i {
  font-size: 0.7rem;
  transition: transform 0.3s ease;
}

[dir="ltr"] .promo-banner__cta:hover i {
  transform: translateX(3px);
}

[dir="rtl"] .promo-banner__cta:hover i {
  transform: translateX(-3px);
}

.promo-banner__close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 0.65rem;
  flex-shrink: 0;
}

.promo-banner__close:hover {
  background: rgba(255,255,255,0.4);
  transform: rotate(90deg);
}

/* Adjust header position when banner is visible */
body.has-promo-banner .site-header {
  top: 55px;
}

body.has-promo-banner .main-content {
  padding-top: 135px;
}

/* Hide banner when closed */
.promo-banner.hidden {
  display: none;
}

body:not(.has-promo-banner) .site-header {
  top: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .promo-banner {
    top: 0.5rem;
    padding: 0.4rem 0.8rem;
    gap: 0.5rem;
    max-width: calc(100% - 1rem);
    border-radius: 25px;
  }
  
  .promo-banner__icon {
    display: none;
  }
  
  .promo-banner__text {
    font-size: 0.7rem;
  }
  
  .promo-banner__text .highlight {
    font-size: 0.6rem;
    padding: 0.1rem 0.4rem;
  }
  
  .promo-banner__cta {
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
  }
  
  .promo-banner__close {
    width: 20px;
    height: 20px;
  }
  
  body.has-promo-banner .site-header {
    top: 45px;
  }
  
  body.has-promo-banner .main-content {
    padding-top: 125px;
  }
}

@media (max-width: 480px) {
  .promo-banner__text .highlight {
    display: none;
  }
  
  body.has-promo-banner .site-header {
    top: 40px;
  }
  
  body.has-promo-banner .main-content {
    padding-top: 120px;
  }
}

/* Page Wrapper */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========================================
   HEADER
   ======================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 3vw, 3rem);
  background: rgba(246, 251, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(130, 207, 226, 0.25);
}

[data-theme="dark"] .site-header {
  background: rgba(26, 31, 38, 0.95);
  border-bottom-color: rgba(130, 207, 226, 0.2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand__logo {
  width: clamp(120px, 15vw, 160px);
  height: auto;
  transition: all 0.3s ease;
  filter: drop-shadow(0 4px 12px rgba(130, 207, 226, 0.4));
}

.brand__logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 6px 20px rgba(130, 207, 226, 0.6));
}

[data-theme="dark"] .brand__logo {
  filter: drop-shadow(0 4px 12px rgba(130, 207, 226, 0.6));
}

[data-theme="dark"] .brand__logo:hover {
  filter: drop-shadow(0 6px 20px rgba(130, 207, 226, 0.8));
}

.brand__text {
  display: flex;
  flex-direction: column;
}

.brand__text strong {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
}

.brand__text small {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-muted);
}

/* Header Navigation - Hidden when promo banner is visible */
.header-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

body.has-promo-banner .header-nav {
  display: none;
}

.nav-link {
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.brand__text strong {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
}

.brand__text small {
  font-size: 0.75rem;
  color: var(--color-muted);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle,
.lang-toggle,
.user-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.theme-toggle:hover,
.lang-toggle:hover,
.user-btn:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.lang-toggle span {
  font-size: 0.85rem;
  font-weight: 600;
}

/* User Menu */
.user-menu {
  position: relative;
}

.user-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.user-btn:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  min-width: 250px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  overflow: hidden;
}

.user-menu.active .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown.logged-in {
  display: none;
}

.user-menu.logged-in .user-dropdown:not(.logged-in) {
  display: none;
}

.user-menu.logged-in .user-dropdown.logged-in {
  display: block;
}

.user-info {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(130, 207, 226, 0.05);
}

.user-info i {
  font-size: 1.8rem;
  color: var(--color-primary);
}

.user-info span {
  font-size: 0.85rem;
  color: var(--color-muted);
  word-break: break-all;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.9rem 1.2rem;
  color: var(--color-accent);
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.dropdown-item:hover {
  background: rgba(130, 207, 226, 0.1);
}

.dropdown-item i {
  width: 20px;
  color: var(--color-primary);
  font-size: 1rem;
}

/* ========================================
   MAIN CONTENT
   ======================================== */
.main-content {
  flex: 1;
  padding-top: 80px;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  padding: 6rem 2rem 4rem;
  text-align: center;
  background: radial-gradient(ellipse at top, rgba(130, 207, 226, 0.1) 0%, transparent 50%),
              linear-gradient(180deg, var(--color-bg) 0%, var(--color-surface) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(130, 207, 226, 0.03) 0%, transparent 50%);
  animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
}

[data-theme="dark"] .hero {
  background: radial-gradient(ellipse at top, rgba(130, 207, 226, 0.08) 0%, transparent 50%),
              linear-gradient(180deg, #0a0e13 0%, var(--color-surface) 100%);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 1.2rem;
  background: linear-gradient(135deg, rgba(130, 207, 226, 0.2), rgba(130, 207, 226, 0.05));
  border: 1px solid rgba(130, 207, 226, 0.3);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--color-primary);
  margin-bottom: 2rem;
  animation: fadeInUp 0.6s ease;
}

.badge-icon {
  font-size: 1rem;
}

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

.hero__content {
  max-width: 700px;
  margin: 0 auto 3rem;
  position: relative;
  z-index: 1;
}

.hero__title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.3;
  color: var(--color-accent);
  white-space: nowrap;
}

.hero__title .highlight {
  background: linear-gradient(135deg, var(--color-primary) 0%, #a8e6cf 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (max-width: 600px) {
  .hero__title {
    white-space: normal;
    font-size: 1.5rem;
  }
}

.hero__subtitle {
  font-size: 1.2rem;
  color: var(--color-muted);
  line-height: 1.9;
  max-width: 550px;
  margin: 0 auto;
}

.hero__features {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.hero-feature i {
  color: var(--color-primary);
  font-size: 1.1rem;
}

/* Hero Navigation Links */
.hero__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.hero-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 25px;
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.hero-nav-link:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(130, 207, 226, 0.3);
}

.hero-nav-link i {
  font-size: 0.9rem;
}

@media (max-width: 480px) {
  .hero__nav {
    gap: 0.8rem;
  }
  
  .hero-nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
}

/* Email Card */
.email-card {
  max-width: 580px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15),
              0 0 0 1px rgba(130, 207, 226, 0.1);
  position: relative;
  z-index: 1;
}

[data-theme="dark"] .email-card {
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4),
              0 0 0 1px rgba(130, 207, 226, 0.1);
}

.email-card__tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 1rem;
  background: transparent;
  border: none;
  color: var(--color-muted);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.tab-btn:hover {
  color: var(--color-primary);
  background: rgba(130, 207, 226, 0.05);
}

.tab-btn.active {
  color: var(--color-primary);
  background: rgba(130, 207, 226, 0.1);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), #a8e6cf);
}

.tab-btn i {
  font-size: 1rem;
}

.email-card__body {
  padding: 2rem;
}

.email-card__footer {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, rgba(130, 207, 226, 0.1), rgba(168, 230, 207, 0.1));
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.email-card__footer p {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin: 0 0 0.5rem 0;
}

.email-card__footer p:last-child {
  margin-bottom: 0;
}

.email-card__footer .warning-note {
  color: var(--color-error);
  font-size: 0.8rem;
  opacity: 0.9;
}

/* App Container - Side by Side Layout */
.app-container {
  display: flex;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  align-items: stretch;
  width: 100%;
}

.app-container .email-card {
  width: 500px;
  flex-shrink: 0;
}

.app-container .inbox-card {
  flex: 1;
  min-width: 0;
}

@media (max-width: 1024px) {
  .app-container {
    flex-direction: column;
  }
  
  .app-container .email-card {
    width: 100%;
  }
}

/* Inbox Card */
.inbox-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15),
              0 0 0 1px rgba(130, 207, 226, 0.1);
}

[data-theme="dark"] .inbox-card {
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4),
              0 0 0 1px rgba(130, 207, 226, 0.1);
}

.inbox-card .inbox-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  margin: 0;
}

.inbox-card .inbox-toolbar {
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--color-border);
}

.inbox-card .inbox-container {
  border: none;
  border-radius: 0;
  min-height: 250px;
  max-height: 350px;
  overflow-y: auto;
}

.inbox-card .inbox-footer {
  border: none;
  border-top: 1px solid var(--color-border);
  border-radius: 0;
}

.email-display {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 1.2rem;
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  direction: ltr;
  transition: border-color 0.3s ease;
}

.email-display:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(130, 207, 226, 0.1);
}

.email-display input {
  flex: 1;
  padding: 1rem 1.2rem;
  font-size: 1rem;
  font-family: inherit;
  background: transparent;
  border: none;
  color: var(--color-accent);
  text-align: center;
  direction: ltr;
  outline: none;
}

.email-display input::placeholder {
  color: var(--color-muted);
  opacity: 0.7;
}

.email-domain-display {
  padding: 1rem;
  background: rgba(130, 207, 226, 0.15);
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  border-right: 2px solid var(--color-border);
}

[dir="ltr"] .email-domain-display {
  border-right: none;
  border-left: 2px solid var(--color-border);
}

.email-actions-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-accent);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.action-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.action-btn.primary {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.action-btn.primary:hover {
  background: var(--color-primary);
  color: white;
}

.action-btn.gradient {
  background: linear-gradient(135deg, var(--color-primary), #a8e6cf);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(130, 207, 226, 0.3);
}

.action-btn.gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(130, 207, 226, 0.4);
}

.action-btn.success {
  background: linear-gradient(135deg, var(--color-success), #34d399);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.action-btn.success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.email-timer {
  margin-top: 1rem;
}

.timer-progress {
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.8rem;
}

.timer-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), #a8e6cf);
  border-radius: 2px;
  width: 100%;
  transition: width 1s linear;
}

.timer-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.timer-text i {
  color: var(--color-primary);
  animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

#timer {
  font-weight: 700;
  color: var(--color-primary);
  font-family: 'Poppins', monospace;
  font-size: 1.1rem;
}

/* ========================================
   INBOX SECTION
   ======================================== */
.inbox-section {
  /* Removed - now using inbox-card inside app-container */
}

.inbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.inbox-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}

.inbox-actions {
  display: flex;
  gap: 0.5rem;
  position: relative;
  z-index: 100;
}

.inbox-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-accent);
  cursor: pointer !important;
  pointer-events: auto !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  z-index: 100;
}

.inbox-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

/* Inbox Toolbar */
.inbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border-bottom: none;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: relative;
  z-index: 5;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 10;
}

.select-all-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.select-all-wrapper input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--color-primary);
}

.selected-count {
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 600;
}

.toolbar-actions {
  display: flex;
  gap: 0.5rem;
  transition: opacity 0.3s ease;
  position: relative;
  z-index: 10;
}

.toolbar-actions button {
  cursor: pointer !important;
  pointer-events: auto !important;
}

.toolbar-btn.filter-btn.active {
  background: var(--color-primary);
  color: var(--color-bg);
}

.toolbar-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  color: var(--color-accent);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.toolbar-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.toolbar-btn.danger:hover {
  background: var(--color-error);
  border-color: var(--color-error);
}

.toolbar-btn i {
  font-size: 0.9rem;
}

.inbox-container {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0;
  min-height: 300px;
  overflow: hidden;
}

/* Inbox Footer */
.inbox-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  position: relative;
  z-index: 100;
}

.inbox-footer span {
  font-size: 0.85rem;
  color: var(--color-muted);
}

.delete-all-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-error);
  border-radius: 8px;
  background: transparent;
  color: var(--color-error);
  font-size: 0.85rem;
  cursor: pointer !important;
  pointer-events: auto !important;
  transition: all 0.2s ease;
  font-family: inherit;
  position: relative;
  z-index: 100;
}

.delete-all-btn:hover {
  background: var(--color-error);
  color: white;
}

/* Empty State */
.inbox-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: var(--color-muted);
}

.inbox-empty i {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.inbox-empty p {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.inbox-empty span {
  font-size: 0.9rem;
}

/* Messages List */
.messages-list {
  display: none;
}

.messages-list.has-messages {
  display: block;
}

.message-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.message-item:hover {
  background: rgba(130, 207, 226, 0.08);
}

.message-item:last-child {
  border-bottom: none;
}

.message-item.unread {
  background: rgba(130, 207, 226, 0.05);
}

.message-item.unread::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60%;
  background: var(--color-primary);
  border-radius: 0 4px 4px 0;
}

[dir="ltr"] .message-item.unread::before {
  right: auto;
  left: 0;
  border-radius: 4px 0 0 4px;
}

.message-item.unread .message-subject {
  font-weight: 700;
}

.message-item.selected {
  background: rgba(130, 207, 226, 0.15);
}

.message-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--color-primary);
  flex-shrink: 0;
}

.message-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.message-item.unread .message-icon {
  box-shadow: 0 4px 15px rgba(130, 207, 226, 0.4);
}

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

.message-from {
  font-size: 0.85rem;
  color: var(--color-primary);
  margin-bottom: 0.2rem;
  font-weight: 500;
}

.message-subject {
  font-size: 0.95rem;
  color: var(--color-accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.2rem;
}

.message-preview {
  font-size: 0.8rem;
  color: var(--color-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
}

[dir="ltr"] .message-meta {
  align-items: flex-start;
}

.message-time {
  font-size: 0.75rem;
  color: var(--color-muted);
}

.message-badge {
  background: var(--color-primary);
  color: white;
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 8px;
  font-weight: 600;
}

.message-actions {
  display: flex;
  gap: 0.3rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.message-item:hover .message-actions {
  opacity: 1;
}

.msg-action-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: var(--color-bg);
  color: var(--color-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.msg-action-btn:hover {
  background: var(--color-primary);
  color: white;
}

.msg-action-btn.delete:hover {
  background: var(--color-error);
}

/* ========================================
   FEATURES SECTION
   ======================================== */
.features-section {
  padding: 4rem 2rem;
  background: var(--color-bg);
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.feature-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, rgba(130, 207, 226, 0.2), rgba(130, 207, 226, 0.05));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon i {
  font-size: 1.8rem;
  color: var(--color-primary);
}

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--color-muted);
}

/* ========================================
   HOW IT WORKS SECTION
   ======================================== */
.how-it-works-section {
  padding: 4rem 2rem;
  background: var(--color-surface);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.step-card {
  text-align: center;
  padding: 2rem;
}

.step-number {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--color-primary), #a8e6cf);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  box-shadow: 0 8px 25px rgba(130, 207, 226, 0.3);
}

.step-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--color-accent);
}

.step-card p {
  font-size: 0.95rem;
  color: var(--color-muted);
  line-height: 1.7;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
  border-top: 1px solid var(--color-border);
  padding: 0;
}

[data-theme="dark"] .site-footer {
  background: linear-gradient(180deg, var(--color-surface) 0%, #050709 100%);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 0;
}

.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 15px;
}

.footer-brand img {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(130, 207, 226, 0.2);
}

.footer-brand-text {
  display: flex;
  flex-direction: column;
}

.footer-brand-text strong {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-primary);
}

.footer-brand-text span {
  font-size: 0.85rem;
  color: var(--color-muted);
}

.footer-links {
  display: flex;
  gap: 4rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.footer-col a i {
  font-size: 0.85rem;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
}

.footer-bottom p {
  color: var(--color-muted);
  font-size: 0.85rem;
  margin: 0;
}

.footer-social {
  display: flex;
  gap: 0.8rem;
}

.social-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  transform: translateY(-3px);
}

@media (max-width: 768px) {
  .footer-main {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  
  .footer-brand {
    flex-direction: column;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 2rem;
  }
  
  .footer-col {
    align-items: center;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}


/* ========================================
   SEARCH & FILTER
   ======================================== */
.inbox-search {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.search-input-wrapper {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-input-wrapper i {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-muted);
}

[dir="ltr"] .search-input-wrapper i {
  right: auto;
  left: 1rem;
}

.search-input-wrapper input {
  width: 100%;
  padding: 0.8rem 1rem;
  padding-right: 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
  color: var(--color-accent);
  font-family: inherit;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

[dir="ltr"] .search-input-wrapper input {
  padding-right: 1rem;
  padding-left: 2.5rem;
}

.search-input-wrapper input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(130, 207, 226, 0.15);
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.6rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-muted);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.filter-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

/* ========================================
   RESPONSIVE INBOX
   ======================================== */
@media (max-width: 768px) {
  .inbox-toolbar {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  .toolbar-right {
    width: 100%;
    justify-content: space-between;
  }
  
  .toolbar-actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  .inbox-search {
    flex-direction: column;
  }
  
  .filter-buttons {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }
  
  .filter-btn {
    white-space: nowrap;
  }
  
  .message-item {
    padding: 0.8rem;
  }
  
  .message-icon {
    width: 38px;
    height: 38px;
    font-size: 0.9rem;
  }
  
  .message-actions {
    opacity: 1;
  }
  
  .message-preview {
    display: none;
  }
  
  .inbox-footer {
    flex-direction: column;
    gap: 0.8rem;
    text-align: center;
  }
  
  .delete-all-btn {
    width: 100%;
    justify-content: center;
  }
}


/* ========================================
   HEADER PROMO - POS ADVERTISEMENT (IN HEADER)
   ======================================== */
.header-promo {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 0.6rem 0.8rem 0.6rem 1.2rem;
  border-radius: 35px;
  box-shadow: 0 4px 25px rgba(102, 126, 234, 0.4);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.3s ease;
}

.header-promo:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 30px rgba(102, 126, 234, 0.5);
}

.header-promo::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 3s infinite;
}

.header-promo__content {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.header-promo__content i {
  font-size: 1.1rem;
}

.header-promo__badge {
  background: rgba(255,255,255,0.25);
  padding: 0.2rem 0.7rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 700;
}

.header-promo__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  color: #764ba2;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 700;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.header-promo:hover .header-promo__cta {
  background: #f0f0f0;
}

.header-promo__cta i {
  font-size: 0.75rem;
}

/* Responsive Header Promo */
@media (max-width: 900px) {
  .header-promo {
    padding: 0.5rem 0.6rem 0.5rem 1rem;
    gap: 0.8rem;
  }
  
  .header-promo__content {
    font-size: 0.85rem;
  }
  
  .header-promo__badge {
    display: none;
  }
}

@media (max-width: 600px) {
  .header-promo {
    padding: 0.4rem 0.5rem 0.4rem 0.8rem;
    gap: 0.6rem;
  }
  
  .header-promo__content {
    font-size: 0.75rem;
    gap: 0.4rem;
  }
  
  .header-promo__content i {
    font-size: 0.9rem;
  }
  
  .header-promo__content span:first-of-type {
    display: none;
  }
  
  .header-promo__cta {
    padding: 0.4rem 0.7rem;
    font-size: 0.75rem;
  }
}
