@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&display=swap');

:root {
    --bg: #f4f7f2;
    --surface: #ffffff;
    --surface-alt: #edf4ea;
    --text: #112015;
    --muted: #5f6f62;
    --brand: #0f766e;
    --brand-dark: #0b5b54;
    --accent: #f59e0b;
    --danger: #b91c1c;
    --shadow: 0 12px 30px rgba(16, 24, 16, 0.08);
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 0% 0%, #d4ece7 0%, rgba(212, 236, 231, 0) 40%),
        radial-gradient(circle at 100% 100%, #fcecc8 0%, rgba(252, 236, 200, 0) 45%),
        var(--bg);
    min-height: 100vh;
}

.container {
    width: min(1080px, 92vw);
    margin: 0 auto;
}

.narrow {
    width: min(660px, 92vw);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background: rgba(244, 247, 242, 0.88);
    border-bottom: 1px solid rgba(95, 111, 98, 0.25);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.brand {
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    letter-spacing: 0.02em;
    font-size: 1.2rem;
}

.nav {
    display: flex;
    gap: 1rem;
}

.nav a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 500;
}

.nav a:hover {
    color: var(--brand);
}

main {
    padding: 1.5rem 0 2.5rem;
}

.panel,
.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.panel-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid #d4e6da;
    background: linear-gradient(115deg, #ffffff 0%, #eff8f4 100%);
}

h1,
h2 {
    margin: 0 0 0.55rem;
}

p {
    margin: 0;
}

.muted {
    color: var(--muted);
}

.helper {
    margin-top: 0.9rem;
}

.form-grid {
    display: grid;
    gap: 0.9rem;
}

label {
    display: grid;
    gap: 0.4rem;
    font-weight: 500;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.72rem;
    border: 1px solid #d3ddd4;
    border-radius: 12px;
    background: #fff;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(15, 118, 110, 0.22);
    border-color: var(--brand);
}

button,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 12px;
    padding: 0.68rem 0.95rem;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
}

button,
.btn-secondary {
    background: var(--brand);
    color: #fff;
}

button:hover,
.btn-secondary:hover {
    background: var(--brand-dark);
}

.btn-ghost {
    background: #edf4ea;
    color: var(--text);
}

.filters {
    display: flex;
    gap: 0.8rem;
    align-items: end;
    margin-bottom: 1rem;
}

.grow {
    flex: 1;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 0.72rem;
    border-bottom: 1px solid #e7ede8;
    vertical-align: top;
}

.actions {
    display: flex;
    gap: 0.7rem;
    align-items: center;
}

.actions a {
    text-decoration: none;
}

.link-button {
    background: none;
    border: none;
    color: var(--danger);
    padding: 0;
}

.status-pill {
    display: inline-block;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    background: #e4ece4;
}

.status-applied,
.status-follow-up {
    background: #d7f3ef;
    color: #0b5b54;
}

.status-interview {
    background: #faeecf;
    color: #8a4e00;
}

.status-offer {
    background: #d8f7d9;
    color: #165b20;
}

.status-rejected {
    background: #ffe1e1;
    color: #8c1b1b;
}

.status-saved {
    background: #e5e9ff;
    color: #2a3d96;
}

.flash {
    margin-top: 1rem;
    border-radius: 12px;
    padding: 0.8rem 1rem;
}

.flash-success {
    background: #dcfce7;
    color: #14532d;
}

.flash-info {
    background: #dbeafe;
    color: #1e3a8a;
}

.flash-warning {
    background: #fef3c7;
    color: #78350f;
}

.flash-error {
    background: #fee2e2;
    color: #7f1d1d;
}

.details {
    display: grid;
    gap: 0.4rem;
    grid-template-columns: 150px 1fr;
}

.details dt {
    color: var(--muted);
    font-weight: 600;
}

.note-block {
    white-space: pre-wrap;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.7rem;
}

.timeline li {
    border-left: 3px solid var(--accent);
    background: var(--surface-alt);
    border-radius: 10px;
    padding: 0.7rem 0.8rem;
}

.timeline-date {
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.feature-list {
    margin: 0;
    padding-left: 1.1rem;
}

.empty {
    text-align: center;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    gap: 0.6rem;
}

.site-footer {
    padding: 1.1rem 0 1.8rem;
    color: var(--muted);
}

@media (max-width: 860px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .panel-hero {
        flex-direction: column;
        align-items: start;
    }
}

@media (max-width: 680px) {
    .header-inner {
        align-items: start;
        flex-direction: column;
        gap: 0.55rem;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .actions {
        flex-wrap: wrap;
    }

    .details {
        grid-template-columns: 1fr;
    }
}
