/* ===== LIGHT THEME (Default) ===== */
:root {
  --bg-color: #E6EEF9;
  --bg-secondary: #EDF2F8;
  --primary-color: #FF5A5F;
  --secondary-color: #FF7A7F;
  --text-dark: #2F3640;
  --text-light: #718096;
  --card-bg: #E6EEF9;
  --modal-bg: #E6EEF9;
  --input-bg: #E6EEF9;
  --table-hover: rgba(255,255,255,0.4);
  --table-border: rgba(255,255,255,0.4);
  --divider: rgba(0,0,0,0.05);
  --shadow-subtle: rgba(0,0,0,0.06);
  
  /* Claymorphism shadows */
  --clay-outer: 10px 10px 20px #c5d3ea, -10px -10px 20px #ffffff;
  --clay-inner-light: inset -5px -5px 10px #ffffff, inset 5px 5px 10px rgba(0,0,0,0.05);
  --clay-inner-dark: inset -5px -5px 10px rgba(255, 255, 255, 0.4), inset 5px 5px 10px rgba(0,0,0,0.1);
  --blob-gradient: linear-gradient(135deg, #FF5A5F 0%, #FF9A9E 100%);
}

/* ===== DARK THEME ===== */
[data-theme="dark"] {
  --bg-color: #1a1d23;
  --bg-secondary: #22262e;
  --text-dark: #E2E8F0;
  --text-light: #8492A6;
  --card-bg: #22262e;
  --modal-bg: #22262e;
  --input-bg: #2a2e36;
  --table-hover: rgba(255,255,255,0.04);
  --table-border: rgba(255,255,255,0.06);
  --divider: rgba(255,255,255,0.06);
  --shadow-subtle: rgba(0,0,0,0.3);
  
  --clay-outer: 8px 8px 16px rgba(0,0,0,0.5), -8px -8px 16px rgba(60,65,75,0.4);
  --clay-inner-light: inset -4px -4px 8px rgba(60,65,75,0.3), inset 4px 4px 8px rgba(0,0,0,0.3);
  --clay-inner-dark: inset -4px -4px 8px rgba(60,65,75,0.25), inset 4px 4px 8px rgba(0,0,0,0.35);
}

/* Smooth transition when toggling theme */
html, body, .clay-card, .clay-panel, .sidebar, .clay-button-outline, .icon-btn, .kpi-card,
input, .clay-button, .clay-button-small, .nav-item, .user-profile {
  transition: background-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

/* Background Blobs for Glass/Clay Contrast */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  z-index: -1;
  opacity: 0.6;
}

[data-theme="dark"] .blob {
  opacity: 0.25;
}

.blob-1 {
  top: -100px;
  right: -50px;
  width: 400px;
  height: 400px;
  background: var(--blob-gradient);
}

.blob-2 {
  bottom: -150px;
  left: -100px;
  width: 350px;
  height: 350px;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.signup-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  width: 100%;
  max-width: 450px;
  padding: 1rem;
}

.brand {
  text-align: center;
}

.logo-clay {
  font-size: 3rem;
  width: 80px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 10px;
  background: var(--bg-color);
  border-radius: 24px;
  box-shadow: var(--clay-outer);
  position: relative;
}

.logo-clay::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--clay-inner-light);
  pointer-events: none;
}

.brand h1 {
  font-weight: 800;
  font-size: 2rem;
  color: var(--text-dark);
  letter-spacing: -0.5px;
}

.brand p {
  color: var(--text-light);
  font-weight: 400;
}

/* The Clay Card Form */
.clay-card {
  background: var(--bg-color);
  padding: 2.5rem;
  border-radius: 32px;
  width: 100%;
  box-shadow: var(--clay-outer);
  position: relative;
  transition: transform 0.3s ease;
}

.clay-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--clay-inner-light);
  pointer-events: none;
}

.clay-card h2 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.subtitle {
  color: var(--text-light);
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.input-group {
  position: relative;
  margin-bottom: 1.5rem;
  z-index: 1;
}

input {
  width: 100%;
  padding: 1.2rem 1rem;
  border: none;
  background: transparent;
  outline: none;
  font-size: 1rem;
  color: var(--text-dark);
  border-radius: 16px;
  box-shadow: inset 4px 4px 8px var(--shadow-subtle), inset -4px -4px 8px rgba(255,255,255,0.15);
  transition: all 0.3s ease;
}

[data-theme="dark"] input {
  background: var(--input-bg);
}

input:focus {
  box-shadow: inset 6px 6px 12px var(--shadow-subtle), inset -6px -6px 12px rgba(255,255,255,0.1);
}

label {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
  transition: 0.3s ease;
  font-size: 0.95rem;
}

input:focus + label,
input:valid + label {
  top: -10px;
  left: 10px;
  font-size: 0.75rem;
  padding: 0 8px;
  color: var(--primary-color);
  font-weight: 600;
  background: var(--bg-color);
  z-index: 1;
}

/* Password Toggle */
.toggle-password {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  z-index: 2;
  transition: color 0.3s ease;
}

.toggle-password:hover {
  color: var(--primary-color);
}


/* Clay Button */
.clay-button {
  width: 100%;
  padding: 1.2rem;
  margin-top: 1rem;
  border: none;
  border-radius: 16px;
  background: var(--primary-color);
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  position: relative;
  box-shadow: 6px 6px 15px rgba(255, 90, 95, 0.4), -4px -4px 10px rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
  z-index: 1;
}

[data-theme="dark"] .clay-button {
  box-shadow: 6px 6px 15px rgba(255, 90, 95, 0.3), -4px -4px 10px rgba(60, 65, 75, 0.4);
}

.clay-button::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 4px 4px 8px rgba(255, 255, 255, 0.4), inset -4px -4px 8px rgba(0,0,0,0.1);
  pointer-events: none;
}

.clay-button:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

.clay-button:active {
  transform: translateY(2px);
  box-shadow: 2px 2px 5px rgba(255, 90, 95, 0.4), -2px -2px 5px rgba(255, 255, 255, 0.8);
}

.clay-button-secondary,
.clay-button-google {
  width: 100%;
  padding: 1rem 1.2rem;
  border: none;
  border-radius: 16px;
  background: var(--bg-color);
  color: var(--text-dark);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--clay-outer);
  position: relative;
  transition: all 0.2s ease;
}

.clay-button-secondary::before,
.clay-button-google::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--clay-inner-light);
  pointer-events: none;
}

.clay-button-secondary:hover,
.clay-button-google:hover {
  transform: translateY(-2px);
  color: var(--primary-color);
}

.clay-button-google {
  margin-top: 0.75rem;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1.25rem 0 0.5rem;
  color: var(--text-light);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--divider);
}

.auth-inline-note,
.custom-success-msg {
  background: rgba(79, 172, 254, 0.1);
  color: #2c73d2;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  font-size: 0.85rem;
  text-align: center;
  font-weight: 600;
  margin-bottom: 1rem;
  border: 1px solid rgba(79, 172, 254, 0.18);
  display: none;
}

.custom-success-msg {
  background: rgba(0, 176, 155, 0.12);
  color: #008f7a;
  border-color: rgba(0, 176, 155, 0.22);
}

.link-button {
  background: none;
  border: none;
  color: var(--primary-color);
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.demo-notice {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

.demo-notice a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.demo-notice a:hover {
  text-decoration: underline;
}

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

@keyframes slideIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

.signup-container {
  animation: fadeIn 0.6s ease-out forwards;
}

/* Custom Error Message */
.custom-error-msg {
  background: rgba(255, 90, 95, 0.1);
  color: var(--primary-color);
  padding: 1rem;
  border-radius: 16px;
  font-size: 0.9rem;
  text-align: center;
  font-weight: 600;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 90, 95, 0.2);
  display: none;
  animation: shake 0.4s ease-in-out;
}

.input-error {
  animation: shake 0.4s ease-in-out;
  border: 1px solid rgba(255, 90, 95, 0.5) !important;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
}
