/* === FileRise styles.css TOC ===
   1) Variables
   2) Base
   3) Layout
   4) Components
   5) Modals
   6) Utilities
   7) Dark Mode
   8) Overrides / Compact / Legacy
*/
/* === Variables === */
:root{--header-h: 55px;}
.header-container{min-height: var(--header-h);}
img.logo{width:50px; height:50px; display:block;}
.is-visually-hidden{visibility: hidden;
  pointer-events: none;}
/* === Modals === */
#userPanelModal .modal-content,
#adminPanelModal .modal-content,
#userPermissionsModal .modal-content,
#adminUserHubModal .modal-content,
#userFlagsModal .modal-content,
#userGroupsModal .modal-content,
#groupAclModal .modal-content,
#clientPortalsModal .modal-content{border-radius: var(--menu-radius);}
#fr-login-tip{min-height: 40px;            
  max-width: 520px;
  margin: 8px auto 0;
  border-radius: var(--menu-radius);
  padding: 10px 12px;
  text-align: left;
  margin-bottom: 10px;}
/* === Layout === */
.main-wrapper{display:flex;              
  gap:5px;
  align-items:flex-start;}
/* === Base === */
body{font-family: 'Roboto', sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    transition: background-color 0.3s, color 0.3s;}
body{letter-spacing: 0.2px;
    overflow-x: hidden;}
.custom-dash{display: inline-block;
    transform: scaleX(1.5);
    padding-left: 2px !important;
    padding-right: 2px !important;}
.container,
  .container-fluid{margin-top: 10px;
    padding-right: 4px !important;
    padding-left: 4px !important;}
@media (min-width: 1300px) {
  .container-fluid{padding-left: 20px !important;
      padding-right: 20px !important;}
}
@media (max-width: 600px) {
  .zones-toggle{left: 85px !important;}
}
/* === Components === */
:root{--filr-accent-500:#008CB4; 
  --filr-accent-600:#00789A; 
  --filr-accent-700:#006882; 
  --filr-accent-ring:rgba(0,140,180,.4);
  --filr-focus-ring:0 0 0 2px var(--filr-accent-ring);}
.btn-color-folder{display:inline-flex; align-items:center; gap:6px;
  background:var(--filr-accent-500);
  border:1px solid var(--filr-accent-700);
  color:#fff;}
.btn-color-folder .material-icons{color:currentColor;}
.btn-color-folder:hover,
.btn-color-folder:focus-visible{background:var(--filr-accent-600);
  border-color:var(--filr-accent-700);}
.btn-color-folder:active{background:var(--filr-accent-700);}
.btn-color-folder:focus-visible{outline:2px solid var(--filr-accent-ring);
  outline-offset:2px;}
.dark-mode .btn-color-folder{background:var(--filr-accent-600);
  border-color:var(--filr-accent-700);
  color:#fff;}
.dark-mode .btn-color-folder:hover,
.dark-mode .btn-color-folder:focus-visible{background:var(--filr-accent-700);}
.btn-login{margin-top: 10px;}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible{
  outline: none;
  box-shadow: var(--filr-focus-ring);}
.orange-icon{color: #2196F3 !important;
    font-size: 34px !important;
    transform: translateY(-3px) !important;}
.red-icon{width: 34px !important;
    display: inline-block !important;
    font-size: 34px !important;
    color: red !important;
    transform: translateY(-3px) !important;}
    .header-container{
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      height: 55px;
      padding: 10px 20px;
      background-color: var(--header-bg-light, #2196F3);
      transition: background-color 0.3s ease;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }
  .dark-mode .header-container{
      background-color: var(--header-bg-dark, #1f1f1f);
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
  }

  .admin-core-badge,
.admin-pro-badge {
  font-size: 12px;
  padding: 2px 6px;
  vertical-align: middle;
  position: relative;
  top: -1px;
  margin-left: 6px;
}

  #adminPanelModal .section-content .pro-card {
    margin: 8px 10px;
    border-radius: 12px;
  }
  #adminPanelModal .section-content {
    margin: 0px 10px;
  }
  .pro-license-meta {
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    background-color: rgba(40, 167, 69, 0.08); /* light green tint */
    border: 1px solid rgba(40, 167, 69, 0.4);
    color: #2e7d32;
  }
  
  .pro-license-meta div + div {
    margin-top: 2px;
  }
  
  /* Dark mode tweak so it doesn't glow too bright */
  .dark-mode .pro-license-meta {
    background-color: rgba(40, 167, 69, 0.18);
    border-color: rgba(40, 167, 69, 0.6);
    color: #c8e6c9;
  }
  /* FileRise Pro button styling (admin) */
  .btn-pro-admin:hover {
  filter: brightness(1.05);
}
    /* User management action bar */
    /* TODO: admin-user-actions also redefined below with different margins; keep both until spacing contexts are confirmed. */
    .admin-user-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 4px;
    }
    .admin-user-actions .btn {
      border-radius: 999px;
      font-size: 12px;
      padding: 6px 12px;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }
    .admin-user-actions .btn .material-icons {
      font-size: 16px;
      line-height: 1;
    }

  /* ---------- Pro buttons + pill ---------- */
  .admin-user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
  }

  .btn-pro-wrapper {
    position: relative;
    display: inline-block;
  }
  .btn-pro-admin:disabled {
    opacity: 0.9;
  }


  .btn-pro-pill {
    position: absolute;
    top: -7px;
    right: -4px;
    font-size: 10px;
    line-height: 1.2;
    padding: 2px 6px;
    border-radius: 999px;
    background: #ffc107;
    color: black;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    pointer-events: none;
    white-space: nowrap;
    font-weight: 600;
  }

#darkModeIcon{color: #fff;}
.header-logo{max-height: 50px;
    width: auto;
    display: block;}
.header-logo svg{height: 50px;
    width: auto;}
.dark-mode header{background-color: #1f1f1f;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);}
.header-left{display: flex;
    align-items: center;
    flex: 1;
    min-width: 100px;}
.header-title{position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    white-space: nowrap;}
.header-title h1{font-size: 2rem;
    color: #fff;
    margin: 0;}
.header-buttons{display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    min-width: 150px;
    gap: 0px;}
.header-buttons button{background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;}
.header-buttons button:not(#userDropdownToggle),
.header-card-icon {
  border-radius: 999px;
    padding: 9px;}
#userDropdownToggle{border-radius: 4px !important;
    padding: 6px 10px !important;}

.header-buttons button:hover{background-color: rgba(122,179,255,.14);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    color: #fff;}
@media (max-width: 600px) {
  header{flex-direction: column;
      text-align: center;
      height: auto;
      padding: 10px;}
  .header-left,
    .header-buttons{justify-content: center;
      flex: unset;}
  .header-title{order: 1;
      width: 100%;
      margin-bottom: 10px;
      position: relative;
      left: auto;
      transform: none;}
  .header-buttons{order: 2;
      flex-wrap: wrap;
      justify-content: center;}
}
.header-buttons button i{font-size: 24px;}

.header-buttons button,
#headerDropArea .header-card-icon {
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}


.header-buttons button:hover,
#headerDropArea .header-card-icon:hover,
#headerDropArea .header-card-icon.is-locked {
  background-color: rgba(122,179,255,.14) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  color: #fff;
}

.dark-mode-toggle{background-color: #424242;
    border: 1px solid #fff;
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s;}
.dark-mode-toggle:hover{background-color: rgba(255, 255, 255, 0.2);}
.folder-help-tooltip{background-color: #fff;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);}
.dark-mode .folder-help-tooltip{background-color: #333 !important;
    color: #eee !important;
    border: 1px solid #555 !important;}
@media (max-width: 790px) {
  .header-container{flex-wrap: wrap;
      height: auto;}
  .header-title{text-align: center;
      flex-basis: 100%;
      order: 2;}
  .header-right{order: 3;
      flex-basis: 100%;
      justify-content: center;
      margin-top: 10px;}
}
@media (max-width: 600px) {
  .header-container{flex-direction: column;
      text-align: center;}
  .header-left{justify-content: center;
      flex-basis: 100%;}
  .header-title{font-size: 1.7rem;
      margin-top: 5px;}
  .header-buttons{flex-direction: row;
      justify-content: center;
      gap: 5px;
      margin-top: 5px;}
}
.material-icons{font-size: 24px;
    vertical-align: middle;
    color: currentColor;}
.material-icons.folder-icon,
  .material-icons.gallery-icon{color: black;
    margin-right: 5px;}
.dark-mode .material-icons.folder-icon,
  .dark-mode .material-icons.gallery-icon{color: white;
    margin-right: 5px;}
.remove-file-btn{width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background: transparent;
    border: none;
    color: red;
    cursor: pointer;
    margin-right: 0px;
    padding: 0;
    border-radius: 50%;
    transition: background-color 0.3s;}
.remove-file-btn:hover{background-color: red;
    color: white;}
.remember-me-container{margin-top: 20px !important;}
#loginForm{margin: 0 auto;
    max-width: 400px;
    background: white;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: var(--menu-radius);}
body.fr-login-view{background: var(--fr-login-bg-light,#f8fafc);
    display: flex;
    flex-direction: column;
    min-height: 100vh;}
body.fr-login-view.dark-mode{background: var(--fr-login-bg-dark,#121212);}
body.fr-login-view #siteFooter{background: transparent;
    border-top-color: transparent;
    color: inherit;}
body.fr-login-view #main{min-height: 0;
    flex: 1 0 auto;
    display: block;
    padding: 32px 16px 40px;
    background: transparent;}
body.fr-login-view.dark-mode #main{background: transparent;}
body.fr-login-view #loginForm{margin-top: 0 !important;}
.login-tagline{margin-top: 10px;
    font-size: 0.95rem;
    color: var(--fr-muted-light,#606060);
    text-align: center;}
body.dark-mode .login-tagline{color: var(--fr-muted-dark,#aaaaaa);}
.dark-mode #loginForm{background-color: #2c2c2c;
    color: #e0e0e0;
    padding: 20px;
    border-radius: var(--menu-radius);
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.2);}
.dark-mode #loginForm input{background-color: #333;
    color: #fff;
    border: 1px solid #555;}
.dark-mode #loginForm label{color: #ddd;}
.dark-mode #loginForm button{background-color: #007bff;
    color: white;
    border: none;}
.dark-mode #loginForm button:hover{background-color: #0056b3;}
#restoreFilesModal .modal-content{position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    z-index: 10000 !important;
    width: 95% !important;
    max-width: 840px !important;
    padding: 22px;
    border-radius: 14px;}
#restoreFilesModal .restore-modal__header{display:flex;
    align-items:center;
    gap:12px;
    padding-bottom:12px;
    margin-bottom:14px;
    border-bottom:1px solid var(--fr-border-light,#e5e5e5);}
body.dark-mode #restoreFilesModal .restore-modal__header{border-color: var(--fr-border-dark,#303030);}
#restoreFilesModal .restore-modal__icon{width:46px; height:46px; display:inline-flex; align-items:center; justify-content:center; background: rgba(122,179,255,.12); border-radius:14px;}
body.dark-mode #restoreFilesModal .restore-modal__icon{background: rgba(122,179,255,.08);}
#restoreFilesModal .restore-modal__icon svg{width:32px; height:32px;}
#restoreFilesModal .restore-modal__titles h4{margin:0; font-size:20px;}
#restoreFilesModal .restore-modal__titles p{margin:2px 0 0; color: var(--fr-muted-light,#606060); font-size:14px;}
#restoreFilesModal .restore-modal__titles .restore-modal__source{margin:4px 0 0; color: var(--fr-muted-light,#606060); font-size:12px;}
body.dark-mode #restoreFilesModal .restore-modal__titles p{color: var(--fr-muted-dark,#aaaaaa);}
body.dark-mode #restoreFilesModal .restore-modal__titles .restore-modal__source{color: var(--fr-muted-dark,#aaaaaa);}
#restoreFilesModal .restore-list{max-height:320px;
    overflow-y:auto;
    border:1px solid var(--fr-border-light,#e5e5e5);
    background: var(--fr-surface-light-2,#f1f1f1);
    border-radius:12px;
    padding:6px;}
body.dark-mode #restoreFilesModal .restore-list{border-color: var(--fr-border-dark,#303030);
    background: var(--fr-surface-dark-2,#181818);}
#restoreFilesModal .restore-row{display:flex;
    align-items:flex-start;
    gap:10px;
    padding:10px;
    border-radius:10px;
    cursor:pointer;
    transition: background-color var(--filr-transition-fast,150ms ease-out), box-shadow var(--filr-transition-fast,150ms ease-out);}
#restoreFilesModal .restore-row:hover{background: rgba(122,179,255,.12);}
#restoreFilesModal .restore-row.selected{background: rgba(122,179,255,.20);
    box-shadow: inset 0 0 0 1px rgba(122,179,255,.45);}
body.dark-mode #restoreFilesModal .restore-row:hover{background: rgba(122,179,255,.10);}
body.dark-mode #restoreFilesModal .restore-row.selected{background: rgba(122,179,255,.18);
    box-shadow: inset 0 0 0 1px rgba(122,179,255,.40);}
#restoreFilesModal .restore-row-text{flex:1 1 auto; min-width:0;}
#restoreFilesModal .restore-checkbox{margin-top:7px;}
#restoreFilesModal .restore-primary{font-weight:600; color: inherit; word-break: break-word;}
#restoreFilesModal .restore-meta{color: var(--fr-muted-light,#606060); font-size:13px; margin-top:4px;}
body.dark-mode #restoreFilesModal .restore-meta{color: var(--fr-muted-dark,#aaaaaa);}
#restoreFilesModal .restore-empty{padding:18px; text-align:center; color: var(--fr-muted-light,#606060);}
body.dark-mode #restoreFilesModal .restore-empty{color: var(--fr-muted-dark,#aaaaaa);}
#restoreFilesModal .restore-modal__actions{display:flex;
    flex-wrap:wrap;
    gap:10px;
    justify-content:flex-end;
    margin-top:16px;}
#restoreFilesModal .restore-btn{display:inline-flex;
    align-items:center;
    gap:8px;
    padding:10px 14px;
    border-radius:8px;
    border:1px solid var(--fr-border-light,#e5e5e5);
    background: var(--fr-surface-light-2,#f1f1f1);
    color:#0f172a;
    font-weight:600;
    box-shadow:0 1px 2px rgba(0,0,0,.08);
    transition: background-color var(--filr-transition-fast,150ms ease-out), transform var(--filr-transition-fast,150ms ease-out), box-shadow var(--filr-transition-fast,150ms ease-out);}
#restoreFilesModal .restore-btn[aria-busy="true"]{cursor: wait;}
#restoreFilesModal .restore-btn[aria-busy="true"]::after{content:"";
    width:14px; height:14px;
    border-radius:50%;
    border:2px solid currentColor;
    border-right-color: transparent;
    display:inline-block;
    margin-left:4px;
    animation: filr-spin .8s linear infinite;}
#restoreFilesModal .restore-btn[aria-busy="true"] .material-icons{opacity:0.6;}
#restoreFilesModal .restore-btn .material-icons{font-size:20px;}
#restoreFilesModal .restore-btn:hover{transform: translateY(-1px); background: #ffffff; box-shadow:0 6px 14px rgba(0,0,0,.12);}
body.dark-mode #restoreFilesModal .restore-btn,body.dark-mode #deleteTrashSelectedBtn{background: var(--fr-surface-dark,#212121); color:#f1f1f1; border-color: var(--fr-border-dark,#303030);}
body.dark-mode #restoreFilesModal .restore-btn:hover{background: color-mix(in srgb, var(--fr-surface-dark,#212121) 80%, #ffffff 20%); box-shadow:0 6px 14px rgba(0,0,0,.5);}
#restoreFilesModal .restore-btn-primary{background: var(--filr-accent-500,#008CB4); border-color: var(--filr-accent-700,#006882); color:#fff;}
#restoreFilesModal .restore-btn-primary:hover{background: var(--filr-accent-600,#00789A);}
#restoreFilesModal .restore-btn-warn{background:#fff5e5; border-color:#f0c075; color:#8a5a00;}
#restoreFilesModal .restore-btn-warn:hover{background:#ffe9c7;}
body.dark-mode #restoreFilesModal .restore-btn-warn{background: color-mix(in srgb, #ffb74d 25%, var(--fr-surface-dark,#212121) 75%); border-color: #862929; color:#ffd27f;}
body.dark-mode #restoreFilesModal .restore-btn-warn:hover{background: color-mix(in srgb, #ffb74d 35%, var(--fr-surface-dark,#212121) 65%);}
#restoreFilesModal .restore-btn-danger{background:#ffe8e8; border-color:#f2b8b5; color:#b42318;}
#restoreFilesModal .restore-btn-danger:hover{background:#ffd7d7;}
body.dark-mode #restoreFilesModal .restore-btn-danger{background: color-mix(in srgb, #ef4444 25%, var(--fr-surface-dark,#212121) 75%); border-color: color-mix(in srgb, #ef4444 50%, var(--fr-border-dark,#303030) 50%); color:#ffbfbf;}
body.dark-mode #restoreFilesModal .restore-btn-danger:hover{background: color-mix(in srgb, #ef4444 35%, var(--fr-surface-dark,#212121) 65%);}
body.dark-mode #restoreFilesModal .restore-btn-warn,
body.dark-mode #restoreFilesModal .restore-btn-danger{border:1px solid color-mix(in srgb, var(--fr-border-dark,#303030) 40%, transparent);}


.modal{display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;}
.modal .modal-content{position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: var(--menu-radius);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    overflow-y: auto;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    height: auto;
    max-height: 90vh;}
@media (max-width: 600px) {
  .modal .modal-content{transform: translate(-50%, -70%);}
}
.dark-mode .modal .modal-content{background-color: #2c2c2c;
    color: #e0e0e0;
    border-color: #444;}
.editor-close-btn,
.restore-close-btn{position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    color: #ff4d4d;
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid transparent;
    transition: all 0.3s ease-in-out;}
.editor-close-btn:hover,
.restore-close-btn:hover{color: white;
    background-color: #ff4d4d;
    box-shadow: 0px 0px 6px rgba(255, 77, 77, 0.8);
    transform: scale(1.05);}
.dark-mode .editor-close-btn,
.dark-mode .restore-close-btn{background-color: rgba(0, 0, 0, 0.7);
    color: #ff6666;}
.dark-mode .editor-close-btn:hover,
.dark-mode .restore-close-btn:hover{background-color: #ff6666;
    color: #000;}
.editor-modal{position: fixed;
    top: 2%;
    left: 5%;
    width: 90vw;
    height: 90vh;
    background-color: #fff;
    padding: 10px 20px 20px 20px;
    border: 1px solid #ccc;
    border-radius: var(--menu-radius);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
    z-index: 1100 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    resize: both !important;}
.editor-textarea{flex-grow: 1 !important;
    width: 100% !important;
    resize: none !important;
    overflow: auto !important;}
.dark-mode .editor-modal{background-color: #2c2c2c;
    color: #e0e0e0;
    border-color: #444;}
@media (max-width: 768px) {
  .editor-modal{top: 0%;
      left: 0%;
      transform: translate(4%, 4%) !important;
      width: 90vw !important;
      max-height: 90vh;
      padding: 15px;
      min-width: auto !important;}
}
.editor-header{display: flex;
    align-items: center;
    justify-content: space-between;
    height: 33px;
    padding: 0 10px;
    margin-bottom: 7px;}
.editor-title{margin: 0;
    line-height: 33px;}
.dark-mode .editor-header{background-color: #2c2c2c;}
@media (max-width: 600px) {
  .editor-title{font-size: 1.2rem;
      max-width: 95%;}
}
.editor-controls{text-align: right;
    margin-right: 30px;
    margin-bottom: 5px;}
.editor-footer{margin-top: 5px;
    text-align: right;}
.modal-content .button-container{display: flex !important;
    justify-content: flex-end;
    gap: 5px;
    margin-top: 20px;}
.logout-container{position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;}
#uploadBtn{font-size: 18px;
    padding: 10px 18px;
    align-items: center;
    margin-top:20px;}
.card-body.d-flex.flex-column{padding: 0.75rem !important;}
#customChooseBtn{background-color: #9E9E9E;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 14px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;}
@media (max-width: 768px) {
  #customChooseBtn{font-size: 12px;
      padding: 6px 10px;}
}
.pause-resume-btn{background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    outline: none;
    margin-right: 5px;}
.material-icons.pauseResumeBtn{color: black !important;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;}
.dark-mode .material-icons.pauseResumeBtn{color: white !important;}
.dark-mode .material-icons.pauseResumeBtn:hover{background-color: rgba(255, 215, 0, 0.3);
    color: #fff;}
body:not(.dark-mode) .material-icons.pauseResumeBtn:hover{background-color: rgba(0, 0, 0, 0.1);
    color: #000;}
#uploadProgressContainer ul{list-style: none;
    padding: 0;
    margin: 0;}
#uploadProgressContainer li{display: flex;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;}
#uploadProgressContainer .file-preview{width: 32px !important;
    height: 32px !important;
    margin-right: 0;
    flex-shrink: 0;}
#uploadProgressContainer .file-preview img{width: 32px !important;
    height: 32px !important;
    object-fit: cover;}
#uploadProgressContainer .file-name{margin: 0 20px 0 2px;
    flex-grow: 1;
    word-break: break-word;}
#uploadProgressContainer .progress{background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin: 5px 0 10px;
    height: 24px;
    width: 250px;}
#uploadProgressContainer .progress-bar{background-color: #007bff;
    height: 100%;
    line-height: 24px;
    color: #000;
    text-align: center;
    transition: width 0.4s ease;
    font-size: 0.9rem;}
#uploadProgressContainer{margin-top: 20px;}
@media (max-width: 768px) {
  .logout-container{position: static;
      align-items: flex-end;
      text-align: right;
      margin-top: 10px;}
  .logout-container button{width: auto;
      min-width: 120px;}
  .hide-small{display: none;}
}
@media (min-width: 768px) and (max-width: 991px) {
  .hide-medium{display: none !important;}
}
.btn{font-size: 0.9rem;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;}
.btn:hover{opacity: 0.9;}
#deleteSelectedBtn,
#copySelectedBtn,
#moveSelectedBtn,
#downloadZipBtn{
    background: inherit;
    color: inherit;
    border-color: transparent;
}
#deleteFolderBtn,
#confirmDeleteFolder{
    background: inherit !important;
    color: inherit !important;
    border-color: transparent !important;
}
#deleteSelectedBtn:hover,
#copySelectedBtn:hover,
#moveSelectedBtn:hover,
#downloadZipBtn:hover{
    background: #e6e9f1;
}
.dark-mode #deleteSelectedBtn:hover,
.dark-mode #copySelectedBtn:hover,
.dark-mode #moveSelectedBtn:hover,
.dark-mode #downloadZipBtn:hover{
    background: #25272c;
}
#downloadZipBtn .material-icons{color:#22c55e;}
#copySelectedBtn .material-icons{color:#6b7280;}
#moveSelectedBtn .material-icons{color:#f59e0b;}
#deleteSelectedBtn .material-icons,
#deleteFolderBtn .material-icons,
#confirmDeleteFolder .material-icons{color:#ef4444;}
#createBtn{background-color: #007bff;
    color: white;}
.dark-mode .dropdown-menu{background-color: #2c2c2c !important;
    border-color:   #444    !important;
    color:          #e0e0e0!important;}
.dark-mode .dropdown-menu .dropdown-item{color: #e0e0e0 !important;}
.dropdown-item:hover{background-color: rgba(0,0,0,0.05);}
.dark-mode .dropdown-item:hover{background-color: rgba(255,255,255,0.1);}
:is(#fileList, #fileListSecondary) button.edit-btn{background-color: #007bff;
    color: white;}
.rename-btn .material-icons,
  #renameFolderBtn .material-icons,
  .folder-rename-btn .material-icons{color: black !important;}
:is(#fileList, #fileListSecondary) table{background-color: transparent;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    table-layout: auto !important;
    width: 100% !important;}
:is(#fileList, #fileListSecondary) table tr:nth-child(even){background-color: transparent;}
:root{--filr-row-hover-bg: rgba(122,179,255,.14);
  --filr-row-selected-bg: rgba(122,179,255,.24);}
:is(#fileList, #fileListSecondary) table{border-collapse: separate;
  border-spacing: 0;}
:is(#fileList, #fileListSecondary) table tbody tr,
:is(#fileList, #fileListSecondary) table tbody tr > td{background-color: transparent !important;}
:is(#fileList, #fileListSecondary) table.table-hover tbody tr:hover > *{background-color: transparent !important;}
:is(#fileList, #fileListSecondary) table.table-striped > tbody > tr:nth-of-type(odd) > *{background-color: transparent !important;}
:is(#fileList, #fileListSecondary) table.filr-table tbody tr,
:is(#fileList, #fileListSecondary) table.filr-table tbody td{transition: background-color .12s ease;}
:is(#fileList, #fileListSecondary) table.filr-table tbody tr:hover:not(.selected, .row-selected, .selected-row, .is-selected) > td{background: var(--filr-row-hover-bg) !important;}
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.selected > td,
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.row-selected > td,
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.selected-row > td,
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.is-selected > td{background: var(--filr-row-selected-bg) !important;
  box-shadow: inset 0 0 0 1px rgba(122,179,255,.45);}
:is(#fileList, #fileListSecondary) table.filr-table tbody tr:hover:not(.selected, .row-selected, .selected-row, .is-selected) > td:first-child,
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.selected > td:first-child,
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.row-selected > td:first-child,
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.selected-row > td:first-child,
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.is-selected > td:first-child{border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;}
:is(#fileList, #fileListSecondary) table.filr-table tbody tr:hover:not(.selected, .row-selected, .selected-row, .is-selected) > td:last-child,
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.selected > td:last-child,
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.row-selected > td:last-child,
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.selected-row > td:last-child,
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.is-selected > td:last-child{border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;}
:is(#fileList, #fileListSecondary) table.filr-table tbody tr:focus-within > td{outline: 2px solid #8ab4f8;
  outline-offset: -2px;
  border-top-left-radius: 8px; border-bottom-left-radius: 8px;
  border-top-right-radius: 8px; border-bottom-right-radius: 8px;}
.dark-mode :is(#fileList, #fileListSecondary) table.filr-table tbody tr:hover:not(.selected, .row-selected, .selected-row, .is-selected) > td{background: var(--filr-row-hover-bg) !important;}
.dark-mode :is(#fileList, #fileListSecondary) table.filr-table tbody tr.selected > td,
.dark-mode :is(#fileList, #fileListSecondary) table.filr-table tbody tr.row-selected > td,
.dark-mode :is(#fileList, #fileListSecondary) table.filr-table tbody tr.selected-row > td,
.dark-mode :is(#fileList, #fileListSecondary) table.filr-table tbody tr.is-selected > td{background: var(--filr-row-selected-bg) !important;}
:is(#fileList, #fileListSecondary) table.filr-table{--bs-table-hover-color: inherit;
  --bs-table-striped-color: inherit;}
:is(#fileList, #fileListSecondary) table.table-hover tbody tr:hover,
:is(#fileList, #fileListSecondary) table.table-hover tbody tr:hover > td{color: inherit !important;}
.dark-mode :is(#fileList, #fileListSecondary) table.filr-table tbody td a,
.dark-mode :is(#fileList, #fileListSecondary) table.filr-table tbody td a:hover{color: inherit !important;}
:root{--filr-row-outline: rgba(122,179,255,.45);
  --filr-row-outline-hover: rgba(122,179,255,.35);}
:is(#fileList, #fileListSecondary) table.filr-table > :not(caption) > * > *{border: 0 !important;}
:is(#fileList, #fileListSecondary) table.filr-table td,
:is(#fileList, #fileListSecondary) table.filr-table th{box-shadow: none !important;}
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.selected > td,
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.row-selected > td,
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.selected-row > td,
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.is-selected > td{background: var(--filr-row-selected-bg) !important;
  box-shadow:
    inset 0  1px 0 var(--filr-row-outline),
    inset 0 -1px 0 var(--filr-row-outline);}
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.selected > td:first-child,
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.row-selected > td:first-child,
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.selected-row > td:first-child,
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.is-selected > td:first-child{box-shadow:
    inset 1px 0  0 var(--filr-row-outline),
    inset 0  1px 0 var(--filr-row-outline),
    inset 0 -1px 0 var(--filr-row-outline);
  border-top-left-radius: 8px; border-bottom-left-radius: 8px;}
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.selected > td:last-child,
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.row-selected > td:last-child,
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.selected-row > td:last-child,
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.is-selected > td:last-child{box-shadow:
    inset -1px 0  0 var(--filr-row-outline),
    inset  0  1px 0 var(--filr-row-outline),
    inset  0 -1px 0 var(--filr-row-outline);
  border-top-right-radius: 8px; border-bottom-right-radius: 8px;}
:is(#fileList, #fileListSecondary) table.filr-table tbody tr:hover:not(.selected, .row-selected, .selected-row, .is-selected) > td{background: var(--filr-row-hover-bg) !important;
  box-shadow:
    inset 0  1px 0 var(--filr-row-outline-hover),
    inset 0 -1px 0 var(--filr-row-outline-hover);}
:is(#fileList, #fileListSecondary) table.filr-table tbody tr:hover:not(.selected, .row-selected, .selected-row, .is-selected) > td:first-child{box-shadow:
    inset 1px 0  0 var(--filr-row-outline-hover),
    inset 0  1px 0 var(--filr-row-outline-hover),
    inset 0 -1px 0 var(--filr-row-outline-hover);
  border-top-left-radius: 8px; border-bottom-left-radius: 8px;}
:is(#fileList, #fileListSecondary) table.filr-table tbody tr:hover:not(.selected, .row-selected, .selected-row, .is-selected) > td:last-child{box-shadow:
    inset -1px 0  0 var(--filr-row-outline-hover),
    inset  0  1px 0 var(--filr-row-outline-hover),
    inset  0 -1px 0 var(--filr-row-outline-hover);
  border-top-right-radius: 8px; border-bottom-right-radius: 8px;}
:is(#fileList, #fileListSecondary) table.filr-table tbody tr:focus-within > td{outline: none;}
:is(#fileList, #fileListSecondary) table.filr-table tbody tr:focus-within > td:first-child,
:is(#fileList, #fileListSecondary) table.filr-table tbody tr:focus-within > td:last-child{outline: 2px solid #8ab4f8; outline-offset: -2px;}
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.inline-rename-active:focus-within > td{
  border-radius: 0;
}
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.inline-rename-active:focus-within > td:first-child{
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.inline-rename-active:focus-within > td:last-child{
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.inline-rename-active:focus-within > td:first-child,
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.inline-rename-active:focus-within > td:last-child{
  outline: none;
}
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.inline-rename-active > td{
  box-shadow: none !important;
}
#fileListTitle,
#fileListTitleSecondary,
.file-list-title{white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
    display: flex !important;
    align-items: center;
    flex-wrap: wrap;
    text-align: left !important;}
.fr-source-badge{
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75em;
    line-height: 1.4;
    background: #f1f5f9;
    color: #1f2937;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
    flex: 0 0 auto;
}
.fr-source-badge--title{
    margin-left: auto;
    font-size: 0.62em;
    padding: 1px 8px;
    line-height: 1.3;
}
.folder-strip-badge.fr-source-badge{
    margin: 2px 8px 2px 0;
    flex: 0 0 auto;
}
.dark-mode .fr-source-badge{
    background: #1f2937;
    color: #e5e7eb;
    border-color: #374151;
}
@media (max-width: 600px) {
  #fileListTitle,
  #fileListTitleSecondary,
  .file-list-title{font-size: 1.4rem !important;}
}
:is(#fileList, #fileListSecondary) table tr{box-shadow: none;
    border: none !important;
    outline: none !important;}
.dark-mode :is(#fileList, #fileListSecondary) table tr{box-shadow: none;
    border: none !important;
    outline: none !important;}
:is(#fileList, #fileListSecondary) table th,
  :is(#fileList, #fileListSecondary) table td{border: none !important;
    white-space: nowrap;}
:is(#fileList, #fileListSecondary) table th[data-column="name"],
  :is(#fileList, #fileListSecondary) table td:nth-child(2){white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    text-align: left !important;
    line-height: 1.2 !important;
    vertical-align: middle !important;
    padding: 2px 4px !important;
    max-width: 250px !important;
    min-width: 120px !important;}
@media (min-width: 500px) {
  :is(#fileList, #fileListSecondary) table th[data-column="name"],
    :is(#fileList, #fileListSecondary) table td:nth-child(2){max-width: 250px !important;
      min-width: 120px !important;}
}
@media (min-width: 1024px) {
  :is(#fileList, #fileListSecondary) table th[data-column="name"],
    :is(#fileList, #fileListSecondary) table td:nth-child(2){max-width: 280px !important;
      min-width: 120px !important;}
}
@media (min-width: 1440px) {
  :is(#fileList, #fileListSecondary) table th[data-column="name"],
    :is(#fileList, #fileListSecondary) table td:nth-child(2){max-width: 510px !important;
      min-width: 240px !important;}
}
:is(#fileList, #fileListSecondary) table th:not([data-column="name"]),
  :is(#fileList, #fileListSecondary) table td:not(:nth-child(2)){white-space: nowrap !important;}
:is(#fileList, #fileListSecondary) table td{vertical-align: middle !important;
    padding: 8px 10px !important;}
:root{--file-row-height: 48px;}
:is(#fileList, #fileListSecondary) table.table tbody tr{height: auto !important;
    min-height: var(--file-row-height) !important;}
:is(#fileList, #fileListSecondary) table.table tbody td:not(.file-name-cell){height: var(--file-row-height) !important;
    line-height: var(--file-row-height) !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    vertical-align: middle;}
:is(#fileList, #fileListSecondary) table.table tbody td.file-name-cell{white-space: normal;
    word-break: break-word;
    line-height: 1.2em !important;
    height: auto !important;}
h2{font-size: 2em;}
.form-group{margin-bottom: 10px;}
label{font-size: 0.9rem;}
.align-items-center{display: flex;
    align-items: center;}
.table th button{background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;}
#uploadForm{display: none;}
.folder-actions{display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
    white-space: normal;
    margin: 0;}
@media (min-width: 600px) and (max-width: 992px) {
  .folder-actions{white-space: nowrap;}
}
.folder-actions .btn{padding: 10px 12px;
    font-size: 0.85rem;
    line-height: 1.1;
    border-radius: 6px;}
.folder-actions .material-icons{font-size: 24px;
    vertical-align: -2px;}
.folder-actions .btn{font-size: 0.85rem;
    line-height: 1.1;
    border-radius: 6px;
  
    transform: scale(1);
    transform-origin: center;
    transition: transform 120ms ease, box-shadow 120ms ease;
    will-change: transform;}
.folder-actions .material-icons{font-size: 20px;
    vertical-align: -2px;
    transition: transform 120ms ease;}
.folder-actions .btn:hover,
  .folder-actions .btn:focus-visible{transform: scale(1.06);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);}
.folder-actions .btn:hover .material-icons,
  .folder-actions .btn:focus-visible .material-icons{transform: scale(1.05);}
.folder-actions .btn:focus-visible{outline: 2px solid rgba(33,150,243,0.6);
    outline-offset: 2px;}
@media (prefers-reduced-motion: reduce) {
  .folder-actions .btn,
    .folder-actions .material-icons{transition: none;}
}
#moveFolderBtn,
.folder-move-btn{background-color: #ff9800;
    border-color: #ff9800;
    color: #fff;
  }
  #moveFolderBtn:hover:not(:disabled):not(.disabled),
.folder-move-btn:hover:not(:disabled):not(.disabled) {
  background-color: #fb8c00; /* slightly darker */
  border-color: #fb8c00;
}

/* Active/pressed (only when enabled) */
#moveFolderBtn:active:not(:disabled):not(.disabled),
.folder-move-btn:active:not(:disabled):not(.disabled) {
  background-color: #f57c00;
  border-color: #f57c00;
}

/* Disabled state (both attribute + .disabled class) */
#moveFolderBtn:disabled,
#moveFolderBtn.disabled,
.folder-move-btn:disabled,
.folder-move-btn.disabled {
  background-color: #ffb74d;
  border-color: #ffb74d;
  color: #fff;
  opacity: 0.55;
}
.row-selected{background-color: #f2f2f2 !important;}
.dark-mode .row-selected{background-color: #444 !important;
    color: #fff !important;}

#customToast{position: fixed;
    bottom: 18px;
    right: 18px;
    background: #ffffff;
    color: #0f172a;
    padding: 12px 14px 12px 18px;
    border-radius: 12px;
    border: 1px solid rgba(15,23,42,0.12);
    box-shadow: 0 12px 26px rgba(15,23,42,0.18);
    font-size: 13px;
    line-height: 1.4;
    max-width: min(420px, calc(100vw - 24px));
    max-height: min(45vh, 320px);
    overflow-y: auto;
    overflow-wrap: anywhere;
    white-space: pre-line;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 9999;
    display: none;}
#customToast::before{content:"";
    position:absolute;
    left:0;
    top:0;
    bottom:0;
    width:4px;
    background: var(--toast-accent, #38bdf8);
    border-radius: 12px 0 0 12px;}
#customToast[data-tone="success"]{--toast-accent:#22c55e;}
#customToast[data-tone="error"]{--toast-accent:#ef4444;}
#customToast[data-tone="warning"]{--toast-accent:#f59e0b;}
#customToast[data-tone="info"]{--toast-accent:#38bdf8;}
#customToast.show{opacity: 1;
    transform: translateY(0);}
.button-wrap{display: flex;
    flex-wrap: nowrap;
    row-gap: 5px;
    column-gap: 0px;}
@media (max-width: 500px) {
  .button-wrap{width: 100%;}
}
.button-wrap .btn{align-items: center;
    height: 32px !important;
    font-size: 14px !important;}
.button-wrap .btn i.material-icons{font-size: 16px !important;
    line-height: 1 !important;
    vertical-align: middle !important;}
.file-list-shell{display:grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    align-items: start;
    width: 100%;}
.file-list-shell.dual-pane{grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;}
.file-list-shell.dual-pane .file-list-pane{min-width: 0;}
.file-list-shell.dual-pane #fileListContainer,
.file-list-shell.dual-pane #fileListContainerSecondary{min-width: 0;}
.file-list-shell.dual-pane :is(#fileList, #fileListSecondary){min-width: 0;}
@media (max-width: 992px) {
  .file-list-shell.dual-pane{grid-template-columns: minmax(0, 1fr);}
}
.file-list-pane{position: relative;
    transition: outline-color 0.15s ease, box-shadow 0.15s ease;}
.file-list-shell.dual-pane .file-list-pane.fr-pane-active{outline: 2px solid var(--filr-accent-500, #3b82f6);
    outline-offset: 2px;}
.file-list-shell.dual-pane .file-list-pane{width: 100%;}
.file-list-shell.dual-pane .file-list-pane.fr-pane-sticky{
    position: sticky;
    top: 12px;
    align-self: start;
}
.file-list-pane.fr-pane-narrow :is(#fileList, #fileListSecondary) .hide-small,
.file-list-pane.fr-pane-narrow :is(#fileList, #fileListSecondary) .hide-medium{display: none !important;}
.file-list-pane.fr-pane-medium :is(#fileList, #fileListSecondary) .hide-medium{display: none !important;}
.file-list-pane.fr-pane-narrow :is(#fileList, #fileListSecondary) th[data-column="size"],
.file-list-pane.fr-pane-narrow :is(#fileList, #fileListSecondary) td.size-cell,
.file-list-pane.fr-pane-narrow :is(#fileList, #fileListSecondary) td.folder-size-cell{display: table-cell !important;}
#fileListContainer,
#fileListContainerSecondary{border: 1px solid #e0e0e0;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: var(--menu-radius);
  max-width: 100%;
    padding-bottom: 10px !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
    margin: 0 0 20px;}
@media (max-width: 750px) {
  #fileListContainer,
  #fileListContainerSecondary{width: 99%;}
}
.dark-mode #fileListContainer,
.dark-mode #fileListContainerSecondary{background-color: #2c2c2c;
    color: #e0e0e0;
    border: 1px solid #444;
    border-radius: var(--menu-radius);}
#fileListContainer>h2,
  #fileListContainer>.file-list-actions,
  #fileListContainer>:is(#fileList, #fileListSecondary),
  #fileListContainerSecondary>h2,
  #fileListContainerSecondary>.file-list-actions,
  #fileListContainerSecondary>#fileListSecondary{margin-left: 15px;}
@media (max-width: 768px) {
  #fileListContainer>h2,
    #fileListContainer>.file-list-actions,
    #fileListContainer>:is(#fileList, #fileListSecondary),
    #fileListContainerSecondary>h2,
    #fileListContainerSecondary>.file-list-actions,
    #fileListContainerSecondary>#fileListSecondary{margin-left: 1px;}
}
.col-12.col-md-4.text-left{margin-left: -17px;}
@media (max-width: 600px) {
  .col-12.col-md-4.text-left{margin-left: -15px;}
}
.file-list-top-controls{width: 100%;}
.file-list-top-controls .fr-page-controls{flex-wrap: wrap;
    gap: 6px;
    max-width: 100%;}
.file-list-pagination-col{display:flex;
    align-items:center;}
.file-list-pagination-col .fr-page-controls{width:100%;}
.file-list-pane.fr-pane-narrow .file-list-top-controls,
  .file-list-pane.fr-pane-medium .file-list-top-controls{margin-left: 0;
    margin-right: 0;}
.file-list-pane.fr-pane-narrow .file-list-top-controls > [class*="col-"],
  .file-list-pane.fr-pane-medium .file-list-top-controls > [class*="col-"]{flex: 0 0 100%;
    max-width: 100%;}
.file-list-pane.fr-pane-narrow .file-list-pagination-col,
  .file-list-pane.fr-pane-medium .file-list-pagination-col{margin-left: 0 !important;
    margin-top: 8px;
    justify-content:center;}
.file-list-pane.fr-pane-narrow .file-list-pagination-col .fr-page-controls,
  .file-list-pane.fr-pane-medium .file-list-pagination-col .fr-page-controls{justify-content:center !important;}
.file-list-pane.fr-pane-narrow .page-indicator,
  .file-list-pane.fr-pane-medium .page-indicator{white-space: normal;}

  .header-buttons button:not(#userDropdownToggle),
#headerDropArea .header-card-icon {
  padding: 9px;
}
#fileListTitle,
#fileListTitleSecondary,
.file-list-title{font-size: 1.8em;
    margin-top: 10px;
    margin-bottom: 10px;}
.file-list-actions{display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;}
.file-list-pane.fr-pane-narrow #fileSummary,
.file-list-pane.fr-pane-medium #fileSummary{
    width:auto;
    max-width:100%;
    justify-content:center;
    margin:6px auto 0;
}
@media (max-width: 900px) {
  .file-list-pagination-col{margin-left:0 !important;
      justify-content:center;}
  .file-list-pagination-col .fr-page-controls{justify-content:center !important;}
  #fileSummary{width:auto;
      max-width:100%;
      justify-content:center;
      margin:6px auto 0;}
}
.file-list-dual-hint{opacity: 0.8;
    font-size: 0.95em;
    padding: 8px 6px;}
.fr-dual-target-hint{display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--fr-border-light,#e5e5e5);
    background: var(--fr-surface-light-2,#f1f1f1);
    color: var(--fr-muted-light,#606060);
    font-size: 0.85rem;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;}
.file-list-actions .fr-dual-target-hint{margin-left: auto;}
.dark-mode .fr-dual-target-hint{background: var(--fr-surface-dark,#212121);
    border-color: var(--fr-border-dark,#303030);
    color: var(--fr-muted-dark,#aaaaaa);}
.file-list-pane.fr-pane-drop-target{outline: 2px dashed var(--filr-accent-500,#008CB4);
    outline-offset: 3px;}
.file-list-secondary-empty{min-height: 180px;
    display: flex;
    align-items: center;}
.file-list-pane.fr-pane-has-content .file-list-dual-hint{display: none;}
.file-actions-strip{display:flex;
    align-items:center;
    gap:10px;
    row-gap:8px;
    flex-wrap:wrap;
    min-height:45px;
    padding:10px 10px;
    border:none;
    border-radius:14px;
    background: var(--fr-surface-light, #f8f9fb);
    box-shadow:
      0 6px 16px rgba(15,23,42,0.08),
      0 0 0 1px rgba(0,0,0,0.04);}
.dark-mode .file-actions-strip{background: var(--fr-surface-dark-2)!important;
    border:none;
    box-shadow:
      0 8px 18px rgba(0,0,0,0.36),
      0 0 0 1px rgba(255,255,255,0.06);}
.file-actions-strip .action-group{display:flex; align-items:center; gap:8px;}
.file-actions-strip .action-separator{width:1px; height:30px;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.18), transparent);
    opacity:0.8;}
.dark-mode .file-actions-strip .action-separator{background: linear-gradient(180deg, transparent, rgba(255,255,255,0.35), transparent);}
.file-actions-strip .action-btn{width:auto;
    height:36px;
    padding:6px 10px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:10px !important;
    background: transparent;
    color: #1f2937;
    border:1px solid transparent;
    box-shadow: none;}

#createBtn{
  border-radius:999px !important;

}
.file-actions-strip .action-btn .btn-label{margin:0 4px; font-weight:600; letter-spacing:0.02em;}
.file-actions-strip .action-btn.icon-only{width:38px; padding:6px;}
.dark-mode .file-actions-strip .action-btn{background:transparent;
    color:#e8eaed;
    border-color:transparent;
    box-shadow:none;}
.file-actions-strip .action-btn:disabled{opacity:0.45;}
.file-actions-strip .action-btn .material-icons,
.file-actions-strip .action-btn .material-symbols-rounded,
.file-actions-strip .action-btn i.material-icons{font-size:20px !important;
    line-height:1 !important;
    color: inherit !important;}
.dark-mode .file-actions-strip .action-btn .material-icons,
.dark-mode .file-actions-strip .action-btn .material-symbols-rounded,
.dark-mode .file-actions-strip .action-btn i.material-icons{color: inherit;}
.file-actions-strip #createDropdown{margin-right:6px;}
.file-actions-strip #toolbarMenuBtn{border-radius:10px;}
.file-actions-strip .dropdown-caret{font-size:18px; margin-left:2px;}
.file-actions-strip .action-btn:hover:not(:disabled){background:rgba(0,0,0,0.06);}
.dark-mode .file-actions-strip .action-btn:hover:not(:disabled){background:rgba(255,255,255,0.08);}
.file-list-actions .action-btn{flex: 0 1 auto;}

/* Keep toolbar height stable but allow wrapping without overflow */

/* Collapse/expand secondary actions */
.file-actions-strip .secondary-separator{
  display:none; /* keep only one divider */
}
.file-actions-strip .secondary-actions,
.file-actions-strip .folder-inline-actions{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  overflow:hidden;
  max-width:0;
  opacity:0;
  transform:translateY(-4px);
  pointer-events:none;
  transition:max-width .18s ease, opacity .18s ease, transform .18s ease;
}
.file-actions-strip .secondary-actions.is-visible,
.file-actions-strip .folder-inline-actions.is-visible{
  max-width:420px;
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}
.file-actions-strip.collapsed .secondary-actions,
.file-actions-strip.collapsed .folder-inline-actions{
  max-width:0;
  opacity:0;
  transform:translateY(-4px);
  pointer-events:none;
}
.file-actions-strip .view-actions{margin-left:10px;}
.file-actions-strip.expanded .view-actions{margin-left:0;}
@media (max-width: 1100px) {
  .file-actions-strip.expanded .view-actions{margin-left:0;}
}

/* View options popover */
.filr-popover{
  position:absolute;
  z-index:10020;
  min-width:220px;
  max-width:280px;
  padding:12px 14px;
  border-radius:12px;
  background: var(--fr-surface-light,#ffffff);
  border:1px solid var(--fr-border-light,#d6dbe3);
  box-shadow:0 14px 32px rgba(15,23,42,.18), 0 0 0 1px rgba(0,0,0,.05);
  color:#0f172a;
}
.dark-mode .filr-popover{
  background: var(--fr-surface-dark-2,#181818)!important;
  border-color: var(--fr-border-dark,#2c2d33)!important;
  box-shadow:0 18px 40px rgba(0,0,0,.75), 0 0 0 1px rgba(0,0,0,.55);
  color:#e7e9ed;
}
#viewOptionsPopover .vo-title{
  font-weight:600;
  margin-bottom:8px;
  letter-spacing:0.01em;
}
#viewOptionsPopover .vo-control{margin-top:6px;}
#viewOptionsPopover .vo-label{
  font-size:0.9rem;
  margin-bottom:4px;
  color:var(--filr-muted-text,#606060);
}
.dark-mode #viewOptionsPopover .vo-label{color:#c3c7ce;}
#viewOptionsPopover .vo-slider-row{
  display:flex;
  align-items:center;
  gap:8px;
}
#viewOptionsPopover input[type=range]{
  flex:1;

}
#viewOptionsPopover .vo-value{
  min-width:42px;
  text-align:right;
  font-weight:600;
}
#viewOptionsPopover .vo-separator{
  margin:10px 0;
  border-top:1px solid var(--fr-border-light,#d6dbe3);
}
.dark-mode #viewOptionsPopover .vo-separator{
  border-color: var(--fr-border-dark,#2c2d33);
}
#viewOptionsPopover .vo-zoom-btns{
  margin-top:8px;
  display:flex;
  gap:6px;
}
#viewOptionsPopover .vo-zoom-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:32px;
  height:30px;
  padding:4px 8px;
  border-radius:8px;
  border:1px solid var(--fr-border-light,#d6dbe3);
  background: var(--fr-surface-light,#fff);
  color: inherit;
  box-shadow:0 1px 3px rgba(0,0,0,.06);
}
.dark-mode #viewOptionsPopover .vo-zoom-btn{
  border-color: var(--fr-border-dark,#2c2d33);
  background: var(--fr-surface-dark,#212121);
  box-shadow:0 1px 4px rgba(0,0,0,.6);
}
#viewOptionsPopover .vo-zoom-btn .material-icons{
  font-size:18px;
  line-height:1;
  color: inherit;
}
#viewOptionsPopover .vo-toggle-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
#viewOptionsPopover .vo-toggle-text{
  font-size:0.9rem;
  color:var(--filr-muted-text,#606060);
}
.dark-mode #viewOptionsPopover .vo-toggle-text{color:#c3c7ce;}
#viewOptionsPopover .vo-toggle-input{
  appearance:none;
  -webkit-appearance:none;
  width:2.6rem;
  height:1.4rem;
  margin:0;
  border-radius:999px;
  border:1px solid var(--fr-border-light,#d6dbe3);
  background-color:#e1e4ea;
  position:relative;
  cursor:pointer;
  outline:none;
  transition:background-color 0.15s ease,border-color 0.15s ease,box-shadow 0.15s ease;
}
#viewOptionsPopover .vo-toggle-input::before{
  content:"";
  position:absolute;
  top:2px;
  left:2px;
  width:1rem;
  height:1rem;
  border-radius:999px;
  background-color:#ffffff;
  box-shadow:0 1px 2px rgba(0,0,0,0.35);
  transition:transform 0.15s ease;
}
#viewOptionsPopover .vo-toggle-input:checked{
  background-color:var(--filr-accent-400,#0d6efd);
  border-color:var(--filr-accent-400,#0d6efd);
}
#viewOptionsPopover .vo-toggle-input:checked::before{
  transform:translateX(1.1rem);
}
#viewOptionsPopover .vo-toggle-input:focus-visible{
  box-shadow:0 0 0 2px rgba(13,110,253,0.35);
}
.dark-mode #viewOptionsPopover .vo-toggle-input{
  border-color:var(--fr-border-dark,#2c2d33);
  background-color:rgba(255,255,255,0.1);
}
.dark-mode #viewOptionsPopover .vo-toggle-input:checked{
  background-color:var(--filr-accent-400,#0d6efd);
  border-color:var(--filr-accent-400,#0d6efd);
}
.dark-mode #viewOptionsPopover .vo-toggle-input::before{
  box-shadow:0 1px 2px rgba(0,0,0,0.7);
}

.modal-footer{margin-top: 15px;
    text-align: right;}
.modal-input{width: 100%;
    margin-top: 10px;}
@media (max-width: 600px) {
  .file-actions-strip{width: 100%;}
  #fileListTitle,
  .file-list-title{font-size: 1.4em;}
  .file-list-actions{flex-direction: column;
      align-items: stretch;}
  .file-list-actions .action-btn{width: 100%;}
  .modal-content{width: 95%;
      margin: 20% auto;}
}
@media (hover:hover) and (pointer:fine) {
  #uploadBtn,
  #createBtn,
  #deleteSelectedBtn,
  #copySelectedBtn,
  #moveSelectedBtn,
  #downloadZipBtn,
  #extractZipBtn,
  #customChooseBtn{transition: transform 120ms ease, box-shadow 120ms ease;
    transform-origin: center;
    will-change: transform;}
  #uploadBtn:hover,
  #createBtn:hover,
  #deleteSelectedBtn:hover,
  #copySelectedBtn:hover,
  #moveSelectedBtn:hover,
  #downloadZipBtn:hover,
  #extractZipBtn:hover,
  #customChooseBtn:hover{transform: scale(1.08);
    box-shadow: 0 2px 10px rgba(0,0,0,.12);}
  #uploadBtn:active,
  #createBtn:active,
  #deleteSelectedBtn:active,
  #copySelectedBtn:active,
  #moveSelectedBtn:active,
  #downloadZipBtn:active,
  #extractZipBtn:active,
  #customChooseBtn:active{transform: scale(1.04);}
  #uploadBtn:focus-visible,
  #createBtn:focus-visible,
  #deleteSelectedBtn:focus-visible,
  #copySelectedBtn:focus-visible,
  #moveSelectedBtn:focus-visible,
  #downloadZipBtn:focus-visible,
  #extractZipBtn:focus-visible,
  #customChooseBtn:focus-visible{outline: none;
    transform: scale(1.08);
    box-shadow: 0 0 0 3px rgba(0,123,255,.25);}

  /* Smooth hover/press for all toolbar buttons (files + folders) */
  .file-actions-strip .action-btn{
    transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
    transform-origin: center;
    will-change: transform;
  }
  .file-actions-strip .action-btn:hover:not(:disabled){
    transform: translateY(-1px) scale(1.04);
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
  }
  .file-actions-strip .action-btn:active:not(:disabled){
    transform: translateY(0) scale(0.99);
    box-shadow: 0 2px 6px rgba(0,0,0,0.14);
  }
  .file-actions-strip .action-btn:focus-visible{
    outline: none;
    box-shadow: 0 0 0 2px var(--filr-accent-ring, rgba(0,140,180,.4));
  }
}
@media (prefers-reduced-motion: reduce) {
  #uploadBtn, #createBtn, #deleteSelectedBtn,
  #copySelectedBtn, #moveSelectedBtn,
  #downloadZipBtn, #extractZipBtn, #customChooseBtn{transition: none !important;
    transform: none !important;
    box-shadow: none !important;}
}

.btn-group.btn-group-sm[aria-label="File actions"] .btn{padding: .8rem !important;         
  width: 32px;                        
  height: 32px;
  line-height: 1 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;}
.btn-group.btn-group-sm[aria-label="File actions"] .btn .material-icons,
.btn-group.btn-group-sm[aria-label="File actions"] .btn .material-symbols-rounded{font-size: 20px !important;        
  line-height: 1 !important;}
.btn-group.btn-group-sm[aria-label="File actions"] .btn + .btn{margin-left: 2px;}
.btn-group.btn-group-sm[aria-label="File actions"] .btn{transition: transform 120ms ease, box-shadow 120ms ease;
  transform-origin: center;
  transform: translateZ(0);     
  will-change: transform;}
.btn-group.btn-group-sm[aria-label="File actions"] .btn:hover{transform: scale(1.12);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.04);}
.btn-group.btn-group-sm[aria-label="File actions"] .btn:active{transform: scale(1.06);}
.btn-group.btn-group-sm[aria-label="File actions"] .btn:focus-visible{transform: scale(1.12);
  outline: none;                 
  box-shadow: 0 0 0 3px rgba(0,123,255,.25);}
.btn-group.btn-group-sm[aria-label="File actions"] .btn .material-icons,
.btn-group.btn-group-sm[aria-label="File actions"] .btn .material-symbols-rounded{transition: transform 120ms ease;}
.btn-group.btn-group-sm[aria-label="File actions"] .btn:hover .material-icons,
.btn-group.btn-group-sm[aria-label="File actions"] .btn:hover .material-symbols-rounded{transform: scale(1.02);}
@media (prefers-reduced-motion: reduce) {
  .btn-group.btn-group-sm[aria-label="File actions"] .btn,
  .btn-group.btn-group-sm[aria-label="File actions"] .btn .material-icons,
  .btn-group.btn-group-sm[aria-label="File actions"] .btn .material-symbols-rounded{transition: none !important;
    transform: none !important;}
}

.breadcrumb-link{cursor: pointer;
    color: #007bff;
    text-decoration: underline;}
.breadcrumb-link:hover{color: #0056b3;}
.breadcrumb-link.selected{background-color: #e9ecef;
    font-weight: bold;
    padding: 2px 4px;
    border-radius: 4px;}
.folder-tree{list-style-type: none;
    padding-left: 5px;
    margin: 0;}
.folder-tree.collapsed{display: none;}
.folder-tree.expanded{display: block;}
.folder-item{display: block;}
.folder-toggle{cursor: pointer;
    margin-right: 5px;
    display: inline-block;
    width: 25px;
    text-align: right;}
.folder-indent-placeholder{display: inline-block;
    width: 5px;}
#folderTreeContainer{display: block;
  margin-left: 10px;}
#sourceSelectorWrap{display:flex;
  align-items:center;
  gap:8px;
  margin: 6px 10px 12px;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--fr-surface-light-2,#f6f6f6);
  border: 1px solid var(--fr-border-light,#e5e5e5);}
#sourceSelectorWrap label{font-size: 0.85rem;
  font-weight: 600;
  color: #555;
  margin: 0;
  white-space: nowrap;}
#sourceSelector{height: 34px;
  padding: 6px 10px;
  font-size: 0.9rem;
  border-radius: 10px;
  flex: 1 1 auto;
  min-width: 0;}
.dark-mode #sourceSelectorWrap{background: var(--fr-surface-dark-2,#1f1f1f);
  border-color: var(--fr-border-dark,#333);}
.dark-mode #sourceSelectorWrap label{color: #cfcfcf;}
.dark-mode #sourceSelector{background-color:#333;
  border-color:#555;
  color:#eee;}
#searchEverywhereModal .search-everywhere-source-wrap{display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:nowrap;}
#searchEverywhereModal .search-everywhere-source-wrap label{margin:0;
  font-size:12px;
  white-space:nowrap;
  flex:0 0 auto;}
#searchEverywhereModal #searchEverywhereSource,
#searchEverywhereModal #searchEverywhereLimit{border-radius:10px;
  height:32px;
  padding:4px 8px;}
.modal-source-row{display:flex;
  align-items:center;
  gap:8px;
  margin: 6px 0 10px;}
.modal-source-row label{font-size: 0.85rem;
  font-weight: 600;
  color: #555;
  margin: 0;
  white-space: nowrap;}
.dark-mode .modal-source-row label{color: #cfcfcf;}
.folder-option{cursor: pointer;}
.folder-option:hover{background-color: #f0f0f0;
    padding: 2px 4px;}
.folder-option.selected{background-color: #d0d0d0;
    border-radius: 4px;
    padding: 2px 4px;}
.dark-mode .folder-option.selected{background-color: #444;
    color: #fff;
    border-radius: 4px;
    padding: 2px 4px;}
.dark-mode .folder-option:hover{background-color: #333;
    color: #fff;
    padding: 2px 4px;}
.image-modal-header{display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 25px;
    padding: 5px;
    margin-bottom: 10px;
    max-width: 90%;}
.image-preview-modal-content{max-width: fit-content !important;
    max-height: 90vh;
    background: #fff;
    padding: 20px !important;
    border-radius: var(--menu-radius);
    overflow: hidden !important;
    margin: auto;
    position: relative;
    display: inline-flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;}
@media (max-width: 600px) {
  .image-preview-modal-content{max-width: fit-content !important;
      padding: 5px !important;
      overflow: hidden !important;
      display: inline-flex !important;}
}
.image-modal-img{max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;}
.close-image-modal{position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000;
    color: #ff4d4d;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    padding-bottom: 2px;
    transition: all 0.3s ease-in-out;}
.close-image-modal:hover{color: white;
    background-color: #ff4d4d;
    box-shadow: 0px 0px 6px rgba(255, 77, 77, 0.8);
    transform: scale(1.05);}
.share-modal-content{width: 600px !important;
    max-width: 90vw !important;}
.share-modal-body{display:flex;
    flex-direction:column;
    gap:12px;}
.share-modal-helper{margin:0;
    color:#666;
    font-size:.92em;}
.share-modal-section{border:1px solid #d9d9d9;
    border-radius:10px;
    padding:12px;
    background:#fafafa;}
.share-section-title{margin:0 0 8px;
    font-weight:600;
    font-size:.96rem;}
.share-mode-toggle{display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;}
.share-mode-btn{border:1px solid #cfcfcf;
    background:#fff;
    border-radius:10px;
    padding:10px;
    text-align:left;
    cursor:pointer;
    transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease;}
.share-mode-btn:hover{border-color:#0b5ed7;}
.share-mode-btn.is-active{border-color:#0b5ed7;
    box-shadow:0 0 0 2px rgba(11,94,215,.15);
    background:#f3f8ff;}
.share-mode-btn-title{display:block;
    font-weight:600;
    font-size:.93rem;
    color:#111;}
.share-mode-btn-desc{display:block;
    margin-top:4px;
    font-size:.82rem;
    color:#555;
    line-height:1.3;}
.share-mode-notice{margin:8px 0 0;
    font-size:.86rem;
    color:#555;}
.share-field-label{display:block;
    margin:0 0 6px;
    font-size:.88rem;
    font-weight:600;}
.share-field-input{width:100%;
    padding:6px;}
.share-custom-expiration{margin-top:10px;
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:8px;}
.share-custom-expiration input[type="number"]{width:72px;}
.share-custom-expiration .share-warning{margin:0;
    width:100%;
    color:#a33;
    font-size:.86rem;}
.share-check{display:flex;
    align-items:flex-start;
    gap:8px;
    margin:0;}
.share-check + .share-check{margin-top:8px;}
.share-check-helper{margin:6px 0 0 25px;
    font-size:.84rem;
    color:#666;}
@media (max-width: 680px) {
  .share-mode-toggle{grid-template-columns:1fr;}
}
.dark-mode .share-modal-helper{color:#b8b8b8;}
.dark-mode .share-modal-section{background:#262626;
    border-color:#404040;}
.dark-mode .share-mode-btn{background:#1f1f1f;
    border-color:#505050;}
.dark-mode .share-mode-btn:hover{border-color:#7ab3ff;}
.dark-mode .share-mode-btn.is-active{border-color:#7ab3ff;
    box-shadow:0 0 0 2px rgba(122,179,255,.22);
    background:#223042;}
.dark-mode .share-mode-btn-title{color:#ececec;}
.dark-mode .share-mode-btn-desc,
.dark-mode .share-mode-notice,
.dark-mode .share-check-helper{color:#b9b9b9;}
.dark-mode .close-image-modal{background-color: rgba(0, 0, 0, 0.6);
    color: #ff6666;}
.dark-mode .close-image-modal:hover{background-color: #ff6666;
    color: #000;}
.dark-mode .image-preview-modal-content{background: #2c2c2c;
    border-color: #444;}
.page-indicator{margin: 0 8px;
    white-space: nowrap;}
.clickable-row{cursor: pointer;}
.file-icon{color: #333;
    margin-right: 0;
    margin-left: 0;
    font-size: 32px;}
.dark-mode .file-icon{color: white;}
.bottom-select{display: inline-block;
    width: auto !important;
    font-size: 16px !important;
    height: 28px !important;
    padding: 2px 8px !important;
    line-height: 1.2 !important;
    border-radius: 4px !important;
    vertical-align: middle !important;}
.label-inline{display: inline-flex;
    align-items: center;
    height: 28px !important;
    font-size: 16px !important;
    line-height: 1.2;
    margin-bottom: 0;}
.items-per-page-text{display: inline-flex;
    align-items: center;
    height: 28px !important;
    font-size: 16px !important;
    line-height: 1.2;
    margin-left: 8px;}
.upload-drop-area{text-align: center;}
.upload-instruction{margin-bottom: 10px;
    font-size: 16px;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;}
.upload-file-row{display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-word;
    flex-wrap: wrap;
    max-width: 100%;}
.file-info-wrapper{display: flex;
    flex-direction: column;
    justify-content: center !important;
    align-items: center !important;
    margin-top: 10px;
    max-width: 100%;}
.file-info-container{display: flex;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;}
.file-preview-container{display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 5px !important;
    max-width: 100% !important;
    text-align: center !important;}
.file-preview-img{max-width: 100px;
    max-height: 100px;
    margin-right: 5px;
    justify-content: center !important;
    height: auto;
    display: block !important;}
@media (max-width: 600px) {
  .file-preview-container{justify-content: center !important;}
}
.file-name-display{vertical-align: middle;
    margin-left: 5px;}
.upload-progress-wrapper{max-height: 300px;
    overflow-y: auto;}
.upload-progress-list{list-style: none;
    padding: 0;}
.upload-progress-item{padding-top: 10px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;}
.upload-progress-extra{padding-top: 10px;
    margin-bottom: 10px;
    display: flex;}
.upload-file-name{flex-grow: 1;
    margin-left: 5px;
    word-break: break-word;}
.upload-progress-div{flex: 0 0 250px;
    margin-left: 5px;}
.dark-mode{background-color: #121212;
    color: #e0e0e0;}
.dark-mode .container{background-color: transparent !important;}
.dark-mode .btn-primary{background-color: #007bff;
    color: #fff;
    border-color: #007bff;}
.dark-mode .btn-secondary{background-color: #6c757d;
    color: #fff;
    border-color: #6c757d;}
.dark-mode .btn-danger{background-color: #dc3545;
    color: #fff;
    border-color: #dc3545;}
.dark-mode .modal .modal-content,
  .dark-mode .editor-modal{background-color: #2c2c2c;
    color: #e0e0e0;
    border: 1px solid #444;}
.dark-mode table{background-color: #2c2c2c;
    color: #e0e0e0;}
.dark-mode #uploadProgressContainer .progress{background-color: #333;}
.dark-mode #uploadProgressContainer .progress-bar{background-color: #007bff;
    color: #e0e0e0;}
.dark-mode-toggle{background-color: transparent !important;
    border: 1px solid transparent !important;
    color: white !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    font-size: 0.9em !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background 0.3s, border 0.3s !important;}
.dark-mode-toggle:hover{background-color: rgba(255, 255, 255, 0.15) !important;}
.dark-mode-toggle:active{background-color: rgba(255, 255, 255, 0.25) !important;}
.dark-mode .dark-mode-toggle{background-color: transparent !important;
    color: white !important;}
.dark-mode .dark-mode-toggle:hover{background-color: rgba(255, 255, 255, 0.15) !important;}
.dark-mode-toggle:focus{outline: none !important;
    box-shadow: none !important;}
.folder-help-details{margin-top: 2px;
    font-size: 12px;
    color: #555;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;}
.folder-help-summary{cursor: pointer;
    list-style: none;
    color: #000;
    background: #f9f9f9;
    padding: 2px;
    display: inline-block;}
.folder-help-icon{vertical-align: middle;
    color: #d96601;
    font-size: 24px !important;}
.folder-help-list{margin: 0;
    padding-left: 20px;}
.dark-mode .folder-help-details{color: #ddd;
    background-color: #2c2c2c;
    border-color: #444;}
.dark-mode .folder-help-summary{color: #ddd;
    background: #2c2c2c;}
.dark-mode .folder-help-icon{color: #f6a72c;
    font-size: 20px;}
.dark-mode .CodeMirror{background: #1e1e1e !important;
    color: #ffffff !important;}
.dark-mode .CodeMirror-cursor{border-left: 2px solid #ffffff !important;}
.dark-mode .CodeMirror-gutters{background: #252526 !important;
    border-right: 1px solid #444 !important;}
.dark-mode .CodeMirror-linenumber{color: #aaaaaa !important;}
.dark-mode .CodeMirror-selected{background: rgba(255, 255, 255, 0.2) !important;}
.dark-mode .CodeMirror-matchingbracket{background-color: rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid #ffffff !important;}
.zoom_in,
  .zoom_out,
  .rotate_left,
  .rotate_right{background: rgba(80, 80, 80, 0.6) !important;
    border: none !important;
    color: white !important;
    cursor: pointer !important;
    border-radius: 4px !important;
    transition: background 0.3s ease, box-shadow 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    transform: translateY(-10px);}
.gallery-nav-btn{background: rgba(80, 80, 80, 0.6) !important;
    border: none !important;
    color: white !important;
    font-size: 48px !important;
    cursor: pointer !important;
    padding: 10px 15px !important;
    border-radius: 4px !important;
    transition: background 0.3s ease, box-shadow 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;}
.gallery-nav-btn:hover,
  .zoom_in:hover,
  .zoom_out:hover,
  .rotate_left:hover,
  .rotate_right:hover{background: rgba(80, 80, 80, 0.8) !important;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4) !important;}
.drop-hover{background-color: #e0e0e0;
    border: 1px dashed #666;}
.dark-mode .drop-hover{background-color: rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px dashed #ffffff !important;}
#restoreFilesList li{display: flex !important;
    align-items: center !important;
    margin-bottom: 5px;}
#restoreFilesList li input[type="checkbox"]{margin: 0 !important;
    transform: translateY(-3px) !important;}
#restoreFilesList li label{margin-left: 8px !important;}
/* === Context Menus === */
.filr-menu{position: fixed;
  z-index: 9999;
  min-width: 220px;
  max-width: min(320px, 90vw);
  height: auto;                  
  max-height: calc(100vh - 16px);
  overflow: auto;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--ctx-sep, rgba(0,0,0,.08));
  background: var(--ctx-bg, #fff);
  color: var(--ctx-fg, #1a1a1a);
  box-shadow:
    0 8px 24px rgba(0,0,0,.18),
    0 2px 6px rgba(0,0,0,.10);}
.filr-menu{--ctx-bg:#fff; --ctx-fg:#1a1a1a; --ctx-sep:rgba(0,0,0,.08);}
.dark-mode .filr-menu{--ctx-bg:#2c2c2c; --ctx-fg:#eaeaea; --ctx-sep:rgba(255,255,255,.12);}
.filr-menu .mi{display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: inherit;                
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  user-select: none;}
.filr-menu .mi:focus{outline: none;}
.filr-menu .mi:hover,
.filr-menu .mi:focus-visible{background: var(--filr-row-hover-bg, rgba(122,179,255,.14));
  box-shadow: inset 0 0 0 1px var(--filr-row-outline-hover, rgba(122,179,255,.35));}
.filr-menu .mi .material-icons{font-size: 18px;
  line-height: 1;
  color: currentColor;}
.filr-menu .mi span{flex: 1 1 auto;}
.filr-menu .sep{height: 1px;
  margin: 6px 4px;
  background: var(--ctx-sep);}
.filr-menu, .filr-menu *{--bs-body-color: inherit;
  --bs-dropdown-link-hover-color: inherit;}
.dark-mode #fileContextMenu{background: #2c2c2c;
  border-color: #555;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);}
#fileContextMenu{z-index: 1039;}
#fileContextMenu[hidden]{display:none !important; pointer-events:none !important;}
#folderContextMenu.filr-menu{max-height: min(calc(100vh - 16px), 420px);
  overflow-y: auto;}
#folderContextMenu .material-icons{color: currentColor; opacity: .9;}
/* === Sidebar / Drag & Drop Zones === */
.drop-target-sidebar{display: none;
    background-color: #f8f9fa;
    border-right: 2px dashed #1565C0;
    margin-top: 10px;
    margin-left: 10px;}
@media (min-width: 769px) {
  .drop-target-sidebar{display: block;}
}
.drop-target-sidebar.active,
  .drag-header.active{width: 350px;
  height: 750px;}
#sidebarDropArea{width: 350px;
  min-width: 350px;
  max-width: 350px;
  flex: 0 0 350px;
  box-sizing: border-box;}
.main-column{flex: 1;
    transition: margin-left 0.3s ease;}
#uploadFolderRow{display: flex;
    flex-wrap: nowrap;
    gap: 1rem;}
@media (max-width: 768px) {
  #uploadFolderRow{gap: 0px;}
}
#leftCol,
  #rightCol{display: flex;
    justify-content: center;
    min-width: 370px;
    align-self: flex-start;}
#leftCol{flex: 0 1 60%;}
#rightCol{flex: 0 1 40%;}
@media (max-width: 768px) {
  .main-wrapper{flex-direction: column;}
  .drop-target-sidebar{display: none !important;}
  #uploadFolderRow{flex-wrap: wrap;}
  #leftCol, #rightCol{flex: 0 1 100% !important;}
  #rightCol{margin-bottom: 0;}
}
#sidebarDropArea.highlight,
  #uploadFolderRow.highlight{border: 2px dashed #1565C0;
    border-radius: var(--menu-radius);
    background-color: #eef;}
.drag-header{cursor: grab;
    user-select: none;
    position: relative;}
.drag-header::after{content: '⋮⋮';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #1565C0;
    pointer-events: none;}
.dragging{transform: scale(1.05);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 10000;}
:root{--menu-radius: 12px;}
.filr-menu{border-radius: var(--menu-radius);}
#uploadCard,
#folderManagementCard{transition: transform 0.3s ease, opacity 0.3s ease;
  width: 100%;
  margin-bottom: 20px;
  border-radius: var(--menu-radius);
  overflow: hidden; 
  border: 1px solid var(--card-border, #e5e7eb);
  background: var(--card-bg, #fff);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);}
body.dark-mode #uploadCard,
body.dark-mode #folderManagementCard{border-color: var(--card-border-dark, #3a3a3a);
  background: var(--card-bg-dark, #2c2c2c);
  box-shadow: 0 12px 28px rgba(0,0,0,.35);}
#uploadFolderRow.highlight{min-height: 320px;
    margin-bottom: 20px;}
#sidebarDropArea,
  #uploadFolderRow{background-color: transparent;}
.dark-mode #sidebarDropArea,
  .dark-mode #uploadFolderRow{background-color: transparent;}
.dark-mode #sidebarDropArea.highlight,
  .dark-mode #uploadFolderRow.highlight{background-color: #333; 
    border: 2px dashed #555; 
    color: #fff;}
.drop-target-sidebar.highlight{margin-top: 10px;}
.drop-target-sidebar:not(.highlight){border: none !important;}
.dragging:focus{outline: none;}
.card{background-color: #fff;
    color: #000;
    border: 1px solid #ddd;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;}
.dark-mode .card{background-color: #2c2c2c;
    color: #e0e0e0;
    border: 1px solid #444;}
.card-header{font-size: 1.1rem;
    font-weight: bold;}
.custom-folder-card-body{padding-top: 5px !important;
    padding-right: 0 !important;
    padding-left: 0 !important;}
/* === Modals (admin/user panels) === */
#addUserModal,
  #removeUserModal{z-index: 5000 !important;}
#customConfirmModal{z-index: 12000 !important;}
#customConfirmModal #confirmMessage{white-space: pre-wrap;}
.admin-panel-content{background: #fff;
    color: #000;}
.dark-mode .admin-panel-content{background: #2c2c2c;
    color: #e0e0e0;
    border: 1px solid #444;}
.dark-mode .admin-panel-content input,
  .dark-mode .admin-panel-content select,
  .dark-mode .admin-panel-content textarea{background: #3a3a3a;
    color: #e0e0e0;
    border: 1px solid #555;}
.dark-mode .admin-panel-content label{color: #e0e0e0;}
#openChangePasswordModalBtn{width: max-content;
    padding: 6px 12px;
    font-size: 14px;}
#changePasswordModal{z-index: 9999;}
/* === Utilities === */
@keyframes spin {
  0%{transform: rotate(0deg);}
  100%{transform: rotate(360deg);}
}
.spinning{animation: spin 1s linear infinite;}
.download-spinner{font-size: 48px;
    animation: spin 2s linear infinite;
    color: var(--download-spinner-color, #000);}
body:not(.dark-mode){--download-spinner-color: #000;}
.dark-mode{--download-spinner-color: #fff;}
.rise-effect{transform: translateY(-20px);
    transition: transform 0.3s ease;}
.toggle-modal-btn,
  .collapse-btn{background: none;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 8px;
    font-size: 24px;
    color: #616161;
    border-radius: 50%;
    transition: background 0.3s ease;}
.toggle-modal-btn:hover,
  .collapse-btn:hover{background: rgba(0, 0, 0, 0.1);}
.toggle-modal-btn:focus,
  .collapse-btn:focus{outline: none;}

.header-drop-zone.drag-active{border: 2px dashed #1565C0;
    background-color: #eef;
    background-color: transparent;
    transition: width 0.3s ease;
    box-sizing: border-box;}
.dark-mode .header-drop-zone.drag-active{background-color: #333; 
    border: 2px dashed #555; 
    color: #fff;}
    .header-drop-zone {
      position: relative; /* so ::before can absolutely position inside */
    }
    
    .header-drop-zone.drag-active:empty::before {
      content: "Drop Zone";
      position: absolute;
      inset: 0; /* top/right/bottom/left: 0 */
      display: flex;
      align-items: center;
      justify-content: center;
    
      font-size: 10px;
      padding-right: 2px;
      color: #aaa;
      pointer-events: none; /* optional, so it doesn't block drops */
    }
:is(#fileList, #fileListSecondary) tbody tr.clickable-row{-webkit-user-select: none; 
    -moz-user-select: none;    
    -ms-user-select: none;     
    user-select: none;}
#fileSummary{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
  margin-top:0;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,0.12);
  background: rgba(15,23,42,0.04);
  color:#1f2937;
  font-size:0.82rem;
  font-weight:600;
  line-height:1;
  white-space:nowrap;
}
#fileSummary .fr-summary-item{display:inline-flex;
  align-items:center;
  gap:4px;}
#fileSummary .fr-summary-count{font-variant-numeric: tabular-nums;}
#fileSummary .fr-summary-sep{opacity:0.45;}
#fileSummary .material-icons{font-size:18px;
  opacity:0.7;}
#fileSummary[data-truncated="1"]{border-style:dashed;}
@media only screen and (max-width: 600px) {
  #fileSummary{float: none !important;
      margin: 6px auto 0 !important;
      text-align: center !important;
      display: flex !important;
      justify-content: center;}
  #rowHeightSliderContainer,
    #viewSliderContainer{float: none !important;
      margin: 0 auto !important;
      text-align: center !important;
      display: block !important;}
}
#viewSliderContainer label,
  #viewSliderContainer span{line-height: 1;
    margin: 0;
    padding: 0;}
.dark-mode #fileSummary{
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.16);
  color:#e5e7eb;}
/* TODO: searchIcon also redefined later with alternate sizing/pill treatment; keep both until usages converge. */
#searchIcon{border-radius: 4px;
    padding: 4px 8px;}
.dark-mode #searchIcon{background-color: #444;
    border: 1px solid #555;
    color: #fff;}
.dark-mode #searchInput{background-color: #333;
    color: #e0e0e0;
    border: 1px solid #555;}
.btn-icon{background: transparent;
    border: none;
    padding: 6px 8px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;}
.btn-icon .material-icons,
  #searchIcon .material-icons{font-size: 24px;
    line-height: 1;
    margin: 0;
    padding: 0;
    color: #333;}
.btn-icon:hover,
  .btn-icon:focus{background: var(--filr-row-hover-bg) !important;
    outline: none;
    box-shadow:
    inset 0  1px 0 var(--filr-row-outline-hover),
    inset 0 -1px 0 var(--filr-row-outline-hover);}
.dark-mode .btn-icon .material-icons,
  .dark-mode #searchIcon .material-icons{color: #fff;}
  .dark-mode .btn-icon:hover,
  .dark-mode .btn-icon:focus{background: rgba(255, 255, 255, 0.1);}
.user-dropdown{position: relative;
    display: inline-block;}
.user-dropdown .user-menu{display: none;
    position: absolute;
    right: 0;
    margin-top: 0.25rem;
    background: var(--bs-body-bg, #fff);
    border: 1px solid #ccc;
    border-radius: var(--menu-radius);
    min-width: 150px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 1000;}
.user-dropdown .user-menu.show{display: block;}
  .user-dropdown .user-menu .item{padding: 0.5rem 0.75rem;
    cursor: pointer;
    white-space: nowrap;}
  .user-dropdown .dropdown-caret{border-top: 5px solid currentColor;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.25rem;}
  .dark-mode .user-dropdown .user-menu{background: #2c2c2c;
    border-color: #444;}
  .dark-mode .user-dropdown .user-menu .item{color: #e0e0e0;}
  .user-dropdown .dropdown-username{margin: 0 8px;
    font-weight: 500;
    vertical-align: middle;
    white-space: nowrap;}
  .user-dropdown .user-menu{border-radius: var(--menu-radius);
  overflow: hidden;                
  backdrop-filter: saturate(140%) blur(2px);}
.user-dropdown .user-menu .item{padding: 0.5rem 0.75rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .12s ease, box-shadow .12s ease;}
.user-dropdown .user-menu .item:hover{background: var(--filr-row-hover-bg) !important;
  box-shadow:
    inset 0  1px 0 var(--filr-row-outline-hover),
    inset 0 -1px 0 var(--filr-row-outline-hover);}
.user-dropdown .user-menu .item:first-child:hover{border-top-left-radius: var(--menu-radius);
  border-top-right-radius: var(--menu-radius);}
.user-dropdown .user-menu .item:last-child:hover{border-bottom-left-radius: var(--menu-radius);
  border-bottom-right-radius: var(--menu-radius);}
.dark-mode .user-dropdown .user-menu{background: #2c2c2c;
  border-color: #444;}
.folder-strip-container{display: flex;
    padding-top: 0px !important;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-content: flex-start;  
    padding: 6px 4px;}
.folder-strip-container .folder-item{display: flex;
    padding-top: 0px !important;
    flex-direction: column;
    align-items: center;        
    justify-content: center;    
    min-width: 0;
    gap: 2px !important;
    padding: 6px 8px;
    box-sizing: border-box;
    border-radius: 10px;
    color: inherit;
    font-size: 0.85em;
    transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
    max-width: 180px;}
.folder-strip-container .folder-item .folder-svg{line-height: 0;
  margin-bottom: 0px;}
.folder-strip-container .folder-item .folder-svg svg{width: 48px;
  height: 48px;
  display: block;}
.folder-strip-container .folder-name{display: block;
  width: 100%;
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  text-align: center;
  overflow: visible;
  text-overflow: clip;
  transform: translateX(2px);
  line-height: 1.2;}
.folder-strip-container .folder-item:hover{transform: translateY(-1px) scale(1.04);
  background-color: rgba(0, 0, 0, 0.04);      
  box-shadow: 0 4px 10px rgba(0, 0, 0, .15);}
body.dark-mode .folder-strip-container .folder-item:hover{background-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .45);}
.folder-strip-container .folder-item:focus-visible{outline: 2px solid #8ab4f8;
  outline-offset: 2px;}
:root{--perm-caret: #444;}
.dark-mode{--perm-caret: #ccc;}
#zonesToggleFloating,
  #sidebarToggleFloating{transition:
      transform 160ms cubic-bezier(.2,.0,.2,1),
      box-shadow 160ms cubic-bezier(.2,.0,.2,1),
      border-color 160ms cubic-bezier(.2,.0,.2,1),
      background-color 160ms cubic-bezier(.2,.0,.2,1);}
:root{--toggle-icon-color: #333;}
.dark-mode{--toggle-icon-color: #eee;}
#zonesToggleFloating .material-icons,
  #zonesToggleFloating .material-icons-outlined,
  #sidebarToggleFloating .material-icons,
  #sidebarToggleFloating .material-icons-outlined{color: var(--toggle-icon-color);
    font-size: 22px;
    line-height: 1;
    display: block;}
#zonesToggleFloating:hover,
  #sidebarToggleFloating:hover{transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,.14);
    border-color: #cfcfcf;}
#zonesToggleFloating:active,
  #sidebarToggleFloating:active{transform: translateY(0) scale(.96);
    box-shadow: 0 3px 8px rgba(0,0,0,.12);}
#zonesToggleFloating:focus-visible,
  #sidebarToggleFloating:focus-visible{outline: none;
    box-shadow:
      0 6px 16px rgba(0,0,0,.14),
      0 0 0 3px rgba(25,118,210,.25);}
#zonesToggleFloating::after,
  #sidebarToggleFloating::after{content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle, rgba(0,0,0,.12) 0%, rgba(0,0,0,0) 60%);
    transform: scale(0);
    opacity: 0;
    transition: transform 300ms ease, opacity 450ms ease;
    pointer-events: none;}
#zonesToggleFloating:active::after,
  #sidebarToggleFloating:active::after{transform: scale(1.4);
    opacity: 1;}
#zonesToggleFloating.is-collapsed,
  #sidebarToggleFloating.is-collapsed{background: #fafafa;
    border-color: #e2e2e2;}
.media-modal{background: #2c2c2c;}
.media-header-bar .btn{padding: 6px 10px;}
.gallery-nav-btn{color: #fff; opacity: 0.85;}
.gallery-nav-btn:hover{opacity: 1; transform: scale(1.05);}
.status-badge{display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  font-size: 11px;
  line-height: 1.3;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.08);
  color: #fff;}
.status-badge.watched{border-color: rgba(34,197,94,.45);      
  background: rgba(34,197,94,.15);}
.status-badge.progress{border-color: rgba(234,88,12,.55);     
  background: rgba(234,88,12,.18);}
#downloadProgressModal .modal-body,
#downloadProgressModal .rise-modal-body,
#downloadProgressModal .modal-content{min-height: 88px;
  overflow: hidden;}
#downloadProgressText{white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;}
#downloadProgressBarOuter{height: 10px;}
#folderTreeContainer{--filr-folder-front: #f6b84e;
  --filr-folder-back:  #ffd36e;
  --filr-folder-stroke:#a87312;
  --filr-paper-fill:   #ffffff;
  --filr-paper-stroke: #9fb3d6;   
  --row-h: 28px;
  --twisty: 24px;
  --twisty-gap: -5px;
  --icon-size: 24px;
  --icon-gap: 6px;
  --indent: 10px;}
#folderTreeContainer .folder-item{position: static; padding-left: 0;}
#folderTreeContainer .folder-item > .folder-tree{margin-left: var(--indent);}
#folderTreeContainer .folder-row{position: relative;
  display: flex;
  align-items: center;
  min-height: var(--row-h);
  height: auto;
  padding-left: calc(var(--twisty) + var(--twisty-gap));}
#folderTreeContainer .recycle-bin-row{height: 28px;}
#folderTreeContainer .folder-row > button.folder-toggle,
#folderTreeContainer .folder-row > .folder-spacer{position: absolute; left: 0;
  width: var(--twisty); height: var(--twisty);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 6px;
  background: transparent; cursor: pointer;}
#folderTreeContainer .folder-row > button.folder-toggle::before{content: "▸"; font-size: calc(var(--twisty) * 0.8); line-height: 1;}
#folderTreeContainer li[role="treeitem"][aria-expanded="true"]
  > .folder-row > button.folder-toggle::before,
#rootRow[aria-expanded="true"] > button.folder-toggle::before{content: "▾";}
#folderTreeContainer .folder-row > button.folder-toggle:hover{border-color: color-mix(in srgb, #7ab3ff 35%, transparent);}
#folderTreeContainer .folder-option{display: inline-flex;
  flex: 0 1 auto;                 
  align-items: center;
  gap: var(--icon-gap);
  height: auto;
  min-height: var(--row-h);
  padding: 0 8px;
  border-radius: 8px;
  line-height: 1.2;
  user-select: none;
  max-width: 100%;
  white-space: normal;}
#folderTreeContainer .folder-option:hover{background: rgba(122,179,255,.14);}
#folderTreeContainer .folder-option.selected{background: rgba(122,179,255,.24);
  box-shadow: inset 0 0 0 1px rgba(122,179,255,.45);}
#folderTreeContainer .folder-label{

  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.2;
  margin-top: 2px;
}
/* === Folder Tree (detailed icons + rows) === */
#folderTreeContainer .folder-icon{flex: 0 0 var(--icon-size);
  width: var(--icon-size); height: var(--icon-size);
  display: inline-flex; align-items: center; justify-content: center;}

#folderTreeContainer .recycle-bin-icon{flex: 0 0 24px;
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  overflow: visible;}
#folderTreeContainer .recycle-bin-icon svg{width:24px; height:24px;}
#folderTreeContainer .recycle-bin-label{white-space: normal; overflow: visible;}

#folderTreeContainer .folder-icon svg{width: 100%; height: 100%; display: block;
  shape-rendering: geometricPrecision;}
#folderTreeContainer .folder-icon .folder-front,
#folderTreeContainer .folder-icon .folder-back{fill: currentColor;
  stroke: var(--filr-folder-stroke);
  stroke-width: .5;
  paint-order: fill stroke;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;}
#folderTreeContainer .folder-icon .folder-front{color: var(--filr-folder-front);}
#folderTreeContainer .folder-icon .folder-back{color: var(--filr-folder-back);}
#folderTreeContainer .folder-icon .paper{fill: var(--filr-paper-fill);
  stroke: var(--filr-paper-stroke);
  stroke-width: 1.5;
  paint-order: stroke fill;}
#folderTreeContainer .folder-icon .paper-fold{fill: var(--filr-paper-stroke);}
#folderTreeContainer .folder-icon .paper-line{stroke: var(--filr-paper-stroke); stroke-width: 1.5;
  stroke-linecap: round; fill: none; opacity: .95;}
#folderTreeContainer .folder-icon .lip-highlight{fill: none; vector-effect: non-scaling-stroke;}
#folderTreeContainer .folder-icon,
#folderTreeContainer .folder-label{transform: none !important;}
.folder-strip-container .folder-svg svg{display: block;
  shape-rendering: crispEdges;}
.folder-strip-container .folder-item{--filr-folder-front:  #f6b84e;
  --filr-folder-back:   #ffd36e;
  --filr-folder-stroke: #a87312;}
.folder-strip-container .folder-svg .folder-front,
.folder-strip-container .folder-svg .folder-back{fill: currentColor;
  stroke: var(--filr-folder-stroke);
  stroke-width: .5;
  paint-order: fill stroke;
  stroke-linejoin: round;
  stroke-linecap: round;}
.folder-strip-container .folder-svg .folder-front{color: var(--filr-folder-front);}
.folder-strip-container .folder-svg .folder-back{color: var(--filr-folder-back);}
.folder-strip-container .folder-svg .paper{fill: #fff;
  stroke: #b2c2db;   
  stroke-width: 1;
  vector-effect: non-scaling-stroke;}
.folder-strip-container .folder-svg .paper-fold{fill: #b2c2db;}
.folder-strip-container .folder-svg .paper-line{stroke: #b2c2db; stroke-width: 1; stroke-linecap: round; fill: none;
  vector-effect: non-scaling-stroke;}
.folder-strip-container .folder-svg .lip-highlight{fill: none;
  vector-effect: non-scaling-stroke;}
#folderTreeContainer .folder-icon .folder-front,
#folderTreeContainer .folder-icon .folder-back,
.folder-strip-container .folder-svg .folder-front,
.folder-strip-container .folder-svg .folder-back,
#folderTreeContainer .folder-icon .lip-highlight,
.folder-strip-container .folder-svg .lip-highlight{stroke-linejoin: round;
  stroke-linecap: round;}
.folder-strip-container .folder-svg svg,
#folderTreeContainer .folder-icon svg{shape-rendering: geometricPrecision !important;}
@media (max-resolution: 1.5dppx) {
  #folderTreeContainer .folder-icon .folder-front,
  #folderTreeContainer .folder-icon .folder-back{stroke-width: .6;}
}
#folderTreeContainer .folder-icon .paper-ink,
.folder-strip-container .folder-svg .paper-ink{stroke: #4da3ff;
  stroke-width: .9;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  opacity: .85;
  paint-order: normal;}
#folderTreeContainer .recycle-bin-item{margin-top:2px; padding-left:0;}
#folderTreeContainer .recycle-bin-option{display:inline-flex; align-items:center; gap: 5px !important; border-radius:10px; justify-content:flex-start; border:1px solid transparent; background:transparent; cursor:pointer; color:inherit; flex:0 1 auto; width:auto; padding: 4px 8px;}
#folderTreeContainer .recycle-bin-option:hover{background: var(--filr-row-hover-bg, rgba(122,179,255,.14)); box-shadow: inset 0 0 0 1px var(--filr-row-outline-hover, rgba(122,179,255,.35));}
#folderTreeContainer .recycle-bin-option:focus-visible{outline:2px solid var(--filr-accent-ring, rgba(0,140,180,.4)); outline-offset:2px;}
#folderTreeContainer .recycle-bin-option .folder-label{white-space: normal; overflow:visible; text-overflow: initial;}
#folderTreeContainer .folder-icon .folder-front,
#folderTreeContainer .folder-icon .folder-back,
#folderTreeContainer .folder-icon .paper-line,
#folderTreeContainer .folder-icon .paper-ink,
#folderTreeContainer .folder-icon .lip-highlight{stroke-width: .6px;}
.folder-strip-container .folder-svg .folder-front,
.folder-strip-container .folder-svg .folder-back,
.folder-strip-container .folder-svg .paper-line,
.folder-strip-container .folder-svg .paper-ink,
.folder-strip-container .folder-svg .lip-highlight{stroke-width: 1.1px;}
#folderTreeContainer .folder-option.locked{opacity: .9;
  font-style: italic;}
#folderTreeContainer .folder-icon .lock-body{fill: var(--filr-folder-stroke, #6b6b6b);
  opacity: .95;}
#folderTreeContainer .folder-icon .lock-shackle{fill: none;
  stroke: var(--filr-folder-stroke, #6b6b6b);
  stroke-width: 1.4;
  stroke-linecap: round;}
#folderTreeContainer .folder-icon .lock-keyhole{fill: rgba(0,0,0,.28);}
body.dark-mode #folderTreeContainer .folder-icon .lock-keyhole{fill: rgba(255,255,255,.28);}
#folderTreeContainer .folder-icon .lock-overlay{vector-effect: non-scaling-stroke;}

/* Folder strip: match lock + encrypted badge styling so overlays don't render white/washed out */
.folder-strip-container .folder-svg .lock-body{fill: var(--filr-folder-stroke, #6b6b6b);
  opacity: .95;}
.folder-strip-container .folder-svg .lock-shackle{fill: none;
  stroke: var(--filr-folder-stroke, #6b6b6b);
  stroke-width: 1.4;
  stroke-linecap: round;}
.folder-strip-container .folder-svg .lock-keyhole{fill: rgba(0,0,0,.28);}
body.dark-mode .folder-strip-container .folder-svg .lock-keyhole{fill: rgba(255,255,255,.28);}

.folder-strip-container .folder-svg .enc-badge{
  fill: rgba(37, 99, 235, .92); /* blue */
  stroke: rgba(0,0,0,.22);
  stroke-width: .6;
  paint-order: fill stroke;
  vector-effect: non-scaling-stroke;
}
body.dark-mode .folder-strip-container .folder-svg .enc-badge{
  fill: rgba(96, 165, 250, .92);
}
.folder-strip-container .folder-svg .enc-mark-shackle{
  fill: none;
  stroke: rgba(255,255,255,.92);
  stroke-width: 0.95;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.folder-strip-container .folder-svg .enc-mark-body{
  fill: rgba(255,255,255,.92);
  stroke: rgba(0,0,0,.20);
  stroke-width: .35;
  vector-effect: non-scaling-stroke;
}
.folder-strip-container .folder-svg .enc-mark-keyhole{
  fill: rgba(0,0,0,.28);
}
body.dark-mode .folder-strip-container .folder-svg .enc-mark-keyhole{
  fill: rgba(0,0,0,.22);
}
#folderTreeContainer .folder-icon .enc-badge{
  fill: rgba(37, 99, 235, .92);
  stroke: rgba(0,0,0,.22);
  stroke-width: .6;
  paint-order: fill stroke;
  vector-effect: non-scaling-stroke;
}
body.dark-mode #folderTreeContainer .folder-icon .enc-badge{
  fill: rgba(96, 165, 250, .92);
}
#folderTreeContainer .folder-icon .enc-mark-shackle{
  fill: none;
  stroke: rgba(255,255,255,.92);
  stroke-width: 0.95;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
#folderTreeContainer .folder-icon .enc-mark-body{
  fill: rgba(255,255,255,.92);
  stroke: rgba(0,0,0,.20);
  stroke-width: .35;
  vector-effect: non-scaling-stroke;
}
#folderTreeContainer .folder-icon .enc-mark-keyhole{
  fill: rgba(0,0,0,.28);
}
body.dark-mode #folderTreeContainer .folder-icon .enc-mark-keyhole{
  fill: rgba(0,0,0,.22);
}

/* File list (inline folder rows + folder strip icons rendered in fileListView.js) */
:is(#fileList, #fileListSecondary) .folder-svg .lock-body{fill: var(--filr-folder-stroke, #6b6b6b);
  opacity: .95;}
:is(#fileList, #fileListSecondary) .folder-svg .lock-shackle{fill: none;
  stroke: var(--filr-folder-stroke, #6b6b6b);
  stroke-width: 1.4;
  stroke-linecap: round;}
:is(#fileList, #fileListSecondary) .folder-svg .lock-keyhole{fill: rgba(0,0,0,.28);}
body.dark-mode :is(#fileList, #fileListSecondary) .folder-svg .lock-keyhole{fill: rgba(255,255,255,.28);}

:is(#fileList, #fileListSecondary) .folder-svg .enc-badge{
  fill: rgba(37, 99, 235, .92);
  stroke: rgba(0,0,0,.22);
  stroke-width: .6;
  paint-order: fill stroke;
  vector-effect: non-scaling-stroke;
}
body.dark-mode :is(#fileList, #fileListSecondary) .folder-svg .enc-badge{
  fill: rgba(96, 165, 250, .92);
}
:is(#fileList, #fileListSecondary) .folder-svg .enc-mark-shackle{
  fill: none;
  stroke: rgba(255,255,255,.92);
  stroke-width: 0.95;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
:is(#fileList, #fileListSecondary) .folder-svg .enc-mark-body{
  fill: rgba(255,255,255,.92);
  stroke: rgba(0,0,0,.20);
  stroke-width: .35;
  vector-effect: non-scaling-stroke;
}
:is(#fileList, #fileListSecondary) .folder-svg .enc-mark-keyhole{
  fill: rgba(0,0,0,.28);
}
body.dark-mode :is(#fileList, #fileListSecondary) .folder-svg .enc-mark-keyhole{
  fill: rgba(0,0,0,.22);
}
#folderTreeContainer li.load-more{padding: 4px 0 4px 28px;            
  list-style: none;}
#folderTreeContainer li.load-more > .btn.btn-ghost{width: calc(100% - 8px);
  margin: 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  border: 1px solid var(--tree-ghost-border);
  background: var(--tree-ghost-bg);
  color: var(--tree-ghost-fg);
  padding: 6px 10px;
  font-size: 12.5px;}
#folderTreeContainer li.load-more > .btn.btn-ghost:hover{background: var(--tree-ghost-hover-bg);}
#folderTreeContainer li.load-more > .btn.btn-ghost:focus-visible{outline: 2px solid #8ab4f8;
  outline-offset: 2px;}
#folderTreeContainer li.load-more > .btn[aria-busy="true"]::before{content: "";
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  display: inline-block;
  animation: filr-spin .8s linear infinite;}
@keyframes filr-spin {
  to{transform: rotate(360deg);}
}
/* === Upload resume banner === */
#resumableDraftBanner.upload-resume-banner{margin: 8px 12px 12px;}
.upload-resume-banner-inner{display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 152, 0, 0.06);
  border: 1px solid rgba(255, 152, 0, 0.55);
  font-size: 0.9rem;}
.upload-resume-text{flex: 1 1 240px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;}
.upload-resume-text .upload-resume-name{overflow-wrap: anywhere;}
.upload-resume-dismiss-btn{flex: 0 0 auto;
  margin-left: auto;}
  .upload-resume-banner-inner .material-icons,
  .folder-badge .material-icons{font-size: 20px;
  margin-right: 6px;
    vertical-align: middle;
    background-color: transparent;
  color: #111;}
  .dark-mode .upload-resume-banner-inner .material-icons,
  .dark-mode .folder-badge .material-icons{background-color: transparent; 
    color: #f5f5f5;}
/* === Folder Strip (header chips/list) === */
/* TODO: folder-strip-container is also defined earlier with fuller styling; keeping both until combined layout states are clarified. */
 /* Base strip container */
 .folder-strip-container {
   margin-bottom: 6px;
 }

/* Base item layout */
.folder-strip-container .folder-item {
  display: flex;
  min-width: 0;
}

.folder-strip-container .folder-svg {
  flex: 0 0 auto;
  line-height: 0;
}

.folder-strip-container .folder-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Desktop: chips, icon above name --- */
.folder-strip-container.folder-strip-desktop {
  display: flex;
  align-items: center;
  overflow-x: auto;
  padding: 4px 8px;
}

.folder-strip-container.folder-strip-desktop .folder-item {
  flex-direction: column;   /* icon on top, name under */
  align-items: center;
  gap: 4px;
}

.folder-strip-container.folder-strip-desktop .folder-name {
  text-align: center;
  max-width: 120px;
}

/* --- Mobile: stacked rows, icon left of name --- */
.folder-strip-container.folder-strip-mobile {
  display: block;
  max-height: 220px;
  overflow-y: auto;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.02);
}

.folder-strip-container.folder-strip-mobile .folder-item {
  width: 100%;
  flex-direction: row;      /* icon left, name right */
  align-items: center;
  gap: 6px;
  padding: 8px 8px;
  border-radius: 6px;
  margin-bottom: 4px;
}

.folder-strip-container.folder-strip-mobile .folder-name {
  flex: 1 1 auto;
  text-align: left;
  transform: translate(8px, 4px);

}

.folder-strip-container.folder-strip-mobile .folder-item:hover {
  background: rgba(0,0,0,.04);
}

.folder-strip-container.folder-strip-mobile .folder-item.selected {
  background: rgba(59,130,246,.12);
}

/* Load-more button */
.folder-strip-load-more {
  display: block;
  width: 100%;
  margin: 4px 0 0;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,.15);
  background: rgba(0,0,0,.02);
  font-size: 0.85rem;
  text-align: center;
  cursor: pointer;
}
/* === Overrides / Compact / Legacy === */
/* ============================================
   FileRise polish – compact theme layer
============================================ */
:root{--filr-radius-lg:14px;--filr-radius-xl:18px;--filr-shadow-soft:0 12px 35px rgba(15,23,42,.14);--filr-shadow-subtle:0 8px 20px rgba(15,23,42,.10);--filr-header-blur:18px;--filr-transition-fast:150ms ease-out;--filr-transition-med:220ms cubic-bezier(.22,.61,.36,1);--fr-bg-dark:#0f0f0f;--fr-surface-dark:#212121;--fr-surface-dark-2:#181818;--fr-border-dark:#303030;--fr-muted-dark:#aaaaaa;--fr-bg-light:#f9f9f9;--fr-surface-light:#ffffff;--fr-surface-light-2:#f1f1f1;--fr-border-light:#e5e5e5;--fr-muted-light:#606060}
.btn-pro-admin{background:linear-gradient(135deg,#ff9800,#ff5722);border-color:#ff9800;color:#1b0f00!important;font-weight:600;box-shadow:0 0 10px rgba(255,152,0,.4)}
#customToast{border-radius:12px}
#folderTreeContainer .folder-row{border-radius:8px}
.btn,#customChooseBtn, #colorFolderModal .btn-ghost, #cancelMoveFolder, #confirmMoveFolder, #cancelRenameFolder, #submitRenameFolder, #cancelDeleteFolder, #confirmDeleteFolder, #cancelCreateFolder, #submitCreateFolder{border-radius:999px;font-weight:500;border:1px solid transparent;transition:background-color var(--filr-transition-fast),box-shadow var(--filr-transition-fast),transform var(--filr-transition-fast),border-color var(--filr-transition-fast)}
.btn-danger,.btn-primary,#createBtn,#uploadBtn,#submitCreateFolder,#submitRenameFolder,#confirmMoveFolder{box-shadow:0 2px 4px rgba(0,0,0,.6)}
.btn-primary:hover,#createBtn:hover,#uploadBtn:hover,#submitCreateFolder:hover,#submitRenameFolder:hover,#confirmMoveFolder:hover{filter:brightness(1.04);transform:translateY(-1px);box-shadow:0 10px 22px rgba(0,140,180,.28)}
.btn-danger:hover{filter:brightness(1.04);transform:translateY(-1px);box-shadow:0 10px 22px rgba(248,113,113,.35)}
#deleteFolderBtn,#confirmDeleteFolder{border-color:rgba(248,113,113,.9);box-shadow:0 8px 18px rgba(248,113,113,.35)}
input[type=text],input[type=password],input[type=email],input[type=url],select,textarea{border-radius:10px;padding:8px 10px;font-size:.92rem;transition:border-color var(--filr-transition-fast),box-shadow var(--filr-transition-fast),background-color var(--filr-transition-fast)}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--filr-accent-500);box-shadow:0 0 0 1px var(--filr-accent-ring)}
.modal{backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
#fileListContainer,#uploadCard,#folderManagementCard,.card,.admin-panel-content{border-radius:var(--filr-radius-xl);border:1px solid rgba(15,23,42,.06);background:#ffffff;box-shadow:var(--filr-shadow-subtle)}
body{min-height:100vh}
/* === Dark Mode === */
body.dark-mode{background:var(--fr-app-bg-dark, var(--fr-surface-dark-2))!important;color:#f1f1f1!important}
body.dark-mode #fileListContainer,body.dark-mode #uploadCard,body.dark-mode #folderManagementCard,body.dark-mode .card,body.dark-mode .admin-panel-content,body.dark-mode .media-topbar{background:var(--fr-surface-dark)!important;border-color:var(--fr-border-dark)!important;box-shadow:0 1px 4px rgba(0,0,0,.9)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
body.dark-mode #fileListContainer::before,body.dark-mode #uploadCard::before,body.dark-mode #folderManagementCard::before,body.dark-mode .card::before,body.dark-mode .admin-panel-content::before{box-shadow:none!important}
body.dark-mode .card-header,body.dark-mode .custom-folder-card-body .drag-header{background:var(--fr-surface-dark-2)!important;border-bottom:1px solid var(--fr-border-dark)!important}
body.dark-mode :is(#fileList, #fileListSecondary) table thead th{background:var(--fr-surface-dark-2)!important;border-bottom:1px solid var(--fr-border-dark)!important}
body.dark-mode :is(#fileList, #fileListSecondary) table.filr-table tbody tr.selected>td,body.dark-mode :is(#fileList, #fileListSecondary) table.filr-table tbody tr.row-selected>td,body.dark-mode :is(#fileList, #fileListSecondary) table.filr-table tbody tr.selected-row>td,body.dark-mode :is(#fileList, #fileListSecondary) table.filr-table tbody tr.is-selected>td{background:rgba(62,166,255,.16)!important;box-shadow:none!important}
body.dark-mode .modal{background-color:rgba(0,0,0,.65)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
body.dark-mode .modal .modal-content,body.dark-mode .editor-modal,body.dark-mode .image-preview-modal-content,body.dark-mode #restoreFilesModal .modal-content,body.dark-mode #downloadProgressModal .modal-content{background:var(--fr-surface-dark)!important;border-radius:12px!important;border:1px solid var(--fr-border-dark)!important;box-shadow:0 8px 24px rgba(0,0,0,.9)!important}
body.dark-mode .modal .modal-content::before,body.dark-mode .editor-modal::before,body.dark-mode .image-preview-modal-content::before,body.dark-mode #restoreFilesModal .modal-content::before,body.dark-mode #downloadProgressModal .modal-content::before{box-shadow:none!important}
body.dark-mode input[type=text],body.dark-mode input[type=password],body.dark-mode input[type=email],body.dark-mode input[type=url],body.dark-mode input[type=number],body.dark-mode select,body.dark-mode textarea{background:#121212!important;border-color:#3d3d3d!important;color:#f1f1f1!important}
body.dark-mode input::placeholder,body.dark-mode textarea::placeholder{color:#777!important}
body.dark-mode input:focus,body.dark-mode select:focus,body.dark-mode textarea:focus{border-color:#3ea6ff!important;box-shadow:0 0 0 1px rgba(62,166,255,.7)!important}
#deleteFolderBtn,#confirmDeleteFolder{background-color:#b3261e!important;border-color:#b3261e!important;box-shadow:0 4px 10px rgba(0,0,0,.7)!important}
body.dark-mode .folder-strip-container.folder-strip-mobile{background:var(--fr-surface-dark-2)!important;border:1px solid var(--fr-border-dark)!important}
body.dark-mode #customToast{background:#1f2937!important;color:#f8fafc!important;border:1px solid rgba(255,255,255,0.16)!important;box-shadow:0 16px 32px rgba(0,0,0,.7)!important}
body.dark-mode #fileSummary{color:var(--fr-muted-dark)!important;
  background: rgba(255,255,255,0.08)!important;
  border-color: rgba(255,255,255,0.16)!important}
body.dark-mode #createMenu,body.dark-mode .user-dropdown .user-menu,body.dark-mode #fileContextMenu,body.dark-mode #folderContextMenu,body.dark-mode #folderManagerContextMenu,body.dark-mode #adminPanelModal .modal-content,body.dark-mode #userPermissionsModal .modal-content,body.dark-mode #userPermissionsModal .modal-content,body.dark-mode #userFlagsModal .modal-content,body.dark-mode #userGroupsModal .modal-content,body.dark-mode #userPanelModal .modal-content,body.dark-mode #groupAclModal .modal-content,body.dark-mode .editor-modal,body.dark-mode #filePreviewModal .modal-content,body.dark-mode #loginForm,body.dark-mode .editor-header,#clientPortalsModal .modal-content{background:var(--fr-surface-dark)!important;border:1px solid var(--fr-border-dark)!important;color:#f1f1f1!important;border-radius:12px!important;box-shadow:0 8px 24px rgba(0,0,0,.9)!important}
body.dark-mode .user-dropdown .user-menu,body.dark-mode #createMenu,body.dark-mode #fileContextMenu,body.dark-mode #folderContextMenu,body.dark-mode #folderManagerContextMenu{background-clip:padding-box}
body:not(.dark-mode){background:var(--fr-app-bg-light, var(--fr-bg-light))!important;color:#111!important}
body.fr-login-view{background: var(--fr-login-bg-light,#f8fafc)!important}
body.fr-login-view.dark-mode{background: var(--fr-login-bg-dark,#121212)!important}
body:not(.dark-mode) #fileListContainer,body:not(.dark-mode) #uploadCard,body:not(.dark-mode) #folderManagementCard,body:not(.dark-mode) .card,body:not(.dark-mode) .admin-panel-content{background:var(--fr-surface-light)!important;border-color:var(--fr-border-light)!important;box-shadow:0 3px 8px rgba(0,0,0,.04)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
body:not(.dark-mode) #fileListContainer::before,body:not(.dark-mode) #uploadCard::before,body:not(.dark-mode) #folderManagementCard::before,body:not(.dark-mode) .card::before,body:not(.dark-mode) .admin-panel-content::before{box-shadow:none!important}
body:not(.dark-mode) .card-header,body:not(.dark-mode) .custom-folder-card-body .drag-header{background:var(--fr-surface-light-2)!important;border-bottom:1px solid var(--fr-border-light)!important}
body:not(.dark-mode) :is(#fileList, #fileListSecondary) table thead th{background:var(--fr-surface-light-2)!important;border-bottom:1px solid var(--fr-border-light)!important}
body:not(.dark-mode) :is(#fileList, #fileListSecondary) table.filr-table tbody tr.selected>td,body:not(.dark-mode) :is(#fileList, #fileListSecondary) table.filr-table tbody tr.row-selected>td,body:not(.dark-mode) :is(#fileList, #fileListSecondary) table.filr-table tbody tr.selected-row>td,body:not(.dark-mode) :is(#fileList, #fileListSecondary) table.filr-table tbody tr.is-selected>td{background:rgba(33,150,243,.12)!important;box-shadow:none!important}
body:not(.dark-mode) .modal{background-color:rgba(0,0,0,.4)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
body:not(.dark-mode) .modal .modal-content,body:not(.dark-mode) .editor-modal,body:not(.dark-mode) .image-preview-modal-content,body:not(.dark-mode) #restoreFilesModal .modal-content,body:not(.dark-mode) #downloadProgressModal .modal-content{background:var(--fr-surface-light)!important;border-radius:12px!important;border:1px solid var(--fr-border-light)!important;box-shadow:0 8px 24px rgba(0,0,0,.18)!important}
body:not(.dark-mode) .modal .modal-content::before,body:not(.dark-mode) .editor-modal::before,body:not(.dark-mode) .image-preview-modal-content::before,body:not(.dark-mode) #restoreFilesModal .modal-content::before,body:not(.dark-mode) #downloadProgressModal .modal-content::before{box-shadow:none!important}
body:not(.dark-mode) input[type=text],body:not(.dark-mode) input[type=password],body:not(.dark-mode) input[type=email],body:not(.dark-mode) input[type=url],body:not(.dark-mode) select,body:not(.dark-mode) textarea{background:#fff!important;border-color:#d0d0d0!important;color:#111!important}
body:not(.dark-mode) input::placeholder,body:not(.dark-mode) textarea::placeholder{color:#9e9e9e!important}
body:not(.dark-mode) input:focus,body:not(.dark-mode) select:focus,body:not(.dark-mode) textarea:focus{border-color:#2196f3!important;box-shadow:0 0 0 1px rgba(33,150,243,.55)!important}
body:not(.dark-mode) #deleteAllBtn,body:not(.dark-mode) #deleteTrashSelectedBtn{box-shadow:0 2px 6px rgba(244,67,54,.3)!important}
body:not(.dark-mode) .folder-strip-container.folder-strip-mobile{background:#f1f1f1!important;border:1px solid var(--fr-border-light)!important}
body:not(.dark-mode) #customToast{background:#ffffff!important;color:#0f172a!important;border:1px solid rgba(15,23,42,0.12)!important;box-shadow:0 12px 26px rgba(15,23,42,0.18)!important}
body:not(.dark-mode) #fileSummary{color:var(--fr-muted-light)!important;
  background: rgba(15,23,42,0.04)!important;
  border-color: rgba(15,23,42,0.12)!important}
body:not(.dark-mode) #createMenu,body:not(.dark-mode) .user-dropdown .user-menu,body:not(.dark-mode) #fileContextMenu,body:not(.dark-mode) #folderContextMenu,body:not(.dark-mode) #folderManagerContextMenu,body:not(.dark-mode) #adminPanelModal .modal-content,body:not(.dark-mode) #userPermissionsModal .modal-content,body:not(.dark-mode) #userPermissionsModal .modal-content,body:not(.dark-mode) #userFlagsModal .modal-content,body:not(.dark-mode) #userGroupsModal .modal-content,body:not(.dark-mode) #userPanelModal .modal-content,body:not(.dark-mode) #groupAclModal .modal-content,body:not(.dark-mode) .editor-modal,body:not(.dark-mode) #filePreviewModal .modal-content,body:not(.dark-mode) #loginForm,body:not(.dark-mode) .editor-header,body:not(.dark-mode) #clientPortalsModal .modal-content{background:var(--fr-surface-light)!important;border:1px solid var(--fr-border-light)!important;color:#111!important;border-radius:12px!important;box-shadow:0 4px 12px rgba(0,0,0,.12)!important}
#searchIcon{display:inline-flex;align-items:center;justify-content:center;width:38px;height:36px;padding:0;border-radius:999px 0 0 999px;border:1px solid rgba(0,0,0,.18);border-right:none;background:#fff;cursor:pointer;box-shadow:none;transform:none}
#searchIcon .material-icons{font-size:20px;line-height:1;color:#555}
#searchIcon:hover{background:#f5f5f5}
#searchIcon+#searchInput{height:36px;border-radius:0 999px 999px 0;border-left:none;padding-top:6px;padding-bottom:6px}
body.dark-mode #searchIcon{background:#212121;border-color:#3d3d3d}
body.dark-mode #searchIcon .material-icons{color:#f1f1f1}
body.dark-mode #searchIcon:hover{background:#303030}
body.dark-mode #searchIcon+#searchInput{border-left:none}
#advancedSearchToggle{border-radius:999px;border:1px solid #d0d0d0;padding:6px 12px;font-size:.9rem;background:#f5f5f5;color:#333;cursor:pointer;display:inline-flex;align-items:center;gap:4px;margin-right:8px;transition:background .15s ease,box-shadow .15s ease,transform .1s ease}
#advancedSearchToggle:hover,#advancedSearchToggle:focus-visible{background:#e8e8e8;box-shadow:0 1px 4px rgba(0,0,0,.16);outline:none;transform:translateY(-1px)}
.dark-mode #advancedSearchToggle{background:#2a2a2a;border-color:#444;color:#f1f1f1}
.dark-mode #advancedSearchToggle:hover,.dark-mode #advancedSearchToggle:focus-visible{background:#333;box-shadow:0 1px 4px rgba(0,0,0,.5)}
.custom-prev-next-btn{display:inline-flex;align-items:center;justify-content:center;min-width:64px;padding:6px 14px;font-size:13px;font-weight:500;border-radius:999px;border:1px solid rgba(0,0,0,.14);background:#f1f1f1;color:#111;cursor:pointer;transition:background-color 140ms ease-out,border-color 140ms ease-out,box-shadow 140ms ease-out,transform 120ms ease-out}
.custom-prev-next-btn:not(:disabled):hover{background:#e5e5e5;border-color:rgba(0,0,0,.22);box-shadow:0 2px 6px rgba(0,0,0,.18);transform:translateY(-1px)}
.custom-prev-next-btn:not(:disabled):active{transform:translateY(0);box-shadow:0 1px 3px rgba(0,0,0,.25)}
.custom-prev-next-btn:disabled{opacity:.5;cursor:default;box-shadow:none}
body.dark-mode .custom-prev-next-btn{background:#212121;border-color:#3d3d3d;color:#f1f1f1}
body.dark-mode .custom-prev-next-btn:not(:disabled):hover{background:#2a2a2a;border-color:#4a4a4a;box-shadow:0 2px 6px rgba(0,0,0,.7)}
input[type=text]:not(#searchInput),input[type=password],input[type=email],input[type=url],input[type=number],textarea,select{border:1px solid rgba(148,163,184,.6)!important;border-radius:10px;background:#ffffff;box-sizing:border-box}
#decreaseFont,#increaseFont{display:inline-flex;align-items:center;justify-content:center;margin-top:5px;height:24px;min-width:30px;padding:2px 8px;font-size:11px;font-weight:500;line-height:1;border-radius:999px;border:1px solid rgba(0,0,0,.16);background:#f5f5f5;color:#222;cursor:pointer;margin-left:4px;transition:background-color 140ms ease-out,border-color 140ms ease-out,box-shadow 140ms ease-out,transform 120ms ease-out}
#decreaseFont:not(:disabled):hover,#increaseFont:not(:disabled):hover{background:#e8e8e8;border-color:rgba(0,0,0,.24);box-shadow:0 1px 4px rgba(0,0,0,.18);transform:translateY(-1px)}
#decreaseFont:not(:disabled):active,#increaseFont:not(:disabled):active{transform:translateY(5px);box-shadow:0 1px 2px rgba(0,0,0,.25)}
#decreaseFont:disabled,#increaseFont:disabled{opacity:.5;cursor:default;box-shadow:none}
body.dark-mode #decreaseFont,body.dark-mode #increaseFont{background:#212121;border-color:#3d3d3d;color:#f1f1f1}
body.dark-mode #decreaseFont:not(:disabled):hover,body.dark-mode #increaseFont:not(:disabled):hover{background:#2a2a2a;border-color:#4a4a4a;box-shadow:0 1px 4px rgba(0,0,0,.7)}
#closeEditorX{margin-right:10px}
:is(#fileList, #fileListSecondary) .folder-row-icon .folder-front{fill:var(--filr-folder-front,#f6b84e);stroke:var(--filr-folder-stroke,#a87312);stroke-width:.5;stroke-linejoin:round;stroke-linecap:round}
:is(#fileList, #fileListSecondary) .folder-row-icon .folder-back{fill:var(--filr-folder-back,#fcd68a);stroke:var(--filr-folder-stroke,#a87312);stroke-width:.5;stroke-linejoin:round;stroke-linecap:round}
:is(#fileList, #fileListSecondary) .folder-row-icon .paper{fill:#fff;stroke:#b2c2db;stroke-width:1;vector-effect:non-scaling-stroke}
:is(#fileList, #fileListSecondary) .folder-row-icon .paper-fold{fill:#b2c2db}
:is(#fileList, #fileListSecondary) .folder-row-icon .paper-line{stroke:#b2c2db;stroke-width:1;stroke-linecap:round;fill:none;vector-effect:non-scaling-stroke}
:is(#fileList, #fileListSecondary) .folder-row-icon .paper-ink{stroke:#4da3ff;stroke-width:.9;stroke-linecap:round;stroke-linejoin:round;fill:none;opacity:.85}
:is(#fileList, #fileListSecondary) .folder-row-icon .lip-highlight{fill:none;vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-linejoin:round}
:is(#fileList, #fileListSecondary) .folder-row-name{font-weight:500;margin-right:4px}
:is(#fileList, #fileListSecondary) .folder-row-meta{margin-left:4px;opacity:.75;font-size:.86em}
:is(#fileList, #fileListSecondary) tbody tr.folder-row{height:var(--file-row-height,44px);cursor:pointer}
:is(#fileList, #fileListSecondary) tbody tr.folder-row .folder-name-cell{padding-top:0;padding-bottom:0}
:is(#fileList, #fileListSecondary) tbody tr.folder-row .folder-row-inner{cursor:inherit}
:is(#fileList, #fileListSecondary) tbody tr.folder-row .folder-icon-cell{text-align:left;vertical-align:middle}
:is(#fileList, #fileListSecondary) tbody tr.folder-row .folder-row-icon svg{display:block}
.folder-row-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;margin-right:6px;position:static;left:0;top:0}
.folder-row-inner{display:flex;align-items:center;gap:8px}
:is(#fileList, #fileListSecondary) table.filr-table th.checkbox-col,:is(#fileList, #fileListSecondary) table.filr-table td.checkbox-col,:is(#fileList, #fileListSecondary) table.filr-table td.folder-icon-cell{width:30px!important;max-width:30px!important}
:is(#fileList, #fileListSecondary) tr.folder-row.folder-row-droptarget{background:var(--filr-accent-50,rgba(250,204,21,.12));box-shadow:inset 0 0 0 1px var(--filr-accent-400,rgba(250,204,21,.6))}
:is(#fileList, #fileListSecondary) tr.folder-row.folder-row-droptarget .folder-row-name{font-weight:600}
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.folder-row>td{padding-top:0!important;padding-bottom:0!important}
:is(#fileList, #fileListSecondary) table.filr-table tbody tr.folder-row>td.folder-icon-cell{overflow:visible}
:is(#fileList, #fileListSecondary) tr.folder-row .folder-row-inner,:is(#fileList, #fileListSecondary) tr.folder-row .folder-row-name{cursor:inherit}

/* === App Zoom Shell === */
:root {
  --app-zoom: 1; /* 1.0 = 100% */
}

#appZoomShell {
  transform-origin: top left;
  transform: scale(var(--app-zoom));
  /* compensate so scaled content still fills the viewport */
  width: calc(100% / var(--app-zoom));
  height: calc(100% / var(--app-zoom));
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}


.header-drop-zone {
  display: inline-flex;
  align-items: center;
  gap: 4px; 
  padding: 0;
  margin-right: 0px; 
  min-width: 0;
  min-height: 50px;
  flex: 0 0 auto;
  transition:
    min-width 0.15s ease,
    padding 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.header-card-icon {
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  --header-icon-delay: 0ms;
  --header-icon-land-ms: 120ms;
  --header-icon-lift-ms: 90ms;
}

.header-card-icon .material-icons {
  font-size: 22px;
  transform-origin: center center;
  filter: none;
}

.header-card-icon.is-landing .material-icons {
  animation: headerIconLand var(--header-icon-land-ms) cubic-bezier(.22,.61,.36,1) var(--header-icon-delay) backwards;
  will-change: transform, opacity;
}

.header-card-icon.is-launching {
  pointer-events: none;
}

.header-card-icon.is-launching .material-icons {
  animation: headerIconLift var(--header-icon-lift-ms) ease-in forwards;
  will-change: transform, opacity;
}

@keyframes headerIconLand {
  0% {
    opacity: 0;
    transform: translateY(4px) rotateZ(-2deg);
    filter: none;
  }
  35% {
    opacity: 1;
    transform: translateY(-1px) rotateZ(1.5deg);
    filter: drop-shadow(0 6px 10px rgba(0,0,0,0.28));
  }
  65% {
    transform: translateY(0) rotateZ(-1deg);
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.18));
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateZ(0);
    filter: none;
  }
}

@keyframes headerIconLift {
  0% {
    opacity: 1;
    transform: translateY(0) rotateZ(0);
    filter: none;
  }
  35% {
    transform: translateY(-2px) rotateZ(1.5deg);
    filter: drop-shadow(0 6px 10px rgba(0,0,0,0.26));
  }
  100% {
    opacity: 0;
    transform: translateY(-4px) rotateZ(-1deg);
    filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .header-card-icon.is-landing .material-icons,
  .header-card-icon.is-launching .material-icons {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

.header-drop-zone.drag-active {
  padding: 0 12px;
  min-width: 100px;
  border-radius: 16px;
  background-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

 /* Modal sizing */
#adminPanelModal .modal-content {
  max-width: 1160px !important;
  width: min(1160px, 90vw) !important;
  background: #fff !important;
  color: #000 !important;
  border: 1px solid #ccc !important;
}
@media (max-width: 900px) {
  #adminPanelModal .modal-content {
    width: 90% !important;
    max-width: none !important;
  }
}
.dark-mode #adminPanelModal .modal-content { background:#2c2c2c !important; color:#e0e0e0 !important; border-color:#555 !important; }
.dark-mode .form-control { background-color:#333; border-color:#555; color:#eee; }
.dark-mode .form-control::placeholder { color:#888; }

.section-header {
  background:#f5f5f5; padding:10px 15px; cursor:pointer; border-radius:12px; font-weight:bold;
  display:flex; align-items:center; justify-content:space-between; margin-top:16px;
}
.section-header:first-of-type { margin-top:0; }
.section-header.collapsed .material-icons { transform:rotate(-90deg); }
.section-header .material-icons { transition:transform .3s; color:#444; }
.dark-mode .section-header { background:#3a3a3a; color:#eee; }
.dark-mode .section-header .material-icons { color:#ccc; }

.section-content { display:none; margin-left:20px; margin-top:8px; margin-bottom:8px; }

#adminPanelModal .section-header {
  background: none;
  border: 0;
  padding: 0;
  border-radius: 0;
  display: block;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  position: relative;
  margin-top: 12px;
  color: #111827;
}
#adminPanelModal .section-header-inner {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.02));
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 8px 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, padding-left 140ms ease;
}
#adminPanelModal .section-header:hover .section-header-inner {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.16);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}
#adminPanelModal .section-header:not(.collapsed) .section-header-inner {
  padding-left: 22px;
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}
#adminPanelModal .section-header:not(.collapsed) .section-header-inner::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.9), rgba(96, 165, 250, 0.9));
}
#adminPanelModal .section-header .material-icons { color: #475569; }
body.dark-mode #adminPanelModal .section-header { color: #f1f5f9; }
body.dark-mode #adminPanelModal .section-header .section-header-inner {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}
body.dark-mode #adminPanelModal .section-header:hover .section-header-inner {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
  transform: translateY(-1px);
}
body.dark-mode #adminPanelModal .section-header:not(.collapsed) .section-header-inner {
  background: rgba(96, 165, 250, 0.18);
  border-color: rgba(96, 165, 250, 0.35);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}
body.dark-mode #adminPanelModal .section-header:not(.collapsed) .section-header-inner::before {
  background: linear-gradient(180deg, rgba(148, 197, 255, 0.95), rgba(96, 165, 250, 0.95));
}
body.dark-mode #adminPanelModal .section-header .material-icons { color: #cbd5f5; }

#adminPanelModal .section-content {
  display: none;
  margin: 8px 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
}
#adminPanelModal .section-content.is-open {
  opacity: 1;
  transform: translateY(0);
}
#adminPanelModal .section-content.is-closing {
  opacity: 0;
  transform: translateY(-4px);
}
body.dark-mode #adminPanelModal .section-content {
  background: #232323;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

#adminPanelModal .audit-table-wrap {
  max-height: 260px;
  overflow: auto;
}

#adminPanelModal .admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-right: 42px;
  margin-bottom: 6px;
}
#adminPanelModal .admin-panel-header h3 {
  margin: 0;
  font-weight: 600;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
#adminPanelModal .admin-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
#adminPanelModal .admin-search-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: #111;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
#adminPanelModal .admin-search-toggle .material-icons { font-size: 18px; }
#adminPanelModal .admin-search-toggle:hover {
  background: #f8fafc;
}
#adminPanelModal .admin-search-toggle.is-active {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}
#adminPanelModal .admin-search-toggle-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
#adminPanelModal .admin-search-wrap {
  margin: 6px 0 12px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.03);
  overflow: hidden;
  max-height: 180px;
  transition: max-height 200ms ease, opacity 200ms ease, transform 200ms ease, margin 200ms ease, padding 200ms ease, border-color 200ms ease;
}
#adminPanelModal .admin-search-input {
  position: relative;
}
#adminPanelModal .admin-search-input .form-control {
  padding-right: 38px;
}
#adminPanelModal .admin-search-clear {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #6b7280;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#adminPanelModal .admin-search-clear:hover {
  background: rgba(15, 23, 42, 0.08);
  color: #111;
}
#adminPanelModal .admin-search-clear:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
#adminPanelModal .admin-search-clear .material-icons {
  font-size: 18px;
}
#adminPanelModal .admin-search-wrap.is-collapsed {
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-color: transparent;
}
body.dark-mode #adminPanelModal .admin-search-toggle {
  background: #2a2a2a;
  color: #e5e7eb;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}
body.dark-mode #adminPanelModal .admin-search-toggle:hover {
  background: #333;
}
body.dark-mode #adminPanelModal .admin-search-toggle.is-active {
  border-color: rgba(147, 197, 253, 0.45);
  box-shadow: 0 0 0 2px rgba(147, 197, 253, 0.12);
}
body.dark-mode #adminPanelModal .admin-search-wrap {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}
body.dark-mode #adminPanelModal .admin-search-clear {
  color: #9ca3af;
}
body.dark-mode #adminPanelModal .admin-search-clear:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
}
body.dark-mode #adminPanelModal .admin-search-clear:focus {
  box-shadow: 0 0 0 2px rgba(147, 197, 253, 0.25);
}
@media (max-width: 720px) {
  #adminPanelModal .admin-search-toggle-label { display: none; }
  #adminPanelModal .admin-panel-header { gap: 8px; }
}

#adminPanelModal .editor-close-btn,
#closeRestoreModal {
  position:absolute; top:10px; right:10px; display:flex; align-items:center; justify-content:center;
  font-size:20px; font-weight:bold; cursor:pointer; z-index:1000; width:32px; height:32px; border-radius:50%;
  text-align:center; line-height:30px; color:#ff4d4d; background:rgba(255,255,255,0.9);
  border:2px solid transparent; transition:all .3s;
}
#adminPanelModal .editor-close-btn:hover,
#closeRestoreModal:hover{ color:#fff; background:#ff4d4d; box-shadow:0 0 6px rgba(255,77,77,.8); transform:scale(1.05); }
.dark-mode #adminPanelModal .editor-close-btn 
.dark-mode #closeRestoreModal{ background:rgba(0,0,0,0.6); color:#ff4d4d; }

.action-row { display:flex; justify-content:space-between; margin-top:15px; }

#adminPanelModal .action-row {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 18px;
  padding: 10px 0 6px;
  gap: 6px;
  justify-content: flex-end;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.9) 35%, rgba(255, 255, 255, 1));
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}
#adminPanelModal .action-row .btn {
  border-radius: 999px;
  min-width: 110px;
  box-shadow: none;
  transform: none;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
#adminPanelModal .action-row .btn:hover,
#adminPanelModal .action-row .btn:focus-visible,
#adminPanelModal .action-row .btn:active {
  box-shadow: none;
  transform: none;
  opacity: 1;
  filter: brightness(1.02);
}
#adminPanelModal .action-row .btn.btn-primary {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
}
#adminPanelModal .action-row .btn.btn-primary:hover,
#adminPanelModal .action-row .btn.btn-primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 140, 180, 0.28);
  filter: brightness(1.04);
}
#adminPanelModal .action-row .btn.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0, 140, 180, 0.22);
}
body.dark-mode #adminPanelModal .action-row {
  background: linear-gradient(180deg, rgba(35, 35, 35, 0), rgba(35, 35, 35, 0.92) 35%, rgba(35, 35, 35, 1));
  border-top-color: rgba(255, 255, 255, 0.08);
}

/* ---------- Folder access editor ---------- */
.folder-access-toolbar {
  display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin:8px 0 6px;
}
.folder-access-list {
  max-height: 520px;
  overflow: auto;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.dark-mode .folder-access-list { border-color:#555; }

.folder-access-header { display:none; }

.folder-access-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
}
.folder-access-row:last-child { margin-bottom: 0; }
.dark-mode .folder-access-row { border-color: rgba(255,255,255,0.14); }
.folder-access-row.row-even:not(.inherited-row):not(.admin-locked-row) {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.1);
}
.dark-mode .folder-access-row.row-even:not(.inherited-row):not(.admin-locked-row) {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.18);
}
.folder-access-row.is-active {
  border-color: rgba(32,132,255,0.7);
  box-shadow: 0 0 0 2px rgba(32,132,255,0.2);
}
.dark-mode .folder-access-row.is-active {
  border-color: rgba(132,190,255,0.8);
  box-shadow: 0 0 0 2px rgba(132,190,255,0.25);
}

.perm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 3fr 1fr 1fr; /* desktop: all in one row; give Write/Modify extra room */
  gap: 6px;
}
.perm-group.perm-group-wide {
  grid-column: auto; /* default: stay on the same row */
}
@media (max-width: 900px) {
  .perm-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .perm-group.perm-group-wide {
    grid-column: 1 / -1; /* tablet/mobile: force its own row */
  }
}
@media (max-width: 480px) {
  .perm-grid {
    grid-template-columns: 1fr;
  }
}

.perm-group {
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 10px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.dark-mode .perm-group { border-color: rgba(255,255,255,0.14); }
.perm-group.group-locked { background: rgba(32,132,255,0.08); }
.dark-mode .perm-group.group-locked { background: rgba(32,132,255,0.14); }

.perm-group-title {
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.perm-group-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.perm-group-body.perm-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}
.perm-group-body.perm-write-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 3px;
}
.perm-group-body.perm-write-grid .perm-toggle {
  justify-content: flex-start;
  text-align: left;
}
.perm-group-body.perm-write-grid > .perm-toggle:nth-child(3n+2) {
  justify-self: center;
}
.perm-group-body.perm-write-grid > .perm-toggle:nth-child(3n) {
  justify-self: end;
}
.perm-group-body.perm-write-grid .perm-toggle {
  justify-content: flex-start;
}
.perm-group-body.perm-write-grid .perm-toggle:nth-child(3n+2) {
  justify-content: center;
}
.perm-group-body.perm-write-grid .perm-toggle:nth-child(3n) {
  justify-content: flex-end;
  text-align: right;
}
.perm-group-body.perm-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.perm-col { text-align:center; white-space:nowrap; }
.folder-access-list .perm-col .fr-toggle { justify-content:center; }
.perm-toggle {
  width: 100%;
  justify-content: flex-start;
  gap: 4px;
}
.folder-badge .inherit-inline {
  margin-left: 10px;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  transform: translateY(1px);
}

.folder-badge {
  display:inline-flex; align-items:center; gap:6px;
  font-weight:600; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;
  min-width: 0;
}
.folder-name-text {
  font-weight: 700;
  color: #111827;
}
.dark-mode .folder-name-text {
  color: #f1f5f9;
}
.inherit-flag-note {
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff4d6;
  color: #8a6d3b;
  font-size: 11px;
}
.inherit-flag-note.pill-note-strong {
  background: #f0f4ff;
  color: #2c3e50;
}
.group-flag-note {
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef7ff;
  color: #1f4f8a;
  font-size: 11px;
}
.group-flag-note.pill-note-strong {
  background: #dfeafe;
  color: #1c3a6b;
}
.dark-mode .group-flag-note {
  background: rgba(140, 194, 255, 0.12);
  color: #a9cfff;
}
.dark-mode .inherit-flag-note {
  background: rgba(255, 212, 138, 0.12);
  color: #f2d49a;
}
.folder-access-row input[data-group-lock="1"]{cursor:not-allowed;}

.muted { opacity:.65; font-size:.9em; }

/* Inheritance visuals */
.inherited-row {
  opacity: 0.8;
  background: rgba(32, 132, 255, 0.06);
}
.admin-locked-row {
  opacity: 0.9;
  background: rgba(0, 0, 0, 0.03);
}
.dark-mode .admin-locked-row {
  background: rgba(255, 255, 255, 0.05);
}
.inherited-tag {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(32,132,255,0.12);
  color: #2064ff;
  margin-left: 6px;
}
.dark-mode .inherited-row { background: rgba(32,132,255,0.12); }
.dark-mode .inherited-tag { background: rgba(32,132,255,0.2); color: #89b3ff; }

@media (max-width: 900px) {
  .folder-access-list { --col-perm: 72px; --col-folder-min: 240px; }
}

/* Folder cell: horizontal-only scroll */
.folder-cell{
overflow-x:auto;
overflow-y:hidden;
white-space:nowrap;
-webkit-overflow-scrolling:touch;
}
/* nicer thin scrollbar (supported browsers) */
.folder-cell::-webkit-scrollbar{ height:8px; }
.folder-cell::-webkit-scrollbar-thumb{ background:rgba(0,0,0,.25); border-radius:4px; }
.dark-mode .folder-cell::-webkit-scrollbar-thumb{ background:rgba(255,255,255,.25); }

/* Badge now doesn't clip; let the wrapper handle scroll */
.folder-badge{
display:inline-flex; align-items:center; gap:6px;
font-weight:600;
min-width:0; /* allow child to be as wide as needed inside scroller */
}
.user-permission-row{margin-bottom:6px;}
    .group-members-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.group-member-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 11px;
  background-color: #1e88e5;
  color: #fff;
}

.dark-mode .group-member-pill {
  background-color: #1565c0;
  color: #fff;
}
      /* Client portal cards */
#clientPortalsBody .portal-card {
  position: relative;
  border-radius: 12px;
  border: 1px solid #ddd;
  padding: 10px 12px 8px;
  margin-bottom: 10px;
}
.dark-mode #clientPortalsBody .portal-card {
  border-color: #555;
  background: #1f1f1f;
}

.portal-card-header {
  display:flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
  padding:4px 4px 4px 0;
}
.portal-card-header .portal-card-caret {
  display:inline-block;
  font-size:14px;
  transform:rotate(-90deg);
  transition:transform .15s ease;
}
.portal-card-header[aria-expanded="true"] .portal-card-caret {
  transform:rotate(0deg);
}
.portal-card-header-main {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:baseline;
}
.portal-card-header-main strong {
  font-size:.9rem;
}
.portal-card-header-main .portal-card-slug {
  font-family:monospace;
  font-size:.8rem;
  opacity:.75;
}

.portal-card-delete,
.group-card-delete {
  position:absolute;
  top:10px;
  right:6px;
  width:30px;
  height:30px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
}
.group-card-delete {

  top:4px;
 
}

.portal-card-body {
  margin-top:6px;
}

#clientPortalsBody .portal-meta-row {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  margin-top:6px;
}
#clientPortalsBody .portal-meta-row label {
  margin:0;
  font-size:.8rem;
}
#clientPortalsBody .portal-source-row {
  align-items:flex-end;
}
#clientPortalsBody .portal-source-row small {
  flex-basis:100%;
}
#clientPortalsBody .portal-source-select {
  min-width:160px;
}
#clientPortalsBody .portal-folder-row {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
}
#clientPortalsBody .portal-folder-input {
  min-width:220px;
  flex:1 1 220px;
}

/* Make date input look consistent */
#clientPortalsBody input[type="date"].form-control-sm {
  border-radius:.25rem;
}
      /* -------- Client portals: Expires alignment + date styling -------- */
#clientPortalsBody .portal-expires-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#clientPortalsBody .portal-expires-group label {
  margin: 0;
  font-size: 0.85rem;
}
#clientPortalsBody .portal-expiry-input {
  max-width: 170px;
  border-radius: 6px;
}
.dark-mode #clientPortalsBody .portal-expiry-input {
  background-color: #333;
  border-color: #555;
  color: #eee;
}

    #clientPortalsBody .portal-submissions-block {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(0,0,0,0.1);
}
#clientPortalsBody .portal-submissions-list {
  max-height: 180px;
  overflow: auto;
  margin-top: 4px;
  padding: 4px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(0,0,0,0.02);
  font-size: 0.8rem;
}
.dark-mode #clientPortalsBody .portal-submissions-list {
  border-color: #555;
  background: rgba(255,255,255,0.02);
}
#clientPortalsBody .portal-submissions-item {
  padding: 4px 2px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
#clientPortalsBody .portal-submissions-item:last-child {
  border-bottom: none;
}
#clientPortalsBody .portal-submissions-meta {
  opacity: 0.75;
  font-size: 0.75rem;
}

/* Client portal submissions load button */
.portal-submissions-block .portal-submissions-load-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(108, 117, 125, 0.9); /* ~Bootstrap secondary */
  background: rgba(108, 117, 125, 0.06);
  font-size: 0.78rem;
  line-height: 1.4;
  cursor: pointer;
  white-space: nowrap;
}

.portal-submissions-block .portal-submissions-load-btn:hover,
.portal-submissions-block .portal-submissions-load-btn:focus-visible {
  background: rgba(108, 117, 125, 0.18);
}

body.dark-mode .portal-submissions-block .portal-submissions-load-btn {
  border-color: rgba(200, 200, 200, 0.7);
  background: rgba(255, 255, 255, 0.04);
}

body.dark-mode .portal-submissions-block .portal-submissions-load-btn:hover,
body.dark-mode .portal-submissions-block .portal-submissions-load-btn:focus-visible {
  background: rgba(255, 255, 255, 0.10);
}
/* ============================================
   TABLE ACTIONS: 3-dot header + row buttons
   ============================================ */

/* Compact "Actions" column */
th[data-column="actions"],
td.actions-cell,
td.folder-actions-cell {
  width: 40px;
  max-width: 40px;
  text-align: center;
  white-space: nowrap;
}

/* Hide "Actions" text but keep it for screen readers */
th[data-column="actions"] {
  position: relative;
  text-indent: -9999px;
}

/* Show a 3-dot Material icon in the header instead */
th[data-column="actions"]::after {
  content: "more_horiz";
  font-family: "Material Icons";
  text-indent: 0;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #6b7280;
}

.dark-mode th[data-column="actions"]::after,
[data-theme="dark"] th[data-column="actions"]::after {
  color: #9ca3af;
}

/* Row-level 3-dot button */
.btn-actions-ellipsis {
  border: none;
  background: transparent;
  padding: 0;
  line-height: 1;
  box-shadow: none;
  border-radius: 999px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background-color 0.16s ease-out,
    box-shadow 0.16s ease-out,
    transform 0.12s ease-out;
}

.btn-actions-ellipsis .material-icons {
  font-size: 20px;
  color: var(--filr-icon-muted, #6b7280);
}

/* Dark theme icon color */
.dark-mode .btn-actions-ellipsis .material-icons,
[data-theme="dark"] .btn-actions-ellipsis .material-icons {
  color: #e5e7eb;
}

/* Glassy hover for 3-dot trigger (light) */
.btn-actions-ellipsis:hover,
.btn-actions-ellipsis:focus-visible {
  outline: none;
  background-color: rgba(148, 163, 184, 0.18);
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.4),
    0 6px 14px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform: translateY(-1px);
}

/* Glassy hover for 3-dot trigger (dark) */
.dark-mode .btn-actions-ellipsis:hover,
.dark-mode .btn-actions-ellipsis:focus-visible,
[data-theme="dark"] .btn-actions-ellipsis:hover,
[data-theme="dark"] .btn-actions-ellipsis:focus-visible {
  background-color: color-mix(in srgb, var(--fr-surface-dark) 70%, transparent);
  box-shadow:
    0 0 0 1px var(--fr-border-dark),
    0 10px 24px rgba(0, 0, 0, 0.7);
}
.btn-actions-ellipsis.btn-link,
.btn-actions-ellipsis.btn-link:hover,
.btn-actions-ellipsis.btn-link:focus,
.btn-actions-ellipsis.btn-link:focus-visible {
  text-decoration: none !important;
}

/* === Late Additions: Hover Preview === */
/* ============================================
   HOVER PREVIEW CARD – glassmorphism
   ============================================ */
/* Clickable glass hover card */
#hoverPreview {
  pointer-events: auto;
}

/* === DARK THEME GLASS CARD (no banding) ======================= */
.hover-preview-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;

  min-width: 420px;
  max-width: 640px;
  min-height: 220px;
  padding: 10px 12px;
  border-radius: 14px;
  overflow: hidden;

  /* Base: semi-opaque dark, no banding */
  background-color: color-mix(
    in srgb,
    var(--fr-surface-dark, #0f172a) 78%,
    transparent
  ) !important;

  /* Very subtle linear sheen (small contrast = no visible bands) */
  background-image: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.0)
  );

  border: 1px solid color-mix(
    in srgb,
    var(--fr-border-dark, #1f2937) 70%,
    transparent
  );

  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.35);

  color: #e5e7eb;
  font-size: 12px;

  /* Glass feel: blur + mild saturation */
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
}

/* === LIGHT THEME GLASS CARD =================================== */
[data-theme="light"] .hover-preview-card {
  background-color: rgba(255, 255, 255, 0.86) !important;
  background-image: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.98),
    rgba(249, 250, 251, 0.80)
  );

  border-color: rgba(148, 163, 184, 0.45);
  box-shadow:
    0 16px 32px rgba(15, 23, 42, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.9);

  color: #111827;

  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
}

/* Two-column inner layout */
.hover-preview-grid {
  display: grid;
  grid-template-columns: 220px minmax(260px, 1fr);
  gap: 12px;
  align-items: center;          /* center LEFT + RIGHT in the same row */
  width: 100%;
}

/* Left column: image + snippet */
.hover-preview-left {
  display: flex;
  flex-direction: column;
  justify-content: center;      /* center inside its own grid cell */
  min-width: 0;
}

/* Right column: title + meta + props */
.hover-preview-right {
  display: flex;
  flex-direction: column;
  justify-content: center;      /* center inside its own grid cell */
  min-width: 0;
  overflow: hidden;
}

/* Thumb area */
.hover-preview-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  margin-bottom: 6px;
}

/* Text / folder peek snippet block */
.hover-preview-snippet {
  margin-top: 4px;
  max-height: 140px;
  overflow: auto;
  font-size: 0.78rem;
  white-space: pre-wrap;
  padding: 6px 8px;
  border-radius: 6px;

  /* Dark chip so it always has contrast vs the card */
  background-color: rgba(39, 39, 39, 0.92) !important;
  color: #e5e7eb !important;
}

/* You can keep this same in light mode (still looks good), or tweak slightly */
[data-theme="light"] .hover-preview-snippet {
  background-color: rgba(39, 39, 39, 0.92) !important;
  color: #f9fafb !important;
}

/* Title + meta + props */
.hover-preview-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.hover-preview-meta {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

[data-theme="light"] .hover-preview-meta {
  color: #6b7280;
}

.hover-preview-props {
  font-size: 0.78rem;
  line-height: 1.3;
  max-height: 160px;
  overflow: auto;
  padding-right: 4px;
  word-break: break-word;
}

.hover-prop-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Icon color */
.hover-preview-icon.material-icons {
  font-size: 26px;
  color: #93c5fd;
}

[data-theme="light"] .hover-preview-icon.material-icons {
  color: #2563eb;
}
/* Row-level 3-dot button: shared between file list + folder tree */
.btn-actions-ellipsis,
.folder-kebab {
  border: none;
  background: transparent;
  padding: 0;
  line-height: 1;
  box-shadow: none;
  border-radius: 999px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background-color 0.16s ease-out,
    box-shadow 0.16s ease-out,
    transform 0.12s ease-out;
}

/* Icon sizing + base color */
.btn-actions-ellipsis .material-icons,
.folder-kebab.material-icons {
  font-size: 20px;
  color: var(--filr-icon-muted, #6b7280);
}

/* Dark theme icon color */
.dark-mode .btn-actions-ellipsis .material-icons,
[data-theme="dark"] .btn-actions-ellipsis .material-icons,
.dark-mode .folder-kebab.material-icons,
[data-theme="dark"] .folder-kebab.material-icons {
  color: #e5e7eb;
}

/* Glassy hover for 3-dot trigger (light) */
.btn-actions-ellipsis:hover,
.btn-actions-ellipsis:focus-visible,
.folder-kebab:hover,
.folder-kebab:focus-visible {
  outline: none;
  background-color: rgba(148, 163, 184, 0.18);
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.4),
    0 6px 14px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform: translateY(-1px);
}

/* Glassy hover for 3-dot trigger (dark) */
.dark-mode .btn-actions-ellipsis:hover,
.dark-mode .btn-actions-ellipsis:focus-visible,
[data-theme="dark"] .btn-actions-ellipsis:hover,
[data-theme="dark"] .btn-actions-ellipsis:focus-visible,
.dark-mode .folder-kebab:hover,
.dark-mode .folder-kebab:focus-visible,
[data-theme="dark"] .folder-kebab:hover,
[data-theme="dark"] .folder-kebab:focus-visible {
  background-color: color-mix(in srgb, var(--fr-surface-dark) 70%, transparent);
  box-shadow:
    0 0 0 1px var(--fr-border-dark),
    0 10px 24px rgba(0, 0, 0, 0.7);
}

/* Keep folder modals in DOM for JS, but hide the old toolbar icons */
.folder-actions {
  /* still exists so modals can be found + detached */
  display: block;
  position: relative;
}

/* Hide the icon buttons, keep their IDs for JS wiring */
.folder-actions > button {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.site-footer {
  margin-top: 12px;
  padding: 8px 16px;
  font-size: 0.8rem;
  color: var(--filr-muted-text, #777);
  border-top: 1px solid rgba(0,0,0,0.06);
  display: flex;
  justify-content: center;
  align-items: center;
}

.site-footer span {
  text-align: center;
  max-width: 100%;
  white-space: normal;
}
/* === Late Additions: Admin / OIDC === */
/* Base look for the OIDC debug JSON box */
#oidcDebugSnapshot,
.oidc-debug-snapshot {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.4;
  white-space: pre-wrap;      /* long JSON stays readable */
  word-break: break-word;
}

/* Light mode */
body:not(.dark-mode) #oidcDebugSnapshot,
body:not(.dark-mode) .oidc-debug-snapshot {
  background: rgba(0, 0, 0, 0.03);
  color: #333;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Dark mode */
body.dark-mode #oidcDebugSnapshot,
body.dark-mode .oidc-debug-snapshot {
  color: #e5e7eb;      /* light gray text */
}
/* admin section separators */
.admin-divider {
  border: 0;
  border-top: 2px solid rgba(0, 0, 0, 0.08);
margin-top: 20px;
margin-bottom: 20px;
}

.dark-mode .admin-divider {
  border-top-color: rgba(255, 255, 255, 0.16);
}

/* Admin: Sources */
#adminPanelModal .sources-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin:6px 0 10px;}
#adminPanelModal .sources-list{border:1px solid var(--fr-border-light,#d8d8d8);border-radius:10px;padding:6px;background:#fafafa;}
#adminPanelModal .sources-grid{display:block;}
#adminPanelModal .sources-row{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,.8fr) minmax(0,1fr) minmax(300px,1fr);gap:10px;align-items:center;padding:6px 8px;border-bottom:1px solid var(--fr-border-light,#e2e2e2);}
#adminPanelModal .sources-row-data{transition: background-color 120ms ease, box-shadow 120ms ease;align-items:flex-start;}
#adminPanelModal .sources-row-data.is-alt{background: rgba(15,23,42,0.03);}
#adminPanelModal .sources-row-data:hover{background: rgba(122,179,255,.10);}
#adminPanelModal .sources-row-data.is-active{background: rgba(33,150,243,.14);box-shadow: inset 0 0 0 1px rgba(33,150,243,.35);}
#adminPanelModal .sources-row-data.is-active:hover{background: rgba(33,150,243,.18);}
#adminPanelModal .sources-row:last-child{border-bottom:0;}
#adminPanelModal .sources-header{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:#6a6a6a;font-weight:600;}
#adminPanelModal .sources-header > div{text-align:left;justify-self:start;}
#adminPanelModal .sources-header-actions{text-align:right;justify-self:end;}
#adminPanelModal .sources-name{display:flex;align-items:flex-start;gap:5px;flex-wrap:wrap;flex-direction:column;}
#adminPanelModal .sources-name-main{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
#adminPanelModal .sources-name-text{min-width:0;}
#adminPanelModal .sources-lock-icon{font-size:14px;color:#64748b;opacity:0.9;}
#adminPanelModal .sources-badges{display:inline-flex;gap:6px;flex-wrap:wrap;}
#adminPanelModal .sources-badge{font-size:11px;padding:2px 8px;border-radius:999px;background:#eef2ff;color:#314;border:1px solid rgba(99,102,241,.25);}
#adminPanelModal .sources-capabilities{display:flex;gap:5px;flex-wrap:wrap;}
#adminPanelModal .sources-capability{font-size:10px;padding:1px 7px;border-radius:999px;border:1px solid #d6dbe3;background:#f8fafc;color:#475569;line-height:1.25;white-space:nowrap;}
#adminPanelModal .sources-capability.cap-ok{background:#ecfdf5;border-color:#a7f3d0;color:#065f46;}
#adminPanelModal .sources-capability.cap-fail{background:#fef2f2;border-color:#fecaca;color:#991b1b;}
#adminPanelModal .sources-capability.cap-skipped{background:#fff7ed;border-color:#fed7aa;color:#9a3412;}
#adminPanelModal .sources-capability.cap-unknown{background:#f1f5f9;border-color:#d5dde8;color:#64748b;}
#adminPanelModal .sources-actions{display:flex;gap:4px;justify-content:flex-end;align-items:center;flex-wrap:nowrap;}
#adminPanelModal .sources-actions .btn{padding:3px 8px;font-size:11px;line-height:1.2;border-radius:8px;white-space:nowrap;}
#adminPanelModal .sources-actions .sources-icon-btn{width:28px;height:26px;min-width:0;padding:0;display:inline-flex;align-items:center;justify-content:center;}
#adminPanelModal .sources-actions .sources-icon-btn .material-icons{font-size:16px;line-height:1;}
#adminPanelModal .sources-test-status{font-size:11px;padding:2px 8px;border-radius:999px;border:1px solid #e2e8f0;background:#f1f5f9;color:#475569;line-height:1.2;white-space:nowrap;}
#adminPanelModal .sources-test-status.status-testing{background:#fff7ed;border-color:#fed7aa;color:#9a3412;}
#adminPanelModal .sources-test-status.status-ok{background:#ecfdf5;border-color:#a7f3d0;color:#065f46;}
#adminPanelModal .sources-test-status.status-warning{background:#fffbeb;border-color:#fde68a;color:#92400e;}
#adminPanelModal .sources-test-status.status-error{background:#fef2f2;border-color:#fecaca;color:#991b1b;}
#adminPanelModal .sources-form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;}
#adminPanelModal .sources-form-inline{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:20px;}
#adminPanelModal .sources-form-inline .form-check{margin:0;}
#adminPanelModal .sources-flags-row{grid-column:1 / -1;align-items:flex-start;margin-top:6px;}
#adminPanelModal .sources-inline-help{flex:1 1 100%;margin:0;line-height:1.35;}
#adminPanelModal .sources-type-block{margin-top:8px;padding:8px;border:1px dashed var(--fr-border-light,#d8d8d8);border-radius:8px;background:#fff;}
#adminPanelModal .sources-hint-row{display:flex;justify-content:flex-end;margin:0 0 6px;}
#adminPanelModal .sources-hint-btn{position:relative;width:18px;height:18px;border-radius:999px;border:1px solid rgba(0,0,0,0.18);background:rgba(0,0,0,0.04);color:#475569;font-size:12px;font-weight:700;line-height:1;padding:0;cursor:pointer;}
#adminPanelModal .sources-hint-btn::after{content:attr(data-tooltip);position:absolute;right:0;top:calc(100% + 6px);min-width:220px;max-width:320px;padding:8px 10px;border-radius:8px;border:1px solid rgba(0,0,0,0.12);background:#ffffff;color:#111;box-shadow:0 8px 20px rgba(0,0,0,0.16);font-size:11px;line-height:1.4;text-align:left;white-space:pre-line;opacity:0;transform:translateY(-2px);pointer-events:none;transition:opacity .12s ease,transform .12s ease;z-index:10030;}
#adminPanelModal .sources-hint-btn:hover::after,
#adminPanelModal .sources-hint-btn:focus::after,
#adminPanelModal .sources-hint-btn:focus-visible::after{opacity:1;transform:translateY(0);}
#adminPanelModal .sources-hint-btn:focus-visible{outline:none;box-shadow:0 0 0 2px rgba(13,110,253,0.35);}
body.dark-mode #adminPanelModal .sources-list{background:#2b2b2b;border-color:var(--fr-border-dark,#333);}
body.dark-mode #adminPanelModal .sources-row{border-bottom-color:var(--fr-border-dark,#333);}
body.dark-mode #adminPanelModal .sources-row-data.is-alt{background: rgba(255,255,255,0.04);}
body.dark-mode #adminPanelModal .sources-row-data:hover{background: rgba(122,179,255,.12);}
body.dark-mode #adminPanelModal .sources-row-data.is-active{background: rgba(62,166,255,.18);box-shadow: inset 0 0 0 1px rgba(62,166,255,.35);}
body.dark-mode #adminPanelModal .sources-row-data.is-active:hover{background: rgba(62,166,255,.22);}
body.dark-mode #adminPanelModal .sources-header{color:#a8a8a8;}
body.dark-mode #adminPanelModal .sources-badge{background:rgba(122,179,255,.12);border-color:rgba(122,179,255,.2);color:#dbe8ff;}
body.dark-mode #adminPanelModal .sources-lock-icon{color:#cbd5f5;}
body.dark-mode #adminPanelModal .sources-capability{background:rgba(148,163,184,0.16);border-color:rgba(148,163,184,0.35);color:#d5dde8;}
body.dark-mode #adminPanelModal .sources-capability.cap-ok{background:rgba(16,185,129,0.18);border-color:rgba(16,185,129,0.35);color:#6ee7b7;}
body.dark-mode #adminPanelModal .sources-capability.cap-fail{background:rgba(239,68,68,0.18);border-color:rgba(239,68,68,0.35);color:#fecaca;}
body.dark-mode #adminPanelModal .sources-capability.cap-skipped{background:rgba(251,146,60,0.18);border-color:rgba(251,146,60,0.35);color:#fdba74;}
body.dark-mode #adminPanelModal .sources-capability.cap-unknown{background:rgba(148,163,184,0.16);border-color:rgba(148,163,184,0.35);color:#d5dde8;}
body.dark-mode #adminPanelModal .sources-test-status{background:rgba(148,163,184,0.18);border-color:rgba(148,163,184,0.35);color:#e2e8f0;}
body.dark-mode #adminPanelModal .sources-test-status.status-testing{background:rgba(251,146,60,0.18);border-color:rgba(251,146,60,0.35);color:#fdba74;}
body.dark-mode #adminPanelModal .sources-test-status.status-ok{background:rgba(16,185,129,0.18);border-color:rgba(16,185,129,0.35);color:#6ee7b7;}
body.dark-mode #adminPanelModal .sources-test-status.status-warning{background:rgba(245,158,11,0.2);border-color:rgba(245,158,11,0.35);color:#fcd34d;}
body.dark-mode #adminPanelModal .sources-test-status.status-error{background:rgba(239,68,68,0.18);border-color:rgba(239,68,68,0.35);color:#fecaca;}
body.dark-mode #adminPanelModal .sources-type-block{background:#262626;border-color:var(--fr-border-dark,#333);}
body.dark-mode #adminPanelModal .sources-hint-btn{border-color:rgba(255,255,255,0.2);background:rgba(255,255,255,0.08);color:#e5e7eb;}
body.dark-mode #adminPanelModal .sources-hint-btn::after{background:var(--fr-surface-dark,#212121);color:#e5e7eb;border-color:var(--fr-border-dark,#303030);box-shadow:0 10px 24px rgba(0,0,0,0.7);}

/* OIDC debug JSON snapshot */
#oidcContent .oidc-debug-snapshot {
  background: rgba(0, 0, 0, 0.03);
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: 4px;
}

.dark-mode #oidcContent .oidc-debug-snapshot {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.16);
}


/* Toggle-style switches for admin panel (OIDC etc.) */
#adminPanelModal .form-check.fr-toggle,
#userPanelModal .form-check.fr-toggle,
.folder-grants-box .form-check.fr-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 0; 
}

/* Base switch track */
#adminPanelModal .form-check.fr-toggle .fr-toggle-input,
#userPanelModal .form-check.fr-toggle .fr-toggle-input,
.folder-grants-box .form-check.fr-toggle .fr-toggle-input {
  appearance: none;
  -webkit-appearance: none;
  width: 2.6rem;
  height: 1.4rem;
  margin: 0;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background-color: #e1e4ea;
  position: relative;
  cursor: pointer;
  outline: none;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

/* Knob */
#adminPanelModal .form-check.fr-toggle .fr-toggle-input::before,
#userPanelModal .form-check.fr-toggle .fr-toggle-input::before,
.folder-grants-box .form-check.fr-toggle .fr-toggle-input::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background-color: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease;
}

/* ON state */
#adminPanelModal .form-check.fr-toggle .fr-toggle-input:checked,
#userPanelModal .form-check.fr-toggle .fr-toggle-input:checked,
.folder-grants-box .form-check.fr-toggle .fr-toggle-input:checked {
  background-color: var(--filr-accent-400, #0d6efd);
  border-color: var(--filr-accent-400, #0d6efd);
}

#adminPanelModal .form-check.fr-toggle .fr-toggle-input:checked::before,
#userPanelModal .form-check.fr-toggle .fr-toggle-input:checked::before,
.folder-grants-box .form-check.fr-toggle .fr-toggle-input:checked::before {
  transform: translateX(1.1rem);
}

/* Focus outline */
#adminPanelModal .form-check.fr-toggle .fr-toggle-input:focus-visible,
#userPanelModal .form-check.fr-toggle .fr-toggle-input:focus-visible,
.folder-grants-box .form-check.fr-toggle .fr-toggle-input:focus-visible {
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.35);
}

/* Dark mode tweaks */
.dark-mode #adminPanelModal .form-check.fr-toggle .fr-toggle-input,
.dark-mode #userPanelModal .form-check.fr-toggle .fr-toggle-input,
.dark-mode .folder-grants-box .form-check.fr-toggle .fr-toggle-input {
  border-color: rgba(255, 255, 255, 0.18);
  background-color: rgba(255, 255, 255, 0.1);
}

.dark-mode #adminPanelModal .form-check.fr-toggle .fr-toggle-input:checked,
.dark-mode #userPanelModal .form-check.fr-toggle .fr-toggle-input:checked,
.dark-mode .folder-grants-box .form-check.fr-toggle .fr-toggle-input:checked {
  background-color: var(--filr-accent-400, #0d6efd);
  border-color: var(--filr-accent-400, #0d6efd);
}

.dark-mode #adminPanelModal .form-check.fr-toggle .fr-toggle-input::before,
.dark-mode #userPanelModal .form-check.fr-toggle .fr-toggle-input::before,
.dark-mode .folder-grants-box .form-check.fr-toggle .fr-toggle-input::before {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

/* Give every admin section a little breathing room at the top */
#adminPanelModal .section-content {
  padding-top: 12px;
}
#adminPanelModal #automationContent.section-content {
  margin-left: 0;
  margin-right: 0;
  padding-left: 8px;
  padding-right: 8px;
}
#adminPanelModal #automationContent .card {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}
#adminPanelModal :is(
  #sponsorContent,
  #proContent,
  #proFeaturesContent,
  #gatewaysContent,
  #storageContent,
  #encryptionContent
) .card,
#adminPanelModal :is(
  #sponsorContent,
  #proContent,
  #proFeaturesContent,
  #gatewaysContent,
  #storageContent,
  #encryptionContent
) .pro-card {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
#adminPanelModal .admin-subsection-title {
  font-weight: 600;
  font-size: 1.15rem;
  margin-top: 4px;
  margin-bottom: 6px;
}

/* ----------------------
   Folder encryption job progress (v2)
---------------------- */
.fr-crypto-job-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  z-index: 14050;
}
.fr-crypto-job-card {
  width: 520px;
  max-width: calc(100vw - 24px);
  border-radius: 12px;
  background: #ffffff;
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  padding: 12px 14px;
}
body.dark-mode .fr-crypto-job-card {
  background: #2c2c2c;
  color: #e0e0e0;
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.fr-crypto-job-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.fr-crypto-job-title {
  font-weight: 600;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fr-crypto-job-body {
  font-size: 13px;
}
.fr-crypto-job-sub {
  opacity: 0.85;
  margin-bottom: 8px;
}
.fr-crypto-job-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
body.dark-mode .fr-crypto-job-bar {
  background: rgba(255, 255, 255, 0.14);
}
.fr-crypto-job-bar-fill {
  height: 100%;
  width: 0%;
  background: #2f7fd8;
  transition: width 180ms ease;
}
.fr-crypto-job-metrics {
  margin-top: 8px;
  opacity: 0.85;
}
.fr-crypto-job-error {
  margin-top: 8px;
  color: #b91c1c;
  font-weight: 600;
  white-space: pre-wrap;
}
body.dark-mode .fr-crypto-job-error {
  color: #fca5a5;
}

.fr-crypto-job-pill {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 14060;
}
.fr-crypto-job-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  color: #111;
}
body.dark-mode .fr-crypto-job-pill-btn {
  background: rgba(32, 33, 36, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f1f3f4;
}
.fr-crypto-job-pill-title {
  font-weight: 600;
  font-size: 13px;
}
.fr-crypto-job-pill-pct {
  font-size: 12px;
  opacity: 0.9;
}

/* Encrypted folder banner (file list) */
.fr-enc-banner{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(246, 184, 78, 0.35);
  border-left: 4px solid #f6b84e;
  background: rgba(246, 184, 78, 0.10);
}
.fr-enc-pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.78em;
  line-height: 1.2;
  color: #1b1b1b;
  background: #f6b84e;
  white-space: nowrap;
}
.fr-enc-text{
  font-size: 0.95em;
  line-height: 1.35;
  color: rgba(20, 20, 20, 0.85);
}
body.dark-mode .fr-enc-banner{
  border-color: rgba(246, 184, 78, 0.32);
  background: rgba(246, 184, 78, 0.13);
}
body.dark-mode .fr-enc-text{
  color: rgba(235, 235, 235, 0.90);
}
