/* styles.css */
:root {
  --buncss-light: initial;
  --buncss-dark: ;
  color-scheme: light dark;
  --bg: #f9fafb;
  --surface: #fff;
  --border: #e5e7eb;
  --border-subtle: #f3f4f6;
  --border-active: #111827;
  --text: #111827;
  --text-2: #374151;
  --text-3: #6b7280;
  --text-4: #9ca3af;
  --error: #dc2626;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --buncss-light: ;
    --buncss-dark: initial;
    --bg: #0f0f11;
    --surface: #1a1a1f;
    --border: #2a2a32;
    --border-subtle: #222228;
    --border-active: #9ca3af;
    --text: #f3f4f6;
    --text-2: #d1d5db;
    --text-3: #9ca3af;
    --text-4: #6b7280;
    --error: #f87171;
  }
}

[data-theme="light"] {
  --buncss-light: initial;
  --buncss-dark: ;
  color-scheme: light;
  --bg: #f9fafb;
  --surface: #fff;
  --border: #e5e7eb;
  --border-subtle: #f3f4f6;
  --border-active: #111827;
  --text: #111827;
  --text-2: #374151;
  --text-3: #6b7280;
  --text-4: #9ca3af;
  --error: #dc2626;
}

[data-theme="dark"] {
  --buncss-light: ;
  --buncss-dark: initial;
  color-scheme: dark;
  --bg: #0f0f11;
  --surface: #1a1a1f;
  --border: #2a2a32;
  --border-subtle: #222228;
  --border-active: #9ca3af;
  --text: #f3f4f6;
  --text-2: #d1d5db;
  --text-3: #9ca3af;
  --text-4: #6b7280;
  --error: #f87171;
}

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

body {
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

h1 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

h2 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

p {
  color: var(--text-3);
  line-height: 1.7;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 380px;
  padding: 32px;
}

label {
  display: block;
  color: var(--text-2);
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 500;
}

input[type="text"], input[type="password"] {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: var(--surface);
  outline: none;
  width: 100%;
  margin-bottom: 16px;
  padding: 8px 12px;
  transition: border-color .15s;
  font-family: inherit;
  font-size: 14px;
}

input[type="text"]:focus, input[type="password"]:focus {
  border-color: var(--border-active);
}

textarea {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  background: var(--surface);
  resize: none;
  outline: none;
  width: 100%;
  padding: 10px 14px;
  transition: border-color .15s;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
}

textarea:focus {
  border-color: var(--border-active);
}

.error {
  color: var(--error);
  min-height: 18px;
  margin-bottom: 12px;
  font-size: 13px;
}

.btn {
  display: inline-flex;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  justify-content: center;
  align-items:  center;
  gap: 6px;
  padding: 8px 20px;
  transition: opacity .15s, background .15s;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
}

.btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  opacity: .85;
}

.btn-outline {
  color: var(--text);
  border: 1.5px solid var(--border);
  background: none;
}

.btn-outline:hover {
  background: var(--bg);
}

.btn-ghost {
  color: var(--text-3);
  background: none;
  border: none;
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-full {
  width: 100%;
}

.btn-sm {
  padding: 5px 14px;
  font-size: 13px;
}

.page-center {
  display: flex;
  justify-content: center;
  align-items:  center;
  min-height: 100vh;
  padding: 24px 16px;
}

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

.page-center .footer-link a {
  color: var(--text);
  font-weight: 500;
}

.app-header {
  display: flex;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  justify-content: space-between;
  align-items:  center;
  height: 52px;
  padding: 0 24px;
}

.logo {
  letter-spacing: -.01em;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}

.logo .seven {
  color: var(--text-3);
}

.app-header .right {
  display: flex;
  align-items:  center;
  gap: 12px;
}

.app-header .username {
  color: var(--text-3);
  font-size: 13px;
}
