/* TransferFiles — Site Styles */

:root {
  --sidebar-width: 220px;
  --topnav-height: 56px;
}

/* Layout */
body {
  min-height: 100vh;
}

.app-wrapper {
  display: flex;
  min-height: calc(100vh - var(--topnav-height));
}

.app-sidebar {
  width: var(--sidebar-width);
  min-height: calc(100vh - var(--topnav-height));
  background: #f8f9fa;
  border-right: 1px solid #dee2e6;
  padding: 1.25rem 0;
  flex-shrink: 0;
}

.app-sidebar .nav-link {
  padding: 0.5rem 1.25rem;
  color: #495057;
  font-weight: 500;
  border-left: 3px solid transparent;
}

.app-sidebar .nav-link:hover {
  background: #e9ecef;
  color: #212529;
}

.app-sidebar .nav-link.active {
  background: #e8f4f8;
  color: #2c3e50;
  border-left-color: #2c3e50;
}

.app-sidebar .nav-link i {
  width: 20px;
  margin-right: 8px;
  text-align: center;
}

.app-sidebar .sidebar-section {
  padding: 0 1.25rem;
  margin-bottom: 1rem;
}

.app-sidebar .sidebar-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6c757d;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.app-content {
  flex: 1;
  padding: 1.5rem 2rem;
  min-width: 0;
}

/* Navbar */
.navbar-brand {
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.5px;
}

.storage-badge {
  font-size: 0.8rem;
  padding: 4px 10px;
  background: #ecf0f1;
  border-radius: 20px;
  color: #495057;
}

.storage-badge i {
  color: #27ae60;
}

/* Tables */
.table-transfers th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6c757d;
  font-weight: 600;
  border-bottom-width: 2px;
}

.table-transfers td {
  vertical-align: middle;
  font-size: 0.9rem;
}

.table-transfers .btn-star {
  background: none;
  border: none;
  padding: 2px 4px;
  cursor: pointer;
  font-size: 1rem;
  color: #ccc;
  transition: color 0.15s;
}

.table-transfers .btn-star:hover,
.table-transfers .btn-star.starred {
  color: #f1c40f;
}

.table-transfers .btn-delete {
  opacity: 0;
  transition: opacity 0.15s;
}

.table-transfers tr:hover .btn-delete {
  opacity: 1;
}

.detail-icon {
  font-size: 0.8rem;
  color: #6c757d;
  margin-right: 6px;
}

/* Widget Management */
.widget-list-panel {
  width: 220px;
  min-height: calc(100vh - var(--topnav-height));
  background: #f8f9fa;
  border-right: 1px solid #dee2e6;
  flex-shrink: 0;
}

.widget-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
  transition: background 0.15s;
}

.widget-list-item:hover {
  background: #e9ecef;
}

.widget-list-item.active {
  background: #d4edfc;
  font-weight: 600;
}

.widget-settings-panel {
  flex: 1;
  padding: 1.5rem 2rem;
  overflow-y: auto;
}

.widget-preview-panel {
  width: 440px;
  background: #f1f3f5;
  border-left: 1px solid #dee2e6;
  padding: 1.25rem;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.widget-preview-frame {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
  flex: 1;
}

/* Public Widget Styles */
.widget-page {
  min-height: 100vh;
  background: #f4f6f9;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 1rem;
}

.widget-card {
  width: 100%;
  max-width: 480px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

/* Widget Theme: Light */
.widget-theme-light {
  background: #fff;
}
.widget-theme-light .widget-top-bar {
  background: #fff;
  color: #333;
  border-bottom: 1px solid #eee;
}
.widget-theme-light .widget-dropzone {
  border: 2px dashed #27ae60;
  color: #888;
  background: #f9fff9;
}
.widget-theme-light .widget-dropzone:hover,
.widget-theme-light .widget-dropzone.drag-over {
  background: #eafbea;
  border-color: #1e8449;
}
.widget-theme-light .btn-widget-action {
  background: #27ae60;
  color: #fff;
  border: none;
}
.widget-theme-light .btn-widget-action:hover {
  background: #219a52;
}
.widget-theme-light .btn-widget-submit {
  background: #27ae60;
  color: #fff;
  font-weight: 700;
}

/* Widget Theme: Dark */
.widget-theme-dark {
  background: #2c2c2c;
  color: #eee;
}
.widget-theme-dark .widget-top-bar {
  background: #222;
  color: #eee;
  border-bottom: 1px solid #444;
}
.widget-theme-dark .widget-dropzone {
  border: 2px dashed #666;
  color: #aaa;
  background: #353535;
}
.widget-theme-dark .widget-dropzone:hover,
.widget-theme-dark .widget-dropzone.drag-over {
  background: #3a3a3a;
  border-color: #999;
}
.widget-theme-dark .btn-widget-action {
  background: #444;
  color: #fff;
  border: none;
}
.widget-theme-dark .btn-widget-action:hover {
  background: #555;
}
.widget-theme-dark .btn-widget-submit {
  background: #444;
  color: #fff;
  font-weight: 700;
}
.widget-theme-dark .form-control {
  background: #3a3a3a;
  border-color: #555;
  color: #eee;
}
.widget-theme-dark .widget-terms {
  color: #aaa;
}

/* Widget Theme: Gold */
.widget-theme-gold {
  background: #faf0d7;
  color: #4a3b1f;
}
.widget-theme-gold .widget-top-bar {
  background: #f5e6c8;
  color: #4a3b1f;
  border-bottom: 1px solid #e0d0a8;
}
.widget-theme-gold .widget-dropzone {
  border: 2px dashed #c8a84e;
  color: #8a7340;
  background: #fdf6e3;
}
.widget-theme-gold .widget-dropzone:hover,
.widget-theme-gold .widget-dropzone.drag-over {
  background: #f5ecd0;
  border-color: #a88b30;
}
.widget-theme-gold .btn-widget-action {
  background: #c8a84e;
  color: #fff;
  border: none;
}
.widget-theme-gold .btn-widget-action:hover {
  background: #b89840;
}
.widget-theme-gold .btn-widget-submit {
  background: #c8a84e;
  color: #fff;
  font-weight: 700;
}
.widget-theme-gold .form-control {
  background: #fdf6e3;
  border-color: #e0d0a8;
  color: #4a3b1f;
}
.widget-theme-gold .widget-terms {
  color: #8a7340;
}

/* Widget shared structure */
.widget-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 0.95rem;
}

.widget-top-bar .file-info {
  font-weight: 400;
  font-size: 0.85rem;
  opacity: 0.7;
}

.widget-body {
  padding: 20px 16px;
}

.widget-dropzone {
  min-height: 140px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 12px;
}

.widget-dropzone i {
  font-size: 2.5rem;
  margin-bottom: 8px;
  opacity: 0.5;
}

.widget-dropzone span {
  font-size: 1rem;
  font-style: italic;
  opacity: 0.7;
}

.widget-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.btn-widget-action {
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
}

.widget-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.widget-fields .form-control {
  font-size: 0.85rem;
  padding: 8px 12px;
}

.widget-terms {
  text-align: center;
  font-size: 0.75rem;
  color: #888;
  margin-bottom: 12px;
}

.widget-terms a {
  color: inherit;
  text-decoration: underline;
}

.btn-widget-submit {
  display: block;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 4px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-widget-submit:hover {
  opacity: 0.9;
}

/* File list in widget */
.widget-file-list {
  max-height: 160px;
  overflow-y: auto;
  margin-bottom: 12px;
  border-radius: 4px;
}

.widget-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.widget-file-item:last-child {
  border-bottom: none;
}

.widget-file-item .file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.widget-file-item .file-size {
  margin-left: 12px;
  opacity: 0.6;
  white-space: nowrap;
}

.widget-file-item .btn-remove {
  margin-left: 8px;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.5;
  font-size: 0.85rem;
  padding: 0 4px;
}

.widget-file-item .btn-remove:hover {
  opacity: 1;
  color: #e74c3c;
}

/* Progress bar */
.widget-progress {
  margin-bottom: 12px;
  display: none;
}

.widget-progress .progress {
  height: 24px;
  border-radius: 4px;
}

/* Login page */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f6f9;
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 2.5rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.login-card h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.login-card .subtitle {
  color: #6c757d;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

/* Cards */
.info-card {
  border-radius: 8px;
  border: 1px solid #dee2e6;
  padding: 1.25rem;
  background: #fff;
}

.info-card h6 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  margin-bottom: 0.75rem;
}

/* Transfer detail */
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.file-card {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  transition: box-shadow 0.15s;
  cursor: pointer;
}

.file-card:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.file-card .file-icon {
  font-size: 2.5rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.file-card .file-name {
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-card .file-size {
  font-size: 0.75rem;
  color: #6c757d;
}

.file-card .btn-download {
  margin-top: 0.5rem;
  font-size: 0.75rem;
}

/* Misc */
.text-muted-sm {
  font-size: 0.8rem;
  color: #6c757d;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #adb5bd;
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.empty-state p {
  font-size: 1.1rem;
}
