:root {
    --navy: #0C1E48;
    --navy-deep: #061535;
    --navy-mid: #1A2B4A;
    --teal: #00A09A;
    --teal-dim: #007A75;
    --teal-soft: rgba(0, 160, 154, 0.12);
    --off-white: #F4F7FA;
    --white: #FFFFFF;
    --surface-1: #FFFFFF;
    --surface-2: #F4F7FA;
    --surface-3: #E9EEF4;
    --text-primary: #1A2B4A;
    --text-secondary: #3D5470;
    --text-muted: #7A90A8;
    --text-on-navy: #FFFFFF;
    --text-on-navy-muted: rgba(255, 255, 255, 0.62);
    --border: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.16);
    --border-on-navy: rgba(255, 255, 255, 0.12);
    --red: #C0392B;
    --amber: #B86A00;
    --green: #1F8A4C;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-8: 48px;
    --topbar-h: 56px;
    --primary-nav-h: 48px;
    --statusbar-h: 28px;
    --font-display: "Rajdhani", sans-serif;
    --font-body: "Source Sans 3", sans-serif;
    --font-mono: "DM Mono", "JetBrains Mono", monospace;
    --shadow-sm: 0 1px 2px rgba(12, 30, 72, 0.06);
    --shadow-md: 0 2px 8px rgba(12, 30, 72, 0.10);
    --shadow-lg: 0 8px 24px rgba(12, 30, 72, 0.14);
    --r-sm: 4px;
    --r-md: 6px;
    --r-lg: 10px;
}

body {
    margin:0;
}

a, a:visited, a:hover, a:active {
    color: var(--text-secondary);
    text-decoration: none; 
}

.paip-page-content {
    flex: 1;
    background: var(--off-white);
    min-height: calc(100vh - var(--topbar-h) - var(--primary-nav-h) - var(--statusbar-h));
    padding: var(--space-5);
    position: relative;
}

.paip-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
    gap: var(--space-3);
}

.paip-page-heading {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: var(--navy);
}

.paip-page-sub {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.paip-progression {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
    max-width: 920px;
    margin: 0 auto var(--space-5);
}

.paip-progression-step {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 12px 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.paip-progression-number {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--teal-dim);
    line-height: 1;
}

.paip-progression-name {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.paip-progression-note {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.paip-anchor-button {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--navy);
    color: var(--white);
    border: none;
    padding: 14px 24px;
    border-radius: var(--r-md);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
    flex-shrink: 0;
    min-width: 300px;
}

.paip-anchor-button:hover {
    background: var(--teal-dim);
    color:var(--white);
}

/* ── Buttons ───────────────────────────────────────────────────────────── */

.paip-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--navy);
    color: var(--white);
    border: none;
    padding: 8px 18px;
    border-radius: var(--r-md);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s;
    line-height: 1.4;
}

.paip-button:hover, .paip-button:visited:hover {
    background: var(--teal-dim);
    color: var(--white);
}

.paip-button:visited {
    color: var(--white);
}

.paip-button-secondary {
    background: transparent;
    color: var(--navy);
    border: 1.5px solid var(--border-strong);
}

.paip-button-secondary:hover, .paip-button-secondary:visited:hover {
    background: var(--surface-3);
    color: var(--navy);
}

.paip-button-secondary:visited {
    color: var(--navy);
}

.paip-button-danger {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: transparent;
    color: var(--red);
    border: 1.5px solid var(--red);
    padding: 5px 12px;
    border-radius: var(--r-md);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    line-height: 1.4;
}

.paip-button-danger:hover {
    background: var(--red);
    color: var(--white);
}

/* ── Form layout ───────────────────────────────────────────────────────── */

.paip-admin-create-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    max-width: 680px;
}

.paip-form-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    margin-bottom: var(--space-3);
}

.paip-form-field label {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.paip-form-field input[type="text"],
.paip-form-field input[type="email"],
.paip-form-field input[type="password"],
.paip-form-field select,
.paip-form-field textarea {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--white);
    border: 1.5px solid var(--border-strong);
    border-radius: var(--r-md);
    padding: 8px 12px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.paip-form-field input:focus,
.paip-form-field select:focus,
.paip-form-field textarea:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px var(--teal-soft);
}

.paip-form-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding-top: var(--space-2);
}

/* ── Section header (used above inline HTMX forms) ─────────────────────── */

.paip-section-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}