/* ── Portale Clienti — Stili frontend ──────────────────────────────────── */

.pc-wrap {
  display: flex;
  min-height: 700px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 14px;
  margin: 20px 0;
}

/* ── Sidebar ── */
.pc-sidebar {
  width: 230px;
  background: #0d2c4f;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.pc-logo {
  padding: 20px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.pc-logo span { display: block; font-size: 13px; font-weight: 600; color: #fff; }
.pc-logo small { font-size: 11px; color: #7b97b8; }

.pc-user {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.pc-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #1b9e75;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: #fff; flex-shrink: 0;
}
.pc-uname  { font-size: 12px; font-weight: 600; color: #fff; }
.pc-urole  { font-size: 11px; color: #7b97b8; word-break: break-all; }

.pc-nav { padding: 10px 8px; flex: 1; }

.pc-nav-section {
  font-size: 10px; color: #7b97b8;
  padding: 12px 10px 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pc-nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px; color: #7b97b8;
  text-decoration: none;
  margin-bottom: 2px;
  transition: background 0.15s, color 0.15s;
}
.pc-nav-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.pc-nav-item.active { background: rgba(27,158,117,0.2); color: #1b9e75; }
.pc-nav-item.pc-sub { padding-left: 28px; font-size: 12px; }

.pc-nav-footer { padding: 16px 10px 8px; margin-top: auto; }
.pc-logout {
  font-size: 12px; color: #7b97b8;
  text-decoration: none; display: block;
}
.pc-logout:hover { color: #fff; }

/* ── Main area ── */
.pc-main {
  flex: 1;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pc-topbar {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 22px;
  height: 54px;
  display: flex; align-items: center;
  flex-shrink: 0;
}
.pc-topbar-title { font-size: 15px; font-weight: 600; color: #1a202c; }
.pc-topbar-sub   { font-size: 12px; color: #718096; }

.pc-content { padding: 18px 22px; overflow-y: auto; flex: 1; }

/* ── Stat cards ── */
.pc-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.pc-stat {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px;
}
.pc-stat-label { font-size: 11px; color: #718096; margin-bottom: 4px; }
.pc-stat-val   { font-size: 22px; font-weight: 600; color: #1a202c; }
.pc-stat-sub   { font-size: 11px; margin-top: 3px; }
.pc-green { color: #1b9e75; }
.pc-amber { color: #b7791f; }
.pc-blue  { color: #2b6cb0; }

/* ── Sezioni ── */
.pc-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 14px;
  overflow: hidden;
}
.pc-section-head {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  display: flex; align-items: center; justify-content: space-between;
}
.pc-section-title { font-size: 13px; font-weight: 600; color: #1a202c; }
.pc-section-link  { font-size: 12px; color: #1b9e75; cursor: pointer; text-decoration: none; }

/* ── Tabelle ── */
.pc-table {
  width: 100%; border-collapse: collapse;
  font-size: 12px; table-layout: fixed;
}
.pc-table th {
  padding: 8px 14px;
  text-align: left; font-size: 11px;
  color: #718096; font-weight: 500;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.pc-table td {
  padding: 10px 14px;
  color: #2d3748;
  border-bottom: 1px solid #f0f4f8;
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.pc-table tr:last-child td { border-bottom: none; }

/* ── Badge ── */
.pc-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 12px;
  font-size: 11px; font-weight: 500;
}
.pc-badge-green  { background: #c6f6d5; color: #276749; }
.pc-badge-amber  { background: #fefcbf; color: #7b6016; }
.pc-badge-blue   { background: #bee3f8; color: #2a4365; }
.pc-badge-gray   { background: #edf2f7; color: #4a5568; }
.pc-badge-red    { background: #fed7d7; color: #822727; }

/* ── Progress bar ── */
.pc-pbar {
  height: 5px; background: #e2e8f0;
  border-radius: 3px; overflow: hidden; width: 90px;
  display: inline-block; vertical-align: middle;
}
.pc-pfill { height: 100%; background: #1b9e75; border-radius: 3px; }

/* ── Filtri ── */
.pc-filters {
  padding: 10px 14px;
  display: flex; gap: 6px; flex-wrap: wrap;
  border-bottom: 1px solid #e2e8f0;
}
.pc-chip {
  font-size: 11px; padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e0;
  color: #718096; cursor: pointer;
  background: transparent;
}
.pc-chip.active { background: #0d2c4f; color: #fff; border-color: #0d2c4f; }

/* ── PDF link ── */
.pc-pdf-link { color: #1b9e75; text-decoration: none; font-size: 12px; }
.pc-pdf-link:hover { text-decoration: underline; }

/* ── Loading / empty ── */
.pc-loading, .pc-empty {
  padding: 40px; text-align: center;
  color: #a0aec0; font-size: 13px;
}

/* ── Login box ── */
.pc-login-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 60px 20px;
}
.pc-login-box {
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 12px; padding: 40px;
  max-width: 400px; width: 100%;
}
.pc-login-box h2 { color: #0d2c4f; margin-bottom: 8px; }
.pc-login-box p  { color: #718096; margin-bottom: 24px; font-size: 14px; }

/* ── Bottone homepage ── */
.pc-cta-button {
  display: inline-block;
  background: #1b9e75;
  color: #fff !important;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 15px; font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.pc-cta-button:hover { background: #158a63; color: #fff !important; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .pc-wrap { flex-direction: column; }
  .pc-sidebar { width: 100%; min-height: auto; }
  .pc-stats { grid-template-columns: repeat(2, 1fr); }
  .pc-nav { display: flex; flex-wrap: wrap; padding: 8px; }
  .pc-nav-section { display: none; }
  .pc-nav-item { font-size: 12px; padding: 7px 10px; }
}

/* ── Fix allineamento form login ─────────────────────────────────────────── */
.pc-login-wrap .login-username,
.pc-login-wrap .login-password {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}
.pc-login-wrap .login-username label,
.pc-login-wrap .login-password label {
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #4a5568;
}
.pc-login-wrap .login-username input,
.pc-login-wrap .login-password input {
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
}
.pc-login-wrap p.login-remember {
    margin-bottom: 16px;
}
.pc-login-wrap p.login-submit {
    margin: 0;
    padding: 0;
}
.pc-login-wrap #wp-submit {
    width: 100%;
}

/* ── Logo nel form di login ───────────────────────────────────────────────── */
.pc-login-logo {
    text-align: center;
    margin-bottom: 20px;
}
.pc-login-logo img {
    max-width: 200px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
}
