:root {
    --top-menu-height: 43px;
    --focus-border-color: #4d90fe;
}

* {
    margin: 0;
    padding: 0;
}

html {
    overflow-y: hidden;
    overflow-x: auto;
    width: 100%;
}

html,
textarea,
input,
select {
    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
}

body {
    font-size: 1rem;
}

a:link,
a:active,
a:visited,
body.Mobile a:hover {
    color: #1f65a6;
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    color: var(--focus-border-color);
    font-weight: bold;
}

a * {
    color: inherit;
}

div.PageContent {
    margin: 14px 10px 28px 10px;
}

textarea,
input {
    box-sizing: border-box;
}

.Hero {
    padding: 28px 0 36px;
}

.Hero h1,
.PageHeader h1 {
    margin: 0 0 18px;
    color: #0f172a;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.08;
}

.Hero p,
.PageHeader p {
    max-width: 760px;
    color: #444;
    font-size: 17px;
    line-height: 1.5;
}

.WorklogHero {
    width: 100%;
}

.InfoBox {
    margin: 0 0 18px;
    padding: 14px 18px;
    border: 1px solid #9dc3ef;
    border-radius: 16px;
    background: #eef7ff;
}

.PageHeader {
    width: 100%;
    margin: 0 0 18px;
    padding: 12px;
}

.Kicker {
    color: #7aa8ff !important;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: 13px !important;
}

.PrimaryButton {
    display: inline-block;
    margin-top: 24px;
    padding: 10px 18px;
    border-radius: 16px;
    color: #fff !important;
    background: #054b83;
}

.DashboardGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    width: 100%;
}

.DashboardCard {
    display: block;
    min-height: 140px;
    padding: 20px;
    border: 1px solid #b8c7d9;
    border-radius: 18px;
    background: linear-gradient(180deg, #fff 0%, #eef5ff 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.DashboardCard strong {
    display: block;
    margin-bottom: 12px;
    color: #0f172a;
    font-size: 1.35rem;
}

.DashboardCard span {
    color: #334155;
    font-weight: normal;
    line-height: 1.5;
}

.WorklogAdminPanel,
.DocumentationPanel,
.TasksPanel,
.WorklogEditorPanel,
.WorklogEntries {
    width: 100%;
    margin: 0 0 24px;
    padding: 20px;
    border: 1px solid #b8c7d9;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
}

.WorklogAdminPanel h2,
.DocumentationPanel h2,
.TasksPanel h2,
.WorklogEditorPanel h2,
.WorklogEntries h2 {
    margin-bottom: 16px;
    color: #0f172a;
}

.WorklogAdminPanel label {
    display: block;
    margin-bottom: 6px;
    color: #334155;
    font-weight: bold;
}

.WorklogAdminPanel select {
    width: 100%;
    max-width: 420px;
    padding: 9px 12px;
    border: 1px solid #b8c7d9;
    border-radius: 10px;
    background: #fff;
}

.WorklogFormGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.WorklogActions,
.WorklogEntryActions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.WorklogActions {
    margin-top: 16px;
}

.DangerActions {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-top: 32px;
    padding: 16px;
    border: 1px solid #f2b8b5;
    border-radius: 14px;
    background: #fff7f7;
}

.DangerActions strong {
    display: block;
    margin-bottom: 4px;
    color: #8a1f1f;
}

.DangerActions p {
    color: #64748b;
    line-height: 1.45;
}

.DocumentationToolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 220px) minmax(160px, 200px) auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 18px;
}

.TasksEditor h2 {
    margin-bottom: 14px;
}

.TasksFormGrid,
.TasksToolbar {
    display: grid;
    gap: 14px;
    align-items: end;
    margin-bottom: 16px;
}

.TasksFormGrid {
    grid-template-columns: minmax(240px, 1fr) minmax(150px, 180px) minmax(160px, 200px) minmax(220px, 280px);
}

.TasksToolbar {
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 220px) minmax(170px, 210px) minmax(150px, 180px) minmax(220px, 280px);
}

.TasksHeader {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.TasksPanel label {
    display: block;
    margin-bottom: 6px;
    color: #334155;
    font-weight: bold;
}

.TasksPanel input,
.TasksPanel select,
.TasksPanel textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #b8c7d9;
    border-radius: 10px;
    background: #fff;
    box-sizing: border-box;
}

.TasksPanel textarea {
    resize: vertical;
    line-height: 1.45;
}

.TasksList {
    display: grid;
    gap: 14px;
}

.TaskCard {
    padding: 16px;
    border: 1px solid #d6e0eb;
    border-left-width: 8px;
    border-radius: 14px;
    background: #fff;
}

.TaskCard header,
.TaskCard footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.TaskCard header {
    align-items: flex-start;
    margin-bottom: 10px;
}

.TaskCard h2 {
    margin: 6px 0 0;
    color: #0f172a;
    font-size: 1.2rem;
}

.TaskDescription {
    margin-bottom: 12px;
    color: #334155;
    line-height: 1.5;
}

.TaskDescription ul,
.TaskDescription ol {
    margin-left: 24px;
}

.TaskCard footer {
    flex-wrap: wrap;
    color: #64748b;
    font-size: 0.92rem;
}

.TaskStatusBadge {
    display: inline-block;
    margin-right: 6px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #fff;
    font-size: 0.82rem;
    font-weight: bold;
}

.TaskTypeBadge {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: bold;
}

.TaskTypeTask {
    color: #334155;
    background: #e2e8f0;
}

.TaskTypeFeature {
    color: #075985;
    background: #dff3ff;
}

.TaskTypeBug {
    color: #8a1f1f;
    background: #ffe5e5;
}

.TaskCardTodo {
    border-left-color: #64748b;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.TaskCardTodo .TaskStatusBadge {
    background: #64748b;
}

.TaskCardInProgress {
    border-left-color: #2563eb;
    background: linear-gradient(180deg, #fff 0%, #eff6ff 100%);
}

.TaskCardInProgress .TaskStatusBadge {
    background: #2563eb;
}

.TaskCardDone {
    border-left-color: #15803d;
    background: linear-gradient(180deg, #fff 0%, #f0fdf4 100%);
}

.TaskCardDone .TaskStatusBadge {
    background: #15803d;
}

.TaskCardAbandoned {
    border-left-color: #b45309;
    background: linear-gradient(180deg, #fff 0%, #fff7ed 100%);
}

.TaskCardAbandoned .TaskStatusBadge {
    background: #b45309;
}

.DocumentationToolbar label,
.DocumentationTitleField label {
    display: block;
    margin-bottom: 6px;
    color: #334155;
    font-weight: bold;
}

.DocumentationToolbar input,
.DocumentationToolbar select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #b8c7d9;
    border-radius: 10px;
    background: #fff;
}

.DocumentationTitleField {
    margin-bottom: 16px;
}

.DocumentationViewActions {
    justify-content: flex-end;
    margin-bottom: 16px;
}

.DocumentationContent {
    line-height: 1.6;
}

.DocumentationTable {
    width: 100%;
    border-collapse: collapse;
}

.DocumentationTable th,
.DocumentationTable td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.DocumentationTable th {
    color: #334155;
    background: #eef5ff;
}

.LocalDialogBackdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.55);
}

.LocalDialog {
    width: min(480px, 100%);
    padding: 24px;
    border: 1px solid #b8c7d9;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.30);
}

.LocalDialog h2 {
    margin-bottom: 12px;
    color: #0f172a;
}

.LocalDialog p {
    color: #334155;
    line-height: 1.5;
}

.LocalDialogActions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.WorklogEntryCard {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #d6e0eb;
    border-radius: 14px;
    background: linear-gradient(180deg, #fff 0%, #f7fbff 100%);
}

.WorklogEntryCard header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.WorklogEntryCard header strong {
    display: block;
    color: #0f172a;
    font-size: 1.2rem;
}

.WorklogEntryCard header span {
    color: #054b83;
    font-weight: bold;
}

.WorklogEntryDescription {
    color: #334155;
    line-height: 1.55;
}

.WorklogEntryDescription ul,
.WorklogEntryDescription ol {
    margin-left: 24px;
}

.HoursSummaryGrid {
    display: grid;
    grid-template-columns: minmax(520px, 1.6fr) minmax(320px, 1fr);
    gap: 18px;
    width: 100%;
    margin: 24px 0;
}

.HoursSidePanels {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.HoursSummaryPanel {
    padding: 18px;
    border: 1px solid #b8c7d9;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
}

.HoursSummaryPanel h2 {
    margin-bottom: 14px;
    color: #0f172a;
}

.HoursTotalPanel {
    grid-column: 1 / -1;
}

.HoursTotalValue {
    color: #054b83;
    font-size: 2rem;
    font-weight: bold;
}

.HoursPanelNote {
    margin-bottom: 10px;
    color: #64748b;
    font-size: 0.95rem;
}

.HoursTable {
    width: 100%;
    border-collapse: collapse;
}

.HoursTable th,
.HoursTable td {
    padding: 9px 10px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.HoursTable th {
    color: #334155;
    background: #eef5ff;
}

.HoursWarningRow td {
    color: #8a1f1f;
    background: #ffe5e5;
    font-weight: bold;
}

.HoursOvertimeRow td {
    color: #7a4b00;
    background: #fff1bf;
    font-weight: bold;
}

.HoursNoticeRow td {
    color: #0f4f75;
    background: #dff3ff;
    font-weight: bold;
}

@media screen and (max-width: 700px) {
    .HoursSummaryGrid {
        grid-template-columns: 1fr;
    }

    .WorklogEntryCard header {
        flex-direction: column;
    }

    .DocumentationToolbar {
        grid-template-columns: 1fr;
    }

    .TasksFormGrid,
    .TasksToolbar {
        grid-template-columns: 1fr;
    }

    .TaskCard header {
        flex-direction: column;
    }

    .DangerActions {
        align-items: flex-start;
        flex-direction: column;
    }
}
