* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f5f5f5;
    color: #222;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #263238;
    color: #fff;
    padding: 0.5rem 1rem;
}

.topbar .brand {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.topbar .btn-link {
    color: #fff;
    margin-left: 1rem;
    text-decoration: none;
}

.topbar .btn-link:hover {
    text-decoration: underline;
}

.main {
    max-width: 1100px;
    margin: 1.5rem auto;
    padding: 0 1rem 2rem;
}

.card {
    background: #fff;
    border-radius: 6px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    margin-bottom: 1.5rem;
}

h1, h2, h3 {
    margin-top: 0;
}

.auth-card {
    max-width: 400px;
    margin: 3rem auto;
}

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

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

.form-group input,
.code-textarea {
    width: 100%;
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-family: inherit;
}

.code-textarea {
    font-family: "Fira Code", "Consolas", "SF Mono", monospace;
    font-size: 0.9rem;
}

.btn-primary {
    background: #1976d2;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.btn-primary:hover {
    background: #1565c0;
}

.btn-link {
    background: none;
    border: none;
    padding: 0;
    color: #1976d2;
    cursor: pointer;
    text-decoration: none;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-danger {
    color: #c62828;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
}

.auth-switch {
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.75rem;
}

.table th, .table td {
    border-bottom: 1px solid #eee;
    padding: 0.5rem;
    text-align: left;
    font-size: 0.9rem;
}

.table th {
    font-weight: 600;
}

/* Upload area */
.upload-section {
    margin-bottom: 1.5rem;
}

.drop-zone {
    border: 2px dashed #90a4ae;
    border-radius: 6px;
    padding: 1.5rem;
    text-align: center;
    color: #607d8b;
    cursor: pointer;
    position: relative;
}

.drop-zone input[type="file"] {
    display: none;
}

.drop-zone.is-dragover {
    background: #eceff1;
    border-color: #1976d2;
}

#upload-status {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #555;
}

.meta {
    font-size: 0.85rem;
    color: #555;
}

/* Prism line numbers spacing */
pre[class*="language-"].line-numbers {
    padding-left: 3.5em;
}