:root {
  --primary: #06b6d4;
  --primary-hover: #0891b2;
  --bg-color: #f8fafc;
  --surface: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --radius: 8px;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.05);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", Roboto, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--primary-hover);
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.user-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn:hover {
  background-color: var(--primary-hover);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}
.btn-outline {
  background-color: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  box-shadow: none;
}
.btn-outline:hover {
  background-color: var(--bg-color);
  color: var(--text-main);
  border-color: var(--text-muted);
  box-shadow: none;
}
.btn-ghost {
  background-color: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  box-shadow: none;
}
.btn-ghost:hover {
  background-color: var(--border);
  color: var(--text-main);
  transform: none;
  box-shadow: none;
}
.btn-danger {
  background-color: transparent;
  color: var(--danger);
  border: 1px solid transparent;
}
.btn-danger:hover {
  background-color: #fee2e2;
  color: var(--danger-hover);
  transform: none;
  box-shadow: none;
}

.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
}
.auth-card {
  background: var(--surface);
  padding: 3.5rem 3rem;
  border-radius: calc(var(--radius) * 2);
  box-shadow: var(--shadow);
  text-align: center;
  width: 100%;
  max-width: 420px;
}
.auth-card h1 {
  margin-bottom: 0.5rem;
  color: var(--text-main);
  font-size: 1.75rem;
}
@media (max-width: 480px) {
  .auth-card {
    padding: 2.5rem 1.5rem;
  }
}
.auth-card p {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
}
.btn-entra {
  width: 100%;
  padding: 0.875rem;
  background-color: #2F2F2F;
  border: 1px solid #2F2F2F;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-entra:hover {
  background-color: #1a1a1a;
  border-color: #1a1a1a;
}
.btn-entra svg {
  height: 22px;
  width: auto;
}

.upload-section {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  display: flex;
  align-items: flex-end;
  gap: 1rem;
}
.input-group {
  flex: 1;
}
.input-group label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
}
input[type="file"] {
  width: 100%;
  height: 48px;
  padding: 0.35rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background-color: var(--bg-color);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
input[type="file"]:hover {
  border-color: var(--primary);
  background-color: #ecfeff;
}
input[type="file"]::file-selector-button {
  height: 100%;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: calc(var(--radius) - 4px);
  padding: 0 1.25rem;
  margin-right: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}
input[type="file"]::file-selector-button:hover {
  background-color: var(--primary-hover);
}
.upload-section .btn {
  height: 48px;
}

.file-list-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.file-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.file-table th {
  padding: 0.6rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.file-table td {
  padding: 0;
  text-align: center;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.file-table th {
  background-color: var(--surface);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.file-table tr:last-child td {
  border-bottom: none;
}
.file-table tr:hover td {
  background-color: var(--bg-color);
}
.file-name {
  display: block;
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-name:hover {
  text-decoration: underline;
}
.file-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}
.inline-form {
  display: inline-flex;
  align-items: center;
  margin: 0;
}
.action-btn {
  height: 36px;
  line-height: 1;
  padding: 0 0.75rem;
}
.btn-icon {
  width: 36px;
  padding: 0;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
}
.page-link {
  padding: 0.5rem;
  min-width: 32px;
  text-align: center;
  border: none;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.9rem;
  background-color: transparent;
  transition: all 0.2s;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.page-link.active {
  color: var(--text-main);
  font-weight: 700;
}
.page-link:hover:not(.active) {
  background-color: var(--border);
  color: var(--text-main);
}

.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideIn 0.3s ease-out forwards;
}
.alert-success {
  background-color: #ecfeff;
  color: #0e7490;
  border: 1px solid #a5f3fc;
}
@keyframes slideIn {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.upload-form {
  display: flex;
  gap: 1rem;
  width: 100%;
  align-items: flex-end;
}
