:root {
  --bg: #ffffff;
  --surface: #fafafa;
  --border: #e4e4e7;
  --text-main: #09090b;
  --text-muted: #71717a;
  --accent: #09090b;
  --accent-hover: #27272a;
  --danger: #ef4444;
  --radius: 8px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.5;
  padding: 2rem 1rem;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  transition: filter 0.3s ease;
}

.blurred {
  filter: blur(8px);
  pointer-events: none;
}

/* Security Lock Modal */
.lock-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.lock-card {
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 2.5rem;
  border-radius: 12px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
}

.lock-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.lock-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.lock-card input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  text-align: center;
  letter-spacing: 2px;
}

.lock-card input:focus {
  border-color: var(--accent);
}

.btn-block {
  width: 100%;
  margin-top: 0 !important;
}

.lock-error {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 1rem;
  font-weight: 500;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.badge {
  background-color: var(--surface);
  border: 1px solid var(--border);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-logout {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: var(--danger);
  color: #ffffff;
  border-color: var(--danger);
}

/* Upload Card */
.upload-card {
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
  transition: border-color 0.2s ease;
}

.upload-card:hover {
  border-color: var(--text-main);
}

.file-drop-zone {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
}

.file-name-preview {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Buttons */
.btn {
  font-family: inherit;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 1rem;
}

.btn-primary {
  background-color: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-action {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  margin-left: 0.25rem;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
}

.btn-action:hover {
  background: var(--text-main);
  color: #ffffff;
}

.btn-danger {
  color: var(--danger);
  border-color: #fecaca;
}

.btn-danger:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}

/* Search Input */
.search-bar {
  margin-bottom: 1rem;
}

.search-bar input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-main);
  outline: none;
}

/* Table */
.table-container {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

th {
  background: var(--surface);
  color: var(--text-muted);
  padding: 0.85rem 1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}

.text-right {
  text-align: right;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 2.5rem;
}

.status-msg {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
}

.hidden {
  display: none !important;
}

/* Modal */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 95%;
  max-width: 1100px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.modal-content.is-fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  border-radius: 0 !important;
  border: none !important;
}

.modal-header {
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-fullscreen {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-fullscreen:hover {
  background: var(--text-main);
  color: #ffffff;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-body { flex: 1; }
.modal-body iframe { width: 100%; height: 100%; }