/* === ⚙️ Base === */
body {
  margin: 0;
  background-color: #f1f3f4;
  font-family: "Roboto", "Segoe UI", sans-serif;
  font-size: 14px;
  color: #202124;
  line-height: 1.6;
}

/* === 🔠 Titoli === */
h1, h2, h3 {
  font-weight: 500;
  margin-bottom: 16px;
  color: #202124;
}

/* === 🔗 Link === */
a {
  color: #1a73e8;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* === 🧭 Sidebar === */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 240px;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  border-right: 1px solid #e0e0e0;
  z-index: 100;
  padding: 20px;
  overflow-y: auto;
}

.sidebar h2 {
  font-size: 13px;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: #5f6368;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li a {
  display: block;
  padding: 10px 12px;
  margin-bottom: 6px;
  font-size: 13px;
  color: #3c4043;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.sidebar li a:hover {
  background-color: #e8f0fe;
  color: #174ea6;
}

/* === 📋 Contenuto === */
.main-content {
  margin-left: 260px;
  padding: 32px;
  background-color: #f1f3f4;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* === 🧩 Layout Griglia Widget === */
.grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* === 📦 Widget Style === */
.widget-box {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  padding: 20px;
  transition: box-shadow 0.3s;
}

.widget-box:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

/* === 📊 Tabelle === */
.table-data {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  overflow: hidden;
}

.table-data th, .table-data td {
  text-align: left;
  padding: 12px;
  font-size: 13px;
  border-bottom: 1px solid #e0e0e0;
}

.table-data th {
  background-color: #f8f9fa;
  color: #5f6368;
}

.table-data tr:hover {
  background-color: #f1f3f4;
}

/* === 🏷️ Badge Stato === */
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 12px;
}

.badge.attivo {
  background-color: #e6f4ea;
  color: #276e35;
}
.badge.attesa {
  background-color: #fff4ce;
  color: #6b4f00;
}
.badge.errore {
  background-color: #fce8e6;
  color: #822525;
}

/* === 🔘 Pulsanti === */
.button {
  padding: 10px 16px;
  background-color: #1a73e8;
  color: #fff;
  border-radius: 4px;
  font-weight: 500;
  border: none;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.button:hover {
  background-color: #1558d6;
}

/* === 📱 Responsive === */
@media (max-width: 768px) {
  .sidebar {
    position: relative;
    width: 100%;
    border-right: none;
    box-shadow: none;
  }
  .main-content {
    margin-left: 0;
    padding: 24px;
  }
  .grid-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .sidebar2 {
    position: relative;
    width: 100%;
    border-right: none;
    box-shadow: none;
  }
  .main-content {
    margin-left: 150px;
    padding: 24px;
  }
  .grid-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.weekly-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.day-column {
  background-color: #fff;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  min-height: 200px;
}

.day-column h3 {
  margin-top: 0;
  color: #1a73e8;
  font-size: 14px;
}

.sidebar ul li a {
  cursor: pointer;
  color: #1a73e8;
  text-decoration: none;
}
.sidebar ul li a:hover {
  text-decoration: underline;
}

.pagination {
  padding: 10px;
  text-align: center;
  background: #eaeaea;
  border-bottom: 1px solid #ccc;
}
.pagination a {
  margin: 0 3px;
  padding: 6px 10px;
  text-decoration: none;
  background: #fff;
  border: 1px solid #999;
  color: #333;
}
.pagination a.active {
  background: #0078d4;
  color: #fff;
  border-color: #005a9e;
}
.pagination a:hover {
  background: #f0f0f0;
}




.email-sidebar {
  width: 30% !important;
  min-width: 300px;
  max-width: 300px; /* se vuoi renderla fissa */
  height: 100vh;
  overflow-y: auto;
  float: left;
}

.email-preview {
  width: 70% !important;
  min-width: calc(100% - 300px);
  height: 100vh;
  overflow-y: auto;
  float: left;
}

.email-item {
  padding: 0.5em;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
}

.email-item:hover {
  background-color: #eee;
}

.reply-popup {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 300px;
  background: #f9f9f9;
  border: 1px solid #ccc;
  box-shadow: 0 0 10px #aaa;
  padding: 10px;
  z-index: 9999;
  resize: both;
  overflow: auto;
}

.reply-header {
  background: #ddd;
  padding: 5px;
  cursor: move;
  font-weight: bold;
}