/* Voiact - Professional Corporate Design */

/* ============================================
   RESET & BASE
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Voiact Brand Color Palette - Modern & Soft */
  --color-white: #fafbfc;
  --color-bg: #f5f7fa;
  --color-bg-alt: #eef2f7;
  --color-bg-section: #ffffff;
  --color-border: #dce3eb;
  --color-border-light: #e8eef5;

  --color-primary: #2c3e8f;
  --color-primary-light: #3d51a3;
  --color-primary-dark: #1e2b66;
  --color-accent: #d97617;
  --color-accent-hover: #b86314;
  --color-accent-light: #f4a261;

  --color-text: #1a2332;
  --color-text-light: #4a5c6e;
  --color-text-muted: #7a8a9e;

  --color-success: #61bd4f;
  --color-danger: #eb5a46;
  --color-warning: #f2d600;
  --color-info: #0079bf;

  --border-radius: 8px;
  --border-radius-sm: 4px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --transition: all 0.2s ease;

  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --spacing-unit: 1rem;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 16px;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--color-primary);
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(1.875rem, 3vw, 2.5rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

h3 {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
}

p {
  margin-bottom: 1rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--color-accent-hover);
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

main {
  flex: 1;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
header {
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.navbar {
  width: 100%;
  padding: 0 2rem;
}

.navbar-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 72px;
  gap: 1rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  transition: var(--transition);
  text-decoration: none;
}

.navbar-brand img {
  height: 42px;
  width: auto;
  background: transparent !important;
  background-color: transparent !important;
}

.navbar-brand span {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.navbar-brand:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.navbar-menu {
  display: contents;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-self: center;
}

.navbar-link {
  color: var(--color-text);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
  position: relative;
}

.navbar-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.3s ease;
}

.navbar-link:hover {
  color: var(--color-primary);
  background: var(--color-bg);
}

.navbar-link:hover::after {
  width: 60%;
}

.navbar-link.user-email {
  cursor: default;
}

.navbar-link.user-email:hover {
  background: transparent;
}

.navbar-link.user-email::after {
  display: none;
}


.navbar-divider {
  width: 1px;
  height: 24px;
  background: var(--color-border);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Language Switcher */
.language-switcher {
  margin-left: 0.5rem;
}

.language-select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  background: var(--color-white);
  color: var(--color-text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}

.language-select:hover {
  border-color: var(--color-primary);
  background: var(--color-bg);
}

.language-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(44, 62, 143, 0.1);
}

.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.75rem;
  margin: -0.5rem;
  z-index: 1001;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.navbar-overlay {
  display: none;
}

.navbar-menu-header {
  display: none;
}

.navbar-toggle span {
  width: 25px;
  height: 2px;
  background: var(--color-primary);
  transition: all 0.3s ease;
  border-radius: 2px;
  pointer-events: none;
}

.navbar-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.navbar-toggle.active span:nth-child(2) {
  opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--color-white);
}

.btn-accent {
  background-color: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 4px 12px rgba(217, 118, 23, 0.25);
}

.btn-accent:hover:not(:disabled) {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(217, 118, 23, 0.35);
  color: var(--color-white);
}

.btn-secondary {
  background-color: var(--color-white);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--color-bg);
  border-color: var(--color-primary);
  transform: translateY(-1px);
  color: var(--color-primary);
}

.btn-danger {
  background-color: var(--color-danger);
  color: var(--color-white);
}

.btn-danger:hover:not(:disabled) {
  background-color: #cf513d;
  transform: translateY(-2px);
  color: var(--color-white);
}

.btn-success {
  background-color: var(--color-success);
  color: var(--color-white);
}

.btn-success:hover:not(:disabled) {
  background-color: #519839;
  transform: translateY(-2px);
  color: var(--color-white);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

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

/* ============================================
   MESSAGES/ALERTS
   ============================================ */
.messages-container {
  padding: 1rem 0;
}

.alert {
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  border-radius: var(--border-radius);
  border-left: 4px solid;
  background-color: var(--color-white);
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.alert-hiding {
  opacity: 0;
  transform: translateX(100%);
}

/* Toast container for dashboard alerts */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  max-width: 400px;
  width: calc(100% - 2rem);
}

.toast-container .alert {
  margin-bottom: 0.5rem;
  box-shadow: var(--shadow-md);
}

.alert-success {
  background-color: #e3fcef;
  border-color: var(--color-success);
  color: #006644;
}

.alert-error {
  background-color: #ffebe6;
  border-color: var(--color-danger);
  color: #bf2600;
}

.alert-warning {
  background-color: #fffae6;
  border-color: var(--color-warning);
  color: #974f00;
}

.alert-info {
  background-color: #deebff;
  border-color: var(--color-info);
  color: #0747a6;
}

.alert-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: inherit;
  opacity: 0.6;
  padding: 0.5rem;
  margin: -0.5rem;
  margin-left: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.alert-close:hover {
  opacity: 1;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--color-white);
  border-radius: var(--border-radius);
  padding: 2rem;
  border: 1px solid var(--color-border-light);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent-light);
  transform: translateY(-4px);
}

.card h2,
.card h3 {
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.card p {
  font-size: 0.9375rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* ============================================
   SECURITY BANNER
   ============================================ */
.security-banner {
  background: var(--color-bg-alt);
  padding: 1rem 0;
  border-top: 1px solid var(--color-border-light);
  margin-top: 4rem;
}

.security-items {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.security-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 159, 26, 0.1);
  border: 1px solid rgba(255, 159, 26, 0.3);
  border-radius: 100px;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.security-divider {
  display: none;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: var(--color-bg-alt);
  padding: 3rem 0 1.5rem;
  margin-top: 0;
  border-top: 1px solid var(--color-border-light);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.9375rem;
}

.footer-section p {
  color: var(--color-text-light);
  font-size: 0.875rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.625rem;
}

.footer-section ul li a {
  color: var(--color-text-light);
  font-size: 0.875rem;
}

.footer-section ul li a:hover {
  color: var(--color-primary);
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-bg);
  transition: var(--transition);
}

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

.footer-social a:hover img {
  filter: brightness(0) invert(1);
}

.footer-social img {
  width: 16px;
  height: 16px;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* ============================================
   CTA BOTTOM SECTION
   ============================================ */
.cta-bottom {
  text-align: center;
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-white);
}

.cta-bottom h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-white);
}

.cta-bottom p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  color: var(--color-white);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
  .navbar-link {
    font-size: 0.875rem;
    padding: 0.375rem 0.625rem;
  }

  .navbar-menu {
    gap: 1rem;
  }
}

@media (max-width: 968px) {
  .navbar-menu {
    gap: 0.75rem;
  }

  .navbar-divider {
    display: none;
  }

  .navbar-link {
    font-size: 0.8125rem;
    padding: 0.375rem 0.5rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.25rem;
  }

  .navbar {
    padding: 0 1.25rem;
  }

  .navbar-container {
    display: flex;
    justify-content: space-between;
    height: 64px;
  }

  .navbar-toggle {
    display: flex;
  }

  .navbar-menu {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    background: var(--color-white);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 1.5rem;
    padding-top: 4.5rem;
    gap: 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    z-index: 1002;
    flex: none;
  }

  .navbar-menu.active {
    transform: translateX(0);
    visibility: visible;
  }

  .navbar-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .navbar-menu-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border-light);
    background: var(--color-white);
  }

  .navbar-menu-logo {
    display: flex;
    align-items: center;
  }

  .navbar-menu-logo img {
    height: 32px;
    width: auto;
  }

  .navbar-menu-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0.5rem;
    margin: -0.5rem;
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
  }

  .navbar-menu-close:hover {
    color: var(--color-text);
  }

  /* Overlay for mobile menu */
  .navbar-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1050;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
  }

  .navbar-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .navbar-menu {
    z-index: 1100 !important;
  }

  .navbar-link {
    width: 100%;
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border-light);
  }

  .navbar-link::after {
    display: none;
  }

  .navbar-link:hover {
    background: var(--color-bg-alt);
    padding-left: 1.5rem;
  }


  .navbar-divider {
    display: none;
  }

  .navbar-actions {
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
  }

  .navbar-actions .btn {
    width: 100%;
  }

  .navbar-actions form {
    width: 100%;
  }

  .navbar-actions form .btn {
    width: 100%;
  }

  .card {
    padding: 1.5rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .cta-bottom h2 {
    font-size: 2rem;
  }

  .cta-bottom p {
    font-size: 1.125rem;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.d-flex { display: flex; }
.d-none { display: none; }
.d-block { display: block; }

.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }

.text-center { text-align: center; }
.text-danger { color: var(--color-danger); }
.text-success { color: var(--color-success); }
.text-muted { color: var(--color-text-muted); }
.text-primary { color: var(--color-primary); }

.small { font-size: 0.875rem; }
.w-100 { width: 100%; }

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.badge-success {
  background-color: #e3fcef;
  color: var(--color-success);
}

.badge-info {
  background-color: #deebff;
  color: var(--color-info);
}

.badge-warning {
  background-color: #fffae6;
  color: #974f00;
}

.badge-danger {
  background-color: #ffebe6;
  color: var(--color-danger);
}

/* ============================================
   MODAL COMPONENT
   ============================================ */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-content {
  background: var(--color-white);
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

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

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-light);
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: var(--color-text);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-border);
}

/* ============================================
   TOGGLE SWITCH
   ============================================ */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-border);
  transition: 0.3s;
  border-radius: 28px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--color-success);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 0 3px rgba(97, 189, 79, 0.2);
}

/* ============================================
   FORM CONTROLS (Shared)
   ============================================ */
.form-control,
.form-select {
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
  transition: var(--transition);
  width: 100%;
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-white);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(44, 62, 143, 0.1);
  outline: none;
}

.form-label {
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  display: block;
  font-size: 0.9375rem;
}

.form-text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
  display: block;
  line-height: 1.5;
}

/* ============================================
   SPINNER ANIMATION
   ============================================ */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spinner {
  border: 3px solid var(--color-border);
  border-top: 3px solid var(--color-primary);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 4px;
}
