:root {
  --bg-color: #f8fafc;
  --header-bg: #1d61e7;
  --card-bg: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --badge-bg: #f1f5f9;
  --badge-text: #334155;
  --search-bg: #ffffff;
  --input-text: #1e293b;
  --bottom-nav-bg: rgba(255, 255, 255, 0.85);
  --bottom-nav-border: rgba(226, 232, 240, 0.8);
}

:root.dark-mode, html.dark-mode {
  --bg-color: #0f172a;
  --header-bg: #1e293b;
  --card-bg: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: #334155;
  --badge-bg: #334155;
  --badge-text: #cbd5e1;
  --search-bg: #1e293b;
  --input-text: #f8fafc;
  --bottom-nav-bg: rgba(30, 41, 59, 0.85);
  --bottom-nav-border: rgba(51, 65, 85, 0.8);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  padding-bottom: 80px;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.top-header {
  background-color: var(--header-bg);
  padding: 12px 16px;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.brand-box {
  display: flex;
  flex-direction: column;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.logo-dot {
  color: #38ef7d;
}

.tagline {
  color: rgba(255, 255, 255, 0.85);
  font-size: 9px;
  margin-top: 3px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-desktop-action {
  display: none;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 10px;
  white-space: nowrap;
}

.btn-desktop-question {
  background-color: #10b981;
  color: #ffffff;
}

.btn-desktop-job {
  background-color: #ffffff;
  color: #1d61e7;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.16);
  border: none;
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.2s ease;
}

.icon-btn:active {
  transform: scale(0.92);
}

html:not(.dark-mode) .sun-icon {
  display: none;
}

html:not(.dark-mode) .moon-icon {
  display: block;
}

html.dark-mode .sun-icon {
  display: block;
}

html.dark-mode .moon-icon {
  display: none;
}

.notification-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  background-color: #ef4444;
  border-radius: 50%;
  border: 1.5px solid var(--header-bg);
}

.logout-btn {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--bottom-nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--bottom-nav-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  flex: 1;
  height: 100%;
}

.bottom-nav-item span {
  font-size: 10px;
  font-weight: 600;
}

.bottom-nav-item.active {
  color: #1d61e7;
}

html.dark-mode .bottom-nav-item.active {
  color: #60a5fa;
}

.nav-plus-btn {
  position: relative;
  top: -12px;
}

.plus-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d61e7, #2563eb);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(29, 97, 231, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-plus-btn:active .plus-icon-wrapper {
  transform: scale(0.92);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.action-modal {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  background: var(--card-bg);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  padding: 20px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 600px;
  margin: 0 auto;
}

.action-modal.active {
  transform: translateY(0);
}

.action-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.action-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.action-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--badge-bg);
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.2s ease;
  border: 1px solid var(--border-color);
}

.action-option:active {
  transform: scale(0.98);
}

.action-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.question-icon {
  background: rgba(29, 97, 231, 0.12);
  color: #1d61e7;
}

.job-icon {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.action-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.container {
  padding: 16px;
  max-width: 600px;
  margin: 0 auto;
  flex: 1;
  width: 100%;
}

.auth-container {
  max-width: 440px;
  margin: 10px auto;
}

.auth-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.auth-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
  color: var(--text-primary);
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  background: var(--search-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--input-text);
  outline: none;
  width: 100%;
}

.form-control:focus {
  border-color: #1d61e7;
}

.btn {
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-sual {
  background-color: #10b981;
  color: #ffffff;
}

.btn-elan {
  background-color: #1d61e7;
  color: #ffffff;
}

.btn-block {
  width: 100%;
}

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
}

.alert-danger {
  background: #fee2e2;
  color: #991b1b;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
}

html.dark-mode .alert-danger {
  background: #451a1a;
  color: #fca5a5;
}

html.dark-mode .alert-success {
  background: #064e3b;
  color: #a7f3d0;
}

.auth-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-footer a {
  color: #1d61e7;
  text-decoration: none;
  font-weight: 700;
}

.search-box {
  background: var(--search-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 5px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  margin-bottom: 16px;
}

.search-input {
  border: none;
  outline: none;
  padding: 8px 12px;
  width: 100%;
  font-size: 13px;
  color: var(--input-text);
  background: transparent;
}

.search-btn {
  background-color: #1d61e7;
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
}

.categories {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.categories::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cat-chip.active {
  background: #1d61e7;
  color: #ffffff;
  border-color: #1d61e7;
}

.cat-chip.active svg {
  stroke: #ffffff !important;
}

.icon-orange { stroke: #f59e0b; }
.icon-blue { stroke: #3b82f6; }
.icon-green { stroke: #10b981; }

.section-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
  border: 1px solid var(--border-color);
}

.card-job {
  border-left: 4px solid #10b981;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.badge {
  background: var(--badge-bg);
  color: var(--badge-text);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-job {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
}

html.dark-mode .badge-job {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.time {
  font-size: 11px;
  color: var(--text-muted);
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 10px;
  transition: color 0.2s ease;
}

a .card-title:hover {
  color: #1d61e7;
}

.job-details, .card-footer {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 8px;
  flex-wrap: wrap;
}

.card-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  margin-top: 12px;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 14px;
}

.site-footer {
  display: none !important;
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 20px 16px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #1d61e7;
}

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }

  .btn-desktop-action {
    display: inline-flex;
  }

  .bottom-nav {
    display: none;
  }

  .site-footer {
    display: block !important;
  }

  .container {
    max-width: 800px;
    padding: 24px 16px;
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}
