/* ================================================================
    GRAFIK GILLETTE - COMPONENTS.CSS
    Part of modular CSS split (v3.8.0)
    ================================================================ */

/* === MENU ITEM — DANGER variant (destructive actions) === */
.menu-item.menu-item-danger {
  color: #c0392b;
}
.menu-item.menu-item-danger:hover {
  background: rgba(192, 57, 43, 0.1);
  border-color: rgba(192, 57, 43, 0.3);
  color: #a93226;
}
.menu-item.menu-item-danger .mi-icon {
  color: #c0392b;
}
body.theme-dark .menu-item.menu-item-danger {
  color: #ff6b6b;
}
body.theme-dark .menu-item.menu-item-danger:hover {
  background: rgba(255, 107, 107, 0.15);
  color: #ff8888;
}
body.theme-dark .menu-item.menu-item-danger .mi-icon {
  color: #ff6b6b;
}

/* === PRIVACY MODE === */
body.privacy-mode .dash-stat-card.dash-overtime-summary,
body.privacy-mode .dash-stat-card.dash-vacation-stats,
body.privacy-mode .dtc-timer,     /* Timer details in dashboard today card */
body.privacy-mode .calendar-day .day-ot,     /* Overtime markers in month view */
body.privacy-mode .calendar-day .day-u,      /* Vacation markers in month view */
body.privacy-mode .calendar-day .day-note-icon, /* Note icons in month view */
body.privacy-mode .info-section-ot,           /* Overtime in info panel */
body.privacy-mode .info-section-note,         /* Notes in info panel */
body.privacy-mode .info-section-vacation,     /* Vacation stats in info panel */
body.privacy-mode .ot-indicator,              /* Any other overtime indicators */
body.privacy-mode #otMonthSummary             /* Monthly overtime summary in month view */ {
  display: none !important;
}

/* Specific for table view — hide custom cells if they contain personal data markers */
body.privacy-mode .table-cell.custom-urlop,
body.privacy-mode .table-cell.custom-ot {
  background: var(--bg-cell) !important;
  color: var(--text-main) !important;
  border-color: var(--border-cell) !important;
}

/* === PRIVACY MODE === */
body.privacy-mode .dash-stat-card.dash-overtime-summary,
body.privacy-mode .dash-stat-card.dash-vacation-stats,
body.privacy-mode .dtc-timer,     /* Timer details in dashboard today card */
body.privacy-mode .calendar-day .day-ot,     /* Overtime markers in month view */
body.privacy-mode .calendar-day .day-u,      /* Vacation markers in month view */
body.privacy-mode .calendar-day .day-note-icon, /* Note icons in month view */
body.privacy-mode .info-section-ot,           /* Overtime in info panel */
body.privacy-mode .info-section-note,         /* Notes in info panel */
body.privacy-mode .info-section-vacation,     /* Vacation stats in info panel */
body.privacy-mode .ot-indicator,              /* Any other overtime indicators */
body.privacy-mode #otMonthSummary             /* Monthly overtime summary in month view */ {
  display: none !important;
}

/* Specific for table view — hide custom cells if they contain personal data markers */
body.privacy-mode .table-cell.custom-urlop,
body.privacy-mode .table-cell.custom-ot {
  background: var(--bg-cell) !important;
  color: var(--text-main) !important;
  border-color: var(--border-cell) !important;
}

/* === ADMIN MODE — visibility of admin-only elements === */
/* Hidden by default. Shown only when body has 'admin-mode' class (set by js/admin.js). */
.admin-only {
  display: none !important;
}
body.admin-mode .admin-only {
  display: block !important;
}
 /* .palette-btn relies on flex for centering its icon + hotkey label;
    the generic 'display: block' above would break that layout, so
    restore flex specifically for admin-only palette buttons. */
body.admin-mode .palette-btn.admin-only {
  display: flex !important;
}
 /* Admin menu section — visual distinction (gold accent) */
body.admin-mode .menu-section.admin-only .menu-section-title {
  color: #d4af37;
}
body.theme-dark.admin-mode .menu-section.admin-only .menu-section-title,
body.ui-skin-industrial.admin-mode .menu-section.admin-only .menu-section-title,
body.ui-skin-neon.admin-mode .menu-section.admin-only .menu-section-title {
  color: #f1c40f;
}

/* === EDIT PALETTE === */
.edit-palette {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-container);
  border: 2px solid var(--text-header);
  border-radius: 14px;
  padding: 8px;
  display: none;
  gap: 6px;
  box-shadow: 0 8px 30px var(--shadow-heavy);
  z-index: 25;
  animation: slideUpFade 0.3s ease-out;
}
.edit-palette.show {
  display: flex;
}
@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
.palette-btn {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.15s;
  position: relative;
}
.palette-btn:hover {
  transform: scale(1.1);
}
.palette-btn.active {
  border-color: #f1c40f;
  box-shadow: 0 0 0 3px rgba(241, 196, 15, 0.4);
  transform: scale(1.1);
}
.palette-btn.p-R {
  background: var(--color-R);
}
.palette-btn.p-P {
  background: var(--color-P);
}
.palette-btn.p-N {
  background: var(--color-N);
}
.palette-btn.p-W {
  background: var(--color-W);
  color: var(--color-W-text);
}
.palette-btn.p-CYCLE {
  background: linear-gradient(135deg, #6a1b9a, #4a148c);
}
.palette-btn.p-OT {
  background: linear-gradient(135deg, #f1c40f, #d68910);
  color: #1a1a1a;
}
.palette-btn .pb-hotkey {
  position: absolute;
  top: 2px;
  right: 3px;
  font-size: 8px;
  opacity: 0.75;
  background: rgba(0, 0, 0, 0.3);
  padding: 1px 3px;
  border-radius: 3px;
}

/* === EDIT BANNER === */
.edit-banner {
  background: linear-gradient(135deg, #e67e22, #d35400);
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  margin: 10px 0;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4);
  animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.edit-banner.show {
  display: flex;
}
.edit-banner-text {
  font-weight: 600;
  font-size: 14px;
  flex: 1;
  min-width: 200px;
}
.edit-banner-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.edit-banner button {
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s;
}
.edit-banner button:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}
.edit-banner button.save {
  background: #27ae60;
  border-color: #1e8449;
}
.edit-banner button.save:hover {
  background: #229954;
}
.edit-banner button.save:disabled {
  background: rgba(255, 255, 255, 0.15);
  cursor: not-allowed;
  opacity: 0.4;
  transform: none;
}
.edit-banner button.danger {
  background: rgba(192, 57, 43, 0.7);
}
.edit-banner button.danger:hover {
  background: rgba(192, 57, 43, 0.95);
}
#dirtyIndicator {
  display: inline-block;
  background: #f1c40f;
  color: #000;
  padding: 3px 10px;
  border-radius: 8px;
  margin-left: 8px;
  font-weight: 700;
  animation: dirtyPulse 1.5s infinite;
}

/* === EDIT BANNER (redesign v3.6.1 — dark + hierarchy) === */
.edit-banner {
  background: linear-gradient(135deg, #2c3e50, #34495e);
  color: #fff;
  padding: 14px 18px;
  border-radius: 12px;
  border-left: 4px solid #e67e22;
  margin: 10px 0;
  display: none;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.edit-banner.show {
  display: flex;
}

/* === Текстова частина зліва === */
.edit-banner-text {
  flex: 1 1 220px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.edit-banner-text .ebt-title {
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.edit-banner-text .ebt-hint {
  font-size: 12px;
  opacity: 0.7;
  line-height: 1.4;
}

/* === Actions container === */
.edit-banner-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* === Групи кнопок (undo/redo разом) === */
.edit-banner-actions .ebg-group {
  display: flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 3px;
}

/* === Базовий стиль всіх кнопок банера === */
.edit-banner button {
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.edit-banner button:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* === ICON-ONLY кнопки (Undo/Redo) === */
.edit-banner button.icon-only {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 16px;
  justify-content: center;
}
.edit-banner button.icon-only:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: none;
}
.edit-banner button.icon-only:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* === PRIMARY кнопка Зберегти === */
.edit-banner button.save {
  background: linear-gradient(135deg, #27ae60, #229954);
  border-color: #1e8449;
  font-weight: 700;
  padding: 9px 18px;
  box-shadow: 0 2px 8px rgba(39, 174, 96, 0.35);
}
.edit-banner button.save:hover {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  box-shadow: 0 4px 14px rgba(39, 174, 96, 0.5);
  transform: translateY(-1px);
}
.edit-banner button.save:disabled {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  cursor: not-allowed;
  opacity: 0.4;
  transform: none;
  box-shadow: none;
}

/* === DANGER кнопки (Rok, Reset) === */
.edit-banner button.danger {
  background: rgba(231, 76, 60, 0.15);
  border-color: rgba(231, 76, 60, 0.4);
  color: #ffcccc;
}
.edit-banner button.danger:hover {
  background: rgba(231, 76, 60, 0.3);
  border-color: rgba(231, 76, 60, 0.6);
  color: #fff;
}

/* === Year picker всередині edit-banner (темний фон) === */
.edit-banner .year-picker {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 3px 6px;
}
.edit-banner .year-picker button {
  background: transparent;
  border: none;
  color: #fff;
  padding: 0 8px;
  font-size: 22px;
  min-width: auto;
  min-height: auto;
  display: inline-flex;
}
.edit-banner .year-picker button:hover {
  background: transparent;
  transform: scale(1.4);
  border-color: transparent;
}
.edit-banner .year-picker .year-current {
  color: #fff;
  font-size: 16px;
}
.edit-banner .year-picker.no-data {
  border-color: #f39c12;
  background: rgba(243, 156, 18, 0.2);
}

/* === Dirty indicator === */
#dirtyIndicator {
  display: inline-block;
  background: #f1c40f;
  color: #1a1a1a;
  padding: 3px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
  animation: dirtyPulse 1.5s infinite;
}
@keyframes dirtyPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(241, 196, 15, 0.5);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(241, 196, 15, 0.7);
  }
}

/* === Discard + year on one row (mobile-friendly) === */
.ebg-row-discard-year {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}
.ebg-row-discard-year #discardChangesBtn {
  flex: 1 1 auto;
  min-width: 0;
}
.ebg-row-discard-year .year-picker {
  flex: 0 0 auto;
  margin: 0;
}

/* === Responsive edit-banner для мобільних === */


/* === TOAST === */
.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
  max-width: 90vw;
}
.toast {
  background: var(--bg-container);
  color: var(--text-main);
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: 0 6px 25px var(--shadow-heavy);
  border-left: 4px solid var(--text-header);
  font-weight: 600;
  font-size: 14px;
  min-width: 250px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.3s ease-out;
  pointer-events: all;
}
.toast.toast-out {
  animation: toastOut 0.3s ease-out forwards;
}
.toast.success {
  border-left-color: #27ae60;
}
.toast.error {
  border-left-color: #c0392b;
}
.toast.warn {
  border-left-color: #e67e22;
}
.toast.info {
  border-left-color: #3498db;
}
.toast .toast-icon {
  font-size: 20px;
  flex-shrink: 0;
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(20px);
  }
}

/* === MODAL === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 150;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease-out;
}
.modal-overlay.show {
  display: flex;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal {
  background: var(--bg-container);
  color: var(--text-main);
  border-radius: 16px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease-out;
  overflow: hidden;
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.modal-header {
  padding: 18px 22px 12px;
  border-bottom: 1px solid var(--border-cell);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 {
  margin: 0;
  color: var(--text-header);
  font-size: 18px;
}
.modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover {
  background: #c0392b;
  color: #fff;
}
.modal-body {
  padding: 20px 22px;
  font-size: 14px;
  line-height: 1.5;
  max-height: 60vh;
  overflow-y: auto;
}
.modal-body p {
  margin: 0 0 12px;
}
.modal-body ul {
  margin: 8px 0;
  padding-left: 22px;
}

.faq-item {
  background: var(--bg-cell);
  border-radius: 10px;
  border: 1px solid var(--border-cell);
  overflow: hidden;
  transition: all 0.2s;
}
.faq-item[open] {
  box-shadow: 0 4px 15px var(--shadow-color);
  border-color: var(--text-header);
}
.faq-item summary {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-header);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.15s;
  user-select: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: '+';
  font-size: 20px;
  font-weight: bold;
  color: var(--text-muted);
  margin-left: 10px;
  transition: transform 0.2s;
}
.faq-item[open] summary::after {
  content: '−';
  color: var(--text-header);
}
.faq-item summary:hover {
  background: var(--bg-controls);
}
.faq-answer {
  padding: 5px 16px 16px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-main);
  border-top: 1px solid var(--border-cell);
  margin-top: 5px;
  padding-top: 12px;
}
.faq-answer ul,
.faq-answer ol {
  margin: 8px 0;
  padding-left: 22px;
}
.faq-answer li {
  margin: 4px 0;
}

.modal-footer {
  padding: 12px 22px 18px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
/* Sync modal: keep Cancel / Download / Send on a single row */
.modal-footer.modal-footer-single-row {
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: stretch;
}
.modal-footer.modal-footer-single-row .modal-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 8px;
  font-size: 13px;
  white-space: nowrap;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.modal-footer.modal-footer-single-row .modal-btn-icon {
  flex-shrink: 0;
  display: block;
}
.modal-btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.15s;
}
.modal-btn.primary {
  background: var(--text-header);
  color: #fff;
}
.modal-btn.primary:hover {
  filter: brightness(1.15);
}
.modal-btn.danger {
  background: #c0392b;
  color: #fff;
}
.modal-btn.danger:hover {
  background: #a93226;
}
.modal-btn.success {
  background: #27ae60;
  color: #fff;
}
.modal-btn.success:hover {
  background: #229954;
}
.modal-btn.secondary {
  background: var(--bg-controls);
  color: var(--text-main);
  border: 1px solid var(--border-cell);
}
.modal-btn.secondary:hover {
  background: var(--bg-cell);
}

/* === PALETTE BUTTONS (new set) === */
.palette-btn.p-URLOP {
  background: linear-gradient(135deg, #27ae60, #16a085);
  color: #fff;
}

.palette-btn.p-URLOP.active {
  box-shadow: 0 0 0 3px #f39c12;
}

.palette-btn.p-ADDSHIFT {
  background: linear-gradient(135deg, #3498db, #2874a6);
  color: #fff;
  font-size: 22px;
}

.palette-btn.p-ADDSHIFT.active {
  box-shadow: 0 0 0 3px #f39c12;
}

.palette-btn.p-OTBEFORE {
  background: linear-gradient(135deg, #f39c12, #d68910);
  color: #fff;
  font-size: 14px;
}

.palette-btn.p-OTBEFORE.active {
  box-shadow: 0 0 0 3px #c0392b;
}

.palette-btn.p-OTAFTER {
  background: linear-gradient(135deg, #e67e22, #ba4a00);
  color: #fff;
  font-size: 14px;
}

.palette-btn.p-OTAFTER.active {
  box-shadow: 0 0 0 3px #c0392b;
}


/* === FOOTER === */
.app-footer {
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px solid var(--border-cell);
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.app-footer-links {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}
.app-footer-links a,
.app-footer-links button {
  color: var(--text-muted);
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 12px;
  transition: color 0.15s;
}
.app-footer-links a:hover,
.app-footer-links button:hover {
  color: var(--text-header);
  text-decoration: underline;
}

/* === PRINT STYLES === */


/* Vacation limit in edit banner */
.edit-banner-limit {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: inherit;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 18px;
  line-height: 1;
}
.edit-banner-limit:hover {
  background: rgba(255, 255, 255, 0.28);
}
a.menu-item {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: inherit;
}

/* Month grid: mobile relief + OT marker */


/* ============================================================
    POPUP FIX — Graffik Gillette (v2)
    Desktop: keep original popup sizes (full-cell overlay is by design
    — the user WANTS relief/OT popups to cover adjacent cells).
    Mobile: enlarge OT detail popup so text fits properly.
    ============================================================ */

/* ── 1. Z-index hierarchy (desktop) ── */
.day-cell .ot-marker {
   z-index: 5;
 }
 .day-cell .shift-rate-badge {
   z-index: 5;
 }
.day-cell:hover {
  z-index: 35;
}
.day-cell.selected {
  z-index: 36;
}

/* ── 2. Desktop: ensure overflow visible for popups ── */
.day-cell {
  overflow: visible !important;
}

/* ============================================================
    3. MOBILE FIXES (max-width: 600px)
    Enlarge OT detail popup so text fits on small screens.
    Relief popups: keep original cell-sized dimensions.
    ============================================================ */


/* ============================================================
    4. SMALL MOBILE (max-width: 480px)
    ============================================================ */


/* ============================================================
    5. PRINT: hide all popups
    ============================================================ */

/* === DRIVE CARD in side menu === */
#menuDriveSection .menu-section-title.drive-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}


/* Enable switch at top of Drive card */
button.drive-enable-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 6px 2px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: var(--text-main);
}
button.drive-enable-row:hover {
  background: var(--bg-controls);
}
.drive-enable-row .de-label {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
}
.drive-enable-row .de-switch {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: var(--bg-controls, #64748b);
  flex-shrink: 0;
  transition: background 0.15s;
}
.drive-enable-row .de-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform 0.15s;
}
.drive-enable-row[aria-checked="true"] .de-switch {
  background: #27ae60;
}
.drive-enable-row[aria-checked="true"] .de-knob {
  transform: translateX(20px);
}
.drive-card.is-drive-off .drive-account,
.drive-card.is-drive-off .drive-warn,
.drive-card.is-drive-off .drive-login,
.drive-card.is-drive-off .drive-logout {
  opacity: 0.55;
}

.drive-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 8px 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border-cell);
  background: var(--bg-info-card);
}



/* b) Divider */
.drive-divider {
  height: 1px;
  background: var(--border-cell);
}

/* c) Account block */
.drive-account {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 2px 0;
}
.drive-account .da-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #4285f4;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  text-transform: uppercase;
}
.drive-account .da-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.drive-account .da-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.drive-account .da-email {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.drive-account .da-role {
  margin-left: auto;
  font-size: 13px;
  flex-shrink: 0;
}

/* d) Warnings block — now a <button>, whole row is clickable */
button.drive-warn {
  display: none;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #f39c12;
  background: rgba(243, 156, 18, 0.12);
  border: 1px solid rgba(243, 156, 18, 0.35);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}
button.drive-warn:hover {
  background: rgba(243, 156, 18, 0.2);
  border-color: rgba(243, 156, 18, 0.5);
}
.drive-warn .dw-icon {
  font-size: 14px;
  flex-shrink: 0;
}
.drive-warn .dw-text {
  flex: 1;
  min-width: 0;
}


/* e0) Sync options button — primary entry point to Drive Sync Options panel */
button.drive-sync-options {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  background: var(--text-header);
  border: 1px solid var(--text-header);
  border-radius: 8px;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s, transform 0.15s;
}
button.drive-sync-options:hover {
  filter: brightness(1.1);
}
button.drive-sync-options:active {
  transform: scale(0.98);
}
button.drive-sync-options .mi-icon {
  font-size: 16px;
  line-height: 1;
}

/* e-login) Sign in with Google — primary action when not logged in */
button.drive-login {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 8px;
  color: #3c4043;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
}
button.drive-login:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.2);
}
button.drive-login:active {
  transform: scale(0.98);
}
button.drive-login .mi-icon {
  width: auto;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* e) Logout button — secondary/outline */
button.drive-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--border-cell);
  border-radius: 8px;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
button.drive-logout:hover {
  background: var(--bg-controls);
  border-color: rgba(192, 57, 43, 0.4);
  color: #c0392b;
}
button.drive-logout .mi-icon {
  width: auto;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mi-icon.mi-icon-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25em;
  height: 1.25em;
}
.mi-icon-svg .mi-svg,
.mi-icon-svg svg {
  display: block;
  width: 18px;
  height: 18px;
}
#userAuthBtn.auth-logged-in {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#userAuthBtn.auth-logged-in svg {
  display: block;
}

#userAuthBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#userAuthBtn svg {
  display: block;
  width: 18px;
  height: 18px;
}