/* ============================================================
   login.css — Login page styles
   These styles are exclusive to the login page and are not part of dash.css.
   ============================================================ */

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

:root {
  --brand:   #0071e3;
  --brand-d: #005cbf;
  --brand-50:#e8f2fc;
  --teal:    #34c759; /* Mac Green just in case */
  --gray-50: #f8f9fb;
  --gray-100:#f1f3f7;
  --gray-200:#e4e8ef;
  --gray-300:#d0d6e2;
  --gray-400:#9aa5bc;
  --gray-500:#6b7a99;
  --gray-600:#4a546e;
  --gray-700:#323c52;
  --gray-800:#1e2535;
  --gray-900:#111827;
  --surface: #ffffff;
  --border:  var(--gray-200);
  --radius:  14px;
  --radius-sm: 8px;
  --font: 'Inter', system-ui, sans-serif;
  --trans: 200ms cubic-bezier(.4,0,.2,1);
}

html { font-size: 16px; }

body {
  font-family: var(--font);
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--gray-50);
  -webkit-font-smoothing: antialiased;
}

/* ---- Left Panel ---- */
.left-panel {
  background-color: #fafafa;
  background-image: 
    radial-gradient(at 80% 0%, hsla(210, 100%, 90%, 0.8) 0px, transparent 50%),
    radial-gradient(at 0% 50%, hsla(260, 100%, 93%, 0.8) 0px, transparent 50%),
    radial-gradient(at 80% 100%, hsla(190, 100%, 90%, 0.8) 0px, transparent 50%),
    radial-gradient(at 0% 0%, hsla(280, 100%, 94%, 0.8) 0px, transparent 50%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  position: relative;
  overflow: hidden;
  border-right: 1px solid rgba(0,0,0,0.05);
}

.left-panel::before {
  display: none;
}

.panel-brand {
  display:flex; align-items:center; gap:12px; position:relative;
}
.panel-logo {
  width:44px; height:44px;
  background: #ffffff;
  border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.panel-logo svg { width:22px; height:22px; color:var(--gray-900); }
.panel-logo-name { font-size:1.375rem; font-weight:800; color:var(--gray-900); letter-spacing:-0.02em; }

.panel-hero { position:relative; }
.panel-tagline {
  font-size:2.25rem; font-weight:800; color:var(--gray-900);
  line-height:1.25; letter-spacing:-0.03em; margin-bottom:16px;
}
.panel-tagline span { color: var(--brand); }

.panel-desc {
  font-size:.9375rem; color:var(--gray-600); line-height:1.65;
  max-width:380px;
}

.panel-features { display:flex; flex-direction:column; gap:14px; position:relative; }
.panel-feature { display:flex; align-items:flex-start; gap:12px; }

.feat-icon {
  width:42px; height:42px; border-radius:12px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05); /* Apple style elevation */
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
  font-size: 22px;
}
.feat-icon svg { width:18px; height:18px; color:var(--gray-900); }
.feat-text { margin-top:2px; }
.feat-text strong { display:block; font-size:.875rem; font-weight:700; color:var(--gray-900); }
.feat-text span { font-size:.8125rem; color:var(--gray-500); }

/* ---- Right Panel ---- */
.right-panel {
  display:flex; align-items:center; justify-content:center;
  padding: 48px 40px;
}

.login-box {
  width: 100%; max-width: 420px;
  display:flex; flex-direction:column; gap:28px;
}

.login-heading h1 {
  font-size:1.625rem; font-weight:800; color:var(--gray-900); letter-spacing:-0.02em;
  margin-bottom:6px;
}
.login-heading p { font-size:.9rem; color:var(--gray-500); }

/* ---- Role selector label ---- */
.role-label {
  font-size:.8125rem; font-weight:600; color:var(--gray-600); margin-bottom:10px;
}

/* ---- Role tabs ---- */
.role-tabs {
  display:grid; grid-template-columns:1fr 1fr; gap:10px;
}
.role-tab {
  display:flex; flex-direction:column; align-items:center; gap:8px;
  padding:16px 12px;
  border:2px solid var(--border);
  border-radius:var(--radius);
  cursor:pointer; background:var(--surface);
  transition:border-color var(--trans), background var(--trans), box-shadow var(--trans);
}
.role-tab:hover { border-color:var(--gray-300); background:var(--gray-50); }
.role-tab.selected {
  border-color:var(--brand);
  background:var(--brand-50);
  box-shadow:0 0 0 3px rgba(10,150,105,.08);
}
.role-tab-icon {
  width:44px; height:44px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  background:var(--gray-100);
  transition:background var(--trans);
}
.role-tab.selected .role-tab-icon { background:var(--brand); }
.role-tab-icon svg { width:22px; height:22px; color:var(--gray-500); }
.role-tab.selected .role-tab-icon svg { color:#fff; }
.role-tab-label { font-size:.8125rem; font-weight:600; color:var(--gray-600); }
.role-tab.selected .role-tab-label { color:var(--brand); }
.role-tab-sub { font-size:11px; color:var(--gray-400); text-align:center; line-height:1.4; }

/* ---- Form fields ---- */
.form-fields { display:flex; flex-direction:column; gap:14px; }
.field { display:flex; flex-direction:column; gap:6px; }
.field label { font-size:.8125rem; font-weight:500; color:var(--gray-700); }
.field input {
  padding:10px 14px; border:1px solid var(--border);
  border-radius:var(--radius-sm); font-size:.9rem;
  font-family:inherit; color:var(--gray-800); background:var(--surface);
  outline:none; transition:border-color var(--trans), box-shadow var(--trans);
}
.field input:focus {
  border-color:var(--brand); box-shadow:0 0 0 3px rgba(10,150,105,.08);
}

.field-pw { position:relative; }
.field-pw input { padding-right:44px; }
.pw-toggle {
  position:absolute; right:12px; top:50%; transform:translateY(-50%);
  background:none; border:none; cursor:pointer; color:var(--gray-400);
  display:flex; align-items:center; justify-content:center;
}
.pw-toggle:hover { color:var(--gray-600); }
.pw-toggle svg { width:18px; height:18px; }

.form-footer { display:flex; align-items:center; justify-content:space-between; }
.check-row { display:flex; align-items:center; gap:8px; cursor:pointer; }
.check-row input { accent-color:var(--brand); }
.check-row span { font-size:.8125rem; color:var(--gray-600); }
.form-link {
  font-size:.8125rem; color:var(--brand); font-weight:500;
  text-decoration:none; background:none; border:none; cursor:pointer;
}
.form-link:hover { text-decoration:underline; }

/* ---- Submit button ---- */
.btn-login {
  width:100%; padding:11px 20px;
  background:var(--brand); color:#fff;
  border:none; border-radius:12px;
  font-size:.95rem; font-weight:600; font-family:inherit;
  cursor:pointer; display:flex; align-items:center; justify-content:center; gap:8px;
  transition:background var(--trans), box-shadow var(--trans), transform var(--trans);
}
.btn-login:hover { background:var(--brand-d); box-shadow:0 4px 14px rgba(0,113,227,.25); transform:translateY(-1px); }
.btn-login:active { transform:translateY(0); }
.btn-login svg { width:18px; height:18px; }

/* ---- Spinner ---- */
@keyframes spin { to { transform: rotate(360deg); } }
.spin-icon { animation: spin .6s linear infinite; }

/* ---- Error message ---- */
.form-error {
  display:none; align-items:center; gap:8px;
  background:#fef2f2; color:#b91c1c;
  border:1px solid #fecaca; border-radius:var(--radius-sm);
  padding:10px 14px; font-size:.8125rem;
}
.form-error.show { display:flex; }
.form-error svg { flex-shrink:0; width:16px; height:16px; }

/* ---- Demo hint ---- */
.demo-hint {
  background:var(--gray-100); border-radius:10px;
  padding:12px 14px; font-size:.8rem; color:var(--gray-500); line-height:1.5;
}
.demo-hint strong { color:var(--gray-700); }
.demo-hint code {
  background:#fff; padding:1px 5px; border-radius:4px; font-size:11px;
}

/* ---- Footer ---- */
.login-footer { text-align:center; font-size:.8125rem; color:var(--gray-400); }
.login-footer a { color:var(--brand); text-decoration:none; font-weight:500; }
.login-footer a:hover { text-decoration:underline; }

@media (max-width:768px) {
  body { grid-template-columns:1fr; }
  .left-panel { display:none; }
  .right-panel { padding:32px 20px; }
}

/* ---- Nova CRM sidebar logo ---- */
.sidebar-brand-logo {
  height: 34px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* ---- 3D Logo Effects ---- */
.logo-3d-wrapper {
  position: relative;
  display: inline-flex;
}

.logo-3d-img {
  /* Effetto estrusione 3D solido tramite drop-shadow sovrapposti */
  filter: 
    drop-shadow(1px 1px 0px rgba(0,0,0,0.05))
    drop-shadow(2px 2px 0px rgba(0,0,0,0.05))
    drop-shadow(3px 3px 0px rgba(0,0,0,0.05))
    drop-shadow(4px 4px 10px rgba(0,0,0,0.15));
  display: block;
  z-index: 1;
}
