body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f5f7fb;
    color: #1f2937;
}

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.site-header-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 20px;
    font-weight: 700;
}

.site-nav {
    display: flex;
    gap: 16px;
    font-size: 14px;
}

.site-nav a {
    color: #374151;
    text-decoration: none;
}

.site-main {
    max-width: 1080px;
    margin: 0 auto;
    padding: 32px 20px;
}

.hero {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.hero h1 {
    margin-top: 0;
    font-size: 32px;
}

.hero-text {
    line-height: 1.8;
}

.feature-list {
    margin-top: 24px;
    display: grid;
    gap: 12px;
}

.feature-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    color: #1f2937;
    text-decoration: none;
}

.project-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.project-menu-card {
    display: flex;
    align-items: center;
    min-height: 72px;
    padding: 16px 18px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
    color: #111827;
    font-weight: 700;
    line-height: 1.5;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.project-menu-card:link,
.project-menu-card:visited {
    color: #111827;
}

.project-menu-card:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.project-menu-card-group {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
}

.project-menu-card-group__title {
    font-weight: 800;
    color: #111827;
}

.project-menu-card-group__link {
    display: block;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    font-weight: 700;
    text-decoration: none;
}

.project-menu-card-group__link:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.project-gantt-scroll {
    overflow-x: auto;
    margin-top: 16px;
}

.project-gantt-table {
    display: grid;
    gap: 0;
    min-width: 980px;
}

.project-gantt-header,
.project-gantt-row {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 12px;
    align-items: stretch;
}

.project-gantt-header-title {
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
}

.project-gantt-date-row,
.project-gantt-timeline {
    display: flex;
}

.project-gantt-timeline {
    align-items: stretch;
}

.project-gantt-date-cell {
    flex: 0 0 36px;
    padding: 6px 0;
    border-left: 1px solid #e5e7eb;
    font-size: 11px;
    color: #6b7280;
    text-align: center;
}

.project-gantt-month-label {
    font-size: 11px;
    font-weight: 700;
    color: #374151;
}

.project-gantt-date-cell.is-saturday,
.project-gantt-day.is-saturday {
    box-shadow: inset 0 0 0 999px rgba(251, 146, 60, 0.14);
}

.project-gantt-date-cell.is-sunday,
.project-gantt-day.is-sunday {
    box-shadow: inset 0 0 0 999px rgba(248, 113, 113, 0.14);
}

.project-gantt-date-cell.is-today,
.project-gantt-day.is-today {
    box-shadow: inset 0 0 0 999px rgba(107, 114, 128, 0.16);
}

.project-gantt-info {
    margin: 4px 0;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
}

.project-gantt-header-title,
.project-gantt-info {
    position: sticky;
    left: 0;
    z-index: 3;
}

.project-gantt-header-title {
    background: #ffffff;
}

.project-gantt-info {
    background: #ffffff;
    box-shadow: 4px 0 8px rgba(15, 23, 42, 0.06);
}

.project-gantt-row.is-delayed .project-gantt-info {
    border-left: 4px solid #dc2626;
}

.project-gantt-title {
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.project-gantt-meta {
    font-size: 13px;
    line-height: 1.7;
    color: #4b5563;
}

.project-gantt-day {
    position: relative;
    flex: 0 0 36px;
    min-height: 72px;
    border-left: 1px solid #e5e7eb;
    background: #ffffff;
}

.project-gantt-day.is-plan::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 34px;
    transform: translateY(-50%);
    border-top: 1px solid #f59e0b;
    border-bottom: 1px solid #f59e0b;
    background: #fffbeb;
}

.project-gantt-day.is-actual::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 34px;
    transform: translateY(-50%);
    border-top: 1px solid #2563eb;
    border-bottom: 1px solid #2563eb;
    background: #93c5fd;
}

.project-gantt-row.is-completed .project-gantt-info {
    border-color: #16a34a;
    background: #f0fdf4;
}

.project-gantt-row.is-completed .project-gantt-day.is-actual::before {
    border-top: 1px solid #16a34a;
    border-bottom: 1px solid #16a34a;
    background: #86efac;
}

.project-gantt-date-cell.is-month-start,
.project-gantt-day.is-month-start {
    border-left: 2px solid #6b7280;
}

.project-gantt-delay {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 8px;
    border: 1px solid #dc2626;
    border-radius: 999px;
    padding: 4px 10px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 700;
}

.deadline-soon-card {
    border: 2px solid #f59e0b;
}

@media (max-width: 640px) {
    .site-header-inner {
        padding: 12px 16px;
        display: block;
    }

    .project-gantt-table {
        min-width: 760px;
    }

    .project-gantt-header,
    .project-gantt-row {
        grid-template-columns: 160px 1fr;
        gap: 6px;
    }

    .project-gantt-info {
        padding: 8px;
        min-height: 48px;
    }

    .project-gantt-title {
        font-size: 12px;
        line-height: 1.35;
        margin-bottom: 4px;
    }

    .project-gantt-meta {
        font-size: 11px;
        line-height: 1.4;
    }

    .project-gantt-date-cell,
    .project-gantt-day {
        flex-basis: 28px;
    }

    .project-gantt-day {
        min-height: 56px;
    }

    .project-gantt-day.is-plan::before,
    .project-gantt-day.is-actual::before {
        height: 24px;
    }

    .project-menu-grid {
        grid-template-columns: 1fr;
    }

    .site-title {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .site-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 12px;
        font-size: 12px;
    }

    .site-main {
        padding: 20px 12px;
    }

    .hero {
        border-radius: 14px;
        padding: 22px 18px;
    }

    .hero h1 {
        font-size: 24px;
        line-height: 1.35;
    }

    .hero-text {
        font-size: 14px;
        line-height: 1.8;
    }

    .feature-card {
        padding: 14px;
        font-size: 14px;
    }
}

.nav-button {
    border: none;
    background: transparent;
    color: #374151;
    font: inherit;
    cursor: pointer;
    padding: 0;
}

.nav-button:hover {
    text-decoration: underline;
}

.school-year-calendar-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 8px;
}

.school-year-calendar-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 7px 12px;
    margin: 3px 6px 3px 0;
    background: #2563eb;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.school-year-calendar-button:link,
.school-year-calendar-button:visited {
    color: #ffffff;
}

.school-year-calendar-button:hover {
    background: #1d4ed8;
}

.school-year-calendar-button.button-edit,
.school-year-calendar-button.button-current {
    border: 1px solid #2563eb;
    background: #ffffff;
    color: #2563eb;
}

.school-year-calendar-button.button-edit:link,
.school-year-calendar-button.button-edit:visited,
.school-year-calendar-button.button-current:link,
.school-year-calendar-button.button-current:visited {
    color: #2563eb;
}

.school-year-calendar-button.button-edit:hover,
.school-year-calendar-button.button-current:hover {
    background: #eff6ff;
}

.school-year-calendar-button.button-delete {
    border: 1px solid #dc2626;
    background: #ffffff;
    color: #dc2626;
}

.school-year-calendar-button.button-delete:link,
.school-year-calendar-button.button-delete:visited {
    color: #dc2626;
}

.school-year-calendar-button.button-delete:hover {
    background: #fef2f2;
}

.school-year-calendar-button.button-danger {
    border: 1px solid #b91c1c;
    background: #b91c1c;
    color: #ffffff;
}

.school-year-calendar-button.button-danger:link,
.school-year-calendar-button.button-danger:visited {
    color: #ffffff;
}

.school-year-calendar-button.button-danger:hover {
    background: #991b1b;
}

.school-year-calendar-button.button-back {
    border: 1px solid #9ca3af;
    background: #ffffff;
    color: #374151;
}

.school-year-calendar-button.button-back:link,
.school-year-calendar-button.button-back:visited {
    color: #374151;
}

.school-year-calendar-button.button-back:hover {
    background: #f3f4f6;
}

.list-action-link.button-back {
    border: 1px solid #9ca3af;
    background: #ffffff;
    color: #374151;
}

.list-action-link.button-back:link,
.list-action-link.button-back:visited {
    color: #374151;
}

.list-action-link.button-back:hover {
    background: #f3f4f6;
}

.list-action-link.button-back {
    border: 1px solid #9ca3af;
    background: #ffffff;
    color: #374151;
}

.list-action-link.button-back:link,
.list-action-link.button-back:visited {
    color: #374151;
}

.list-action-link.button-back:hover {
    background: #f3f4f6;
}

.school-year-calendar-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 0 16px;
    scroll-snap-type: x mandatory;
}

.school-year-calendar-month {
    flex: 0 0 100%;
    max-width: 100%;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    scroll-snap-align: start;
}

.school-year-calendar-month h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 18px;
}

.school-year-calendar-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: #ffffff;
}

.school-year-calendar-table th,
.school-year-calendar-table td {
    border: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.school-year-calendar-table th {
    padding: 8px 6px;
    font-size: 13px;
    background: #f3f4f6;
    text-align: center;
}

.school-year-calendar-table td {
    height: 112px;
    padding: 8px;
    font-size: 13px;
}

.calendar-day-number {
    font-weight: 700;
}

.calendar-day-today {
    border: 3px solid #2563eb !important;
    background: #eff6ff;
}

.calendar-day-near-future {
    border: 2px solid #f59e0b !important;
    background: #fffbeb;
}

.calendar-today-label {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}

@media (max-width: 640px) {
    .school-year-calendar-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .school-year-calendar-button {
        width: fit-content;
        max-width: 100%;
    }

    .school-year-calendar-scroll {
        gap: 12px;
    }

    .school-year-calendar-month {
        flex-basis: 100%;
        padding: 12px;
    }

    .school-year-calendar-table th {
        padding: 6px 4px;
        font-size: 11px;
    }

    .school-year-calendar-table td {
        height: 48px;
        padding: 4px;
        font-size: 11px;
    }
}

.calendar-day-events {
    margin-top: 6px;
    display: grid;
    gap: 4px;
}

.calendar-day-event {
    display: block;
    min-width: 0;
    padding: 3px 4px;
    border-radius: 7px;
    background: #f8fafc;
    overflow: visible;
    font-size: 11px;
    line-height: 1.45;
}

.calendar-event-label {
    display: inline-block;
    min-width: 0;
    margin-bottom: 2px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-weight: 700;
    text-align: center;
    font-size: 10px;
}

.calendar-event-label-deadline {
    background: #fee2e2;
    color: #b91c1c;
}

.calendar-event-text {
    display: block;
    min-width: 0;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 640px) {
    .calendar-day-events {
        margin-top: 4px;
        gap: 3px;
    }

    .calendar-day-event {
        display: block;
        font-size: 10px;
    }

    .calendar-event-label {
        min-width: auto;
        padding: 2px 5px;
        font-size: 9px;
    }

    .calendar-event-text {
        display: none;
    }

    .calendar-day-event-more .calendar-event-text {
        display: inline;
        font-weight: 700;
    }
}

.dashboard-menu {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px 18px;
}

.dashboard-menu-card {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 14px 16px;
    color: #1f2937;
    text-decoration: none;
    min-height: 54px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.dashboard-menu-card h2 {
    margin: 0;
    font-size: 15px;
}

.dashboard-menu-card p {
    display: none;
}

@media (max-width: 640px) {
    .dashboard-menu {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .dashboard-menu-card {
        min-height: 48px;
        padding: 12px 12px;
    }

    .dashboard-menu-card h2 {
        font-size: 13px;
    }
}

.consultation-message-list {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.consultation-message-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.consultation-message-bubble {
    max-width: 100%;
    padding: 12px 14px;
    border-radius: 16px;
    line-height: 1.7;
    word-break: break-word;
}

.consultation-message-teacher .consultation-message-bubble {
    grid-column: 1;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
}

.consultation-message-student .consultation-message-bubble {
    grid-column: 2;
    background: #dbeafe;
    border: 1px solid #bfdbfe;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

.consultation-message-parent .consultation-message-bubble {
    grid-column: 3;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-bottom-right-radius: 4px;
}

.consultation-message-meta {
    margin: 0 0 6px;
    font-size: 12px;
    color: #6b7280;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.consultation-message-body {
    margin: 0;
    font-size: 15px;
    color: #111827;
}

@media (max-width: 640px) {
    .consultation-message-bubble {
        max-width: 86%;
        padding: 10px 12px;
    }

    .consultation-message-meta {
        font-size: 11px;
    }

    .consultation-message-body {
        font-size: 14px;
    }
}

.consultation-thread-card {
    max-width: 640px;
    margin: 0 auto;
}

.consultation-reply-form {
    margin-top: 16px;
}

.consultation-reply-field p {
    margin: 0;
}

.consultation-reply-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
}

.consultation-reply-field textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 96px;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    font: inherit;
    line-height: 1.7;
    resize: vertical;
    background: #ffffff;
}

.consultation-reply-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.consultation-reply-actions button {
    border: none;
    border-radius: 999px;
    padding: 9px 18px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.consultation-reply-actions button:hover {
    background: #1d4ed8;
}

@media (max-width: 640px) {
    .consultation-reply-field textarea {
        min-height: 88px;
        padding: 10px 12px;
        font-size: 14px;
    }

    .consultation-reply-actions button {
        width: 100%;
        padding: 10px 16px;
    }
}

.form-panel {
    border-radius: 14px;
}

.rounded-form-fields p {
    margin: 0 0 14px;
}

.rounded-form-fields label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
}

.rounded-form-fields input,
.rounded-form-fields textarea,
.rounded-form-fields select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    font: inherit;
    line-height: 1.7;
    background: #ffffff;
}

.rounded-form-fields textarea {
    min-height: 96px;
    resize: vertical;
}

.rounded-form-actions {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 10px;
}

.rounded-form-actions button,
.rounded-form-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    padding: 9px 18px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.rounded-form-actions button:hover,
.rounded-form-actions a:hover {
    background: #1d4ed8;
}

@media (max-width: 640px) {
    .rounded-form-fields input,
    .rounded-form-fields textarea,
    .rounded-form-fields select {
        padding: 10px 12px;
        font-size: 14px;
    }

    .rounded-form-actions button {
        width: 100%;
        padding: 10px 16px;
    }
}

.rounded-form-fields input[type="checkbox"],
.rounded-form-fields input[type="radio"] {
    width: auto;
    margin-right: 8px;
}

.teacher-menu-card {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.teacher-bulk-contact-card h2 {
    margin: 0;
    font-size: 16px;
}

.teacher-bulk-contact-card a {
    color: #1f2937;
    text-decoration: none;
}

.teacher-student-picker {
    margin-top: 18px;
}

.teacher-student-index-row {
    display: grid;
    grid-template-columns: 170px minmax(280px, 1fr);
    gap: 14px;
    align-items: start;
}

.teacher-student-index h2 {
    margin-top: 0;
}

.teacher-unread-summary {
    margin: 10px 0 14px;
    padding: 8px 10px;
    border-radius: 999px;
    background: #fee2e2;
    color: #991b1b;
    font-weight: 700;
    text-align: center;
}

.teacher-student-index-list {
    display: grid;
    gap: 6px;
}

.teacher-student-index-list h3 {
    margin: 14px 0 4px;
    font-size: 14px;
    color: #4b5563;
}

.teacher-student-index-link {
    display: block;
    margin-left: 18px;
    border-radius: 10px;
    padding: 9px 10px;
    color: #1f2937;
    text-decoration: none;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    font-weight: 700;
    box-sizing: border-box;
}

.teacher-student-index-link:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.teacher-student-index-link-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.teacher-student-index-link-unread {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fff1f2;
}

.teacher-student-index-link-active.teacher-student-index-link-unread {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #ffffff;
}

.teacher-selected-student-inline-card {
    margin: 0 0 10px;
}

.teacher-selected-student-card {
    display: block;
    color: #1f2937;
    text-decoration: none;
}

.teacher-selected-student-card h2 {
    margin-top: 0;
}

.teacher-selected-student-unread {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fee2e2;
    color: #991b1b;
    font-weight: 700;
}

@media (max-width: 640px) {
    .teacher-student-index-row {
        grid-template-columns: 1fr;
    }

    .teacher-student-index-link {
        margin-left: 0;
    }

    .teacher-selected-student-inline-card {
        margin-top: 8px;
    }
}

.list-action-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.list-action-link {
    display: inline-block;
    border-radius: 999px;
    padding: 8px 14px;
    background: #2563eb;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.list-action-link:hover {
    background: #1d4ed8;
}

.list-filter-panel {
    margin: 18px 0 22px;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}

.list-filter-panel h3 {
    margin: 0 0 10px;
    font-size: 16px;
}

.list-filter-panel h3:not(:first-child) {
    margin-top: 16px;
}

.list-filter-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.list-filter-link {
    display: inline-block;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 7px 13px;
    background: #ffffff;
    color: #1f2937;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.list-filter-link:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.list-filter-link-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.list-filter-link-active:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.student-card-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 18px;
    margin-top: 12px;
}

.student-card-info-grid p {
    margin: 6px 0;
}

.student-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.student-card-badge {
    display: inline-block;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 5px 10px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 640px) {
    .student-card-info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .list-action-link {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
}

.test-result-timeline {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.test-result-timeline-card {
    flex: 0 0 280px;
}

.test-result-table-wrap {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 10px;
}

.test-result-table {
    width: max-content;
    border-collapse: collapse;
    min-width: 100%;
}

.test-result-table th,
.test-result-table td {
    border: 1px solid #d8dee8;
    padding: 10px 12px;
    vertical-align: top;
    line-height: 1.6;
    font-size: 0.92rem;
}

.test-result-table th {
    min-width: 130px;
    background: #f5f7fb;
    text-align: left;
    white-space: nowrap;
    position: sticky;
    left: 0;
    z-index: 2;
}

.test-result-table td {
    min-width: 190px;
}

@media (max-width: 600px) {
    .test-result-table th {
        min-width: 92px;
        position: static;
        left: auto;
        z-index: auto;
    }

    .test-result-table td {
        min-width: 82px;
        width: 82px;
        max-width: 82px;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .test-result-table th,
    .test-result-table td {
        padding: 8px 10px;
        font-size: 0.86rem;
        line-height: 1.5;
    }
}

.test-result-graph-panel {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #ffffff;
}

.test-result-graph-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.test-result-graph-header h4 {
    margin: 0;
    font-size: 16px;
}

.test-result-graph-header label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
}

.test-result-graph-metric {
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    font-size: 14px;
}

.test-result-graph-canvas {
    width: 100%;
    overflow-x: auto;
}

.test-result-graph-svg {
    display: block;
    min-width: 640px;
    width: 100%;
    height: auto;
}

.test-result-graph-bg {
    fill: #eef7fb;
}

.test-result-graph-grid-line {
    stroke: #cbd5e1;
    stroke-dasharray: 3 3;
    stroke-width: 1;
}

.test-result-graph-axis {
    stroke: #9ca3af;
    stroke-width: 1.4;
}

.test-result-graph-line {
    fill: none;
    stroke: #2563eb;
    stroke-width: 3;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.test-result-graph-point {
    fill: #2563eb;
    stroke: #ffffff;
    stroke-width: 2;
}

.test-result-graph-axis-label {
    fill: #374151;
    font-size: 12px;
}

.test-result-graph-title {
    fill: #111827;
    font-size: 15px;
    font-weight: 700;
}

.test-result-graph-empty {
    margin: 0;
    padding: 14px;
    border-radius: 10px;
    background: #f9fafb;
    color: #4b5563;
    font-size: 14px;
}

@media (max-width: 640px) {
    .test-result-graph-header {
        align-items: stretch;
        flex-direction: column;
    }

    .test-result-graph-header label {
        align-items: stretch;
        flex-direction: column;
    }

    .test-result-graph-svg {
        min-width: 560px;
    }
}

.test-result-radar-panel {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #ffffff;
}

.test-result-radar-note {
    margin: 0 0 12px;
    padding: 12px;
    border-radius: 10px;
    background: #f9fafb;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.7;
}

.test-result-radar-metric {
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    font-size: 14px;
}

.test-result-radar-canvas {
    width: 100%;
    overflow-x: auto;
}

.test-result-radar-svg {
    display: block;
    min-width: 640px;
    width: 100%;
    height: auto;
}

.test-result-radar-grid {
    fill: none;
    stroke: #cbd5e1;
    stroke-width: 1;
    stroke-dasharray: 3 3;
}

.test-result-radar-grid-label {
    fill: #6b7280;
    font-size: 12px;
}

.test-result-radar-axis {
    stroke: #d1d5db;
    stroke-width: 1;
}

.test-result-radar-label {
    fill: #111827;
    font-size: 13px;
    font-weight: 700;
}

.test-result-radar-area-previous {
    fill: rgba(37, 99, 235, 0.14);
    stroke: #2563eb;
    stroke-width: 3;
}

.test-result-radar-area-latest {
    fill: rgba(220, 38, 38, 0.14);
    stroke: #dc2626;
    stroke-width: 3;
}

.test-result-radar-point-previous {
    fill: #2563eb;
    stroke: #ffffff;
    stroke-width: 2;
}

.test-result-radar-point-latest {
    fill: #dc2626;
    stroke: #ffffff;
    stroke-width: 2;
}

.test-result-radar-legend-line {
    stroke-width: 4;
    stroke-linecap: round;
}

.test-result-radar-legend-line.previous {
    stroke: #2563eb;
}

.test-result-radar-legend-line.latest {
    stroke: #dc2626;
}

.test-result-radar-legend-label {
    fill: #374151;
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 640px) {
    .test-result-radar-svg {
        min-width: 560px;
    }
}

.weekly-goal-card-list {
    display: grid;
    gap: 16px;
}

.weekly-goal-card {
    padding: 16px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    background: #ffffff;
}

.weekly-goal-card h3 {
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
    color: #111827;
    font-size: 18px;
}

.weekly-goal-card__body {
    margin: 12px 0 0 14px;
}

.weekly-goal-card__label {
    margin: 0 0 6px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
}

.weekly-goal-card__text {
    margin: 0;
    color: #111827;
    font-size: 15px;
    line-height: 1.9;
    font-weight: 500;
}

.weekly-goal-card label {
    display: block;
    margin: 12px 0 6px;
    color: #374151;
    font-size: 14px;
    font-weight: 700;
}

.weekly-goal-card textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
}

.weekly-goal-week-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 16px;
}

.weekly-goal-week-button {
    display: inline-block;
    border-radius: 999px;
    padding: 8px 14px;
    background: #2563eb;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.weekly-goal-week-button:hover {
    background: #1d4ed8;
}

.weekly-goal-week-button.button-current {
    border: 1px solid #2563eb;
    background: #ffffff;
    color: #2563eb;
}

.weekly-goal-week-button.button-current:link,
.weekly-goal-week-button.button-current:visited {
    color: #2563eb;
}

.weekly-goal-week-button.button-current:hover {
    background: #eff6ff;
}

@media (max-width: 640px) {
    .weekly-goal-week-controls {
        flex-direction: column;
    }

    .weekly-goal-week-button {
        text-align: center;
    }
}

.shared-asset-table-wrap {
    margin-top: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
    overflow-x: auto;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.shared-asset-table {
    width: 100%;
    min-width: 1100px;
    border-collapse: collapse;
    table-layout: fixed;
    background: #ffffff;
}

.workflow-item-table {
    min-width: 1500px;
}

.shared-asset-table thead th {
    padding: 14px 12px;
    border-bottom: 2px solid #dbeafe;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 13px;
    font-weight: 800;
    text-align: left;
    vertical-align: middle;
    line-height: 1.5;
}

.shared-asset-table tbody td {
    padding: 14px 12px;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
    font-size: 14px;
    vertical-align: top;
    line-height: 1.6;
    word-break: break-word;
    overflow-wrap: anywhere;
    background: #ffffff;
}

.shared-asset-table tbody tr:nth-child(even) td {
    background: #f9fafb;
}

.shared-asset-table tbody tr:hover td {
    background: #f3f8ff;
}

.shared-asset-table tbody tr:last-child td {
    border-bottom: none;
}

.shared-asset-name-cell {
    font-weight: 800;
    color: #111827;
}

.shared-asset-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.shared-asset-status-active {
    background: #dcfce7;
    color: #166534;
}

.shared-asset-status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

@media (max-width: 640px) {
    .shared-asset-table-wrap {
        border-radius: 12px;
    }

    .shared-asset-table thead th,
    .shared-asset-table tbody td {
        padding: 11px 10px;
        font-size: 13px;
    }
}

.shared-asset-table thead th,
.shared-asset-table tbody td {
    border-right: 1px solid #e5e7eb;
}

.shared-asset-table thead th:last-child,
.shared-asset-table tbody td:last-child {
    border-right: none;
}

.workflow-detail-card {
    padding: 24px;
}

.workflow-detail-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.workflow-detail-header h2 {
    margin: 4px 0 0;
}

.workflow-detail-type {
    margin: 0;
    color: #2563eb;
    font-size: 13px;
    font-weight: 700;
}

.workflow-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.workflow-detail-item {
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
}

.workflow-detail-item span {
    display: block;
    margin-bottom: 4px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

.workflow-detail-item strong {
    color: #111827;
    font-size: 14px;
}

.workflow-detail-section {
    margin-top: 16px;
}

.workflow-detail-section h3 {
    margin: 0 0 8px;
    font-size: 15px;
}

.workflow-detail-body {
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
    line-height: 1.8;
}

@media (max-width: 640px) {
    .workflow-detail-header {
        display: block;
    }

    .workflow-detail-grid {
        grid-template-columns: 1fr;
    }
}

.workflow-detail-action-form {
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
}

.workflow-detail-action-form label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
}

.workflow-detail-action-form select {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 12px;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    font: inherit;
    line-height: 1.7;
    background: #ffffff;
}

.workflow-detail-action-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    font: inherit;
    line-height: 1.7;
    background: #ffffff;
    resize: vertical;
}

.workflow-detail-action-form button {
    margin-top: 10px;
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.workflow-detail-action-form button:hover {
    background: #1d4ed8;
}

@media (max-width: 640px) {
    .workflow-detail-action-panel {
        grid-template-columns: 1fr;
    }

    .workflow-detail-action-form button {
        width: 100%;
    }
}

.workflow-menu-alert {
    display: inline-block;
    margin: 6px 0 0;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 12px;
    font-weight: 700;
}

.workflow-menu-button-alert {
    background: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18);
}

.workflow-menu-button-alert:hover {
    background: #b91c1c;
}

.project-basic-table-wrap {
    overflow-x: visible;
}

.project-basic-table {
    min-width: 0;
    table-layout: fixed;
}

.project-basic-label-col {
    width: 26%;
}

.project-basic-value-col {
    width: 74%;
}

.project-basic-table tbody th {
    padding: 14px 12px;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #111827;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.6;
    text-align: center;
    vertical-align: top;
    white-space: normal;
}

.project-basic-table tbody td {
    font-size: 15px;
    line-height: 1.8;
}

@media (max-width: 640px) {
    .project-basic-label-col {
        width: 34%;
    }

    .project-basic-value-col {
        width: 66%;
    }

    .project-basic-table tbody th,
    .project-basic-table tbody td {
        padding: 11px 10px;
        font-size: 13px;
    }
}

/* トップメニュー専用：100%表示でも主要情報が収まりやすいように圧縮 */
.home-today-card {
    padding: 14px;
}

.home-today-card h2 {
    margin-bottom: 12px;
}

.home-today-card h3 {
    margin: 18px 0 10px;
    padding-top: 12px;
    border-top: 1px solid currentColor;
    font-size: 16px;
}

.home-today-card h4,
.home-today-card .today-subsection-heading {
    margin: 12px 0 6px;
    font-size: 15px;
    font-weight: 800;
}

.home-today-card .shared-asset-table-wrap {
    margin-top: 8px;
    overflow-x: visible;
}

.home-today-card .shared-asset-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
}

.home-today-card .shared-asset-table thead th,
.home-today-card .shared-asset-table tbody td {
    padding: 10px 10px;
    font-size: 13px;
    line-height: 1.5;
}

.home-today-card .shared-asset-table th:nth-child(1),
.home-today-card .shared-asset-table td:nth-child(1) {
    width: 36%;
}

.home-today-card .shared-asset-table th:nth-child(2),
.home-today-card .shared-asset-table td:nth-child(2) {
    width: 40%;
}

.home-today-card .shared-asset-table th:nth-child(3),
.home-today-card .shared-asset-table td:nth-child(3) {
    width: 12%;
}

.home-today-card .shared-asset-table th:nth-child(4),
.home-today-card .shared-asset-table td:nth-child(4) {
    width: 12%;
}

.home-menu-grid .project-menu-card {
    min-height: 52px;
    padding: 10px 14px;
}

.shared-asset-reservation-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 16px;
    align-items: start;
}

.shared-asset-reservation-main,
.shared-asset-reservation-side {
    margin: 0;
}

.shared-asset-reservation-main h2,
.shared-asset-reservation-side h2 {
    margin-top: 0;
}

.form-help-text {
    margin-top: -4px;
    margin-bottom: 14px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.7;
}

.shared-asset-reservation-side ul {
    columns: 2;
    padding-left: 0;
    list-style: none;
}

.shared-asset-reservation-side li {
    break-inside: avoid;
    margin-bottom: 8px;
}

@media (max-width: 760px) {
    .shared-asset-reservation-layout {
        grid-template-columns: 1fr;
    }

    .shared-asset-reservation-side ul {
        columns: 1;
    }
}

.form-two-column-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-two-column-row p {
    margin-top: 0;
}

@media (max-width: 760px) {
    .form-two-column-row {
        grid-template-columns: 1fr;
    }
}

.calendar-day-project-card,
.calendar-day-workflow-card,
.calendar-day-asset-card {
    display: block;
    color: #1f2937;
    text-decoration: none;
}

.calendar-day-project-card,
.calendar-day-workflow-card,
.project-schedule-timeline-card {
    position: relative;
    overflow: hidden;
}

.calendar-day-completed-stamp {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    transform: translate(-50%, -50%) rotate(-12deg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    min-height: 52px;
    padding: 8px 18px;
    border: 4px solid #dc2626;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
    color: #dc2626;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.12em;
    pointer-events: none;
    opacity: 0.86;
}

.calendar-day-project-card h3,
.calendar-day-workflow-card h3,
.calendar-day-asset-card h3 {
    margin: 6px 0 16px;
    font-size: 19px;
    line-height: 1.5;
    font-weight: 800;
}

.calendar-day-card-label {
    display: inline-block;
    margin: 0 0 4px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
}

.calendar-day-card-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    margin: 0;
}

.calendar-day-card-summary div {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
}

.calendar-day-card-summary dt {
    margin-bottom: 5px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 800;
}

.calendar-day-card-summary dd {
    margin: 0;
    color: #374151;
    font-size: 15px;
    line-height: 1.7;
    font-weight: 500;
}

@media (max-width: 760px) {
    .calendar-day-card-summary {
        grid-template-columns: 1fr;
    }
}

.calendar-day-detail-page .feature-card > h2 {
    display: inline-block;
    margin: 0 0 18px 0;
    padding: 8px 14px;
    border: 1px solid #374151;
    border-radius: 10px;
    background: #374151;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
}

.today-card-list {
    display: grid;
    gap: 10px;
    margin-top: 8px;
}

.today-list-card {
    display: block;
    border: 1px solid currentColor;
    border-radius: 10px;
    padding: 12px 14px;
    color: inherit;
    text-decoration: none;
}

.today-list-card__label {
    margin: 0 0 6px 10px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.today-list-card__label strong {
    display: inline-block;
    margin-bottom: 2px;
    color: #111827;
    font-size: 13px;
    font-weight: 800;
}

.today-list-card__title {
    margin: 0 0 6px 10px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.6;
}

.today-list-card__body {
    margin: 0 0 6px 10px;
    color: #111827;
    font-size: 14px;
    line-height: 1.8;
    font-weight: 500;
}

.today-list-card__meta {
    margin: 0 0 10px 10px;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
}

.today-list-card__action a {
    font-weight: 700;
}

.shared-asset-card-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 12px 18px;
    align-items: start;
}

@media (max-width: 700px) {
    .today-card-list {
        min-width: 0;
    }

    .shared-asset-master-card {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .shared-asset-card-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .shared-asset-card-grid > div {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
}

.workflow-month-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.workflow-month-group {
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
}

.workflow-month-summary {
    cursor: pointer;
    padding: 12px 14px;
    background: #f3f4f6;
    color: #111827;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.5;
}

.workflow-month-group .today-card-list {
    padding: 12px;
}
