/* =============================================
   EXTRABANCA PEOPLE — style.css v3
   Palette completa dal sito ufficiale:
   Rosso    #c0272d  — brand primario
   Verde    #3aaa5e  — "Attivo", successo, privati
   Blu      #4a90d9  — info, employee badge, aziende
   Grigio   #888888  — testo secondario
   Scuro    #2c2c2c  — testo, navbar, footer
   Bianco   #ffffff  — sfondo principale
   Grigio bg #f7f7f7 — sfondo sezioni
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap');

:root {
  --eb-red:       #c0272d;
  --eb-red-dark:  #9a1e23;
  --eb-red-light: #fdf0f0;
  --eb-green:     #3aaa5e;
  --eb-green-dark:#2d8a4c;
  --eb-blue:      #4a90d9;
  --eb-blue-dark: #357abd;
  --eb-gray:      #888888;
  --eb-dark:      #2c2c2c;
  --eb-bg:        #f7f7f7;
  --eb-white:     #ffffff;
  --eb-border:    #e0e0e0;
  --eb-text:      #444444;
}

* { box-sizing: border-box; }

body {
  background: var(--eb-white);
  color: var(--eb-text);
  font-family: 'Open Sans', 'Segoe UI', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* ══════════════════════════════════════════
   NAVBAR — bianca, bordo rosso in basso
   ══════════════════════════════════════════ */
.eb-navbar {
  background: var(--eb-white) !important;
  border-bottom: 3px solid var(--eb-red);
  box-shadow: 0 1px 6px rgba(0,0,0,.07);
  padding: 0 !important;
}
.eb-navbar .container { min-height: 62px; align-items: stretch; }
.eb-navbar .navbar-brand img { height: 28px; filter: none !important; }
.eb-navbar .nav-link {
  color: var(--eb-dark) !important;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 20px 14px !important;
  border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s;
  display: flex; align-items: center; gap: 5px;
}
.eb-navbar .nav-link:hover {
  color: var(--eb-red) !important;
  border-bottom-color: var(--eb-red);
}
.eb-navbar .nav-label {
  font-size: 11px; color: var(--eb-gray);
  text-transform: uppercase; letter-spacing: .1em;
  font-weight: 600; align-self: center;
}
.btn-navbar {
  border: 2px solid var(--eb-red);
  color: var(--eb-red) !important;
  background: transparent;
  font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: .05em;
  border-radius: 4px; padding: 7px 15px; margin-left: 8px;
  transition: all .15s;
  display: inline-flex; align-items: center; gap: 5px;
  text-decoration: none;
}
.btn-navbar:hover { background: var(--eb-red); color: #fff !important; }

/* ══════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════ */
.btn-eb {
  background: var(--eb-red); color: #fff !important;
  border: 2px solid var(--eb-red);
  font-weight: 700; font-size: 12px;
  text-transform: uppercase; letter-spacing: .05em;
  border-radius: 4px; padding: 9px 20px;
  transition: all .15s; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
}
.btn-eb:hover { background: var(--eb-red-dark); border-color: var(--eb-red-dark); color: #fff !important; }

.btn-eb-outline {
  background: transparent; color: var(--eb-red) !important;
  border: 2px solid var(--eb-red);
  font-weight: 700; font-size: 12px;
  text-transform: uppercase; letter-spacing: .05em;
  border-radius: 4px; padding: 9px 20px;
  transition: all .15s; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
}
.btn-eb-outline:hover { background: var(--eb-red); color: #fff !important; }

.btn-green {
  background: var(--eb-green); color: #fff !important;
  border: 2px solid var(--eb-green);
  font-weight: 700; font-size: 12px;
  text-transform: uppercase; letter-spacing: .05em;
  border-radius: 4px; padding: 9px 20px;
  transition: all .15s; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
}
.btn-green:hover { background: var(--eb-green-dark); border-color: var(--eb-green-dark); color: #fff !important; }

.btn-blue {
  background: var(--eb-blue); color: #fff !important;
  border: 2px solid var(--eb-blue);
  font-weight: 700; font-size: 12px;
  text-transform: uppercase; letter-spacing: .05em;
  border-radius: 4px; padding: 9px 20px;
  transition: all .15s; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
}
.btn-blue:hover { background: var(--eb-blue-dark); border-color: var(--eb-blue-dark); color: #fff !important; }

/* ══════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════ */
.card-eb {
  border: 1px solid var(--eb-border);
  border-top: 3px solid var(--eb-red);
  border-radius: 6px;
  box-shadow: 0 1px 8px rgba(0,0,0,.05);
  background: #fff; overflow: hidden;
}
.card-eb .card-header {
  background: var(--eb-bg);
  border-bottom: 1px solid var(--eb-border);
  color: var(--eb-dark);
  font-weight: 700; font-size: 12px;
  text-transform: uppercase; letter-spacing: .07em;
  padding: 11px 18px;
  display: flex; align-items: center; gap: 8px;
}
.card-eb .card-header i { color: var(--eb-red); }
.card-eb .card-body { padding: 20px; }

/* ══════════════════════════════════════════
   PAGE HEADER
   ══════════════════════════════════════════ */
.page-header {
  background: var(--eb-white);
  border-bottom: 1px solid var(--eb-border);
  padding: 22px 0 18px; margin-bottom: 28px;
}
.page-header h2 {
  font-size: 1.4rem; font-weight: 700;
  color: var(--eb-dark); margin: 0;
  display: flex; align-items: center; gap: 10px;
}
.page-header h2 i { color: var(--eb-red); }

/* ══════════════════════════════════════════
   LOGIN
   ══════════════════════════════════════════ */
.login-page {
  min-height: 100vh; background: var(--eb-bg);
  display: flex; align-items: center; justify-content: center;
}
.login-wrap { max-width: 420px; width: 100%; padding: 24px; }
.login-box {
  background: #fff; border-radius: 8px;
  border: 1px solid var(--eb-border);
  border-top: 4px solid var(--eb-red);
  box-shadow: 0 2px 20px rgba(0,0,0,.08);
  padding: 40px 36px;
}
.login-logo { display: block; margin: 0 auto 20px; height: 32px; filter: none !important; }
.login-title { text-align: center; font-size: 17px; font-weight: 700; color: var(--eb-dark); margin-bottom: 3px; }
.login-sub { text-align: center; color: var(--eb-gray); font-size: 13px; margin-bottom: 26px; }

/* ══════════════════════════════════════════
   FORM CONTROLS
   ══════════════════════════════════════════ */
.form-label {
  font-weight: 600; font-size: 13px;
  color: var(--eb-dark); margin-bottom: 5px;
  display: flex; align-items: center; gap: 5px;
}
.form-label i { color: var(--eb-red); }
.form-control {
  border: 1px solid var(--eb-border); border-radius: 4px;
  font-size: 14px; padding: 9px 13px;
  color: var(--eb-text); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
  border-color: var(--eb-red);
  box-shadow: 0 0 0 3px rgba(192,39,45,.10); outline: none;
}
.form-control::placeholder { color: #ccc; }
.form-select {
  border: 1px solid var(--eb-border); border-radius: 4px;
  font-size: 14px; padding: 9px 13px;
}
.form-select:focus {
  border-color: var(--eb-red);
  box-shadow: 0 0 0 3px rgba(192,39,45,.10);
}
.input-group-text {
  background: #fff !important;
  border-color: var(--eb-border) !important;
  color: #ccc;
}
.input-group .form-control { border-left: none !important; }

/* ══════════════════════════════════════════
   PROFILE HERO
   ══════════════════════════════════════════ */
.profile-hero {
  background: linear-gradient(120deg, var(--eb-dark) 0%, #3d0a0c 55%, var(--eb-red) 100%);
  color: #fff; padding: 50px 0 38px; text-align: center;
}
.profile-photo {
  width: 110px; height: 110px; object-fit: cover;
  border-radius: 50%; border: 3px solid rgba(255,255,255,.7);
  box-shadow: 0 3px 14px rgba(0,0,0,.3);
  display: block; margin: 0 auto 14px;
}
.profile-photo-placeholder {
  width: 110px; height: 110px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px; font-size: 2.8rem; color: rgba(255,255,255,.5);
}
.profile-hero h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 4px; }
.profile-hero .job-title { font-size: .95rem; opacity: .85; font-weight: 300; margin-bottom: 2px; }
.profile-hero .company { font-size: .8rem; opacity: .55; text-transform: uppercase; letter-spacing: .1em; }

/* ══════════════════════════════════════════
   CONTACT LIST
   ══════════════════════════════════════════ */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li {
  display: flex; align-items: center;
  padding: 12px 18px; border-bottom: 1px solid var(--eb-border);
  gap: 12px; font-size: 14px;
}
.contact-list li:last-child { border-bottom: none; }
.contact-list .ci {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--eb-red-light); color: var(--eb-red);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.contact-list .cl-label { font-size: 10px; color: var(--eb-gray); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1px; }
.contact-list a { color: var(--eb-dark); text-decoration: none; font-weight: 600; font-size: 14px; }
.contact-list a:hover { color: var(--eb-red); }

/* ══════════════════════════════════════════
   QR
   ══════════════════════════════════════════ */
.qr-wrap {
  background: #fff; display: inline-block; padding: 12px;
  border-radius: 6px; border: 2px solid var(--eb-red-light);
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

/* ══════════════════════════════════════════
   SHARE BUTTONS
   ══════════════════════════════════════════ */
.btn-share {
  border-radius: 50px !important;
  padding: 10px 24px !important;
  font-size: 12px !important;
  margin: 5px !important;
  min-width: 190px;
}

/* ══════════════════════════════════════════
   BADGES — usa la palette completa
   ══════════════════════════════════════════ */
.badge { font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 4px 10px; border-radius: 20px; }
.badge-admin    { background: var(--eb-red) !important; color: #fff !important; }
.badge-employee { background: var(--eb-blue) !important; color: #fff !important; }
.badge-active   { background: var(--eb-green) !important; color: #fff !important; }
.badge-inactive { background: var(--eb-gray) !important; color: #fff !important; }
/* Override Bootstrap badge colors */
.bg-success { background: var(--eb-green) !important; }
.bg-secondary { background: var(--eb-gray) !important; }

/* ══════════════════════════════════════════
   ADMIN TABLE
   ══════════════════════════════════════════ */
.table-eb { border-collapse: collapse; width: 100%; }
.table-eb thead th {
  background: var(--eb-dark); color: #fff;
  font-size: 11px; text-transform: uppercase;
  letter-spacing: .07em; font-weight: 700; border: none;
  padding: 13px 16px;
}
.table-eb tbody td {
  padding: 11px 16px; vertical-align: middle;
  font-size: 14px; border-bottom: 1px solid var(--eb-border);
  color: var(--eb-text); background: #fff;
}
.table-eb tbody tr:hover td { background: #fafafa; }

/* ══════════════════════════════════════════
   PHOTO UPLOAD
   ══════════════════════════════════════════ */
.photo-upload-wrap { position: relative; display: inline-block; }
.photo-upload-wrap img,
.photo-upload-wrap .photo-placeholder {
  width: 130px; height: 130px; border-radius: 8px;
  object-fit: cover; border: 2px solid var(--eb-border); display: block;
}
.photo-upload-wrap .photo-placeholder {
  background: var(--eb-bg); display: flex;
  align-items: center; justify-content: center; color: #ccc; font-size: 3rem;
}
.photo-upload-btn {
  position: absolute; bottom: -8px; right: -8px;
  background: var(--eb-red); color: #fff; border-radius: 50%;
  width: 30px; height: 30px; display: flex; align-items: center;
  justify-content: center; cursor: pointer; border: 2px solid #fff;
  font-size: 13px; transition: background .15s;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.photo-upload-btn:hover { background: var(--eb-red-dark); }

/* Save bar */
.save-bar {
  background: var(--eb-bg); border: 1px solid var(--eb-border);
  border-radius: 6px; padding: 14px 20px;
  display: flex; justify-content: flex-end; align-items: center;
  gap: 16px; flex-wrap: wrap;
}
.save-bar .url-hint { font-size: 12px; color: var(--eb-gray); display: flex; align-items: center; gap: 4px; }

/* ══════════════════════════════════════════
   ALERTS — verde, blu, rosso, grigio
   ══════════════════════════════════════════ */
.alert { border-radius: 5px; font-size: 14px; padding: 12px 16px; border: 1px solid; display: flex; align-items: center; gap: 8px; }
.alert i { flex-shrink: 0; }
.alert-success { background: #f0faf4; border-color: #b2dfbe; color: var(--eb-green-dark); }
.alert-danger   { background: var(--eb-red-light); border-color: #f5c6c6; color: var(--eb-red-dark); }
.alert-warning  { background: #fffbf0; border-color: #fde8a0; color: #7a5c00; }
.alert-info     { background: #f0f6ff; border-color: #b8d4f5; color: var(--eb-blue-dark); }

/* ══════════════════════════════════════════
   FOOTER — unico elemento scuro
   ══════════════════════════════════════════ */
.eb-footer {
  background: var(--eb-dark); color: #aaa;
  padding: 30px 0; margin-top: 60px;
  font-size: 13px; text-align: center;
}
.eb-footer img {
  /* Solo nel footer il logo va in bianco */
  filter: brightness(10) !important;
  height: 26px; display: block; margin: 0 auto 8px;
}
.eb-footer strong { color: #fff; }
.eb-footer a { color: #bbb; text-decoration: underline; }
.eb-footer a:hover { color: var(--eb-red); }

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
  .profile-hero h1 { font-size: 1.4rem; }
  .btn-share { min-width: unset !important; width: 100% !important; }
  .login-box { padding: 28px 20px; }
  .save-bar { flex-direction: column; align-items: stretch; }
  .save-bar .url-hint { display: none; }
  .page-header .d-flex { flex-direction: column; align-items: flex-start !important; gap: 12px !important; }
}
