* { box-sizing: border-box; }

body {
    font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    background: #f4f6f8;
    color: #1f2937;
    margin: 0;
    padding: 24px;
}

.container {
    max-width: 960px;
    margin: 0 auto;
}

h1 {
    font-size: 22px;
    margin-bottom: 4px;
}

.subtitle {
    color: #6b7280;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 14px;
}

nav.tabs {
    margin-bottom: 20px;
}

nav.tabs a {
    display: inline-block;
    padding: 8px 16px;
    margin-right: 8px;
    border-radius: 6px;
    text-decoration: none;
    color: #374151;
    background: #e5e7eb;
    font-size: 14px;
}

nav.tabs a.active {
    background: #2563eb;
    color: #fff;
}

nav.tabs .user-badge {
    display: inline-block;
    padding: 8px 4px;
    margin-left: 8px;
    font-size: 13px;
    color: #6b7280;
}

nav.tabs .logout-link {
    background: #fee2e2;
    color: #991b1b;
}

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-wrap {
    width: 100%;
    max-width: 380px;
    padding: 16px;
}

.login-card {
    text-align: left;
}

.login-card h1 {
    font-size: 20px;
    margin-bottom: 4px;
}

.login-card form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
}

.card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.card h2 {
    font-size: 16px;
    margin-top: 0;
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 200px;
}

.form-group.grow-2 { flex: 2; }

label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

input[type="text"], input[type="url"], input[type="search"] {
    padding: 9px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

input:focus { outline: 2px solid #93c5fd; border-color: #2563eb; }

.btn {
    padding: 9px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
}

.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }

.btn-secondary { background: #e5e7eb; color: #374151; }
.btn-secondary:hover { background: #d1d5db; }

.btn-edit { background: #fef3c7; color: #92400e; margin-right: 6px; }
.btn-edit:hover { background: #fde68a; }

.btn-delete { background: #fee2e2; color: #991b1b; }
.btn-delete:hover { background: #fecaca; }

.form-message {
    margin-top: 10px;
    font-size: 13px;
    min-height: 18px;
}

.form-message.success { color: #15803d; }
.form-message.error { color: #b91c1c; }
.form-message.info { color: #1d4ed8; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th, td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid #e5e7eb;
}

th {
    color: #6b7280;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

td.actions-cell { white-space: nowrap; }

.ds-link {
    color: #2563eb;
    word-break: break-all;
    text-decoration: none;
}

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

.empty-row {
    text-align: center;
    color: #9ca3af;
    padding: 20px;
}

.hint {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.last-updated {
    font-size: 12px;
    color: #6b7280;
}

.download-link {
    text-decoration: none;
    display: inline-block;
}
