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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

header {
    background: #1b2a4a;
    color: #fff;
    padding: 1.5rem 0;
    border-bottom: 3px solid #e8952e;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.header-brand {
    flex-shrink: 0;
}

.brand-link {
    text-decoration: none;
    color: inherit;
}

.brand-link:hover h1 {
    color: #e8952e;
}

header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: color 0.15s;
}

header .tagline {
    color: #b0bec5;
    margin-top: 0.15rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ── Main navigation ── */
.main-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.main-nav a {
    color: #d0dae6;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}

.main-nav a:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.main-nav a.active {
    background: rgba(232, 149, 46, 0.2);
    color: #e8952e;
}

.nav-divider {
    display: inline-block;
    width: 1px;
    height: 1.25rem;
    background: rgba(255,255,255,0.2);
    margin: 0 0.25rem;
    vertical-align: middle;
}

.main-nav .btn {
    margin-left: 0.5rem;
}

main {
    flex: 1;
    padding: 2.5rem 0;
}

.hero {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: #f4f6f8;
    border-radius: 6px;
    border: 1px solid #dde3e9;
    margin-bottom: 2.5rem;
}

.hero h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #1b2a4a;
}

.hero p {
    color: #555;
    font-size: 1.05rem;
    max-width: 640px;
    margin: 0 auto;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: #fff;
    border: 1px solid #dde3e9;
    border-radius: 6px;
    padding: 1.5rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    color: #1b2a4a;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: #555;
    font-size: 0.95rem;
}

footer {
    background: #1b2a4a;
    padding: 1.25rem 0;
    text-align: center;
    color: #7a8a9e;
    font-size: 0.8rem;
}

/* ── Page toolbar ── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
}

.page-header h2 {
    font-size: 1.4rem;
    color: #1b2a4a;
}

/* ── Buttons ── */
.btn {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-primary {
    background: #e8952e;
    color: #fff;
    border-color: #e8952e;
}

.btn-primary:hover {
    background: #cf7f20;
    border-color: #cf7f20;
}

.btn-outline {
    background: transparent;
    color: #1b2a4a;
    border-color: #1b2a4a;
}

.btn-outline:hover {
    background: #1b2a4a;
    color: #fff;
}

.btn-sm {
    padding: 0.25rem 0.65rem;
    font-size: 0.8rem;
}

/* ── Forms ── */
.form-card {
    background: #fff;
    border: 1px solid #dde3e9;
    border-radius: 6px;
    padding: 2rem;
    max-width: 560px;
}

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

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1b2a4a;
    margin-bottom: 0.35rem;
}

.form-group input,
.form-group select {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #c4cdd6;
    border-radius: 4px;
    font-size: 0.95rem;
    color: #333;
    background: #fafbfc;
    transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #e8952e;
    background: #fff;
}

.form-group .helptext {
    display: block;
    font-size: 0.8rem;
    color: #7a8a9e;
    margin-top: 0.25rem;
}

.errorlist {
    list-style: none;
    color: #c0392b;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* ── Tables ── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid #dde3e9;
}

.data-table th {
    color: #1b2a4a;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #f4f6f8;
}

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

.data-table tr:hover td {
    background: #f9fbfc;
}

.table-wrap {
    border: 1px solid #dde3e9;
    border-radius: 6px;
    overflow: hidden;
}

/* ── Detail card ── */
.detail-card {
    background: #fff;
    border: 1px solid #dde3e9;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.detail-card-header {
    background: #f4f6f8;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #dde3e9;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1b2a4a;
}

.detail-row {
    display: flex;
    padding: 0.7rem 1.25rem;
    border-bottom: 1px solid #f0f2f5;
    font-size: 0.9rem;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    width: 180px;
    flex-shrink: 0;
    color: #7a8a9e;
    font-weight: 600;
    font-size: 0.83rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-top: 0.05rem;
}

.detail-value {
    flex: 1;
    color: #222;
    word-break: break-all;
}

/* ── API key ── */
.api-key-row {
    align-items: center;
    gap: 0.75rem;
}

.api-key-value {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    background: #f4f6f8;
    border: 1px solid #dde3e9;
    border-radius: 4px;
    padding: 0.3rem 0.65rem;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    color: #1b2a4a;
    flex: 1;
}

.copy-btn {
    flex-shrink: 0;
}

.copy-btn.copied {
    background: #27ae60;
    border-color: #27ae60;
    color: #fff;
}

/* ── Alert ── */
.alert {
    padding: 0.85rem 1.25rem;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
}

.alert-warning {
    background: #fff8e1;
    border-color: #f0c040;
    color: #7a5f00;
}

