/* ══ auth-modern.css — White + Left Image Auth ════════════════════════════ */
:root {
  --auth-bg: #fff;
  --auth-text: #1a1a1a;
  --auth-text-muted: #888;
  --auth-text-dim: #bbb;
  --auth-border: #e8e8e8;
  --auth-border-focus: #1a1a1a;
  --auth-input-bg: #fafafa;
  --auth-placeholder: #bbb;
  --auth-error-bg: #fff0f0;
  --auth-error-border: #fca5a5;
  --auth-error-text: #b91c1c;
  --auth-success-bg: #f0fff0;
  --auth-success-border: #a5fca5;
  --auth-success-text: #1b8c1b;
  --auth-accent: #1a1a1a;
  --auth-accent-hover: #333;
  --auth-radius: 0;
  --auth-radius-sm: 8px;
  --auth-transition: .2s ease;
}

* { box-sizing: border-box; }

.auth-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  font-family: 'Montserrat', system-ui, sans-serif;
  background: var(--auth-bg);
}

/* ── Left image panel ─────────────────────────────────────────────────────── */
.auth-image-panel {
  flex: 0 0 50%;
  max-width: 50%;
  min-height: 100vh;
  position: relative;
}

/* ── Right form panel ─────────────────────────────────────────────────────── */
.auth-form-panel {
  flex: 0 0 50%;
  max-width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  min-height: 100vh;
}
.auth-form-box {
  width: 100%;
  max-width: 400px;
}

.auth-logo {
  margin-bottom: 32px;
}
.auth-logo img {
  height: 32px;
  object-fit: contain;
}

.auth-heading {
  margin-bottom: 28px;
}
.auth-heading h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--auth-text);
  margin: 0 0 4px;
}
.auth-heading p {
  font-size: .85rem;
  color: var(--auth-text-muted);
  margin: 0;
}

.auth-error, .auth-success {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 14px;
  border-radius: var(--auth-radius-sm);
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 18px;
  line-height: 1.5;
  animation: shake .35s ease;
}
.auth-error  { background: var(--auth-error-bg); border: 1px solid var(--auth-error-border); color: var(--auth-error-text); }
.auth-success { background: var(--auth-success-bg); border: 1px solid var(--auth-success-border); color: var(--auth-success-text); }
.auth-error i, .auth-success i { flex-shrink: 0; margin-top: 2px; }

@keyframes shake {
  0%,100%{transform:translateX(0)}
  20%{transform:translateX(-5px)}
  40%{transform:translateX(5px)}
  60%{transform:translateX(-3px)}
  80%{transform:translateX(3px)}
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.form-group label {
  font-size: .75rem;
  font-weight: 700;
  color: var(--auth-text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrap .input-icon {
  position: absolute;
  left: 13px;
  color: var(--auth-text-dim);
  font-size: 14px;
  pointer-events: none;
  z-index: 1;
}

.form-input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  background: var(--auth-input-bg);
  border: 1.5px solid var(--auth-border);
  border-radius: var(--auth-radius-sm);
  color: var(--auth-text);
  font-size: .85rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--auth-transition), box-shadow var(--auth-transition);
}
.form-input::placeholder { color: var(--auth-placeholder); }
.form-input:focus {
  border-color: var(--auth-border-focus);
  box-shadow: 0 0 0 3px rgba(0,0,0,.04);
}

.input-wrap .pw-toggle {
  position: absolute;
  right: 11px;
  background: none;
  border: none;
  color: var(--auth-text-dim);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  transition: color var(--auth-transition);
}
.input-wrap .pw-toggle:hover { color: var(--auth-text); }

/* Password strength */
.pw-strength {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}
.pw-strength-bar {
  flex: 1;
  height: 3px;
  border-radius: 4px;
  background: #e8e8e8;
  transition: background .3s;
}
.pw-strength-text {
  font-size: .7rem;
  font-weight: 600;
  margin-top: 4px;
  min-height: 16px;
}

/* Label row */
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.check-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.check-wrap input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--auth-accent);
  cursor: pointer;
}
.check-wrap label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--auth-text-muted);
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
}

.forgot-link {
  font-size: .8rem;
  font-weight: 700;
  color: var(--auth-text-muted);
  text-decoration: none;
  transition: color var(--auth-transition);
}
.forgot-link:hover { color: var(--auth-text); }

/* Submit button */
.auth-btn {
  width: 100%;
  padding: 14px;
  background: var(--auth-accent);
  color: #fff;
  border: none;
  border-radius: var(--auth-radius-sm);
  font-size: .85rem;
  font-weight: 800;
  letter-spacing: .04em;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background var(--auth-transition);
}
.auth-btn:hover { background: var(--auth-accent-hover); }
.auth-btn:disabled { opacity: .5; cursor: not-allowed; }

.auth-btn .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: none;
}
.auth-btn.loading .spinner { display: inline-block; }
.auth-btn.loading .btn-text { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--auth-text-dim);
  font-size: .75rem;
  font-weight: 700;
  margin: 4px 0;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--auth-border);
}

/* Footer links */
.auth-footer {
  text-align: center;
  margin-top: 4px;
}
.auth-footer p {
  font-size: .82rem;
  color: var(--auth-text-muted);
  margin: 0;
}
.auth-footer a {
  color: var(--auth-accent);
  font-weight: 700;
  text-decoration: none;
}
.auth-footer a:hover { text-decoration: underline; }

/* Terms checkbox */
.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.terms-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--auth-accent);
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}
.terms-check label {
  font-size: .78rem;
  color: var(--auth-text-muted);
  cursor: pointer;
  line-height: 1.5;
  text-transform: none;
  letter-spacing: normal;
}
.terms-check a {
  color: var(--auth-accent);
  font-weight: 700;
  text-decoration: none;
}

/* ── Dashboard (white + sidebar) ─────────────────────────────────────────── */
.dash-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  font-family: 'Montserrat', system-ui, sans-serif;
  background: #f5f7fa;
  color: #1a1a1a;
}

/* Sidebar */
.dash-sidebar {
  width: 240px;
  min-width: 240px;
  min-height: 100vh;
  background: #fff;
  border-right: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid #f0f0f0;
}
.sidebar-logo img { height: 26px; }
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid #f0f0f0;
}
.sidebar-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #1a1a1a;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  font-weight: 800;
}
.sidebar-user-info { display: flex; flex-direction: column; }
.sidebar-user-info strong { font-size: .82rem; font-weight: 700; }
.sidebar-user-info span { font-size: .7rem; color: #999; }

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 600;
  color: #666;
  text-decoration: none;
  transition: all .15s;
}
.sidebar-link i { width: 18px; text-align: center; font-size: .9rem; }
.sidebar-link:hover { background: #f5f5f5; color: #1a1a1a; }
.sidebar-link.active { background: #1a1a1a; color: #fff; }
.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid #f0f0f0;
}
.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 600;
  color: #e63946;
  text-decoration: none;
  transition: all .15s;
}
.sidebar-logout i { width: 18px; text-align: center; }
.sidebar-logout:hover { background: #fff5f5; }

/* Main content */
.dash-main {
  flex: 1;
  padding: 32px 40px 60px;
  max-width: 1100px;
}
.dash-mobile-top { display: none; }
.dash-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
}
.dash-topbar h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 4px;
  letter-spacing: -.02em;
}
.dash-topbar p { font-size: .85rem; color: #999; margin: 0; }
.dash-date { font-size: .8rem; color: #bbb; font-weight: 600; padding-top: 4px; }

/* Cards */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.dash-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  text-decoration: none;
  color: #1a1a1a;
  transition: box-shadow .2s, transform .2s;
  cursor: pointer;
}
.dash-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  transform: translateY(-2px);
}
.dash-card-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: #f5f5f5;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.3rem;
  color: #1a1a1a;
}
.dash-card h3 { font-size: .9rem; font-weight: 700; margin: 0 0 4px; }
.dash-card p { font-size: .75rem; color: #999; margin: 0; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media(max-width:768px){
  .auth-image-panel { display: none; }
  .auth-form-panel { flex: 0 0 100%; max-width: 100%; padding: 32px 20px; min-height: auto; }
  .auth-form-box { max-width: 100%; }
  .dash-sidebar { display: none; }
  .dash-main { padding: 0; }
  .dash-topbar { flex-direction: column; gap: 4px; padding: 16px 16px 0; }
  .dash-topbar h1 { font-size: 1.2rem; }
  .dash-date { font-size: .7rem; }
  .dash-grid { grid-template-columns: repeat(2,1fr); gap: 10px; padding: 0 16px 24px; }
  .dash-card { padding: 20px 12px; }
  .dash-card-icon { width: 44px; height: 44px; font-size: 1.1rem; margin-bottom: 12px; }
  .dash-card h3 { font-size: .78rem; }
  .dash-card p { font-size: .68rem; }
  .dash-mobile-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    position: sticky;
    top: 0;
    z-index: 10;
  }
  .dash-back-btn {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #f5f5f5; color: #1a1a1a; text-decoration: none;
    font-size: 15px; flex-shrink: 0;
  }
  .dash-mobile-logo { height: 22px; }
  .dash-mobile-top h2 { font-size: .85rem; font-weight: 700; margin: 0 0 0 auto; color: #999; }
}
