:root {
  color-scheme: dark;
  --bg: #05070b;
  --card-bg: #080b10;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.15);
  --grid-line: rgba(255, 255, 255, 0.03);
  --text: #ffffff;
  --muted: #8b9bb4;
  --accent: #10b981; /* emerald-500 */
  --accent-hover: #059669; /* emerald-600 */
}

.light {
  color-scheme: light;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --line: rgba(0, 0, 0, 0.1);
  --line-strong: rgba(0, 0, 0, 0.15);
  --grid-line: rgba(0, 0, 0, 0.05);
  --text: #0f172a;
  --muted: #64748b;
  --accent: #10b981;
  --accent-hover: #059669;
}

* {
  box-sizing: border-box;
  border-radius: 0 !important;
}

html, body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  font-family: "Chakra Petch", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.split-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Left Panel */
.panel-left {
  display: none;
  position: relative;
  overflow: hidden;
  background: #000;
  width: 50%;
}

@media (min-width: 1024px) {
  .panel-left {
    display: block;
  }
}

.bg-video {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4);
}

.left-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 3rem;
  color: #fff;
}

.brand-light {
  color: #fff !important;
}

.text-emerald {
  color: #10b981;
}

.left-text h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.left-text p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.125rem;
  max-width: 28rem;
}

.left-footer {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Right Panel */
.panel-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image: 
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
}

.right-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
}

.brand-mobile {
  display: none;
}

@media (max-width: 1023px) {
  .brand-mobile {
    display: inline-flex;
  }
}

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

.right-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background-color: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.card-header {
  text-align: center;
  margin-bottom: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  margin-bottom: 1.5rem;
}

.brand-logo {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
}

.brand-copy {
  text-align: left;
  line-height: 1.2;
}

.brand-name {
  font-weight: 700;
  font-size: 1.1rem;
}

.brand-name span {
  color: var(--accent);
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.card-header h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.card-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.alert {
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  font-size: 0.875rem;
}

.input-group {
  margin-bottom: 1.25rem;
}

.input-group label {
  display: block;
  font-size: 0.875rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.input-group input {
  width: 100%;
  height: 2.75rem;
  padding: 0 1rem;
  background-color: var(--bg);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.login-form button, .primary-link {
  width: 100%;
  height: 2.75rem;
  background-color: var(--accent);
  color: #fff;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.login-form button:hover, .primary-link:hover {
  background-color: var(--accent-hover);
}

.card-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}

.card-footer a {
  color: var(--text);
  text-decoration: underline;
  transition: color 0.2s;
}

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

.text-center {
  text-align: center;
}

.system-status {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent);
  display: inline-block;
}

.workspace-success {
  text-align: center;
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.workspace-header h3 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.status-text {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 2rem;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50% !important;
  background-color: var(--accent);
}

.workspace-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.secondary {
  width: 100%;
  height: 2.75rem;
  background-color: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background-color 0.2s, border-color 0.2s;
}

.secondary:hover {
  background-color: rgba(128,128,128,0.1);
  border-color: var(--muted);
}

.hidden {
  display: none !important;
}

.theme-toggle {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50% !important;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}
.theme-toggle:hover {
  background: rgba(128,128,128,0.1);
}
