@import url("https://fonts.googleapis.com/css2?family=Sora:wght@300;400;600;700&display=swap");

:root {
    --symbiotisk-black: #1a2625;
    --symbiotisk-green: #05884d;
    --symbiotisk-blue: #5e16f8;
    --symbiotisk-light-green: #9ed8bc;
    --symbiotisk-lighter-green: #e2f3eb;
    --symbiotisk-grey: #4d6260;
    --symbiotisk-medium-grey: #819896;
    --symbiotisk-mouse-grey: #b3c9c7;
    --symbiotisk-light-grey: #e8ebeb;
    --symbiotisk-bg: #f6f5f4;
    --symbiotisk-white: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Sora", "Segoe UI", Arial, sans-serif;
    color: var(--symbiotisk-black);
    background: var(--symbiotisk-bg);
    background-image:
        radial-gradient(61.13% 66.84% at 50.39% 55.06%, rgba(3, 166, 90, 0.25) 0%, rgba(3, 166, 90, 0.00) 100%),
        linear-gradient(178deg, #ffffff 0%, #9ed8bc 100%);
    background-attachment: fixed;
    font-size: 16px;
}

a {
    color: var(--symbiotisk-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    background: var(--symbiotisk-white);
    border-bottom: 1px solid var(--symbiotisk-light-grey);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    color: var(--symbiotisk-black);
}

.brand img {
    width: 28px;
    height: 28px;
    display: block;
}

.nav-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.inline-form {
    margin: 0;
    display: inline-flex;
    align-items: center;
}

.inline-form button {
    font-family: inherit;
}

.content {
    max-width: 1280px;
    width: 100%;
    margin: 24px auto;
    padding: 0 28px 48px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.page-header.page-header-meta {
    gap: 24px;
}

.page-header.page-header-meta .meta-table {
    width: auto;
    margin-left: auto;
    font-size: 12px;
}

.page-header.page-header-meta .meta-table th,
.page-header.page-header-meta .meta-table td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--symbiotisk-light-grey);
}

.page-header.page-header-meta .meta-table th {
    background: transparent;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--symbiotisk-grey);
    font-weight: 600;
}

.page-header.page-header-meta .meta-table td {
    text-align: right;
    font-weight: 600;
}

.card {
    background: var(--symbiotisk-white);
    border: 1px solid var(--symbiotisk-light-grey);
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 8px 18px rgba(24, 39, 75, 0.04);
}

.card h1 {
    margin-top: 0;
}

.card-narrow {
    max-width: 420px;
    margin: 60px auto 0;
}

.form {
    display: grid;
    gap: 16px;
}

.form.form-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.form .full-row {
    grid-column: 1 / -1;
}

label span {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--symbiotisk-grey);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--symbiotisk-mouse-grey);
    border-radius: 6px;
    font-size: 15px;
    background: var(--symbiotisk-white);
}

.update-formatter textarea {
    min-height: 280px;
}

.formatter-output {
    padding: 14px 16px;
    border: 1px solid var(--symbiotisk-mouse-grey);
    border-radius: 6px;
    background: var(--symbiotisk-white);
    min-height: 160px;
    white-space: pre-wrap;
}

input[type="checkbox"] {
    transform: translateY(2px);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.checkbox-row span {
    margin-bottom: 0;
}

.section-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--symbiotisk-grey);
    margin: 10px 0 4px;
}

.divider {
    height: 1px;
    background: var(--symbiotisk-light-grey);
    margin: 10px 0 4px;
    grid-column: 1 / -1;
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid var(--symbiotisk-mouse-grey);
    background: var(--symbiotisk-white);
    cursor: pointer;
    font-size: 15px;
}

.button.primary {
    background: var(--symbiotisk-blue);
    border-color: var(--symbiotisk-blue);
    color: var(--symbiotisk-white);
}

.button.success {
    background: var(--symbiotisk-green);
    border-color: var(--symbiotisk-green);
    color: var(--symbiotisk-white);
}

.button.danger {
    background: var(--symbiotisk-black);
    border-color: var(--symbiotisk-black);
    color: var(--symbiotisk-white);
}

.alert {
    background: #ffecec;
    border: 1px solid #f5bcbc;
    color: #8d1c24;
    padding: 10px 12px;
    border-radius: 6px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--symbiotisk-white);
    border: 1px solid var(--symbiotisk-light-grey);
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid var(--symbiotisk-light-grey);
    vertical-align: middle;
}

th {
    background: var(--symbiotisk-lighter-green);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--symbiotisk-grey);
}

th.sortable {
    cursor: pointer;
    position: relative;
}

th.sortable.is-sorted-asc::after,
th.sortable.is-sorted-desc::after {
    content: '';
    display: inline-block;
    margin-left: 6px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

th.sortable.is-sorted-asc::after {
    border-bottom: 6px solid var(--symbiotisk-grey);
}

th.sortable.is-sorted-desc::after {
    border-top: 6px solid var(--symbiotisk-grey);
}

tr.dragging {
    opacity: 0.5;
}

tr.auto-upgraded td {
    background: rgba(158, 216, 188, 0.35);
}

tr.inactive td {
    color: var(--symbiotisk-medium-grey);
}

td.expired {
    color: #b52a2f;
    font-weight: 600;
}

.handle {
    width: 40px;
    color: var(--symbiotisk-medium-grey);
    cursor: grab;
}

.upgraded {
    text-align: center;
}

@media (max-width: 860px) {
    .content {
        margin: 16px auto;
    }

    table {
        display: block;
        overflow-x: auto;
    }

    .page-header.page-header-meta {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .page-header.page-header-meta .meta-table {
        width: 100%;
        margin-left: 0;
    }
}
