:root{
  --font: Arial, sans-serif;
  --fs: 14px;

  --bg-1: #0f4b66;
  --bg-2: #0a2a3d;

  --panel: rgba(10, 44, 62, 0.70);
  --panel-2: rgba(12, 54, 74, 0.62);

  --stroke: rgba(255,255,255,0.10);
  --stroke-2: rgba(255,255,255,0.06);
  --line: rgba(255,255,255,0.12);

  --txt: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.70);

  --row-hover: rgba(255,255,255,0.08);

  --btn-grad-a: rgba(182,214,193,0.95);
  --btn-grad-b: rgba(113,168,134,0.92);
  --btn-txt: rgba(0,0,0,0.75);

  --danger-a: rgba(225,140,140,0.95);
  --danger-b: rgba(190,95,95,0.92);

  --ghost-a: rgba(255,255,255,0.10);
  --ghost-b: rgba(255,255,255,0.04);
	
	--cat-richieste: #a35a12;      /* arancione scuro */
  --cat-amministrazione: #1f6b4a; /* verde scuro */
  --cat-wordpress: #3b4f7a;      /* blu/viola freddo */
}

*{ box-sizing:border-box; }

/* invece di height:100% */
html, body{ min-height:100%; }

html{
  background:
    radial-gradient(1200px 550px at 50% 0%, rgba(58,132,162,0.35), transparent 60%),
    radial-gradient(900px 500px at 50% 10%, rgba(25,95,126,0.45), transparent 62%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2));
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-color: var(--bg-2); /* fallback */
}

body{
  margin:0;
  font-family: var(--font);
  font-size: var(--fs);
  color: var(--txt);
  background: transparent; /* IMPORTANTISSIMO */
}

.app{
  width: 920px;
  max-width: calc(100% - 32px);
  margin: 34px auto 40px;
}


.topbar{
  position: relative;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 10px 16px 14px;
  border-bottom: 1px solid var(--stroke);
}

.topbar h1{
  margin:0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 0 rgba(0,0,0,0.35);
}

.actions{
  position:absolute;
  right: 16px;
  top: 6px;
  display:flex;
  gap: 10px;
}

.btn{
  border: 1px solid rgba(255,255,255,0.10);
  background: linear-gradient(180deg, var(--btn-grad-a), var(--btn-grad-b));
  color: var(--btn-txt);
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 6px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    0 2px 10px rgba(0,0,0,0.25);
  cursor:pointer;
  user-select:none;
}

.btn:disabled{
  opacity: 0.55;
  cursor:not-allowed;
}

.btn:active:not(:disabled){
  transform: translateY(1px);
}

.btn.icon{
  width: 44px;
  padding: 8px 0;
  text-align:center;
  font-size: 18px;
  line-height: 18px;
}

.btn.danger{
  background: linear-gradient(180deg, var(--danger-a), var(--danger-b));
}

.btn.ghost{
  background: linear-gradient(180deg, var(--ghost-a), var(--ghost-b));
  color: var(--txt);
}

.panel{
  margin-top: 10px;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 6px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 10px 24px rgba(0,0,0,0.22);
  overflow:hidden;
}

.tabs{
  display:flex;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  flex-wrap: wrap;
}
.tab{
  padding: 7px 12px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.10);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  color: var(--txt);
  font-weight:700;
  cursor:pointer;
}
.tab.active{
  background: linear-gradient(180deg, var(--btn-grad-a), var(--btn-grad-b));
  color: var(--btn-txt);
}

/* TAB base */
.tab{
  background: rgba(255,255,255,0.08);
  color: #fff;
}

/* TAB categoria - stato normale (sempre colorate, soft) */
.tab[data-category="RICHIESTE CLIENTI"]{
  background: color-mix(in srgb, var(--cat-richieste) 75%, #000);
}

.tab[data-category="AMMINISTRAZIONE"]{
  background: color-mix(in srgb, var(--cat-amministrazione) 75%, #000);
}

.tab[data-category="WORDPRESS"]{
  background: color-mix(in srgb, var(--cat-wordpress) 75%, #000);
}


/* TAB categoria - stato normale (sempre colorate, soft) */
.tab[data-category="RICHIESTE CLIENTI"]{
  background: color-mix(in srgb, var(--cat-richieste) 75%, #000);
}

.tab[data-category="AMMINISTRAZIONE"]{
  background: color-mix(in srgb, var(--cat-amministrazione) 75%, #000);
}

.tab[data-category="WORDPRESS"]{
  background: color-mix(in srgb, var(--cat-wordpress) 75%, #000);
}

.tab:hover{
  filter: brightness(1.08);
}



.section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border-bottom: 1px solid var(--stroke-2);
  font-weight: 700;
}

.section-head .title{
  display:flex;
  align-items:center;
  gap: 10px;
}

.section-head .chev{
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display:grid;
  place-items:center;
  cursor:pointer;
  color: var(--muted);
}
.section-head .chev:hover{
  background: rgba(255,255,255,0.05);
  color: var(--txt);
}

.subpanel{
  padding: 12px 14px;
  background: var(--panel-2);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.controls{
  display:flex;
  align-items:center;
  gap: 12px;
  flex-wrap: wrap;
}
.controls .label{
  font-weight:700;
  color: var(--muted);
}
.controls .spacer{
  flex:1;
}
.controls .mini{
  font-size: 12px;
  color: var(--muted);
  min-height: 14px;
}

.pill{
  padding: 7px 14px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.10);
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
  color: var(--txt);
  font-weight:700;
  cursor:pointer;
}
.pill.active{
  background: linear-gradient(180deg, var(--btn-grad-a), var(--btn-grad-b));
  color: var(--btn-txt);
}

.select{
  padding: 9px 10px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.18);
  color: var(--txt);
  outline: none;
}

/* SELECT: stile coerente col verdino dei bottoni */
select{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background: var(--btn-grad-a);
  color: #0b2a38; /* testo scuro (leggibile sul verdino) */

  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 10px;

  padding: 10px 36px 10px 12px;
  font-size: 14px;
  line-height: 1.2;

  outline: none;
  cursor: pointer;

  /* freccia */
  background-image:
    linear-gradient(45deg, transparent 50%, #0b2a38 50%),
    linear-gradient(135deg, #0b2a38 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

/* Hover/focus: leggero schiarimento (fallback) */
select:hover,
select:focus{
  filter: brightness(1.05);
  border-color: rgba(0,0,0,0.28);
}

/* Hover/focus: schiarimento “pulito” se supportato */
@supports (color: color-mix(in srgb, #fff 50%, #000)){
  select:hover,
  select:focus{
    filter: none;
    background: color-mix(in srgb, var(--btn-grad-a) 88%, #ffffff);
  }
}

/* Menu aperto: neutro chiaro, leggibile (best cross-browser) */
select option{
  background: #f0f2f1;
  color: #0b2a38;
}





.table{
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.table thead th{
  text-align:left;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.table tbody td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.table tbody tr:nth-child(odd){
  background: rgba(255,255,255,0.03);
}
.table tbody tr:hover{
  background: var(--row-hover);
}

/*
.col-done{ width: 66px; }
.col-title{ width: 52%; }
.col-client{ width: 28%; }
.col-date{ width: 20%; } */


/* Bordino categoria su DESKTOP: nella prima cella, non sul TR */
.table td.col-done{
  border-left: 5px solid transparent !important;
  padding-left: 10px; /* piccolo respiro, NON cambia l’allineamento delle colonne */
}

.table tr[data-category*="RICHIESTE"] td.col-done{
  border-left: 5px solid var(--cat-richieste) !important;
}
.table tr[data-category*="AMMINISTRAZIONE"] td.col-done{
  border-left: 5px solid var(--cat-amministrazione) !important;
}
.table tr[data-category*="WORDPRESS"] td.col-done{
  border-left: 5px solid var(--cat-wordpress) !important;
}


/* Bordino categoria su MOBILE: card */
.card{
  position: relative;
}

.card::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:4px;
  background: transparent;
  border-radius: 10px 0 0 10px; /* se vuoi */
}

/* Colori per categoria (mobile) */
.card[data-category="RICHIESTE CLIENTI"]::before{ background: var(--cat-richieste); }
.card[data-category="AMMINISTRAZIONE"]::before{ background: var(--cat-amministrazione); }
.card[data-category="WORDPRESS"]::before{ background: var(--cat-wordpress); }



.col-date{
  white-space: nowrap;
  text-align: left;
  font-weight: 600;
}

.chk{
  appearance:none;
  -webkit-appearance:none;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.06);
  display:inline-grid;
  place-items:center;
  cursor:pointer;
}
.chk:checked{
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.35);
}
.chk:checked::after{
  content:"✓";
  font-weight: 900;
  font-size: 14px;
  color: rgba(255,255,255,0.92);
  transform: translateY(-1px);
}

.table tbody tr[data-done="1"] td{ color: rgba(255,255,255,0.70); }
.table tbody tr[data-done="1"] .task-title{ text-decoration: line-through; opacity: 0.85; }


.block-gap{ margin-top: 10px; }

.collapsible[aria-expanded="false"] + .collapsible-body{ display:none; }

/* Login + drawer fields */
.login-grid{
  display:flex;
  align-items:flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.field{ display:flex; flex-direction:column; gap: 6px; }
.field label{ color: var(--muted); font-weight:700; font-size: 12px; }
.field input, .field select, .field textarea{
  width: 320px;
  max-width: 100%;
  padding: 9px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.18);
  color: var(--txt);
  outline: none;
}
.field textarea{ width: 100%; resize: vertical; }
.hint{
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  min-height: 16px;
}
.hint.small{ font-size: 11px; }

.setup{
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.10);
}
.setup-title{
  font-weight:700;
  margin-bottom: 10px;
}
.setup-grid{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items:flex-end;
}

/* Mobile cards */
.cards{
  padding: 10px 12px 14px;
  display: grid;
  gap: 10px;
}
.card{
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 12px 12px;
  display:flex;
  gap: 12px;
  align-items:flex-start;
}
.card:active{ transform: translateY(1px); }
.card-main{ flex:1; min-width: 0; }
.card-title{
  font-weight: 800;
  margin-bottom: 6px;
  word-break: break-word;
}
.card-sub{
  color: var(--muted);
  font-size: 12px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}
.card-right{
  display:flex;
  align-items:flex-start;
}
.card .chk{
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

/* FAB */
.fab{
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.10);
  background: linear-gradient(180deg, var(--btn-grad-a), var(--btn-grad-b));
  color: var(--btn-txt);
  font-weight: 900;
  font-size: 22px;
  display:grid;
  place-items:center;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    0 10px 24px rgba(0,0,0,0.30);
  cursor:pointer;
  z-index: 40;
}
.fab:disabled{
  opacity: 0.55;
  cursor:not-allowed;
}

/* Drawer + overlay */
.overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  z-index: 50;
}

.drawer{
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 92vw;
  height: 100vh;
  background: rgba(10, 44, 62, 0.94);
  border-left: 1px solid rgba(255,255,255,0.10);
  box-shadow: -10px 0 30px rgba(0,0,0,0.35);
  z-index: 60;
  transform: translateX(100%);
  transition: transform .18s ease;
}
.drawer.open{
  transform: translateX(0);
}
.drawer-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.drawer-title{
  font-size: 16px;
  font-weight: 700;
}
.drawer-x{
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  color: var(--txt);
  cursor:pointer;
}

.drawer-meta{
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
  font-size: 12px;
  display:grid;
  gap: 6px;
}

.drawer-body{
  padding: 14px;
}
.drawer-body .field input,
.drawer-body .field select,
.drawer-body .field textarea{
  width: 100%;
}

.drawer-actions{
  display:flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* Responsive helpers */
.desktop-only{ display: revert; }
.mobile-only{ display: none; }

table.desktop-only{ display: table; width: 100%; }


@media (max-width: 720px){
  .app{ width: 100%; max-width: calc(100% - 18px); margin: 18px auto 80px; }
  .topbar h1{ font-size: 22px; }
  .actions{ right: 12px; }

  .desktop-only{ display:none !important; }
  .mobile-only{ display:block !important; }

  .drawer{ width: 100vw; max-width: 100vw; }
}
