/* Global reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 60px; /* Offset fixed header */
}

body {
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: #1f2937;
  line-height: 1.5;
  transition: background 0.3s ease;
}

body.light-theme {
  background: linear-gradient(135deg, #1e3a8a 0%, #7c3aed 100%);
}

body.dark-theme {
  background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
}

body.dark-theme .container,
body.dark-theme .business-card,
body.dark-theme .modal-content {
  background: rgba(30, 41, 59, 0.95); /* #1E293B with 0.95 opacity */
  color: #e5e7eb;
}

body.dark-theme h1,
body.dark-theme h2:not(.business-name),
body.dark-theme h3,
body.dark-theme p,
body.dark-theme label,
body.dark-theme a,
body.dark-theme .drawer-menu li a,
body.dark-theme .drawer-menu li i {
  color: #e5e7eb;
}

body.dark-theme input,
body.dark-theme select {
  background: #1e293b;
  color: #e5e7eb;
  border-color: #4b5563;
}

body.dark-theme input::placeholder {
  color: #9ca3af;
}

.container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  text-align: center;
  max-width: 800px; /* Match Flutter */
  width: 90%;
  margin: 100px auto 32px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  flex: 1;
}

.container.dashboard,
.container.about,
.container.faqs,
.container.support {
  max-width: 800px; /* Updated for consistency */
}

.container:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

/* Hamburger Styles */
.hamburger {
  position: fixed !important;
  top: 16px;
  left: 16px;
  right: auto;
  margin: 0;
  font-size: 28px;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  border-radius: 50%;
  padding: 8px;
  cursor: pointer;
  z-index: 1001;
  color: #f3f4f6;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease;
}

.hamburger:hover {
  transform: scale(1.05);
}

.hamburger:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

body.dark-theme .hamburger {
  background: rgba(0, 0, 0, 0.4);
  color: #f3f4f6;
}

/* Drawer Styles */
.drawer {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100vh;
  background: #ffffff;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
  transition: left 0.3s ease;
  z-index: 999;
  overflow-y: auto;
}

.drawer.active {
  left: 0;
}

.drawer-header {
  height: 150px;
  background: linear-gradient(to right, #3b82f6, #10b981);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}

.drawer-header h2 {
  color: #ffffff;
  font-size: 24px;
  font-weight: bold;
  font-family: 'Roboto', sans-serif;
  margin: 0;
}

.drawer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.drawer-menu li {
  display: flex;
  align-items: center;
  padding: 16px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.drawer-menu li:hover {
  background: #f5f5f5;
}

.drawer-menu li i {
  margin-right: 16px;
  font-size: 24px;
  color: #000000;
}

.drawer-menu li a,
.drawer-menu li span {
  text-decoration: none;
  color: #000000;
  font-size: 16px;
  font-family: 'Roboto', sans-serif;
}

body.dark-theme .drawer {
  background: #121212;
}

body.dark-theme .drawer-menu li:hover {
  background: #333333;
}

body.dark-theme .drawer-menu li i,
body.dark-theme .drawer-menu li a {
  color: #ffffff;
}

/* Ensure specific icon colors */
.drawer-menu li i.fa-house { color: #000000; }
.drawer-menu li i.fa-tachometer-alt { color: #000000; }
.drawer-menu li i.fa-question-circle { color: #000000; }
.drawer-menu li i.fa-headset { color: #000000; }
.drawer-menu li i.fa-info-circle { color: #000000; }
.drawer-menu li i.fa-adjust { color: #000000; }
.drawer-menu li i.fa-envelope { color: #10B981; }
.drawer-menu li i.fa-credit-card { color: #F59E0B; }
.drawer-menu li i.fa-cog { color: #000000; }

/* Header Styles */
header {
  display: none; /* Hidden to match Flutter */
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 32px 16px;
  margin-top: 18px;
}

.hero h1 {
  font-size: 36px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.38);
}

/* Content Styles */
.container h1 {
  font-size: 36px; /* Match Flutter */
  font-weight: 700;
  color: #111827;
  margin-bottom: 24px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.dark-theme .container h1 {
  color: #e5e7eb;
}

.container h2:not(.business-name) {
  font-size: 24px;
  font-weight: 600;
  color: #1f2937;
  margin: 24px 0 12px;
}

body.dark-theme .container h2:not(.business-name) {
  color: #e5e7eb;
}

.container p,
.container li {
  font-size: 14.4px; /* Match Flutter */
  color: #6b7280;
  margin-bottom: 12px;
}

body.dark-theme .container p,
body.dark-theme .container li {
  color: #d1d5db;
}

.container a {
  color: #2563eb;
  text-decoration: none;
}

body.dark-theme .container a {
  color: #60a5fa;
}

.feature-list,
.list {
  list-style: none;
  text-align: center;
  margin: 0;
}

.feature-list li,
.list-item li {
  margin: 8px 0;
  padding-left: 0;
  position: relative;
}

.feature-list li::before,
.list-item li::before {
  content: '•';
  color: #10b981;
  display: inline-block;
  margin-right: 8px;
}

/* Contact Button */
.contact-button {
  display: block;
  width: 100%;
  padding: 12px;
  background: linear-gradient(to right, #10b981, #059669);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.contact-button:hover {
  transform: scale(1.05);
}

body.dark-theme .contact-button {
  background: linear-gradient(to right, #10b981, #059669);
}

/* Support Page Specific Styles */
.container.support .business-card {
  background-color: rgba(255, 255, 255, 0.95);
  padding: 32px;
  max-width: 450px;
  margin: 0 auto;
  border-radius: 4px;
}

body.dark-theme .container.support .business-card {
  background-color: rgba(30, 51, 59);
}

.value-list-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.value-list-item span {
  font-weight: 600;
  color: #555555;
}

body.dark-theme .value-list-item span {
  color: #ffffff;
}

.value-list-item span {
  color: #000000;
  text-align: right;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.dark-theme .value-list-item span {
  color: #ffffff;
}

.actions ul {
  list-style: none;
  background: none;
  margin-right: 0;
  text-align: center;
}

.actions ul li {
  margin: 8px 0;
}

.actions ul li a {
  color: #2563eb;
  text-decoration: none;
}

body.dark-theme .actions ul li a {
  color: #60a5fa;
}

.qa-section {
  text-align: center;
  margin-top: 32px;
}

.qa-section .faq-item {
  margin-bottom: 16px;
}

.qa-section .faq-item b {
  color: #1f2937;
  font-weight: 600;
}

body.dark-theme .qa-section .faq-item b {
  color: #e5e7eb;
}

.qa-section .faq-item a {
  color: #2563eb;
  text-decoration: none;
}

body.dark-theme .qa-section .faq-item a {
  color: #60a5fa;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.footer-links a {
  color: #2563eb;
  text-decoration: none;
  font-size: 16px;
}

body.dark-theme .footer-links a {
  color: #60a5fa;
}

/* Dropdown Styles */
.form-group label {
  font-size: 16px;
  font-weight: 700; /* Slightly bolder */
  color: #1f2937;
  text-align: center;
  display: block;
  margin-bottom: 8px;
}

body.dark-theme .form-group label {
  color: #e5e7eb;
}

.business-selector {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14.4px;
  background: #f9fafb;
  color: #1f2937;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

body.dark-theme .business-selector {
  border-color: #4b5563;
  background: #1e293b;
  color: #e5e7eb;
}

.business-selector:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.business-selector option {
  background: #ffffff;
  color: #1f2937;
}

body.dark-theme .business-selector option {
  background: #1e293b;
  color: #e5e7eb;
}

/* Error Message */
.error-message {
  color: #dc2626;
  font-size: 14px;
  margin-top: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-align: center;
}

.error-message.active {
  opacity: 1;
}

/* Business Card */
.business-card {
  background: rgba(255, 255, 255, 0.95);
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-top: 16px;
}

body.dark-theme .business-card {
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.business-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

body.dark-theme .business-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.business-card .business-name {
  font-size: 24px;
  font-weight: 600;
  color: #3b82f6 !important; /* Ensure color applies */
  margin-bottom: 8px;
  text-align: center;
}

body.dark-theme .business-card .business-name {
  color: #60a5fa !important; /* Ensure color applies */
}

.business-card p {
  font-size: 14.4px;
  color: #1f2937;
  text-align: center;
}

body.dark-theme .business-card p {
  color: #e5e7eb;
}

.no-data, .no-links {
  font-size: 14.4px;
  color: #6b7280;
  text-align: center;
}

body.dark-theme .no-data,
body.dark-theme .no-links {
  color: #d1d5db;
}

.form-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  width: 100%;
}

.link-button {
  display: block;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  font-weight: 500;
  color: #ffffff !important;
  transition: all 0.3s ease, transform 0.2s ease;
  width: 100%;
  max-width: 400px;
  min-width: 250px;
}

.link-button:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.link-button.sales {
  background: linear-gradient(to right, #8b5cf6, #6d28d9);
}

.link-button.sales:hover {
  background: linear-gradient(to right, #7c3aed, #5b21b6);
}

.link-button.stock {
  background: linear-gradient(to right, #f59e0b, #d97706);
}

.link-button.stock:hover {
  background: linear-gradient(to right, #e68a00, #b45309);
}

.link-button.expense {
  background: linear-gradient(to right, #ec4899, #db2777);
}

.link-button.expense:hover {
  background: linear-gradient(to right, #db2777, #be185d);
}

.link-button.payment {
  background: linear-gradient(to right, #06b6d4, #0891b2);
}

.link-button.payment:hover {
  background: linear-gradient(to right, #0891b2, #0e7490);
}

.link-button.itemManager {
  background: linear-gradient(to right, #6366f1, #4f46e5);
}

.link-button.itemManager:hover {
  background: linear-gradient(to right, #4f46e5, #4338ca);
}

.link-button.master-sheet {
  background: linear-gradient(to right, #22c55e, #15803d);
}

.link-button.master-sheet:hover {
  background: linear-gradient(to right, #16a34a, #166534);
}

/* Footer */
footer {
  text-align: center;
  padding: 16px;
  font-size: 14px;
  color: #ffffff;
  background: #1f2937;
  width: 100%;
}

footer a {
  color: #2563eb;
  text-decoration: none;
}

body.dark-theme footer a {
  color: #60a5fa;
}

/* Unrelated styles remain unchanged */
h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin: 1rem 0;
}

h3 {
  font-size: 20px; /* Match Flutter for "Available Links" */
  font-weight: 500;
  margin: 8px 0;
  color: #1f2937;
}

body.dark-theme h3 {
  color: #e5e7eb;
}

.form-section {
  transition: none;
}

.hidden {
  display: none;
}

.form-group {
  text-align: center; /* Match Flutter */
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #1f2937;
}

input, select {
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  width: 100%;
  transition: all 0.3s ease;
  background: #f9fafb;
}

input:focus, select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
  background: #ffffff;
}

input::placeholder {
  color: #6b7280;
}

button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  width: 100%;
}

button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

button:hover::after {
  width: 200px;
  height: 200px;
}

#signup-form button {
  background: linear-gradient(to right, #059669, #047857);
  color: #ffffff;
}

#signup-form button:hover {
  background: linear-gradient(to right, #059669, #047857);
}

#login-form button {
  background: linear-gradient(to right, #4e3bf6, #492ded);
  color: #ffffff;
  margin-top: 1.5rem;
}

#login-form button:hover {
  background: linear-gradient(to right, #4e3bf6, #492ded);
}

#logout-link {
  color: #ef4444;
  margin-top: auto;
  padding: 0.5rem;
  border-radius: 0.5rem;
}

#logout-link:hover {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.1);
}

a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

body.dark-theme a {
  color: #60a5fa;
}

a:hover {
  text-decoration: underline;
  color: #1d4ed8;
}

body.dark-theme a:hover {
  color: #3b82f6;
}

/* Spinner */
#loading::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid #ffffff;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #FFFFFF;
  padding: 1.5rem;
  border-radius: 0.5rem;
  max-width: 400px;
  margin: auto;
  position: relative;
}

body.dark-theme .modal-content {
  background: rgba(30, 41, 59, 0.95);
  color: #e5e7eb;
}

.modal-content h3 {
  margin-top: 0;
  font-size: 1.25rem;
}

.modal-content button {
  background: #6366F1;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  margin-right: 0.5rem;
}

.modal-content button[type="button"] {
  background: #6B7280;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.loading-overlay.hidden {
  display: none;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #ffffff;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.animate-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#sellers-buyers-link {
  color: #10b981;
  padding: 0.5rem;
  border-radius: 0.5rem;
}

#sellers-buyers-link:hover {
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
}

#payments-link {
  color: #f59e0b;
  padding: 0.5rem;
  border-radius: 0.5rem;
}

#payments-link:hover {
  color: #d97706;
  background: rgba(245, 158, 11, 0.1);
}

.faq-list {
  margin-top: 1.5rem;
  text-align: left;
}

.faq-item {
  border-bottom: 1px solid #d1d5db;
  margin-bottom: 0.5rem;
}

body.dark-theme .faq-item {
  border-bottom-color: #4b5563;
}

.faq-question {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: #1f2937;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

body.dark-theme .faq-question {
  color: #e5e7eb;
}

.faq-question::after {
  content: '▼';
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.faq-question:hover {
  background: rgba(59, 130, 246, 0.1);
}

.faq-answer {
  display: none;
  padding: 0 1rem 1rem;
  font-size: 1rem;
  color: #29588a;
}

body.dark-theme .faq-answer {
  color: #2c4b79;
}

#signup-password,
#login-password {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 0.75rem;
  font-size: 0.9rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  line-height: normal;
  vertical-align: middle;
}

.password-container {
  position: relative;
  width: 100%;
}

.password-container input {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 0.75rem !important;
  line-height: normal;
  vertical-align: middle;
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  height: 100%;
}

.password-toggle i {
  font-size: 1rem;
  color: #666;
}

form.space-y-4 > * {
  margin-bottom: 1rem;
}

.submit-button {
  width: 100%;
  padding: 0.75rem;
  background: #71a3f4;
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s ease;
}

.submit-button:hover {
  background: #6d98f6;
}

.google-form-button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: #14b8a6;
  color: #ffffff;
  border-radius: 0.5rem;
  text-align: center;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: background 0.3s ease, transform 0.2s ease;
}

body.dark-theme .google-form-button {
  background: #2dd4bf;
}

.google-form-button:hover {
  background: #0d9488;
  transform: scale(1.05);
}

body.dark-theme .google-form-button:hover {
  background: #22d3ee;
}

input[type="file"] {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  color: #1f2937;
}

body.dark-theme input[type="file"] {
  border-color: #4b5563;
  background: rgba(31, 41, 55, 0.3);
  color: #e5e7eb;
}

input[type="file"]::-webkit-file-upload-button {
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
}

body.dark-theme input[type="file"]::-webkit-file-upload-button {
  background: #60a5fa;
}

select,
input[type="tel"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  color: #1f2937;
  font-size: 1rem;
}

body.dark-theme select,
body.dark-theme input[type="tel"] {
  border-color: #4b5563;
  background: rgba(31, 41, 55, 0.3);
  color: #e5e7eb;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .container {
    margin: 80px auto 16px;
    padding: 24px;
  }
  .hero {
    padding: 24px 12px;
  }
  .hero h1 {
    font-size: 28px;
  }
  .drawer {
    width: 200px;
    left: -200px;
  }
  .drawer-menu li i {
    font-size: 20px;
  }
  .drawer-menu li a {
    font-size: 14px;
  }
  .form-links {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 16px;
    margin: 80px auto 16px;
  }
  .hero h1 {
    font-size: 24px;
  }
}