/* Shared styles for AI Sout HTML pages */
:root {
  --background: #fafafa;
  --foreground: #171717;
  --card: #ffffff;
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  --primary: #6366f1;
  --primary-foreground: #ffffff;
  --secondary: #e4e4e7;
  --border: #e4e4e7;
  --accent: #22c55e;
  --radius: 0.75rem;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  min-height: 100vh;
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(250, 250, 250, 0.95);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--foreground);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

nav { display: none; }
@media (min-width: 768px) {
  nav { display: flex; align-items: center; gap: 1.5rem; }
}

nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s;
}
nav a:hover { color: var(--foreground); }

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

.header-user-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  transition: background 0.2s;
}
.header-user-wrap:hover { background: var(--muted); color: var(--foreground); }

.header-user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.header-user-avatar-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.875rem;
  font-weight: 600;
}
.header-user-name { white-space: nowrap; }
@media (max-width: 639px) {
  .header-user-name { display: none; }
}

.header-profile-btn { font-size: 0.875rem; }

.btn-logout {
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  background: var(--muted);
  color: var(--muted-foreground);
  border: 1px solid var(--border);
}
.btn-logout:hover {
  background: var(--secondary);
  color: var(--foreground);
  border-color: var(--muted-foreground);
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  margin-right: 0.5rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.lang-toggle:hover {
  color: var(--foreground);
  background: var(--muted);
  border-color: var(--muted-foreground);
}
.lang-icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}
.lang-toggle-text {
  font-size: 0.75rem;
  opacity: 0.9;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
  font-family: inherit;
}

.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { opacity: 0.9; }

.btn-ghost { background: transparent; color: var(--muted-foreground); }
.btn-ghost:hover { color: var(--foreground); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
}
.btn-outline:hover { background: var(--muted); }

.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* Form */
.form-group { margin-bottom: 1.5rem; }
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--card);
  font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}
.form-textarea { min-height: 6rem; resize: vertical; }

/* Card */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Badge */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  background: var(--secondary);
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s;
}
.badge:hover {
  background: var(--primary);
  color: var(--primary-foreground);
}

/* Footer */
footer {
  margin-top: 4rem;
  background: linear-gradient(165deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  color: #e2e8f0;
  position: relative;
  overflow: hidden;
}
footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.6;
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
  padding: 3rem 0 0;
  position: relative;
  z-index: 1;
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
}
@media (min-width: 768px) {
  .footer-grid { padding: 4rem 0 0; gap: 3rem; }
}

.footer-brand .logo {
  color: #fff;
  transition: transform 0.2s, opacity 0.2s;
}
.footer-brand .logo:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.footer-brand .logo-icon {
  background: linear-gradient(135deg, var(--primary), #818cf8);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}
.footer-brand p {
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: #94a3b8;
  line-height: 1.7;
  max-width: 18rem;
}

.footer-social {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: #94a3b8;
  text-decoration: none;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.25s ease;
}
.footer-social-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}
.footer-social a:hover {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.footer-col {
  padding: 1rem 0;
}
.footer-col h3 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: inline-block;
}

.footer ul { list-style: none; }
.footer li { margin-bottom: 0.5rem; }
.footer-col ul li:last-child { margin-bottom: 0; }
.footer-col a {
  font-size: 0.9375rem;
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
  display: inline-block;
  padding-left: 0;
  border-left: 2px solid transparent;
  margin-left: 0;
}
.footer-col a:hover {
  color: #fff;
  padding-left: 0.5rem;
  border-left-color: var(--primary);
}

.footer-bottom {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  position: relative;
  z-index: 1;
}
.footer-bottom p {
  font-size: 0.8125rem;
  color: #64748b;
}

/* Page header */
.page-header { text-align: center; margin-bottom: 2rem; }
.page-header h1 { font-size: 1.875rem; font-weight: 700; }
@media (min-width: 640px) { .page-header h1 { font-size: 2.25rem; } }
.page-header p { margin-top: 0.5rem; color: var(--muted-foreground); }
