:root {
    --primary-button-top: #6673e6;
    --primary-button-bottom: #5864d8;
    --primary-button-hover-top: #5f6cde;
    --primary-button-hover-bottom: #515dce;
    --primary-button-active: #4f5bc8;
}

/*
 * Primary actions deliberately stay restrained.
 * The logo carries the expressive multi-colour gradient; controls should feel
 * dependable and professional instead of competing with the product mark.
 */
.button-primary {
    border: 1px solid rgba(63, 73, 178, .34);
    border-radius: 11px;
    background: linear-gradient(180deg, var(--primary-button-top) 0%, var(--primary-button-bottom) 100%);
    color: #fff;
    box-shadow:
        0 7px 16px rgba(58, 69, 166, .18),
        inset 0 1px 0 rgba(255, 255, 255, .16);
    text-shadow: none;
    filter: none;
}

.button-primary:hover {
    border-color: rgba(55, 66, 168, .42);
    background: linear-gradient(180deg, var(--primary-button-hover-top) 0%, var(--primary-button-hover-bottom) 100%);
    color: #fff;
    box-shadow:
        0 9px 20px rgba(54, 65, 157, .22),
        inset 0 1px 0 rgba(255, 255, 255, .18);
    filter: none;
}

.button-primary:active {
    border-color: rgba(51, 61, 157, .44);
    background: var(--primary-button-active);
    box-shadow:
        0 4px 10px rgba(54, 65, 157, .17),
        inset 0 1px 1px rgba(36, 45, 125, .1);
    transform: translateY(0);
}

.button-primary:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(94, 105, 220, .18),
        0 7px 16px rgba(58, 69, 166, .18),
        inset 0 1px 0 rgba(255, 255, 255, .16);
}

.button-primary:disabled {
    filter: saturate(.72);
    box-shadow: 0 4px 10px rgba(58, 69, 166, .12);
}

.dashboard-new-session {
    border-radius: 11px;
    box-shadow:
        0 8px 18px rgba(58, 69, 166, .19),
        inset 0 1px 0 rgba(255, 255, 255, .16);
}

.dashboard-new-session:hover {
    box-shadow:
        0 10px 22px rgba(54, 65, 157, .22),
        inset 0 1px 0 rgba(255, 255, 255, .18);
}

/* Keep the dashboard typography closer to the original, calmer hierarchy. */
.dashboard-page-heading h1 {
    font-weight: 700;
    letter-spacing: -.035em;
}

.dashboard-session-name strong {
    font-size: .94rem;
    font-weight: 700;
    letter-spacing: normal;
}

.dashboard-session-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.dashboard-session-mobile-meta {
    display: none;
}

/*
 * Choice controls must not inherit the generic text-input surface rules.
 * Rendering them ourselves keeps every border intact in Chrome, Safari/iOS
 * and Firefox, and applies the same treatment on login, dashboard, profile
 * and settings screens.
 */
input[type="checkbox"],
input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    display: inline-block;
    flex: 0 0 auto;
    width: 18px;
    min-width: 18px;
    max-width: 18px;
    height: 18px;
    min-height: 18px;
    max-height: 18px;
    padding: 0;
    border: 1px solid #929caf;
    background-color: #fff;
    background-image: none;
    background-repeat: no-repeat;
    background-position: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);
    cursor: pointer;
    vertical-align: middle;
}

input[type="checkbox"] {
    border-radius: 3px;
    background-size: 11px 9px;
}

input[type="radio"] {
    border-radius: 50%;
    background-size: 8px 8px;
}

input[type="checkbox"]:hover,
input[type="radio"]:hover {
    border-color: #707b94;
}

input[type="checkbox"]:checked {
    border-color: #5864d8;
    background-color: #5864d8;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3 3 7-7' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

input[type="radio"]:checked {
    border-color: #5864d8;
    background-color: #fff;
    background-image: radial-gradient(circle, #5864d8 0 4px, transparent 4.5px);
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
    border-color: #707b94;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);
}

input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
    outline: 3px solid rgba(88, 100, 216, .18);
    outline-offset: 2px;
}

input[type="checkbox"]:disabled,
input[type="radio"]:disabled {
    border-color: #c8ceda;
    background-color: #f2f4f8;
    cursor: not-allowed;
    opacity: .72;
}

/* Preserve the intended alignment in the two denser checkbox contexts. */
.trusted-device-option input[type="checkbox"] {
    width: 17px;
    min-width: 17px;
    max-width: 17px;
    height: 17px;
    min-height: 17px;
    max-height: 17px;
    margin: 2px 0 0;
}

.dashboard-select-all input[type="checkbox"],
.dashboard-select-cell input[type="checkbox"] {
    margin: 0;
}

/*
 * Mobile cards use one compact content group: icon on the left, title and
 * metadata stacked tightly in the middle, and the delete action on the right.
 * The visible metadata deliberately omits the redundant "Gewijzigd" label so
 * the full timestamp stays readable instead of being clipped on narrow iPhones.
 */
@media (max-width: 720px) {
    .dashboard-table-shell,
    .dashboard-session-table,
    .dashboard-session-table tbody,
    .dashboard-session-table tbody tr {
        width: 100%;
        max-width: none;
    }

    .dashboard-select-cell,
    .dashboard-session-table td:nth-child(3),
    .dashboard-session-table td:nth-child(4),
    .dashboard-session-table td:nth-child(5),
    .dashboard-session-table td:nth-child(6),
    .dashboard-session-table td:nth-child(7) {
        display: none !important;
    }

    .dashboard-session-table tbody tr {
        position: relative !important;
        display: block !important;
        min-height: 80px;
        padding: 14px 64px 14px 14px !important;
    }

    .dashboard-session-table td,
    .dashboard-session-table td:nth-child(n) {
        width: auto !important;
        max-width: none !important;
    }

    .dashboard-session-table td:nth-child(2) {
        display: block !important;
        min-width: 0;
        overflow: hidden;
        text-align: left !important;
    }

    .dashboard-session-name {
        display: flex !important;
        width: 100% !important;
        min-width: 0;
        min-height: 52px;
        max-width: 100% !important;
        align-items: center;
        gap: 12px;
        overflow: hidden;
        color: var(--text);
        text-align: left !important;
    }

    .dashboard-session-name .dashboard-folder-icon {
        position: static !important;
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        transform: none !important;
    }

    .dashboard-session-copy {
        display: flex;
        flex: 1 1 0;
        width: 0;
        min-width: 0;
        max-width: 100%;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        gap: 2px;
        overflow: hidden;
        text-align: left !important;
    }

    .dashboard-session-name strong {
        display: block;
        width: 100% !important;
        min-width: 0;
        max-width: 100% !important;
        overflow: hidden;
        line-height: 1.22;
        text-align: left !important;
        text-overflow: ellipsis;
        white-space: nowrap !important;
        overflow-wrap: normal !important;
    }

    .dashboard-session-mobile-meta {
        display: flex;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        align-items: baseline;
        gap: 4px;
        overflow: hidden;
        color: var(--muted);
        font-size: clamp(.7rem, 3.05vw, .78rem);
        font-variant-numeric: tabular-nums;
        font-weight: 600;
        line-height: 1.15;
        letter-spacing: -.01em;
        text-align: left !important;
        white-space: nowrap;
    }

    .dashboard-session-mobile-meta > span {
        flex: 0 0 auto;
        min-width: 0;
        white-space: nowrap;
    }

    .dashboard-session-mobile-meta .dashboard-session-mobile-updated {
        overflow: visible;
        text-overflow: clip;
    }

    .dashboard-session-mobile-meta time {
        white-space: nowrap;
    }

    .dashboard-session-actions {
        display: contents !important;
    }

    .dashboard-session-actions form {
        position: absolute;
        top: 50%;
        right: 14px;
        display: block;
        width: 38px;
        height: 38px;
        margin: 0;
        transform: translateY(-50%);
    }

    .dashboard-session-actions .dashboard-delete-button {
        display: grid;
        width: 38px;
        height: 38px;
        place-items: center;
    }
}

@media (max-width: 520px) {
    .dashboard-new-session {
        border-radius: 10px;
        box-shadow:
            0 6px 14px rgba(58, 69, 166, .17),
            inset 0 1px 0 rgba(255, 255, 255, .15);
    }
}

@media (prefers-reduced-motion: reduce) {
    .button-primary {
        transition: none !important;
    }
}
