/* ============================================================
   style.css — Lalafa CRM
   ============================================================ */

:root {
  --bg:     #0f1117;
  --bg2:    #161b27;
  --bg3:    #1e2536;
  --bg4:    #252d3f;
  --teal:   #00e5b0;
  --purple: #a78bfa;
  --orange: #f97316;
  --blue:   #38bdf8;
  --green:  #4ade80;
  --red:    #f87171;
  --text:   #e2e8f0;
  --text2:  #8892a4;
  --text3:  #4a5568;
  --border: #2a3347;
}

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

body {
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── LOGIN PAGE ── */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
}

.login-wrap {
  width: 100%;
  max-width: 400px;
  padding: 1.5rem;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-bottom: 2rem;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--teal), var(--purple));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: #0f1117;
}

.logo-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.logo-sub {
  font-size: 11px;
  color: var(--text2);
  letter-spacing: 0.5px;
}

.login-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
}

.login-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.login-desc {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 1.5rem;
}

.login-error {
  background: rgba(248,113,113,.1);
  border: 1px solid rgba(248,113,113,.3);
  color: var(--red);
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 13px;
  margin-bottom: 1rem;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 5px;
  font-weight: 500;
}

.field input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
}

.field input:focus {
  border-color: var(--teal);
}

.field input::placeholder {
  color: var(--text3);
}

.btn-login {
  width: 100%;
  background: var(--teal);
  color: #0f1117;
  border: none;
  border-radius: 8px;
  padding: 11px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: opacity .15s;
}

.btn-login:hover { opacity: 0.9; }
.btn-login:disabled { opacity: 0.5; cursor: not-allowed; }

.login-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text3);
  margin-top: 1.25rem;
}

.login-footer a {
  color: var(--teal);
  text-decoration: none;
}

.login-bottom {
  text-align: center;
  font-size: 11px;
  color: var(--text3);
  margin-top: 1.5rem;
}

.login-bottom a {
  color: var(--text2);
  text-decoration: none;
}

/* ── APP LAYOUT ── */
.app {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  width: 240px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.logo-area {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border);
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-section {
  padding: 0.6rem 0.75rem 0.2rem;
}

.nav-label {
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.3rem;
  padding: 0 4px;
  font-weight: 500;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 1px;
  transition: all .1s;
}

.nav-item:hover { background: var(--bg3); color: var(--text); }
.nav-item.active { background: rgba(0,229,176,.1); color: var(--teal); }

.sidebar-footer {
  margin-top: auto;
  padding: 0.85rem;
  border-top: 1px solid var(--border);
}

.user-area {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.6rem;
}

.user-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--purple));
  color: #0f1117;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}

.user-email {
  font-size: 11px;
  color: var(--text3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
}

.btn-logout {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text2);
  border-radius: 6px;
  padding: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
}

.btn-logout:hover {
  border-color: var(--red);
  color: var(--red);
}

/* ── MAIN ── */
.main {
  flex: 1;
  overflow: auto;
  padding: 2rem 2.5rem;
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-title {
  font-size: 22px;
  font-weight: 600;
}

.page-sub {
  font-size: 13px;
  color: var(--text2);
  margin-top: 2px;
}

.welcome-box {
  background: var(--bg2);
  border: 1px solid rgba(0,229,176,.25);
  border-top: 3px solid var(--teal);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  max-width: 500px;
}

.welcome-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 4px;
}

.welcome-desc {
  font-size: 13px;
  color: var(--text2);
}
