:root {
  --bg: #0f172a;
  --panel: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --primary: #22d3ee;
  --danger: #f87171;
  --warn: #fbbf24;
  --ok: #34d399;
  --border: #1f2937;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Arial, sans-serif; background: var(--bg); color: var(--text); }
header, footer { padding: 16px 24px; border-bottom: 1px solid var(--border); }
h1, h2 { margin: 0 0 8px 0; }
.panel { background: var(--panel); margin: 16px; padding: 16px; border: 1px solid var(--border); border-radius: 8px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.checkbox { flex-direction: row; align-items: center; gap: 8px; }
input, select, button { background: #0b1324; color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; font-size: 14px; }
button { cursor: pointer; }
button:hover { border-color: var(--primary); }
.note { color: var(--muted); font-size: 12px; margin-top: 8px; }
.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th { text-align: left; color: var(--muted); border-bottom: 1px solid var(--border); padding: 6px 4px; }
tbody td { border-bottom: 1px solid var(--border); padding: 8px 4px; vertical-align: middle; }
.pill { padding: 2px 8px; border-radius: 999px; font-size: 12px; display: inline-block; }
.pill.ok { background: #064e3b; color: var(--ok); }
.pill.warn { background: #4d3612; color: var(--warn); }
.pill.danger { background: #4b1d1d; color: var(--danger); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; word-break: break-all; color: #d1d5db; }
.hidden { display: none; }

/* New DropBlocks UI */
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; }
.logo { width: 28px; height: 28px; display: grid; place-items: center; background: #0b1324; border: 1px solid var(--border); border-radius: 6px; color: var(--primary); font-weight: 700; }
.logo-img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; display: block; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 6px; border: 1px solid var(--border); background: #0b1324; color: var(--text); }
.icon-btn .btn-text { display: none; }
@media (min-width: 560px) { .icon-btn .btn-text { display: inline; } }
.file-label { 
  position: relative !important; 
  overflow: hidden !important; 
  display: inline-flex !important; 
  align-items: center !important; 
  gap: 6px !important; 
  padding: 8px 10px !important; 
  border-radius: 6px !important; 
  border: 1px solid var(--border) !important; 
  background: #0b1324 !important; 
  color: var(--text) !important; 
  cursor: pointer !important;
  flex-direction: row !important;
}
.file-label:hover { border-color: var(--primary) !important; }
.visually-hidden { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.files-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.files-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Encryption lock badge */
.lock { margin-left: 6px; font-size: 12px; vertical-align: middle; opacity: 0.9; }

/* Row action icons */
.actions { white-space: nowrap; }
.icon-only { padding: 6px 8px; line-height: 1; font-size: 16px; background: #0b1324; }
.icon-only:hover { border-color: var(--primary); }
.icon-only + .icon-only { margin-left: 6px; }


/* Breadcrumb navigation */
.breadcrumb { 
  margin: 8px 0; 
  font-size: 14px; 
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.breadcrumb-item { 
  cursor: pointer; 
  color: var(--primary); 
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}
.breadcrumb-item:hover { 
  background: var(--border);
  text-decoration: none;
}
.breadcrumb-item.active { 
  color: var(--text); 
  cursor: default; 
  background: var(--panel);
}
.breadcrumb-sep { 
  color: var(--muted); 
  margin: 0 2px;
}

/* Ensure tooltips work properly */
[title] { position: relative; }
[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel);
  color: var(--text);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  pointer-events: none;
}

/* Folder Row Styles */
tr .folder-row {
  cursor: pointer;
  background: var(--panel) !important;
  border-radius: 4px;
  padding: 0.5rem;
  border: 1px solid var(--border);
}

tr:hover .folder-row {
  background: var(--border) !important;
}

.folder-row i {
  color: var(--primary);
  margin-right: 0.5rem;
}

/* Make sure folder rows have consistent styling */
tr:has(.folder-row) {
  background: var(--panel);
}

tr:has(.folder-row):hover {
  background: var(--border);
}

/* Path display in new folder modal */
.path-display {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  color: var(--text);
  margin-top: 4px;
}

.path-display i {
  color: var(--primary);
  margin-right: 4px;
}

/* Upload spinner */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
  margin-right: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner.hidden {
  display: none;
}

/* Upload button with spinner */
#upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
}

#upload-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Cancel buttons - secondary styling */
button[id$="-cancel"] {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  margin-left: 8px;
}

button[id$="-cancel"]:hover {
  background: var(--border);
  border-color: var(--text);
}

/* Modal footer button layout */
footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

footer button:first-child {
  margin-right: 0;
}

/* File details modal styling */
.file-detail-value {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 12px;
  margin-top: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  word-break: break-all;
}

.uhrp-url {
  font-size: 12px;
  color: var(--primary);
}

.encryption-key {
  font-size: 12px;
  color: var(--warn);
}

.file-name-clickable {
  transition: color 0.2s ease;
}

.file-name-clickable:hover {
  color: var(--primary);
  text-shadow: 0 0 8px rgba(34, 211, 238, 0.3);
}

/* File details modal grid */
#file-details-content .grid {
  gap: 16px;
}

#file-details-content label {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}


/* Default display rules */
.files-table {
  display: table;
}

.files-mobile {
  display: none;
}

/* Mobile Responsive Design */

/* Mobile-first approach - base styles for mobile */
@media (max-width: 768px) {
  /* Header adjustments */
  .app-header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 12px 16px;
  }
  
  .brand {
    justify-content: center;
  }
  
  .toolbar {
    justify-content: center;
    gap: 6px;
  }
  
  .icon-btn {
    padding: 10px 12px;
    min-height: 44px; /* iOS touch target minimum */
  }
  
  /* Panel adjustments */
  .panel {
    margin: 8px;
    padding: 12px;
  }
  
  /* File table - convert to card layout on mobile */
  .files-table {
    display: none; /* Hide table on mobile */
  }
  
  .files-mobile {
    display: block; /* Show mobile cards */
  }
  
  /* Mobile file cards */
  .file-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
  }
  
  .file-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
  }
  
  .file-card-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    flex: 1;
    min-width: 0;
  }
  
  .file-card-actions {
    display: flex;
    gap: 4px;
  }
  
  .file-card-actions button {
    padding: 6px;
    min-width: 36px;
    min-height: 36px;
  }
  
  .file-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
  }
  
  .file-card-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  
  .file-card-detail-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .file-card-detail-value {
    font-weight: 500;
    color: var(--text);
  }
  
  /* Folder cards */
  .folder-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
  }
  
  .folder-card:hover {
    background: var(--border);
  }
  
  .folder-card-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
  }
  
  .folder-card-actions {
    display: flex;
    gap: 4px;
  }
  
  /* Breadcrumb mobile */
  .breadcrumb {
    flex-wrap: wrap;
    gap: 4px;
    font-size: 14px;
  }
  
  .breadcrumb-item {
    padding: 4px 8px;
    border-radius: 4px;
  }
  
  /* Modal adjustments */
  dialog article {
    margin: 8px;
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    overflow-y: auto;
  }
  
  dialog header {
    padding: 12px 16px;
  }
  
  dialog footer {
    padding: 12px 16px;
    flex-direction: column;
    gap: 8px;
  }
  
  dialog footer button {
    width: 100%;
    padding: 12px;
    min-height: 44px;
  }
  
  /* File details modal mobile */
  #file-details-content .grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .file-detail-value {
    font-size: 12px;
    padding: 6px 8px;
    word-break: break-all;
  }
  
  /* Form adjustments */
  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  input, select, button {
    padding: 12px;
    font-size: 16px; /* Prevents zoom on iOS */
    min-height: 44px;
  }
  
  /* File input styling */
  .file-label {
    width: 100%;
    justify-content: center;
    padding: 12px;
    min-height: 44px;
  }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  .files-table {
    display: table;
  }
  
  .files-mobile {
    display: none;
  }
  
  /* Adjust table for tablet */
  table {
    font-size: 13px;
  }
  
  thead th, tbody td {
    padding: 6px 8px;
  }
  
  .actions {
    white-space: nowrap;
  }
  
  .actions button {
    padding: 4px 6px;
    min-width: 32px;
    min-height: 32px;
  }
}

/* Desktop - show full table */
@media (min-width: 1025px) {
  .files-table {
    display: table;
  }
  
  .files-mobile {
    display: none;
  }
  
  .icon-btn .btn-text {
    display: inline;
  }
}

/* Touch improvements for all devices */
@media (hover: none) and (pointer: coarse) {
  /* Touch device optimizations */
  button, .icon-btn, .file-name-clickable {
    min-height: 44px;
    min-width: 44px;
  }
  
  .actions button {
    min-width: 40px;
    min-height: 40px;
  }
  
  /* Increase touch targets */
  .breadcrumb-item {
    padding: 8px 12px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}


/* About modal styling */
.about-section {
  margin-bottom: 24px;
}

.about-section h3 {
  color: var(--primary);
  margin-bottom: 12px;
  font-size: 18px;
}

.about-section h4 {
  color: var(--text);
  margin-bottom: 8px;
  font-size: 16px;
}

.about-section p {
  margin-bottom: 12px;
  line-height: 1.6;
}

.about-section ul {
  margin-left: 20px;
  margin-bottom: 12px;
}

.about-section li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.toolbar-explanation {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.toolbar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.toolbar-item strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 14px;
}

.toolbar-item p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.contact-info {
  margin-bottom: 16px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.contact-info h4 {
  margin-bottom: 12px;
  color: var(--primary);
}

.contact-info p {
  margin-bottom: 12px;
  font-size: 14px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.contact-links a:hover {
  background: var(--border);
  border-color: var(--primary);
}

.contact-links a i {
  width: 16px;
  height: 16px;
}

/* Mobile responsive for About modal */
@media (max-width: 768px) {
  .toolbar-explanation {
    gap: 12px;
  }
  
  .toolbar-item {
    padding: 10px;
  }
  
  .contact-links {
    gap: 6px;
  }
  
  .contact-links a {
    padding: 10px 12px;
    font-size: 13px;
  }
}


/* Disclaimer section styling */
.disclaimer {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid var(--danger);
  border-radius: 8px;
  padding: 16px;
  margin-top: 24px;
}

.disclaimer h3 {
  color: var(--danger);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.disclaimer-content p {
  margin-bottom: 12px;
  line-height: 1.6;
}

.disclaimer-content p:last-child {
  margin-bottom: 0;
}

.disclaimer strong {
  color: var(--danger);
  font-weight: 600;
}

/* Blockchain timestamping section */
.about-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.about-section h3:has-text("Blockchain Timestamping") {
  color: var(--primary);
}


/* Renew confirmation modal styling */
.renew-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.renew-file-info {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
}

.renew-file-info h4 {
  color: var(--primary);
  margin-bottom: 12px;
  font-size: 16px;
}

.renew-file-info p {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.renew-file-info p:last-child {
  margin-bottom: 0;
}

.renew-file-info strong {
  color: var(--text);
  font-weight: 600;
}

.renew-warning {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid var(--warn);
  border-radius: 6px;
  padding: 12px;
}

.renew-warning p {
  margin: 0;
  font-size: 13px;
  color: var(--warn);
  line-height: 1.4;
}

.renew-warning strong {
  color: var(--warn);
  font-weight: 600;
}

/* Renew button with spinner */
#renew-confirm-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
}

#renew-confirm-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Mobile responsive for renew modal */
@media (max-width: 768px) {
  .renew-file-info {
    padding: 12px;
  }
  
  .renew-file-info h4 {
    font-size: 15px;
  }
  
  .renew-file-info p {
    font-size: 13px;
  }
  
  .renew-warning {
    padding: 10px;
  }
  
  .renew-warning p {
    font-size: 12px;
  }
}


/* Renew success and error states */
.renew-success, .renew-error {
  text-align: center;
  padding: 20px;
}

.renew-success .success-icon, .renew-error .error-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.renew-success h4 {
  color: var(--success);
  margin-bottom: 16px;
  font-size: 18px;
}

.renew-error h4 {
  color: var(--danger);
  margin-bottom: 16px;
  font-size: 18px;
}

.renew-success p, .renew-error p {
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.renew-success p:last-child, .renew-error p:last-child {
  margin-bottom: 0;
}

.renew-success strong, .renew-error strong {
  color: var(--text);
  font-weight: 600;
}

.success-note, .error-note {
  font-style: italic;
  color: var(--muted);
  font-size: 13px;
  margin-top: 16px;
}

.error-message {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--danger);
  border-radius: 4px;
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: var(--danger);
  word-break: break-all;
  margin: 12px 0;
}

#renew-retry-btn {
  margin-top: 16px;
  background: var(--primary);
  color: white;
  border: 1px solid var(--primary);
}

#renew-retry-btn:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* Mobile responsive for feedback states */
@media (max-width: 768px) {
  .renew-success, .renew-error {
    padding: 16px;
  }
  
  .renew-success .success-icon, .renew-error .error-icon {
    font-size: 40px;
  }
  
  .renew-success h4, .renew-error h4 {
    font-size: 16px;
  }
  
  .renew-success p, .renew-error p {
    font-size: 13px;
  }
  
  .success-note, .error-note {
    font-size: 12px;
  }
  
  .error-message {
    font-size: 11px;
    padding: 10px;
  }
}


/* About page list styling */
.about-section ul {
  margin: 12px 0;
  padding-left: 20px;
}

.about-section li {
  margin-bottom: 8px;
  line-height: 1.5;
  font-size: 14px;
}

.about-section li strong {
  color: var(--primary);
  font-weight: 600;
}

/* Mobile responsive for about lists */
@media (max-width: 768px) {
  .about-section ul {
    margin: 10px 0;
    padding-left: 16px;
  }
  
  .about-section li {
    margin-bottom: 6px;
    font-size: 13px;
  }
}


/* Main page footer */
.main-footer {
  background: var(--panel);
  border-top: 1px solid var(--border);
  padding: 20px;
  margin-top: 40px;
  text-align: center;
}

.footer-content p {
  margin: 8px 0;
  font-size: 14px;
  color: var(--muted);
}

.footer-content p:first-child {
  font-size: 16px;
  color: var(--primary);
  font-weight: 600;
}

.footer-content a {
  color: var(--primary);
  text-decoration: none;
}

.footer-content a:hover {
  text-decoration: underline;
}

/* Mobile responsive for main footer */
@media (max-width: 768px) {
  .main-footer {
    padding: 16px;
    margin-top: 20px;
  }
  
  .footer-content p {
    font-size: 13px;
  }
  
  .footer-content p:first-child {
    font-size: 15px;
  }
}



/* Import Modal Styles */
#import-modal {
  max-width: 600px;
}

#import-modal .import-info {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--surface);
  border-radius: 6px;
  border: 1px solid var(--border);
}

#import-modal .import-info h4 {
  margin: 0 0 0.5rem 0;
  color: var(--primary);
  font-size: 1.1rem;
}

#import-modal .import-info p {
  margin: 0.5rem 0;
  color: var(--text-muted);
  line-height: 1.5;
}

#import-modal .import-info ul {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

#import-modal .import-info li {
  margin: 0.25rem 0;
  color: var(--text-muted);
}

#import-modal .import-file-section {
  margin: 1.5rem 0;
}

#import-modal .import-file-section label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text);
}

#import-modal .import-file-section input[type="file"] {
  width: 100%;
  margin: 0.5rem 0;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-family);
}

#import-modal .import-file-section small {
  display: block;
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

#import-modal .import-options {
  margin: 1.5rem 0;
}

#import-modal .import-options h5 {
  margin: 0 0 1rem 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

#import-modal .import-options label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  padding: 1rem;
  border-radius: 6px;
  transition: background-color 0.2s;
  border: 1px solid var(--border);
  background: var(--panel);
  margin-bottom: 0.75rem;
}

#import-modal .import-options label:hover {
  background: var(--border);
}

#import-modal .import-options input[type="radio"] {
  margin: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  flex-shrink: 0;
  margin-top: 0.125rem; /* Slight offset to align with first line of text */
}

#import-modal .import-options input[type="radio"]:checked + span {
  color: var(--primary);
}

#import-modal .import-options span {
  flex: 1;
  line-height: 1.4;
}

#import-modal .import-options span strong {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

#import-modal .import-options span small {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.3;
}

/* File Selection Styles */
#import-modal .file-selection {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--surface);
  border-radius: 6px;
  border: 1px solid var(--border);
}

#import-modal .file-selection h5 {
  margin: 0 0 1rem 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

#import-modal .file-selection-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

#import-modal .file-selection-controls .btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

#import-modal .selected-count {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

#import-modal .file-list-container {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--panel);
}

#import-modal .file-list {
  padding: 0.5rem;
}

#import-modal .file-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 4px;
  transition: background-color 0.2s;
  margin-bottom: 0.25rem;
}

#import-modal .file-item:hover {
  background: var(--border);
}

#import-modal .file-item:last-child {
  margin-bottom: 0;
}

#import-modal .file-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

#import-modal .file-item-info {
  flex: 1;
  min-width: 0;
}

#import-modal .file-item-name {
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.25rem;
  word-break: break-word;
}

#import-modal .file-item-details {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

#import-modal .file-item-folder {
  color: var(--primary);
  font-weight: 500;
}

#import-modal .file-item-size {
  color: var(--text-muted);
}

#import-modal .file-item-date {
  color: var(--text-muted);
}

/* Renew Modal Styles */
#renew-modal {
  max-width: 700px;
}

#renew-modal .renew-info {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--surface);
  border-radius: 6px;
  border: 1px solid var(--border);
}

#renew-modal .renew-info h4 {
  margin: 0 0 0.5rem 0;
  color: var(--primary);
  font-size: 1.1rem;
}

#renew-modal .renew-info p {
  margin: 0.5rem 0;
  color: var(--text-muted);
  line-height: 1.5;
}

#renew-modal .renew-info ul {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

#renew-modal .renew-info li {
  margin: 0.25rem 0;
  color: var(--text-muted);
}

#renew-modal .renew-settings {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--surface);
  border-radius: 6px;
  border: 1px solid var(--border);
}

#renew-modal .renew-settings h5 {
  margin: 0 0 1rem 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

#renew-modal .expiring-files {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--surface);
  border-radius: 6px;
  border: 1px solid var(--border);
}

#renew-modal .expiring-files h5 {
  margin: 0 0 1rem 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

#renew-modal .expiring-files-list {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--panel);
  padding: 0.5rem;
}

#renew-modal .expiring-file-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 4px;
  transition: background-color 0.2s;
  margin-bottom: 0.25rem;
  border: 1px solid var(--border);
  background: var(--card-background);
}

#renew-modal .expiring-file-item:hover {
  background: var(--hover-background);
}

#renew-modal .expiring-file-item:last-child {
  margin-bottom: 0;
}

#renew-modal .expiring-file-info {
  flex: 1;
  min-width: 0;
}

#renew-modal .expiring-file-name {
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.25rem;
  word-break: break-word;
}

#renew-modal .expiring-file-details {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

#renew-modal .expiring-file-folder {
  color: var(--primary);
  font-weight: 500;
}

#renew-modal .expiring-file-expires {
  color: var(--warning);
  font-weight: 500;
}

#renew-modal .expiring-file-size {
  color: var(--text-muted);
}

#renew-modal .no-expiring-files {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-style: italic;
}

#renew-modal .no-expiring-files p {
  margin: 0;
}

#import-status {
  margin-top: 1rem;
  padding: 0.5rem;
  border-radius: 4px;
  background: var(--success);
  color: var(--text);
}

#import-status.error {
  background: var(--danger);
}

/* Export Modal Styles */
#export-modal {
  max-width: 600px;
}

#export-modal .export-info {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--surface);
  border-radius: 6px;
  border: 1px solid var(--border);
}

#export-modal .export-info h4 {
  margin: 0 0 0.5rem 0;
  color: var(--primary);
  font-size: 1.1rem;
}

#export-modal .export-info p {
  margin: 0.5rem 0;
  color: var(--text-muted);
  line-height: 1.5;
}

#export-modal .export-info ul {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

#export-modal .export-info li {
  margin: 0.25rem 0;
  color: var(--text-muted);
}

#export-modal .export-filename {
  margin-top: 1rem;
}

#export-modal .export-filename label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text);
}

#export-modal .export-filename input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-family);
  font-size: 1rem;
}

#export-modal .export-filename input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
}

#export-modal .export-filename small {
  display: block;
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}
