/* ============================= RESET & BASE ============================= */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color: #202124;
  background: #f8f9fa;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input {
  font-family: inherit;
}

ul,
li {
  list-style: none;
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

a {
  text-decoration: none;
}

/* ============================= VARIABLES ============================= */
:root {
  --blue: #1a73e8;
  --blue-dark: #1557b0;
  --red: #ea4335;
  --red-dark: #c5221f;
  --yellow: #f4b400;
  --green: #0f9d58;
  --bg: #f8f9fa;
  --border: #e8eaed;
  --border-strong: #dadce0;
  --text-primary: #202124;
  --text-secondary: #5f6368;
  --hover: #f1f3f4;
  --selected: #e8f0fe;
  --sidebar-w: 272px;
  --sidebar-collapsed-w: 80px;
  --topbar-h: 64px;
  --shadow-1: 0 1px 2px rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
  --shadow-2: 0 1px 3px rgba(60, 64, 67, .30), 0 4px 8px 3px rgba(60, 64, 67, .15);
}

/* ============================= ICONS ============================= */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined' !important;
  font-weight: normal !important;
  font-style: normal !important;
  font-size: 24px !important;
  line-height: 1 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  display: inline-block !important;
  white-space: nowrap !important;
  word-wrap: normal !important;
  direction: ltr !important;
  -webkit-font-smoothing: antialiased !important;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon-fill {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ============================= UTIL / A11Y ============================= */
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: background .15s;
}

.icon-btn:hover {
  background: var(--hover);
}

button:focus-visible,
input:focus-visible,
.nav-item:focus-visible,
.file-card:focus-visible,
.file-row:focus-visible,
.crumb-btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* ============================= LOGIN SCREEN ============================= */
.login-screen {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 24px;
  overflow-y: auto;
}

.login-card {
  width: 100%;
  max-width: 450px;
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  padding: 48px 40px 36px;
  text-align: center;
}

.login-logo-mark svg {
  display: block;
  margin: 0 auto 16px;
}

.login-card h1 {
  font-size: 24px;
  font-weight: 400;
  margin: 0 0 8px;
}

.login-sub {
  color: var(--text-secondary);
  font-size: 16px;
  margin: 0 0 32px;
}

.login-sub strong {
  color: var(--text-primary);
  font-weight: 500;
}

.input-group {
  position: relative;
  margin-bottom: 24px;
  text-align: left;
}

.input-group input {
  width: 100%;
  padding: 16px 15px;
  font-size: 16px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  outline: none;
  background: transparent;
  color: var(--text-primary);
}

.input-group input:focus {
  border: 2px solid var(--blue);
  padding: 15px 14px;
}

.input-group label {
  position: absolute;
  left: 16px;
  top: 16px;
  color: var(--text-secondary);
  font-size: 16px;
  background: #fff;
  padding: 0 4px;
  transition: all .12s ease;
  pointer-events: none;
}

.input-group input:focus+label,
.input-group input:not(:placeholder-shown)+label {
  top: -9px;
  left: 12px;
  font-size: 12px;
  color: var(--blue);
}

.login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--red);
  font-size: 13px;
  text-align: left;
  margin: -12px 0 16px;
}

.login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.demo-hint {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: left;
  line-height: 1.4;
  max-width: 230px;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .25px;
  transition: background .15s, box-shadow .15s;
  flex-shrink: 0;
}

.btn-primary:hover {
  background: var(--blue-dark);
  box-shadow: var(--shadow-1);
}

@media (max-width:520px) {
  .login-card {
    border: none;
    padding: 32px 12px;
  }

  .login-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .btn-primary {
    width: 100%;
    padding: 12px 24px;
  }

  .demo-hint {
    max-width: none;
    text-align: center;
  }
}

/* ============================= APP SHELL / TOPBAR ============================= */
.drive-app {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-text {
  font-size: 22px;
  color: var(--text-secondary);
  font-weight: 400;
}

.topbar-search {
  flex: 1;
  max-width: 720px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border-radius: 8px;
  padding: 0 16px;
  height: 46px;
  min-width: 0;
}

.topbar-search:focus-within {
  background: #fff;
  box-shadow: var(--shadow-1);
}

.topbar-search input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 16px;
  color: var(--text-primary);
  min-width: 0;
}

.topbar-search .search-icon {
  color: var(--text-secondary);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  flex-shrink: 0;
}

.avatar-wrap {
  position: relative;
  margin-left: 8px;
}

.avatar-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  clip-path: circle(50%);
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-btn img {
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}

/* Applies to profile images rendered by every template, including settings. */
.account-avatar,
.account-avatar img {
  border-radius: 50% !important;
  overflow: hidden;
}
.account-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block;
}

.avatar-menu {
  position: absolute;
  right: 0;
  top: 44px;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow-2);
  min-width: 230px;
  padding: 8px 0;
  z-index: 120;
}

.avatar-menu-email {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  word-break: break-all;
}

.avatar-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  font-size: 14px;
}

.avatar-menu-item:hover {
  background: var(--hover);
}

/* ============================= SIDEBAR ============================= */
.app-body {
  flex: 1;
  display: flex;
  min-height: 0;
  position: relative;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  padding: 16px 8px 0;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width .2s ease, transform .2s ease;
  background: #fff;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-w);
}

.sidebar.collapsed .label {
  display: none;
}

.sidebar.collapsed .new-btn-text {
  display: none;
}

.sidebar.collapsed .new-btn {
  width: 56px;
  height: 56px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
}

.sidebar.collapsed .storage-box {
  display: none;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 0;
  width: 48px;
}

.new-btn-wrap {
  position: relative;
  padding: 0 8px 16px;
}

.new-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  box-shadow: var(--shadow-1);
  border-radius: 24px;
  padding: 14px 24px 14px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  transition: box-shadow .15s, background .15s;
}

.new-btn:hover {
  box-shadow: var(--shadow-2);
  background: #f8f9fa;
}

.new-menu {
  position: absolute;
  top: 64px;
  left: 8px;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow-2);
  min-width: 230px;
  padding: 8px 0;
  z-index: 70;
}

.new-menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 10px 20px;
  font-size: 14px;
}

.new-menu-item:hover {
  background: var(--hover);
}

.new-menu hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px 0 24px;
  height: 32px;
  border-radius: 0 16px 16px 0;
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
}

.nav-item:hover {
  background: var(--hover);
}

.nav-item.active {
  background: var(--selected);
  color: var(--blue-dark);
  font-weight: 500;
}

.nav-item.active .material-symbols-outlined {
  color: var(--blue-dark);
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.storage-box {
  padding: 16px 24px 16px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.storage-nav-label {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.storage-bar {
  height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}

.storage-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 2px;
  transition: width .3s;
}

.storage-text {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.btn-outline {
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--blue);
  width: 100%;
  font-weight: 500;
}

.btn-outline:hover {
  background: var(--selected);
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  z-index: 44;
}

/* ============================= CONTENT ============================= */
.content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 20px 24px 24px;
  overflow-y: auto;
  position: relative;
}

.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 22px;
  color: var(--text-secondary);
  flex-wrap: wrap;
  min-width: 0;
}

.crumb-btn {
  font-size: 22px;
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: 4px;
}

.crumb-btn:hover {
  background: var(--hover);
}

.crumb-current {
  font-size: 22px;
  color: var(--text-primary);
  padding: 4px 8px;
  font-weight: 400;
}

.crumb-sep {
  font-size: 18px;
  color: var(--text-secondary);
}

.content-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  flex-wrap: wrap;
}

.chip-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.chip-btn:hover {
  background: var(--hover);
}

.chip-btn .material-symbols-outlined {
  font-size: 18px;
}

.sort-menu {
  position: absolute;
  top: 44px;
  right: 44px;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow-2);
  min-width: 190px;
  padding: 8px 0;
  z-index: 50;
}

.sort-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  font-size: 14px;
}

.sort-item:hover {
  background: var(--hover);
}

/* ============================= FILE GRID / LIST ============================= */
.file-area.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.file-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  position: relative;
  background: #fff;
  transition: box-shadow .15s, border-color .15s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.file-card:hover {
  box-shadow: var(--shadow-1);
}

.file-card.selected {
  background: var(--selected);
  border-color: var(--blue);
}

.file-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.file-card .file-icon {
  font-size: 40px;
}

.file-card-name {
  font-size: 14px;
  font-weight: 500;
  word-break: break-word;
  line-height: 1.3;
  padding-right: 4px;
}

.file-card-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.star-badge {
  position: absolute;
  bottom: 14px;
  right: 16px;
  font-size: 16px;
  color: var(--yellow);
}

.kebab-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  opacity: 0;
  transition: opacity .1s, background .1s;
  flex-shrink: 0;
}

.file-card:hover .kebab-btn,
.file-row:hover .kebab-btn,
.file-card.selected .kebab-btn,
.file-row.selected .kebab-btn {
  opacity: 1;
}

.kebab-btn:hover {
  background: rgba(0, 0, 0, .06);
}

@media (hover:none) {
  .kebab-btn {
    opacity: 1;
  }
}

.file-area.list-view {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.list-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.list-header .lh-icon {
  width: 22px;
  flex-shrink: 0;
}

.list-header .lh-name {
  flex: 1;
  min-width: 0;
}

.list-header .lh-owner {
  width: 140px;
  flex-shrink: 0;
}

.list-header .lh-modified {
  width: 150px;
  flex-shrink: 0;
}

.list-header .lh-size {
  width: 90px;
  flex-shrink: 0;
}

.list-header .lh-kebab {
  width: 32px;
  flex-shrink: 0;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 14px;
}

.file-row:hover {
  background: var(--hover);
}

.file-row.selected {
  background: var(--selected);
}

.file-row .file-icon.small {
  font-size: 22px;
  width: 22px;
}

.file-row-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.row-star {
  font-size: 16px;
  color: var(--yellow);
  flex-shrink: 0;
}

.file-row-owner {
  width: 140px;
  flex-shrink: 0;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-row-modified {
  width: 150px;
  flex-shrink: 0;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-row-size {
  width: 90px;
  flex-shrink: 0;
  color: var(--text-secondary);
}

/* file type colors */
.icon-folder {
  color: #5f6368;
}

.icon-doc {
  color: #4285f4;
}

.icon-sheet {
  color: #0f9d58;
}

.icon-slide {
  color: #f4b400;
}

.icon-pdf {
  color: #ea4335;
}

.icon-image {
  color: #9c27b0;
}

.icon-video {
  color: #e91e63;
}

.icon-audio {
  color: #00acc1;
}

.icon-archive {
  color: #795548;
}

.icon-text {
  color: #5f6368;
}

.icon-file {
  color: #5f6368;
}

.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  padding: 48px 16px;
  text-align: center;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  color: var(--border-strong);
}

.empty-state p {
  font-size: 14px;
  max-width: 320px;
}

.drop-overlay {
  position: absolute;
  inset: 8px;
  background: rgba(26, 115, 232, .06);
  border: 2px dashed var(--blue);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
}

.drop-overlay-inner {
  text-align: center;
  color: var(--blue);
}

.drop-overlay-inner .material-symbols-outlined {
  font-size: 48px;
}

.drop-overlay-inner p {
  font-size: 15px;
  margin-top: 8px;
  font-weight: 500;
}

/* ============================= INFO PANEL ============================= */
.info-panel {
  width: 320px;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  background: #fff;
  padding: 16px;
  overflow-y: auto;
}

.info-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.info-panel-header h3 {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}

.info-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 16px;
}

.info-name {
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 8px;
  word-break: break-word;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
}

.info-row span:last-child {
  color: var(--text-primary);
  text-align: right;
  word-break: break-word;
}

.info-empty {
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
  margin-top: 32px;
}

/* =========================================================
   CONTEXT MENU
   Viewport-safe on desktop / tablet / mobile
========================================================= */

.context-menu {
  position: fixed;

  /* JS will set these values */
  left: 0;
  top: 0;

  width: 240px;
  max-width: calc(100vw - 24px);

  max-height: min(520px, calc(100vh - 24px));

  overflow-y: auto;
  overflow-x: hidden;

  padding: 6px;

  background: #ffffff;

  border: 1px solid #dddfe3;
  border-radius: 12px;

  box-shadow:
    0 10px 35px rgba(0, 0, 0, .18),
    0 2px 8px rgba(0, 0, 0, .08);

  z-index: 99999;

  display: none;

  /* Prevent accidental text selection */
  user-select: none;

  /* Important for iOS */
  -webkit-overflow-scrolling: touch;

  /* Prevent weird overflow */
  contain: layout paint;
}

.context-menu.show {
  display: block;
}

.context-item {
  width: 100%;

  min-height: 44px;

  display: flex;
  align-items: center;

  gap: 12px;

  padding: 10px 12px;

  border: 0;
  border-radius: 8px;

  background: transparent;

  color: #202124;

  font-size: 14px;
  line-height: 1.2;

  text-align: left;

  cursor: pointer;

  white-space: nowrap;
}

.context-item:hover {
  background: #f2f4f7;
}

.context-item:active {
  background: #e8eaed;
}

.context-item .material-symbols-outlined {
  width: 22px;
  min-width: 22px;

  font-size: 21px !important;

  color: #5f6368;
}

.context-item.danger {
  color: #d93025;
}

.context-item.danger .material-symbols-outlined {
  color: #d93025;
}

.context-separator {
  height: 1px;

  background: #eceff1;

  margin: 5px 0;
}


/* =========================================================
   CONTEXT MENU SCROLLBAR
========================================================= */

.context-menu::-webkit-scrollbar {
  width: 6px;
}

.context-menu::-webkit-scrollbar-track {
  background: transparent;
}

.context-menu::-webkit-scrollbar-thumb {
  background: #c7c9cc;
  border-radius: 10px;
}

.context-menu::-webkit-scrollbar-thumb:hover {
  background: #aeb1b5;
}


/* =========================================================
   MOBILE CONTEXT MENU
========================================================= */

@media (max-width: 768px) {

  .context-menu {
    width: min(280px, calc(100vw - 24px));

    max-width: calc(100vw - 24px);

    max-height:
      calc(100dvh - 24px - 76px - env(safe-area-inset-bottom));

    padding: 7px;

    border-radius: 15px;

    box-shadow:
      0 12px 40px rgba(0, 0, 0, .20),
      0 2px 8px rgba(0, 0, 0, .08);
  }

  .context-item {
    min-height: 48px;

    padding:
      11px 13px;

    font-size: 14px;

    border-radius: 9px;
  }

  .context-item .material-symbols-outlined {
    font-size: 22px !important;
  }

}


/* =========================================================
   SMALL PHONES
========================================================= */

@media (max-width: 390px) {

  .context-menu {
    width: min(260px, calc(100vw - 16px));

    max-width: calc(100vw - 16px);

    max-height:
      calc(100dvh - 16px - 76px - env(safe-area-inset-bottom));

    border-radius: 14px;
  }

  .context-item {
    min-height: 46px;

    padding: 10px 11px;

    font-size: 13px;

    gap: 10px;
  }

}


/* =========================================================
   VERY SMALL PHONES
========================================================= */

@media (max-width: 340px) {

  .context-menu {
    width: calc(100vw - 14px);

    max-width: calc(100vw - 14px);

    padding: 6px;

    border-radius: 13px;
  }

  .context-item {
    min-height: 44px;

    font-size: 13px;
  }

}

/* ============================= MODAL ============================= */
.modal-overlay {
  inset: 0;
  background: rgba(0, 0, 0, .4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
}

.modal-box {
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 400px;
  padding: 20px 24px 16px;
  box-shadow: var(--shadow-2);
}

.modal-box h3 {
  font-size: 18px;
  font-weight: 400;
  margin: 0 0 16px;
}

.modal-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  outline: none;
}

.modal-input:focus {
  border: 2px solid var(--blue);
  padding: 9px 11px;
}

.modal-message {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
}

.btn-text {
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  color: var(--blue);
  font-weight: 500;
}

.btn-text:hover {
  background: var(--selected);
}

.btn-primary-sm {
  padding: 8px 20px;
  border-radius: 4px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

.btn-primary-sm:hover {
  background: var(--blue-dark);
}

.btn-primary-sm.btn-danger {
  background: var(--red);
}

.btn-primary-sm.btn-danger:hover {
  background: var(--red-dark);
}

/* ============================= TOAST ============================= */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #323232;
  color: #fff;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  transition: opacity .2s, transform .2s;
  z-index: 300;
  box-shadow: var(--shadow-2);
  max-width: 90vw;
  text-align: center;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hidden-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ============================= RESPONSIVE ============================= */
@media (max-width:1180px) {
  .info-panel {
    position: fixed;
    right: 0;
    top: var(--topbar-h);
    bottom: 0;
    z-index: 35;
    box-shadow: var(--shadow-2);
  }
}

@media (max-width:768px) {
  :root {
    --topbar-h: 56px;
  }

  .brand-text {
    display: none;
  }

  .sidebar {
    position: fixed;
    top: var(--topbar-h);
    bottom: 0;
    left: 0;
    width: 280px !important;
    transform: translateX(-100%);
    z-index: 45;
    box-shadow: var(--shadow-2);
    padding-top: 12px;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar.collapsed .label {
    display: inline;
  }

  .sidebar.collapsed .new-btn-text {
    display: inline;
  }

  .sidebar.collapsed .new-btn {
    width: auto;
    height: auto;
    padding: 14px 24px 14px 16px;
    border-radius: 24px;
    justify-content: flex-start;
  }

  .sidebar.collapsed .storage-box {
    display: block;
  }

  .sidebar.collapsed .nav-item {
    justify-content: flex-start;
    padding: 0 20px 0 24px;
    width: auto;
  }

  .content {
    padding: 12px 12px 16px;
  }

  .content-header {
    margin-bottom: 8px;
  }

  .file-area.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
  }

  .file-row-owner,
  .list-header .lh-owner {
    display: none;
  }

  .topbar {
    gap: 6px;
    padding: 0 6px;
  }

  .topbar-search {
    padding: 0 12px;
    height: 40px;
  }

  .new-btn {
    padding: 12px 18px 12px 14px;
  }

  .info-panel {
    width: 100%;
  }

  .breadcrumb .crumb-btn,
  .breadcrumb .crumb-current {
    font-size: 19px;
  }
}

@media (max-width:480px) {

  .file-row-modified,
  .list-header .lh-modified {
    display: none;
  }

  .file-row-size,
  .list-header .lh-size {
    display: none;
  }

  .file-card-meta {
    display: none;
  }

  .brand svg {
    width: 28px;
    height: 26px;
  }

  .demo-hint {
    display: block;
  }
}

/* -----------------------------
 STORAGE
 ---------------------------- */
.sidebar-bottom {
  margin-top: auto;
}

.storage-info {
  display: flex;
  align-items: center;

  gap: 10px;

  padding: 12px;

  border-top: 1px solid #eee;
}

.sidebar {
  position: sticky;

  top: 64px;

  width: 250px;

  height:
    calc(100dvh - 64px);

  flex-shrink: 0;

  display: flex;
  flex-direction: column;

  padding: 18px 12px;

  background: #fff;

  border-right: 1px solid #e8eaed;
}

.storage-icon {
  width: 38px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;

  background: #f1f3f4;
}

.storage-details {
  flex: 1;
  min-width: 0;
}

.storage-title {
  font-size: 13px;
  font-weight: 600;
}

.storage-bar {
  height: 5px;

  margin-top: 7px;

  border-radius: 10px;

  background: #e5e7eb;

  overflow: hidden;
}

.storage-bar-fill {
  height: 100%;

  width: 42%;

  background: #1a73e8;
}

.storage-text {
  margin-top: 5px;

  font-size: 10px;

  color: #70757a;
}
