/* public/assets/css/main.css */

:root {
  --brand-primary: #1B77BA;
  --brand-primary-dark: #145784;
  --bg-light: #f3f6fb;
  --text-main: #1f2933;
  --border-soft: #d0d7e2;
  --radius-lg: 14px;
  --shadow-soft: 0 14px 35px rgba(15, 23, 42, 0.16);
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, rgba(27, 119, 186, 0.14), transparent 55%),
              radial-gradient(circle at bottom right, rgba(27, 119, 186, 0.16), transparent 55%),
              var(--bg-light);
  color: var(--text-main);
}

/* Layout principale */

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  padding: 0.9rem 2rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid #e5e9f2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}

.app-header__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--brand-primary);
  text-decoration: none;
}

.app-header__logo:hover {
  opacity: 0.9;
}

.app-header__logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  box-shadow: 0 8px 20px rgba(27, 119, 186, 0.4);
}

.app-header__logo-text span {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
}

.app-header__logo-text small {
  display: block;
  font-size: 0.7rem;
  color: #6b7280;
}

.app-header__actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.app-header__user {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-right: 0.75rem;
}

.app-header__avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--brand-primary);
  color: #fff;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-header__user-text {
  display: flex;
  flex-direction: column;
  font-size: 0.78rem;
}

.app-header__user-text small {
  color: #9ca3af;
}

.btn {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.45rem 1.1rem;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(27, 119, 186, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 25px rgba(27, 119, 186, 0.35);
}

.btn-outline {
  background: transparent;
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.btn-outline:hover {
  background: rgba(27, 119, 186, 0.05);
}

.btn-xs {
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
}

/* Welcome layout */

.app-main {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 2rem;
}

.welcome-grid {
  width: 100%;
  max-width: 1100px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  overflow: hidden;
}

.welcome-left {
  padding: 2.5rem 2.5rem 2.5rem 2.25rem;
  background: radial-gradient(circle at top left, rgba(27, 119, 186, 0.13), transparent 55%),
              #ffffff;
  border-right: 1px solid #eef1f8;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.welcome-kicker {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-primary);
  margin-bottom: 0.4rem;
}

.welcome-title {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 0.7rem;
}

.welcome-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: #6b7280;
  max-width: 30rem;
}

.welcome-actions {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.welcome-meta {
  margin-top: 1.75rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

/* Pannello destro login/registrazione */

.panel-right {
  padding: 2.5rem 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 360px;
}

.auth-title {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.auth-subtitle {
  margin: 0 0 1.4rem;
  font-size: 0.85rem;
  color: #6b7280;
}

.form-field {
  margin-bottom: 0.8rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 0.2rem;
  color: #4b5563;
}

.form-input {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.form-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 1px rgba(27, 119, 186, 0.25);
}

.form-error {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: #b91c1c;
}

.form-row-inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.form-hint {
  font-size: 0.78rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

.form-hint--success {
  color: #15803d;
}

.auth-footer {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: #6b7280;
}

.auth-footer a {
  color: var(--brand-primary);
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Footer pagina */

.app-footer {
  padding: 1rem 2rem;
  font-size: 0.8rem;
  color: #9ca3af;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-footer a {
  color: #9ca3af;
  text-decoration: none;
}

.app-footer a:hover {
  color: var(--brand-primary);
}

/* Navbar homepage (search + icone) */

.home-shell {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.home-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.home-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.home-search input {
  border: none;
  outline: none;
  font-size: 0.9rem;
  flex: 1;
}

.home-search-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(27, 119, 186, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--brand-primary);
}

.home-icons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-pill {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.12s ease;
}

.icon-pill:hover {
  border-color: var(--brand-primary);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.icon-pill-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Righe “stile Netflix” */

.home-section {
  margin-bottom: 2rem;
}

.home-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.7rem;
}

.home-section-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.home-section-subtitle {
  font-size: 0.8rem;
  color: #9ca3af;
}

.home-row {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.home-row::-webkit-scrollbar {
  height: 6px;
}

.home-row::-webkit-scrollbar-track {
  background: transparent;
}

.home-row::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.6);
  border-radius: 100px;
}

/* Card prodotto/servizio */

.product-card {
  min-width: 220px;
  max-width: 240px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  padding: 0.85rem 0.9rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border: 1px solid rgba(15, 23, 42, 0.03);
}

.product-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(27, 119, 186, 0.09);
  color: var(--brand-primary);
}

.product-title {
  font-size: 0.92rem;
  font-weight: 600;
}

.product-vendor {
  font-size: 0.78rem;
  color: #6b7280;
}

.product-rating {
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #f59e0b;
}

.product-rating span {
  color: #6b7280;
}

.product-price {
  margin-top: 0.1rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.product-comment {
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: #6b7280;
  font-style: italic;
}

.product-actions {
  margin-top: 0.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-actions .btn {
  font-size: 0.78rem;
  padding: 0.3rem 0.8rem;
}

.product-fav {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.12s ease;
}

.product-fav:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.home-info {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 0;
  margin-bottom: 1.3rem;
}

.link-inline {
  color: var(--brand-primary);
  text-decoration: none;
}

.link-inline:hover {
  text-decoration: underline;
}

/* Pagina Team */

.team-layout {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.team-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.team-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.team-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 0.85rem 0.9rem;
  border: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.team-card-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.team-card-name {
  font-size: 0.95rem;
  font-weight: 600;
}

.team-card-meta {
  font-size: 0.75rem;
  color: #9ca3af;
}

.team-form {
  background: #ffffff;
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid #e5e7eb;
}

/* Team workspace */

.team-workspace {
  background: #ffffff;
  border-radius: 16px;
  padding: 1rem 1rem 1.1rem;
  border: 1px solid #e5e7eb;
  margin-bottom: 1.4rem;
}

.team-tasks {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.team-task {
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 0.6rem 0.7rem;
}

.team-task-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.team-task-desc {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.15rem;
}

.team-task-meta {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.2rem;
}

.team-task-status {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  background: #eff6ff;
  color: #1d4ed8;
}

.team-task-actions {
  margin-top: 0.3rem;
  display: flex;
  gap: 0.4rem;
}

/* CART */

.cart-layout {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.4rem;
}

.cart-title {
  margin: 0 0 0.2rem;
}

.cart-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: #6b7280;
}

.cart-empty {
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  padding: 1rem;
  border: 1px dashed #cbd5e1;
  font-size: 0.9rem;
  color: #6b7280;
}

.cart-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.4rem;
}

.cart-list--compact .cart-item {
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.cart-item {
  background: #ffffff;
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  border: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-item-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.cart-item-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.cart-item-vendor {
  font-size: 0.78rem;
  color: #6b7280;
}

.cart-item-meta {
  font-size: 0.78rem;
  color: #9ca3af;
}

.cart-item-actions {
  text-align: right;
}

.cart-item-subtotal {
  font-weight: 600;
  font-size: 0.9rem;
}

.cart-item-remove {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: #ef4444;
  text-decoration: none;
}

.cart-item-remove:hover {
  text-decoration: underline;
}

.cart-summary {
  background: #ffffff;
  border-radius: 14px;
  padding: 1rem 1rem 1.1rem;
  border: 1px solid #e5e7eb;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.cart-summary-note {
  font-size: 0.78rem;
  color: #9ca3af;
  margin-top: 0;
  margin-bottom: 0.7rem;
}

.cart-summary-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

/* ORDERS */

.orders-layout {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.orders-header {
  margin-bottom: 1.4rem;
}

.orders-title {
  margin: 0 0 0.2rem;
}

.orders-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: #6b7280;
}

.orders-empty {
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  padding: 1rem;
  border: 1px dashed #cbd5e1;
  font-size: 0.9rem;
  color: #6b7280;
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.order-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 0.85rem 0.9rem;
  border: 1px solid #e5e7eb;
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.order-card-id {
  font-size: 0.85rem;
  font-weight: 600;
}

.order-card-date {
  font-size: 0.78rem;
  color: #9ca3af;
}

.order-card-total {
  font-size: 0.9rem;
  font-weight: 600;
}

.order-items {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px dashed #e5e7eb;
}

.order-item-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 0.15rem;
}

/* PROFILO PRO (edit) */

.profile-layout {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.profile-header {
  margin-bottom: 1.3rem;
}

.profile-title {
  margin: 0 0 0.2rem;
}

.profile-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: #6b7280;
}

.profile-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.2rem 1.1rem 1.3rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

/* PROFILO PRO pubblico */

.profile-public-layout {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.profile-public-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 1.4rem 1.4rem 1.5rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}

.profile-public-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.profile-public-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.profile-public-name {
  font-size: 1.05rem;
  font-weight: 600;
}

.profile-public-headline {
  font-size: 0.9rem;
  color: #4b5563;
}

.profile-public-meta {
  font-size: 0.8rem;
  color: #6b7280;
}

.profile-public-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: rgba(27, 119, 186, 0.08);
  font-size: 0.75rem;
  color: var(--brand-primary);
}

.profile-public-body {
  margin-top: 0.9rem;
  font-size: 0.88rem;
  color: #4b5563;
  line-height: 1.5;
  white-space: pre-line;
}

.profile-public-services {
  margin-top: 1rem;
  border-top: 1px dashed #e5e7eb;
  padding-top: 0.7rem;
}

.profile-public-services-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.profile-public-service-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.profile-public-cta {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

/* ADMIN */

.admin-layout {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.admin-header {
  margin-bottom: 1.3rem;
}

.admin-title {
  margin: 0 0 0.2rem;
}

.admin-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: #6b7280;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-summary-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 0.7rem 0.8rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  font-size: 0.85rem;
}

.admin-summary-card strong {
  display: block;
  font-size: 1.1rem;
  margin-top: 0.1rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 0.9rem 0.95rem 1rem;
  border: 1px solid #e5e7eb;
}

.admin-card-title {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.admin-table th,
.admin-table td {
  padding: 0.25rem 0.3rem;
}

.admin-table th {
  text-align: left;
  font-weight: 600;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
}

/* Responsive */

@media (max-width: 900px) {
  .welcome-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .welcome-left {
    border-right: none;
    border-bottom: 1px solid #eef1f8;
  }
  .admin-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .admin-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .app-main {
    padding: 1rem;
  }
  .app-header,
  .app-footer {
    padding: 0.75rem 1rem;
  }
  .cart-summary-actions {
    flex-direction: column-reverse;
  }
  .admin-summary {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* EXPLORE / MARKETPLACE PAGE */

.explore-layout {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.explore-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.2rem;
}

.explore-title {
  margin: 0 0 0.25rem;
}

.explore-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: #6b7280;
}

.explore-filters {
  background: #ffffff;
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 1rem;
}

.explore-filters .form-input {
  min-width: 180px;
}

.explore-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

@media (max-width: 900px) {
  .explore-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .explore-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* TEAM MESSAGES */

.team-messages {
  background: #ffffff;
  border-radius: 14px;
  padding: 0.9rem 0.95rem 1rem;
  border: 1px solid #e5e7eb;
  margin-bottom: 1.2rem;
}

.team-messages-title {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.team-messages-list {
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 0.6rem;
}

.team-message {
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
}

.team-message strong {
  font-weight: 600;
}

.team-message-meta {
  font-size: 0.7rem;
  color: #9ca3af;
}

.team-message-form .form-input {
  width: 100%;
  min-height: 60px;
  resize: vertical;
}
