:root {
  --bg-color: #0f172a;
  --text-color: #f1f5f9;
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --success: #10b981;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background: var(--bg-color);
  background-image: radial-gradient(circle at top right, rgba(59, 130, 246, 0.2), transparent 40%),
                    radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.1), transparent 40%);
  background-attachment: fixed;
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none !important;
}

.view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#login-view {
  justify-content: center;
  align-items: center;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card {
  padding: 2rem;
  width: 100%;
  max-width: 400px;
}

h1, h2 {
  margin-bottom: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.input-group {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-group label {
  font-size: 0.875rem;
  color: #cbd5e1;
}

input[type="password"] {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(15, 23, 42, 0.5);
  color: white;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

input[type="password"]:focus {
  border-color: var(--primary);
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

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

.btn.primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn.outline {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-color);
  width: auto;
}

.btn.outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn.small {
  padding: 0.4rem 0.8rem;
  font-size: 0.875rem;
}

.btn.danger {
  background: var(--danger);
  color: white;
}

.btn.danger:hover {
  background: var(--danger-hover);
}

.error {
  color: var(--danger);
  margin-top: 1rem;
  font-size: 0.875rem;
  text-align: center;
}

.status-msg {
  margin-top: 1rem;
  font-size: 0.875rem;
  text-align: center;
  color: var(--success);
}

/* Dashboard Styles */
.glass-header {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-content h1 {
  margin: 0;
  font-size: 1.5rem;
}

.dashboard-content {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.upload-section.card, .files-section.card {
  max-width: 100%;
}

.drop-zone {
  border: 2px dashed var(--glass-border);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(15, 23, 42, 0.3);
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.1);
}

.drop-zone p {
  color: #94a3b8;
}

.hidden-input {
  display: none;
}

.files-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.files-header h2 {
  margin: 0;
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

select {
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--glass-border);
  background: var(--bg-color);
  color: var(--text-color);
  outline: none;
}

.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

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

th {
  color: #cbd5e1;
  font-weight: 500;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.actions {
  display: flex;
  gap: 0.5rem;
}

.truncate {
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
}

/* Tools Catalog Styles */
.tools-section {
  width: 100%;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.tool-card {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border-color: rgba(59, 130, 246, 0.3);
}

.tool-card h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #fff;
  font-weight: 600;
}

.tool-card p {
  color: #94a3b8;
  font-size: 0.875rem;
  line-height: 1.5;
  flex-grow: 1;
  margin: 0;
}

.tool-card .actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-start;
  margin-top: auto;
}

