body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f3f5f8;
  color: #1f2937;
  margin: 0;
}
a {
  color: #0b66d1;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
.small {
  color: #6b7280;
  font-size: 0.92rem;
}
.ok, .error {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
}
.ok {
  color: #166534;
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
}
.error {
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.explorer-body {
  min-height: 100vh;
}
.explorer-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.explorer-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 18px 26px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.explorer-brand {
  display: flex;
  gap: 14px;
  align-items: center;
}
.explorer-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
}
.explorer-brand-title {
  font-size: 15px;
  color: #6b7280;
}
.explorer-brand-subtitle {
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}
.explorer-header-right {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.explorer-search input {
  width: 320px;
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-size: 15px;
  background: #fff;
}
.explorer-user {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.explorer-admin-badge {
  padding: 4px 9px;
  border-radius: 999px;
  background: #e5eefc;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.explorer-main {
  padding: 26px;
}
.explorer-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.explorer-toolbar-left {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.explorer-btn {
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid #c7d2fe;
  cursor: pointer;
  font-size: 16px;
}
.explorer-btn-primary {
  background: #1677ff;
  color: #fff;
  border-color: #1677ff;
}
.explorer-btn-secondary {
  background: #f8fbff;
  color: #1677ff;
}
.explorer-breadcrumbs {
  font-size: 16px;
  color: #374151;
}
.crumb-sep {
  color: #9ca3af;
  margin: 0 8px;
}

.explorer-panels,
.admin-grid {
  display: grid;
  gap: 18px;
}
.explorer-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.dropzone {
  border: 2px dashed #bfd5ff;
  border-radius: 14px;
  padding: 22px;
  background: #f7fbff;
  text-align: center;
  transition: 0.15s ease;
  margin-bottom: 12px;
}
.dropzone.dragover {
  background: #edf5ff;
  border-color: #3b82f6;
}
.compact-dropzone {
  margin-bottom: 12px;
}
.explorer-hidden-upload {
  display: none;
}
.explorer-folder-create {
  margin-top: 8px;
}
.explorer-folder-create input[type="text"] {
  min-width: 240px;
}
.explorer-folder-create input[type="text"],
.explorer-hidden-upload input[type="file"],
.explorer-search input,
button,
select,
input[type="text"],
input[type="password"] {
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 15px;
  background: #fff;
}
button {
  cursor: pointer;
  background: #111827;
  color: #fff;
  border-color: #111827;
}
.explorer-meta-line {
  margin-top: 12px;
}

.explorer-list-header,
.explorer-row {
  display: grid;
  grid-template-columns: minmax(320px, 1.8fr) 140px 180px 280px;
  gap: 16px;
  align-items: center;
}
.explorer-list-header {
  padding: 10px 12px;
  color: #6b7280;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-bottom: 1px solid #e5e7eb;
}
.explorer-row {
  padding: 14px 12px;
  border-bottom: 1px solid #f0f2f5;
}
.explorer-row:last-child {
  border-bottom: 0;
}
.explorer-folder-row {
  background: #fbfcfe;
}
.explorer-item {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}
.explorer-item-name {
  font-weight: 600;
  color: #111827;
  word-break: break-word;
}
.explorer-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.explorer-folder-icon {
  background: #fff3df;
}
.explorer-pdf-icon {
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 700;
}
.explorer-file-icon {
  background: #e5e7eb;
  color: #374151;
  font-weight: 700;
}
.preview-thumb.explorer-inline-thumb {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
  background: #fff;
}
.explorer-col-actions {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
}
.explorer-col-actions a {
  white-space: nowrap;
}
.explorer-empty {
  padding: 24px 12px;
  color: #6b7280;
}

/* Login */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-shell {
  width: 100%;
  max-width: 460px;
}
.login-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(17,24,39,0.06);
}
.login-brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}
.login-title {
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}
.login-subtitle {
  color: #6b7280;
  margin: 0 0 20px;
}
.login-form {
  display: grid;
  gap: 16px;
}
.login-field {
  display: grid;
  gap: 8px;
}
.login-field label {
  font-size: 14px;
  color: #374151;
  font-weight: 600;
}
.login-checkbox {
  margin-top: -4px;
}
.login-button {
  width: 100%;
  justify-content: center;
}

/* Admin */
.admin-section-title {
  margin: 0 0 16px;
  font-size: 24px;
}
.admin-create-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.admin-user-header,
.admin-user-row {
  grid-template-columns: minmax(180px, 1fr) 120px 200px minmax(260px, 1.4fr);
}
.admin-reset-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.admin-role-badge {
  text-transform: capitalize;
}
.admin-tip {
  margin-top: 16px;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 980px) {
  .explorer-list-header {
    display: none;
  }
  .explorer-row,
  .admin-user-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .explorer-col-size::before {
    content: "Size: ";
    color: #6b7280;
  }
  .explorer-col-modified::before {
    content: "Uploaded: ";
    color: #6b7280;
  }
}
