/* ============================================================
   Mail Manager — La Valcamonica Laghe
   ============================================================ */

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

   :root {
     --bg:          #F4F5F7;
     --bg-panel:    #FFFFFF;
     --bg-sidebar:  #1A1D23;
     --bg-hover:    #F0F2F5;
     --bg-active:   #EBF3FD;
     --border:      #E4E7EC;
     --border-light:#F0F2F5;
     --text-primary:#111827;
     --text-second: #4B5563;
     --text-muted:  #9CA3AF;
     --accent:      #378ADD;
     --accent-dark: #2563EB;
     --accent-light:#EBF3FD;
     --danger:      #EF4444;
     --success:     #10B981;
     --sidebar-text:#A3ADB8;
     --sidebar-active-bg: rgba(55,138,221,.15);
     --sidebar-active-text: #6FB3F0;
     --radius-sm:   6px;
     --radius-md:   10px;
     --radius-lg:   14px;
     --shadow-sm:   0 1px 3px rgba(0,0,0,.08);
     --shadow-md:   0 4px 16px rgba(0,0,0,.10);
     --shadow-lg:   0 8px 32px rgba(0,0,0,.14);
     --font:        'Inter', system-ui, sans-serif;
     --sidebar-w:   220px;
     --list-w:      300px;
     --transition:  .15s ease;
   }
   
   html, body { height: 100%; overflow: hidden; font-family: var(--font); background: var(--bg); color: var(--text-primary); font-size: 14px; -webkit-font-smoothing: antialiased; }
   
   /* ============ LOGIN ============ */
   .login-screen {
     position: fixed; inset: 0;
     display: flex; align-items: center; justify-content: center;
     background: linear-gradient(135deg, #0F172A 0%, #1E293B 60%, #1a3a5c 100%);
     z-index: 1000;
   }
   .login-card {
     background: #fff; border-radius: var(--radius-lg);
     padding: 40px; width: 360px;
     box-shadow: var(--shadow-lg);
   }
   .login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
   .login-title { font-size: 18px; font-weight: 600; color: var(--text-primary); }
   .login-sub   { font-size: 12px; color: var(--text-muted); }
   .login-form  { display: flex; flex-direction: column; gap: 12px; }
   .form-label  { font-size: 13px; font-weight: 500; color: var(--text-second); }
   .form-input  {
     width: 100%; padding: 10px 12px;
     border: 1.5px solid var(--border); border-radius: var(--radius-sm);
     font-size: 14px; font-family: var(--font); color: var(--text-primary);
     outline: none; transition: border-color var(--transition);
   }
   .form-input:focus { border-color: var(--accent); }
   .login-error { font-size: 13px; color: var(--danger); }
   .btn-primary {
     padding: 10px 16px; background: var(--accent); color: #fff;
     border: none; border-radius: var(--radius-sm); font-size: 14px;
     font-weight: 500; font-family: var(--font); cursor: pointer;
     transition: background var(--transition);
   }
   .btn-primary:hover { background: var(--accent-dark); }
   .btn-primary:disabled { opacity: .6; cursor: not-allowed; }
   
   /* ============ APP SHELL ============ */
   .app-shell { display: flex; height: 100vh; overflow: hidden; }
   
   /* ============ SIDEBAR ============ */
   .sidebar {
     width: var(--sidebar-w); min-width: var(--sidebar-w);
     background: var(--bg-sidebar);
     display: flex; flex-direction: column;
     border-right: none;
   }
   .sidebar-top { padding: 18px 14px 14px; border-bottom: 1px solid rgba(255,255,255,.06); }
   .sidebar-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
   .sidebar-brand-text { font-size: 14px; font-weight: 600; color: #E5E7EB; }
   .compose-btn {
     width: 100%; padding: 8px 12px;
     background: rgba(55,138,221,.2); color: #6FB3F0;
     border: 1px solid rgba(55,138,221,.3); border-radius: var(--radius-sm);
     font-size: 13px; font-weight: 500; font-family: var(--font);
     cursor: pointer; display: flex; align-items: center; gap: 7px;
     transition: background var(--transition);
   }
   .compose-btn:hover { background: rgba(55,138,221,.32); }
   .sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 0; }
   .sidebar-nav::-webkit-scrollbar { width: 4px; }
   .sidebar-nav::-webkit-scrollbar-track { background: transparent; }
   .sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }
   .nav-section-label { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.25); padding: 0 16px 6px; }
   .nav-item {
     display: flex; align-items: center; gap: 9px;
     padding: 8px 16px; cursor: pointer; border-radius: 0;
     color: var(--sidebar-text); font-size: 13px;
     transition: background var(--transition), color var(--transition);
     position: relative;
   }
   .nav-item:hover { background: rgba(255,255,255,.06); color: #D1D5DB; }
   .nav-item.active { background: var(--sidebar-active-bg); color: var(--sidebar-active-text); }
   .nav-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
   .nav-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
   .nav-badge {
     background: var(--accent); color: #fff;
     font-size: 10px; font-weight: 600;
     padding: 1px 6px; border-radius: 20px; min-width: 20px; text-align: center;
   }
   .nav-tag-chip {
     display: flex; align-items: center; gap: 7px;
     padding: 6px 16px; cursor: pointer; font-size: 13px;
     color: var(--sidebar-text); transition: color var(--transition);
   }
   .nav-tag-chip:hover { color: #D1D5DB; }
   .nav-tag-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
   .sidebar-bottom {
     padding: 12px; border-top: 1px solid rgba(255,255,255,.06);
     display: flex; flex-direction: column; gap: 4px;
   }
   .notif-toggle, .logout-btn {
     display: flex; align-items: center; gap: 8px;
     padding: 8px 10px; border-radius: var(--radius-sm);
     font-size: 12px; color: var(--sidebar-text);
     background: none; border: none; cursor: pointer; font-family: var(--font);
     width: 100%; transition: background var(--transition), color var(--transition);
   }
   .notif-toggle:hover, .logout-btn:hover { background: rgba(255,255,255,.07); color: #D1D5DB; }
   .notif-toggle.active { color: #6FB3F0; }
   
   /* ============ MAIL LIST PANEL ============ */
   .mail-list-panel {
     width: var(--list-w); min-width: var(--list-w);
     border-right: 1px solid var(--border);
     background: var(--bg-panel);
     display: flex; flex-direction: column;
   }
   .panel-header {
     display: flex; align-items: center;
     padding: 16px 14px 12px;
     border-bottom: 1px solid var(--border-light);
   }
   .panel-title { font-size: 15px; font-weight: 600; flex: 1; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hidden { display: none !important; }
  .folder-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }
  .folder-tab {
    flex: 1 1 calc(33.333% - 4px);
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 8px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-panel);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
  }
  .folder-tab:hover { background: var(--bg-hover); color: var(--text-second); }
  .folder-tab.active {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent-dark);
    box-shadow: inset 0 0 0 1px rgba(55,138,221,.08);
  }
  #tabSent.active {
    background: #FFF4ED;
    border-color: #D85A30;
    color: #B45309;
    box-shadow: inset 0 0 0 1px rgba(216,90,48,.08);
  }
  #tabSpam.active {
    background: #FEF2F2;
    border-color: #EF4444;
    color: #B91C1C;
    box-shadow: inset 0 0 0 1px rgba(239,68,68,.08);
  }
  .tab-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--accent);
    color: #fff;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    align-items: center;
    justify-content: center;
  }
  .folder-notice {
    padding: 10px 14px;
    font-size: 12px;
    color: var(--text-second);
    background: #FFFBEB;
    border-bottom: 1px solid #FDE68A;
  }
  .folder-list-label {
    padding: 8px 14px 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
  }
  .mail-list--sent .folder-list-label {
    color: #B45309;
    background: #FFF8F3;
  }
  .mail-list--sent .mail-item--sent {
    border-left: 3px solid transparent;
  }
  .mail-list--sent .mail-item--sent.active {
    background: #FFF4ED;
    border-left-color: #D85A30;
  }
  .mail-list--spam .folder-list-label {
    color: #B91C1C;
    background: #FEF2F2;
  }
  .mail-list--spam .mail-item.active {
    background: #FEF2F2;
  }
  .mi-direction {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-right: 5px;
    border-radius: 4px;
    background: #FFE8D9;
    color: #B45309;
    font-size: 10px;
    font-weight: 700;
    vertical-align: middle;
  }
  .file-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--text-second);
    font-size: 12px;
  }
  .file-picker input {
    display: none;
  }
  .file-picker span {
    flex-shrink: 0;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-panel);
    color: var(--text-second);
    cursor: pointer;
    font-weight: 600;
  }
  .file-picker span:hover {
    background: var(--bg-hover);
  }
  .file-picker small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-muted);
  }
  .compose-file-picker {
    flex: 1;
  }
   .panel-actions { display: flex; gap: 4px; }
   .icon-btn {
     width: 30px; height: 30px; border-radius: var(--radius-sm);
     border: 1px solid var(--border); background: transparent;
     display: flex; align-items: center; justify-content: center;
     cursor: pointer; color: var(--text-muted); transition: all var(--transition);
   }
   .icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
   .icon-btn.spinning svg { animation: spin .7s linear infinite; }
   @keyframes spin { to { transform: rotate(360deg); } }
   .search-wrapper {
     display: flex; align-items: center; gap: 8px;
     margin: 10px 12px; padding: 7px 10px;
     background: var(--bg); border: 1px solid var(--border);
     border-radius: var(--radius-sm); color: var(--text-muted);
   }
   .search-wrapper input { flex: 1; border: none; background: transparent; font-size: 13px; font-family: var(--font); color: var(--text-primary); outline: none; }
   .search-wrapper input::placeholder { color: var(--text-muted); }
   .mail-list-container { flex: 1; overflow-y: auto; }
   .mail-list-container::-webkit-scrollbar { width: 4px; }
   .mail-list-container::-webkit-scrollbar-track { background: transparent; }
   .mail-list-container::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
   
   .mail-item {
     padding: 12px 14px; cursor: pointer;
     border-bottom: 1px solid var(--border-light);
     transition: background var(--transition);
   }
   .mail-item:hover { background: var(--bg-hover); }
   .mail-item.active { background: var(--accent-light); border-left: 3px solid var(--accent); padding-left: 11px; }
   .mi-row1 { display: flex; align-items: center; justify-content: space-between; margin-bottom: 3px; }
   .mi-from { font-size: 13px; font-weight: 400; color: var(--text-second); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
   .mail-item.unread .mi-from { font-weight: 600; color: var(--text-primary); }
   .mi-time { font-size: 11px; color: var(--text-muted); flex-shrink: 0; margin-left: 6px; }
   .mi-subject { font-size: 13px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; display: flex; align-items: center; gap: 5px; }
   .attachment-mark { flex-shrink: 0; font-size: 12px; color: var(--text-muted); }
   .unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; display: inline-block; }
   .mi-preview { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 5px; }
   .mi-tags { display: flex; gap: 4px; flex-wrap: wrap; }
   .tag-chip-sm {
     font-size: 10px; padding: 2px 7px; border-radius: 20px;
     font-weight: 500;
   }
   
   /* ============ MAIL VIEW PANEL ============ */
   .mail-view-panel {
     flex: 1; min-width: 0;
     background: var(--bg-panel);
     display: flex; flex-direction: column;
     overflow: hidden;
   }
   .empty-placeholder {
     flex: 1; display: flex; flex-direction: column;
     align-items: center; justify-content: center;
     gap: 12px; color: var(--text-muted); font-size: 14px;
     text-align: center;
   }
   
   /* Mail view content */
   .mv-header {
     padding: 16px 20px; border-bottom: 1px solid var(--border);
     display: flex; gap: 14px; align-items: flex-start;
   }
   .mv-info { flex: 1; min-width: 0; }
   .mv-subject { font-size: 17px; font-weight: 600; color: var(--text-primary); margin-bottom: 5px; line-height: 1.3; }
   .mv-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
   .mv-meta strong { color: var(--text-second); }
   .mv-attachments {
     display: flex; flex-wrap: wrap; gap: 6px;
     margin: 8px 0;
   }
   .attachment-chip {
     display: inline-flex; align-items: center; gap: 6px;
     max-width: 240px; padding: 5px 8px;
     border: 1px solid var(--border); border-radius: var(--radius-sm);
     color: var(--text-second); text-decoration: none;
     background: var(--bg); font-size: 12px;
   }
   .attachment-chip:hover { border-color: var(--accent); background: var(--accent-light); color: var(--accent-dark); }
   .attachment-chip strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
   .attachment-chip small { color: var(--text-muted); flex-shrink: 0; }
   .mv-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
   .tag-chip {
     font-size: 11px; font-weight: 500; padding: 3px 9px; border-radius: 20px;
     cursor: pointer; transition: opacity var(--transition);
   }
   .tag-chip:hover { opacity: .75; }
   .add-tag-btn {
     font-size: 11px; padding: 3px 9px; border-radius: 20px;
     border: 1.5px dashed var(--border); color: var(--text-muted);
     background: none; cursor: pointer; font-family: var(--font);
     display: flex; align-items: center; gap: 4px;
     transition: all var(--transition);
   }
   .add-tag-btn:hover { border-color: var(--accent); color: var(--accent); }
   .mv-actions { display: flex; gap: 6px; flex-shrink: 0; }
   
   .mv-body {
     flex: 1; overflow-y: auto; padding: 24px 24px;
     line-height: 1.75; font-size: 14px; color: var(--text-primary);
   }
   .mv-body::-webkit-scrollbar { width: 5px; }
   .mv-body::-webkit-scrollbar-track { background: transparent; }
   .mv-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
   .mv-body p { margin-bottom: 10px; white-space: pre-wrap; }
   
   .reply-area {
     border-top: 1px solid var(--border); padding: 14px 20px;
   }
   .reply-to-label { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
   .reply-to-label strong { color: var(--text-second); }
   .reply-textarea {
     width: 100%; padding: 10px 12px;
     border: 1.5px solid var(--border); border-radius: var(--radius-sm);
     font-size: 13px; font-family: var(--font); color: var(--text-primary);
     resize: none; height: 90px; outline: none;
     transition: border-color var(--transition); background: var(--bg);
   }
   .reply-textarea:focus { border-color: var(--accent); background: #fff; }
   .reply-area .file-picker { margin-top: 8px; }
   .reply-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
   .reply-feedback { font-size: 12px; color: var(--success); }
   .send-btn {
     display: flex; align-items: center; gap: 7px;
     padding: 8px 18px; background: var(--accent); color: #fff;
     border: none; border-radius: var(--radius-sm); font-size: 13px;
     font-weight: 500; font-family: var(--font); cursor: pointer;
     transition: background var(--transition);
   }
   .send-btn:hover { background: var(--accent-dark); }
   .send-btn:disabled { opacity: .6; cursor: not-allowed; }
   
   /* ============ COMPOSE ============ */
   .compose-panel { display: flex; flex-direction: column; height: 100%; }
   .compose-header { padding: 16px 20px; border-bottom: 1px solid var(--border); }
   .compose-header h2 { font-size: 16px; font-weight: 600; }
   .compose-fields { padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--border); }
   .compose-row { display: flex; align-items: center; gap: 10px; }
   .compose-row label { font-size: 12px; color: var(--text-muted); width: 44px; flex-shrink: 0; }
   .compose-input {
     flex: 1; padding: 8px 10px;
     border: 1.5px solid var(--border); border-radius: var(--radius-sm);
     font-size: 13px; font-family: var(--font); color: var(--text-primary);
     outline: none; background: var(--bg);
     transition: border-color var(--transition);
   }
   .compose-input:focus { border-color: var(--accent); background: #fff; }
   .compose-select {
     flex: 1; padding: 8px 10px;
     border: 1.5px solid var(--border); border-radius: var(--radius-sm);
     font-size: 13px; font-family: var(--font); color: var(--text-primary);
     outline: none; background: var(--bg); cursor: pointer;
   }
   .compose-body-area { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
   .compose-textarea {
     flex: 1; padding: 16px 20px;
     border: none; font-size: 14px; font-family: var(--font);
     color: var(--text-primary); resize: none; outline: none;
     line-height: 1.7;
   }
   .compose-footer {
     padding: 12px 20px; border-top: 1px solid var(--border);
     display: flex; align-items: center; justify-content: space-between;
   }
   .compose-feedback { font-size: 12px; color: var(--success); }
   
   /* ============ TAG DROPDOWN ============ */
   .tag-dropdown {
     position: fixed; background: var(--bg-panel);
     border: 1px solid var(--border); border-radius: var(--radius-md);
     box-shadow: var(--shadow-md); padding: 6px;
     z-index: 500; display: none; min-width: 180px;
   }
   .tag-dropdown.open { display: block; }
   .tag-dropdown-item {
     display: flex; align-items: center; gap: 10px;
     padding: 7px 10px; border-radius: var(--radius-sm);
     font-size: 13px; cursor: pointer; color: var(--text-primary);
     transition: background var(--transition);
   }
   .tag-dropdown-item:hover { background: var(--bg-hover); }
   .tag-dd-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
   .tag-dd-check { margin-left: auto; color: var(--accent); font-size: 13px; }
   
   /* ============ TOAST NOTIFICHE ============ */
   .notif-toast {
     position: fixed; bottom: 24px; right: 24px;
     background: var(--bg-sidebar); color: #E5E7EB;
     border-radius: var(--radius-md); padding: 14px 16px;
     box-shadow: var(--shadow-lg); width: 300px;
     transform: translateY(20px) scale(.96); opacity: 0;
     pointer-events: none;
     transition: transform .25s ease, opacity .25s ease;
     z-index: 9999;
   }
   .notif-toast.show { transform: translateY(0) scale(1); opacity: 1; pointer-events: all; }
   .notif-toast-header { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; margin-bottom: 5px; }
   .notif-toast-body { font-size: 12px; color: rgba(255,255,255,.55); }
   
   /* ============ LOADING ============ */
   .loading-bar {
     height: 2px; background: var(--accent);
     animation: loadbar 1s ease infinite alternate;
     margin: 8px 0;
   }
   @keyframes loadbar { from { opacity: .3; width: 20%; } to { opacity: 1; width: 100%; } }
   .skeleton {
     background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
     background-size: 200% 100%;
     animation: shimmer 1.2s infinite;
     border-radius: 4px;
   }
   @keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
   
   /* ============ SCROLLBAR GLOBAL ============ */
   * { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }

/* ============ NUOVE FUNZIONALITÀ — v4 ============ */

/* Tab Bozze / Archivio (variano leggermente i colori dai tab esistenti) */
#tabDrafts.active {
  background: #F5F3FF;
  border-color: #8B5CF6;
  color: #6D28D9;
  box-shadow: inset 0 0 0 1px rgba(139,92,246,.08);
}
#tabArchive.active {
  background: #ECFDF5;
  border-color: #10B981;
  color: #047857;
  box-shadow: inset 0 0 0 1px rgba(16,185,129,.08);
}
.mail-list--drafts .folder-list-label {
  color: #6D28D9;
  background: #F5F3FF;
}

/* Paginazione */
.pagination-bar {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg-panel);
}
.page-btn {
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-second); transition: all var(--transition);
}
.page-btn:hover:not(:disabled) { background: var(--bg-hover); color: var(--text-primary); }
.page-btn:disabled { opacity: .35; cursor: not-allowed; }
.page-label { font-size: 12px; color: var(--text-muted); font-weight: 500; min-width: 110px; text-align: center; }

/* Barra azioni Rispondi / Rispondi a tutti / Inoltra */
.mv-action-bar {
  display: flex; gap: 8px; padding: 10px 20px;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}
.action-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--bg-panel);
  color: var(--text-second); font-size: 12px; font-weight: 500;
  font-family: var(--font); cursor: pointer; transition: all var(--transition);
}
.action-pill:hover { background: var(--accent-light); border-color: var(--accent); color: var(--accent-dark); }

/* Cc nel rispondi a tutti */
.reply-cc-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.reply-cc-row label { font-size: 12px; color: var(--text-muted); width: 28px; flex-shrink: 0; }
.reply-cc-row input { flex: 1; }

/* Nota allegati inoltrati */
.fwd-attachments-note {
  font-size: 12px; color: var(--text-muted);
  padding: 6px 0; font-style: italic;
}

/* Dropdown "Sposta in..." */
.move-dropdown-wrapper { position: relative; }
.move-dropdown {
  position: absolute; top: calc(100% + 4px); right: 0;
  background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  padding: 6px; min-width: 170px; z-index: 400; display: none;
}
.move-dropdown.open { display: block; }
.move-dropdown-item {
  padding: 7px 10px; border-radius: var(--radius-sm);
  font-size: 13px; cursor: pointer; color: var(--text-primary);
  transition: background var(--transition);
}
.move-dropdown-item:hover { background: var(--bg-hover); }

/* Stato salvataggio bozza */
.draft-save-status {
  font-size: 11px; color: var(--text-muted); margin-left: 10px;
}

/* Login: messaggio di blocco rate-limit più visibile */
.login-error { font-weight: 500; }