/* ============================================================
   SOMMAC – Area Riservata Stylesheet
   ============================================================ */

/* ---- Login page body ---- */
.ar-body #loginSection {
  min-height: calc(100vh - 72px);
  background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 60%, #1a0505 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 60px;
  position: relative;
  overflow: hidden;
}

.ar-body #loginSection::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(155,27,27,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(155,27,27,.06) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

.ar-body #loginSection::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(155,27,27,.15) 0%, transparent 65%);
  pointer-events: none;
}

/* ---- Login card wrapper ---- */
.ar-login-wrap {
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 2;
}

/* ---- Card ---- */
.ar-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
  overflow: hidden;
}

.ar-card__header {
  background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
  padding: 40px 40px 32px;
  text-align: center;
  position: relative;
}

.ar-card__header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #9B1B1B, #c42323, #9B1B1B);
}

.ar-card__lock-icon {
  width: 52px;
  height: 52px;
  background: rgba(155,27,27,.2);
  border: 2px solid rgba(155,27,27,.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e05555;
  font-size: 1.3rem;
  margin: 0 auto 16px;
}

.ar-card__logo {
  height: 54px;
  width: auto;
  margin: 0 auto 16px;
  filter: brightness(0) invert(1);
  opacity: .9;
}

.ar-card__title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
  font-family: 'Inter', sans-serif;
}

.ar-card__subtitle {
  font-size: .85rem;
  color: rgba(255,255,255,.5);
  font-family: 'Inter', sans-serif;
}

/* ---- Form ---- */
.ar-form {
  padding: 36px 40px 32px;
}

.ar-form__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 22px;
}

.ar-form__group label {
  font-size: .85rem;
  font-weight: 600;
  color: #2C2C2C;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'Inter', sans-serif;
}
.ar-form__group label i { color: #9B1B1B; font-size: .9rem; }

.ar-input-wrap {
  position: relative;
}

.ar-input-wrap input {
  width: 100%;
  padding: 13px 16px;
  font-size: .93rem;
  font-family: 'Inter', sans-serif;
  color: #2C2C2C;
  background: #F5F5F5;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  outline: none;
  transition: border-color .25s, box-shadow .25s;
}

.ar-input-wrap input:focus {
  border-color: #9B1B1B;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(155,27,27,.1);
}

.ar-input-wrap input.ar-input--error {
  border-color: #e53e3e;
  background: #fff5f5;
}

/* Password toggle */
.ar-input-wrap--pw input {
  padding-right: 48px;
}

.ar-toggle-pw {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #6b6b6b;
  font-size: .95rem;
  padding: 4px;
  transition: color .25s;
  font-family: 'Inter', sans-serif;
}
.ar-toggle-pw:hover { color: #9B1B1B; }

/* Error messages */
.ar-error {
  font-size: .8rem;
  color: #e53e3e;
  min-height: 16px;
  font-family: 'Inter', sans-serif;
}

.ar-error--general {
  text-align: center;
  font-size: .88rem;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 6px;
  background: #fff5f5;
  border: 1px solid #fecaca;
  margin-bottom: 16px;
  display: none;
}
.ar-error--general.show { display: block; }

/* Remember me */
.ar-form__remember {
  margin-bottom: 20px;
}

.ar-checkbox-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .85rem;
  color: #6b6b6b;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.ar-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #9B1B1B;
  flex-shrink: 0;
}

/* Login button */
.ar-btn {
  width: 100%;
  padding: 14px;
  background: #9B1B1B;
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .25s, transform .2s, box-shadow .25s;
  letter-spacing: .02em;
}
.ar-btn:hover {
  background: #7a1212;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(155,27,27,.4);
}
.ar-btn:disabled {
  opacity: .65;
  pointer-events: none;
}

/* Footer note */
.ar-card__footer {
  padding: 20px 40px 28px;
  text-align: center;
  border-top: 1px solid #e0e0e0;
}
.ar-card__footer p {
  font-size: .82rem;
  color: #6b6b6b;
  line-height: 1.6;
  font-family: 'Inter', sans-serif;
}
.ar-card__footer a {
  color: #9B1B1B;
  font-weight: 600;
  text-decoration: none;
  transition: color .25s;
}
.ar-card__footer a:hover { color: #7a1212; }

/* ============================================================
   DASHBOARD
   ============================================================ */
.ar-dashboard {
  padding-top: 100px;
  padding-bottom: 80px;
  min-height: calc(100vh - 72px);
  background: #F5F5F5;
}

.ar-dashboard__inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Welcome bar */
.ar-welcome {
  background: #fff;
  border-radius: 14px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  border-left: 5px solid #9B1B1B;
}

.ar-welcome__left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ar-welcome__avatar {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #9B1B1B, #c42323);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  font-family: 'Inter', sans-serif;
  flex-shrink: 0;
}

.ar-welcome h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2C2C2C;
  margin-bottom: 4px;
  font-family: 'Inter', sans-serif;
}
.ar-welcome p {
  font-size: .85rem;
  color: #6b6b6b;
  font-family: 'Inter', sans-serif;
}

.ar-logout-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #F5F5F5;
  color: #2C2C2C;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all .25s;
  white-space: nowrap;
}
.ar-logout-btn:hover {
  background: #9B1B1B;
  color: #fff;
  border-color: #9B1B1B;
}

/* Dashboard grid */
.ar-dash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.ar-dash-card {
  background: #fff;
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform .25s, box-shadow .25s;
  position: relative;
  overflow: hidden;
}
.ar-dash-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,.12);
}

.ar-dash-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.ar-dash-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #2C2C2C;
  font-family: 'Inter', sans-serif;
}

.ar-dash-card p {
  font-size: .86rem;
  color: #6b6b6b;
  line-height: 1.6;
  font-family: 'Inter', sans-serif;
  flex: 1;
}

.ar-dash-card__badge {
  display: inline-block;
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  align-self: flex-start;
  margin-top: 4px;
}

.ar-dash-card__badge--coming {
  background: rgba(245,158,11,.12);
  color: #d97706;
}

/* Notice */
.ar-notice {
  background: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border-left: 4px solid #3b82f6;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.ar-notice i {
  color: #3b82f6;
  font-size: 1.2rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.ar-notice p {
  font-size: .88rem;
  color: #6b6b6b;
  line-height: 1.65;
  font-family: 'Inter', sans-serif;
}
.ar-notice a {
  color: #9B1B1B;
  font-weight: 600;
  transition: color .25s;
}
.ar-notice a:hover { color: #7a1212; }

/* ============================================================
   RESPONSIVE – Area Riservata
   ============================================================ */
@media (max-width: 768px) {
  .ar-form { padding: 28px 24px 24px; }
  .ar-card__header { padding: 32px 24px 24px; }
  .ar-card__footer { padding: 18px 24px 24px; }

  .ar-dash-grid { grid-template-columns: 1fr; }

  .ar-welcome {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .ar-logout-btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .ar-login-wrap { padding: 0 4px; }
}
