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

:root {
  --primary: #7c3aed;
  --primary-dark: #6d28d9;
  --secondary: #ec4899;
  --success: #10b981;
  --danger: #ef4444;
  --bg: #f8fafc;
  --bg-dark: #0f172a;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-light: #64748b;
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ==================== MODAL STYLES ==================== */

.modal {
  display: flex;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.modal-content {
  background: white;
  padding: 32px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease-out;
  max-width: 380px;
  width: 90%;
  pointer-events: auto;
}

.login-modal {
  max-width: 340px;
  padding: 40px 32px;
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-header h1 {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 4px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.login-header .subtitle {
  color: var(--text-light);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-input {
  font-size: 1.2rem;
  text-align: center;
  letter-spacing: 6px;
  font-weight: 600;
  font-family: 'Monaco', 'Menlo', monospace;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
}

.modal-header h2 {
  color: var(--text);
  font-size: 1.3rem;
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text-light);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.close-btn:hover {
  background: var(--bg);
  color: var(--text);
}

/* ==================== LAYOUT ==================== */

.app-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: white;
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
}

.logo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.logo h1 {
  font-size: 1.4rem;
  color: var(--primary);
  font-weight: 700;
  margin: 0;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: var(--bg);
  color: var(--text);
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s;
  text-align: left;
  width: 100%;
}

.nav-item:hover {
  background: var(--bg);
  color: var(--text);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
}

.nav-item svg {
  flex-shrink: 0;
}

.main-content {
  margin-left: 240px;
  flex: 1;
  padding: 32px;
  max-width: 900px;
  margin-right: auto;
}

/* ==================== CONTENT SECTIONS ==================== */

.content-section {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.content-section.active {
  display: block;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
}

.section-header h2 {
  font-size: 1.8rem;
  margin-bottom: 0;
  color: var(--text);
}

.section-header .helper-text {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ==================== BUTTONS ==================== */

.btn {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  pointer-events: auto;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(124, 58, 237, 0.4);
}

.btn-secondary {
  background: var(--border);
  color: var(--text);
}

.btn-secondary:hover:not(:disabled) {
  background: #cbd5e1;
}

.btn-large {
  padding: 14px 24px;
  font-size: 1rem;
  width: 100%;
  justify-content: center;
  border-radius: 10px;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

/* ==================== INPUT FIELDS ==================== */

.input-field {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.2s;
  font-family: inherit;
}

.input-field:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.input-field::placeholder {
  color: var(--text-light);
}

.helper-text {
  display: block;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 6px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.form-group label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

/* ==================== EMAIL CARD ==================== */

.email-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-top: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.email-card.hidden {
  display: none;
}

.email-header {
  font-size: 0.85rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  font-weight: 600;
}

.email-value {
  font-size: 1.3rem;
  font-family: 'Monaco', monospace;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 16px;
  word-break: break-all;
  background: var(--bg);
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.expiry-info {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.expiry-info span {
  font-size: 0.9rem;
  color: var(--text-light);
  display: block;
  margin-bottom: 10px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  width: 100%;
  transition: width 0.1s linear;
}

/* ==================== EMAIL LIST ==================== */

.emails-grid {
  display: grid;
  gap: 12px;
}

.email-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}

.email-item:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.1);
}

.email-item.locked {
  border-color: var(--secondary);
  background: rgba(236, 72, 153, 0.02);
}

.email-item.locked:hover {
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.15);
}

.status-locked {
  color: var(--secondary);
  font-weight: 600;
}

.email-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.email-item-actions {
  display: flex;
  gap: 8px;
}

.email-item-copy,
.email-item-lock {
  padding: 6px 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.email-item-copy:hover,
.email-item-lock:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(124, 58, 237, 0.3);
}

.email-item-lock.btn-locked {
  background: var(--secondary);
}

.email-item-lock.btn-locked:hover {
  background: #d6327c;
}

.email-item-expires {
  font-size: 0.8rem;
  color: var(--text-light);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ==================== MESSAGES ==================== */

.error-message {
  color: var(--danger);
  font-size: 0.9rem;
  padding: 10px 12px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 6px;
  border-left: 3px solid var(--danger);
  display: none;
  margin-top: 12px;
}

.error-message.show {
  display: block;
}

.success-message {
  color: var(--success);
  font-size: 0.9rem;
  padding: 10px 12px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 6px;
  border-left: 3px solid var(--success);
  display: none;
  margin-top: 12px;
}

.success-message.show {
  display: block;
}

/* ==================== MODAL BUTTONS ==================== */

.modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

/* ==================== ANIMATIONS ==================== */

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

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

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
  .sidebar {
    width: 60px;
    padding: 16px 8px;
  }

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

  .logo h1 {
    font-size: 1.1rem;
  }

  .nav-item {
    padding: 10px;
    gap: 0;
    justify-content: center;
  }

  .nav-item svg {
    margin: 0;
  }

  .main-content {
    margin-left: 60px;
    padding: 20px;
  }

  .modal-content {
    max-width: 90vw;
  }

  .section-header {
    flex-direction: column;
  }

  .email-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .sidebar {
    width: 50px;
  }

  .main-content {
    margin-left: 50px;
    padding: 16px;
  }

  .section-header h2 {
    font-size: 1.4rem;
  }

  .email-value {
    font-size: 1rem;
  }

  .modal-content {
    padding: 24px;
    border-radius: 10px;
  }
}



