/* File Service Styles */
:root {
  --primary-color: #0078d4;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --error-color: #dc3545;
  --bg-color: #f8f9fa;
  --border-color: #dee2e6;
  --text-color: #212529;
  --folder-color: #ffc107;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  background: var(--primary-color);
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 600;
}

#auth-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#user-info {
  font-size: 0.9rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s;
}

.btn:hover {
  opacity: 0.9;
}

.btn-primary, header .btn {
  background: white;
  color: var(--primary-color);
}

.btn-secondary {
  background: transparent;
  border: 1px solid white;
  color: white;
}

/* Main content */
main {
  flex: 1;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Breadcrumb */
#breadcrumb {
  margin-bottom: 1rem;
}

#breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#breadcrumb li:not(:last-child)::after {
  content: '/';
  margin-left: 0.5rem;
  color: var(--secondary-color);
}

#breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
}

#breadcrumb a:hover {
  text-decoration: underline;
}

/* Tier selector */
#tier-selector {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: white;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

#tier-selector label {
  margin-right: 1.5rem;
  cursor: pointer;
}

#auth-required-hint {
  font-size: 0.8rem;
  color: var(--secondary-color);
}

/* File list */
#file-list-container {
  background: white;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

#file-list {
  width: 100%;
  border-collapse: collapse;
}

#file-list th,
#file-list td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

#file-list th {
  background: var(--bg-color);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--secondary-color);
}

#file-list tbody tr:hover {
  background: #f1f3f5;
}

#file-list .name-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#file-list .icon {
  font-size: 1.2rem;
}

#file-list .folder .icon {
  color: var(--folder-color);
}

#file-list a {
  color: var(--primary-color);
  text-decoration: none;
}

#file-list a:hover {
  text-decoration: underline;
}

#loading, #empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--secondary-color);
}

.error {
  padding: 1rem;
  background: #f8d7da;
  color: var(--error-color);
  border-radius: 4px;
  margin: 1rem;
}

/* Upload section */
#upload-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: white;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

#upload-section h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.form-group input[type="text"],
.form-group select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
}

.form-group input[type="file"] {
  font-size: 0.9rem;
}

#upload-status {
  margin-top: 1rem;
  font-size: 0.9rem;
}

#upload-status.success {
  color: var(--success-color);
}

#upload-status.error {
  color: var(--error-color);
  background: transparent;
  padding: 0;
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  color: var(--secondary-color);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-color);
}

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

/* Responsive */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 1rem;
  }
  
  main {
    padding: 1rem;
  }
  
  #file-list th:nth-child(2),
  #file-list td:nth-child(2),
  #file-list th:nth-child(3),
  #file-list td:nth-child(3) {
    display: none;
  }
}
