:root {
    --surface: #fff;
    --page: #f5f6f8;
    --text: #202833;
    --muted: #687482;
    --border: #e1e5e9;
    --accent: #315f68;
    --accent-hover: #254a52;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--page);
    color: var(--text);
    font: 16px/1.5 "Segoe UI", Arial, sans-serif;
}

.form-error {
    position: fixed;
    top: 16px;
    left: 50%;
    z-index: 1000;
    width: max-content;
    max-width: calc(100% - 32px);
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #e6b8b8;
    border-radius: 6px;
    background: #fa9b9b 0;
    color: #8a3030;
    box-shadow: 0 4px 14px rgb(32 40 51 / 12%);
    transform: translateX(-50%);
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.site-header {
    position: sticky;
    top: 12px;
    z-index: 1;
    display: flex;
    align-items: center;
    width: calc(100% - 32px);
    max-width: 960px;
    min-height: 58px;
    margin: 12px auto 0;
    padding: 8px 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.header-logo {
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
}

.site-nav {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.site-nav ul {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav .nav-link {
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.site-nav .nav-link:hover {
    background: var(--page);
    color: var(--accent);
    text-decoration: none;
}

.site-nav .nav-link:focus-visible,
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.nav-bar-image {
    display: block;
    width: 22px;
    height: 22px;
    opacity: 0.75;
}

.site-nav .nav-link:hover .nav-bar-image,
.site-nav .nav-link:focus-visible .nav-bar-image {
    opacity: 1;
}

.page-frame,
.dashboard-frame {
    width: calc(100% - 32px);
    max-width: 620px;
    margin: 32px 0;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.dashboard-frame {
    max-width: 960px;
}

.page-title {
    margin: 0 0 22px;
    font-size: 1.5rem;
    line-height: 1.3;
    text-align: center;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-label {
    margin: 8px 0 0;
    font-size: 1rem;
    font-weight: 600;
}

input,
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
    outline: 2px solid rgb(49 95 104 / 15%);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

button {
    width: fit-content;
    padding: 10px 18px;
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: var(--surface);
    font: inherit;
    cursor: pointer;
}

button:hover {
    background: var(--accent-hover);
}

p {
    color: var(--muted);
}

.profile-overview {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
}

.profile-picture-frame {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--page);
}

.profile-picture-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-title {
    margin: 0;
    font-size: 1.4rem;
}

.profile-email {
    margin: 4px 0 0;
}

.profile-details {
    margin-top: 8px;
}

.profile-detail {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.profile-detail-label {
    max-width: 80%;
    color: var(--muted);
}

.profile-actions {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 22px;
}

.availability-items {
    display: flex;
    align-items: center;
    gap: 12px;
}

.availability-input {
    max-width: 180px;
    margin: 0;
}

.back-image {
    display: block;
    width: 28px;
    height: 28px;
    opacity: 0.75;
}

.back-image:hover {
    opacity: 1;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th,
td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 600;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 64px;
    margin-top: auto;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.site-footer-content {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .site-header {
        top: 8px;
        width: calc(100% - 24px);
        margin-top: 8px;
        padding: 8px 12px;
    }

    .site-nav ul {
        gap: 0;
    }

    .site-nav .nav-link {
        padding: 8px;
    }

    .page-frame,
    .dashboard-frame {
        margin: 20px 0;
        padding: 22px 18px;
    }

    .profile-overview {
        gap: 14px;
    }

    .profile-picture-frame {
        width: 60px;
        height: 60px;
        flex-basis: 60px;
    }

    .profile-actions {
        flex-direction: column;
    }

    .availability-items {
        gap: 8px;
    }

    .availability-input {
        min-width: 0;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    th,
    td {
        padding: 10px 8px;
    }

    button {
        width: 100%;
    }
}
