/* CSS Variables for design system */
:root {
  --bg-color: #0b0c10;
  --panel-bg: rgba(22, 24, 37, 0.6);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(236, 72, 153, 0.15);
  
  --primary-glow: #9d4edd;
  --secondary-glow: #ec4899;
  
  --text-main: #f8f9fa;
  --text-muted: #94a3b8;
  
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.15);
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.15);
  --warning: #f59e0b;
  --warning-glow: rgba(245, 158, 11, 0.15);
  
  --font-family: 'Inter', sans-serif;
  --font-display: 'Outfit', sans-serif;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-x: hidden;
  position: relative;
}

/* Dynamic Gradient Background Glows */
.background-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
  animation: float 20s infinite alternate ease-in-out;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: var(--primary-glow);
  top: -10%;
  left: -10%;
}

.orb-2 {
  width: 600px;
  height: 600px;
  background: var(--secondary-glow);
  bottom: -15%;
  right: -10%;
  animation-delay: -5s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(80px, 50px) scale(1.15);
  }
}

/* Core Container */
.app-container {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Glassmorphism Card Style */
.glass-card {
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: var(--border-glow);
}

/* AUTHENTICATION VIEW */
.auth-card {
  width: 100%;
  max-width: 450px;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.5s ease-out;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.gradient-text {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #c084fc, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.auth-form h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

/* Input Fields */
.input-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-group label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

input[type="email"],
input[type="password"],
input[type="tel"],
input[type="text"],
input[type="datetime-local"],
select,
textarea {
  background: rgba(10, 10, 15, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary-glow);
  box-shadow: 0 0 10px rgba(157, 77, 221, 0.2);
}

/* Buttons */
.glow-btn {
  background: linear-gradient(135deg, var(--primary-glow), var(--secondary-glow));
  border: none;
  border-radius: 8px;
  color: #fff;
  padding: 0.9rem 1.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
  transition: all 0.2s ease;
  display: inline-block;
  text-align: center;
}

.glow-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.5);
}

.glow-btn:active {
  transform: translateY(0);
}

.glow-btn.secondary-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

.glow-btn.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05);
}

.text-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.text-btn:hover {
  color: var(--text-main);
}

.small-text-btn {
  background: transparent;
  border: none;
  color: var(--primary-glow);
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.2s;
}

.small-text-btn:hover {
  opacity: 0.8;
}

/* Auth helpers */
.toggle-text {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
}

.toggle-text a {
  color: var(--secondary-glow);
  text-decoration: none;
  font-weight: 600;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  margin: 1.5rem 0;
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.auth-divider span {
  padding: 0 10px;
}

.google-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-main);
  padding: 0.8rem;
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: background 0.2s;
}

.google-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* DASHBOARD VIEW */
.dashboard-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  animation: fadeIn 0.4s ease-out;
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* Top Navbar */
.navbar {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

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

.logo-icon {
  font-size: 1.5rem;
}

.nav-brand h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  background: linear-gradient(135deg, #c084fc, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

#user-email-display {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.signout-btn {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.signout-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
}

/* Panel Layout Cards */
.dashboard-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.panel-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.panel-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  border-left: 3px solid var(--secondary-glow);
  padding-left: 0.75rem;
}

.panel-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: -0.5rem;
}

/* 1. Phone Verification UI details */
.verify-form-container {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  padding: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.05);
}

.inline-input-group {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 480px) {
  .inline-input-group {
    grid-template-columns: 1fr;
  }
}

#verify-request-box .glow-btn {
  width: 100%;
  padding: 0.75rem;
}

/* OTP Code Box Grid */
.otp-boxes-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.otp-digit {
  width: 100%;
  height: 48px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-display);
  border-radius: 8px;
  background: rgba(10, 10, 15, 0.8);
}

.otp-timer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.otp-timer span {
  color: var(--secondary-glow);
  font-weight: 600;
}

.otp-action-row {
  display: flex;
  gap: 1rem;
}

.otp-action-row .glow-btn {
  flex: 1;
  padding: 0.75rem;
}

/* Lists */
.verified-list-container h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
}

.styled-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
}

.styled-list li {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.empty-list-msg {
  color: var(--text-muted);
  font-style: italic;
  justify-content: center !important;
  font-size: 0.85rem !important;
  border: 1px dashed rgba(255, 255, 255, 0.05) !important;
  background: transparent !important;
  padding: 1rem !important;
}

.number-tag {
  background: rgba(157, 77, 221, 0.15);
  border: 1px solid rgba(157, 77, 221, 0.3);
  color: #d8b4fe;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-left: 0.5rem;
}

.delete-item-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  transition: color 0.2s;
}

.delete-item-btn:hover {
  color: var(--danger);
}

/* 2. Create Voice Reminder Form details */
.type-toggle-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.25rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
}

.type-toggle-container.three-way {
  grid-template-columns: repeat(3, 1fr);
}

/* Voice Recording Panel */
.record-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: rgba(10, 10, 15, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-top: 0.5rem;
}

.record-status-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.record-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #4b5563; /* grey when idle */
  transition: all 0.3s ease;
}

.record-indicator.recording {
  background: #ef4444; /* red */
  box-shadow: 0 0 12px #ef4444;
  animation: pulseRed 1s infinite alternate;
}

.record-indicator.has-recording {
  background: #10b981; /* green */
  box-shadow: 0 0 10px #10b981;
}

#record-timer {
  font-family: monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.05em;
}

.record-controls-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
}

.record-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.record-action-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
}

.record-action-btn.start-btn {
  border-color: rgba(236, 72, 153, 0.4);
  box-shadow: 0 2px 10px rgba(236, 72, 153, 0.1);
}

.record-action-btn.start-btn:hover {
  border-color: var(--primary-glow);
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.25);
  background: rgba(236, 72, 153, 0.08);
}

.record-action-btn.stop-btn {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.1);
}

.record-action-btn.stop-btn:hover {
  border-color: #ef4444;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.08);
}

.record-action-btn.play-btn {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.1);
}

.record-action-btn.play-btn:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.08);
}

.audio-player {
  width: 100%;
  max-width: 320px;
  height: 40px;
  outline: none;
  background: transparent;
  margin-top: 0.5rem;
}

@keyframes pulseRed {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

.toggle-btn {
  background: transparent;
  border: none;
  padding: 0.6rem;
  color: var(--text-muted);
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-btn.active {
  background: var(--panel-bg);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.char-counter {
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* MP3 upload box */
.upload-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0,0,0,0.1);
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--secondary-glow);
  background: rgba(236, 72, 153, 0.05);
}

.upload-icon {
  font-size: 1.75rem;
}

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

.upload-link {
  color: var(--secondary-glow);
  font-weight: 600;
  text-decoration: underline;
}

.upload-dropzone input[type="file"] {
  display: none;
}

.selected-file-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(236, 72, 153, 0.1);
  border: 1px solid rgba(236, 72, 153, 0.2);
  border-radius: 6px;
  padding: 0.5rem 0.8rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.remove-file-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.remove-file-btn:hover {
  color: var(--danger);
}

/* Presets */
.presets-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-muted);
  padding: 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.preset-btn:hover {
  background: rgba(157, 77, 221, 0.1);
  border-color: var(--primary-glow);
  color: var(--text-main);
}

.submit-btn {
  width: 100%;
}

/* Templates grid details */
.inline-template-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.inline-template-form input[type="text"] {
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
}

#template-name-input {
  flex: 1;
}

#template-text-input {
  flex: 2;
}

.plus-btn {
  padding: 0 1rem;
  font-size: 1.2rem;
  box-shadow: none;
}

.templates-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  max-height: 180px;
  overflow-y: auto;
  padding: 2px;
}

.template-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.65rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
  cursor: pointer;
}

.template-card:hover {
  background: rgba(157, 77, 221, 0.05);
  border-color: rgba(157, 77, 221, 0.3);
}

.template-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  text-align: left;
}

.template-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-main);
}

.template-content {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

/* Logs and filter */
.logs-panel {
  flex: 1;
}

.logs-filter-row {
  display: flex;
  gap: 0.5rem;
  background: rgba(0,0,0,0.15);
  padding: 0.25rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.filter-tab {
  background: transparent;
  border: none;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  flex: 1;
  font-family: var(--font-display);
  font-weight: 500;
  transition: all 0.2s;
}

.filter-tab.active {
  background: var(--panel-bg);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.logs-container {
  flex: 1;
  overflow-y: auto;
  max-height: 350px;
  padding-right: 5px;
}

.log-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.log-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.log-body {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(0,0,0,0.1);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  width: 100%;
  border-left: 2px solid var(--primary-glow);
}

.log-phone-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.status-badge {
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.pending {
  background: var(--warning-glow);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge.completed {
  background: var(--success-glow);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.failed {
  background: var(--danger-glow);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-badge.cancelled {
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.cancel-reminder-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.cancel-reminder-btn:hover {
  background: var(--danger-glow);
  color: var(--danger);
  border-color: var(--danger);
}

/* Helpers */
.hidden {
  display: none !important;
}

.gradient-text-btn {
  background: linear-gradient(135deg, var(--primary-glow), var(--secondary-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Footer styling */
.app-footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  border-top: 1px solid var(--border-color);
  background: rgba(0,0,0,0.2);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Billing & Subscription UI Styles --- */
.user-billing-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-right: 1rem;
}

.badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  text-transform: uppercase;
}

.free-badge {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.basic-badge {
  background: rgba(124, 58, 237, 0.2);
  color: #a78bfa;
  border: 1px solid rgba(124, 58, 237, 0.4);
}

.premium-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.usage-text {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  white-space: nowrap;
}

.billing-action-btn {
  background: linear-gradient(135deg, var(--primary-glow), var(--secondary-glow));
  color: #fff;
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  margin-right: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.2);
}

.billing-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal.hidden {
  display: none !important;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 800px;
  padding: 2.5rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.close-modal:hover {
  color: #fff;
}

.modal-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

/* Plans Container */
.plans-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

@media (max-width: 640px) {
  .plans-container {
    grid-template-columns: 1fr;
  }
}

.plan-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 2rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.plan-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.plan-card h3 {
  font-size: 1.25rem;
  font-family: var(--font-display);
  margin-bottom: 0.5rem;
}

.plan-card .price {
  font-size: 2.5rem;
  font-weight: 800;
  font-family: var(--font-display);
  margin-bottom: 1.5rem;
  color: #fff;
}

.plan-card .price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}

.plan-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
  flex: 1;
}

.plan-card ul li {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.plan-card .upgrade-action-btn {
  width: 100%;
  padding: 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Highlight Premium / Popular plan */
.plan-card.popular {
  border: 1px solid rgba(220, 38, 38, 0.3);
  position: relative;
}

.plan-card.popular::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  border: 2px solid transparent;
  background: linear-gradient(135deg, var(--primary-glow), var(--secondary-glow)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  pointer-events: none;
}

.popular-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: linear-gradient(135deg, var(--primary-glow), var(--secondary-glow));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  text-transform: uppercase;
}

/* Animations */
.animate-zoom {
  animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- Welcome Landing Page Styles --- */
.landing-container {
  width: 100%;
  padding-bottom: 4rem;
  animation: fadeIn 0.6s ease-out;
}

.landing-container.hidden {
  display: none !important;
}

.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 1.5rem auto;
  padding: 0.8rem 2rem;
  border-radius: 50px;
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.landing-nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.landing-nav-links a:hover {
  color: #fff;
}

.landing-hero {
  max-width: 850px;
  margin: 6rem auto 4rem auto;
  text-align: center;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 850;
  line-height: 1.2;
  color: #fff;
  letter-spacing: -0.02em;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 650px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1rem;
}

.secondary-cta-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-light);
  border-radius: 8px;
  padding: 0.9rem 1.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.secondary-cta-btn:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

/* Features Section */
.features-section {
  max-width: 1100px;
  margin: 4rem auto;
  padding: 4rem 1.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: -2.5rem;
  margin-bottom: 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.feature-card {
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  background: rgba(255, 255, 255, 0.01);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.03);
}

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Pricing Section */
.pricing-section {
  max-width: 1100px;
  margin: 2rem auto 4rem auto;
  padding: 0 1.5rem;
}

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

.pricing-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.pricing-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.03);
}

.pricing-card h3 {
  font-size: 1.35rem;
  font-family: var(--font-display);
  margin-bottom: 0.5rem;
  color: #fff;
}

.pricing-card .price {
  font-size: 2.8rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: #fff;
  margin-bottom: 1rem;
}

.pricing-card .price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 1.5rem;
  min-height: 40px;
}

.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.pricing-card ul li {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.4;
}

.pricing-cta-btn {
  width: 100%;
  padding: 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-light);
  transition: all 0.2s;
}

.pricing-cta-btn:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

/* Popular pricing highlight */
.pricing-card.popular {
  border: 1px solid rgba(220, 38, 38, 0.3);
  position: relative;
}

.pricing-card.popular::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  border: 2px solid transparent;
  background: linear-gradient(135deg, var(--primary-glow), var(--secondary-glow)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  pointer-events: none;
}

/* Recurrence Info Tooltip Trigger */
.info-tooltip-trigger {
  color: var(--text-muted);
  cursor: help;
  font-size: 0.85rem;
  margin-left: 0.35rem;
  opacity: 0.7;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.info-tooltip-trigger:hover {
  opacity: 1;
  color: var(--primary-glow);
}

/* --- Inline Playback Preview Styles --- */
.log-body-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.log-memo-text {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-light);
  word-break: break-word;
}

.playback-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.play-preview-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s ease;
  padding: 0;
}

.play-preview-btn:hover {
  background: rgba(157, 77, 221, 0.15);
  border-color: var(--primary-glow);
  transform: scale(1.08);
}

.play-preview-btn.playing {
  background: var(--primary-glow-translucent);
  border-color: var(--primary-glow);
  color: #fff;
  animation: pulseGlow 1.5s infinite ease-in-out;
}

.progress-bar-wrapper {
  width: 80px;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  transition: width 0.3s ease;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-glow), var(--secondary-glow));
  border-radius: 2px;
  transition: width 0.1s linear;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0px rgba(157, 77, 221, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(157, 77, 221, 0); }
  100% { box-shadow: 0 0 0 0px rgba(157, 77, 221, 0); }
}

/* Upwork login styles */
.upwork-green-btn {
  background: #14a800 !important;
  color: #fff !important;
  box-shadow: none !important;
}

.upwork-green-btn:hover {
  background: #108a00 !important;
  transform: none !important;
}

.upwork-social-btn {
  box-shadow: none !important;
}

.upwork-social-btn:hover {
  opacity: 0.9;
  transform: none !important;
}

.google-btn-upwork:hover {
  background: #357ae8 !important;
}

.apple-btn-upwork:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

.upwork-outline-btn {
  box-shadow: none !important;
}

.upwork-outline-btn:hover {
  background: rgba(20, 168, 0, 0.08) !important;
  transform: none !important;
}

.input-with-icon input {
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-with-icon input:focus {
  border-color: #14a800 !important;
  box-shadow: 0 0 8px rgba(20, 168, 0, 0.25) !important;
}

/* Recurrence badges in logs */
.recurrence-badge {
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-left: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.recurrence-badge.daily {
  background: rgba(6, 182, 212, 0.1) !important;
  color: #06b6d4 !important;
  border: 1px solid rgba(6, 182, 212, 0.3) !important;
}

.recurrence-badge.weekly {
  background: rgba(139, 92, 246, 0.1) !important;
  color: #8b5cf6 !important;
  border: 1px solid rgba(139, 92, 246, 0.3) !important;
}

