.gm-dashboard {
    display: grid;
    gap: 24px;
    min-width: 0;
}

.gm-hero,
.gm-detail-head,
.gm-stats,
.gm-grid,
.gm-vivosun,
.gm-detail-grid {
    display: grid;
    gap: 16px;
}

.gm-hero {
    grid-template-columns: minmax(0, 1fr) 220px;
    align-items: end;
}

.gm-detail-head {
    grid-template-columns: minmax(0, 1fr) 220px;
    align-items: start;
}

.gm-actions {
    display: grid;
    gap: 12px;
}

.gm-kicker {
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    color: #5f686f;
}

.gm-hero h2,
.gm-grid h3 {
    margin: 0;
}

.gm-note {
    margin: 10px 0 0;
    color: #5f686f;
}

.gm-stamp,
.gm-stats > div,
.gm-grid section {
    background: rgba(255, 252, 247, 0.9);
    border: 1px solid rgba(24, 33, 38, 0.12);
    border-radius: 18px;
    padding: 18px;
}

.gm-logout-form {
    margin: 0;
}

.gm-action-button {
    width: 100%;
    border: 1px solid rgba(24, 33, 38, 0.12);
    border-radius: 18px;
    padding: 14px 18px;
    background: #25553b;
    color: #fff;
    font: inherit;
    font-size: 1rem;
    cursor: pointer;
}

.gm-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
}

.gm-logout-button {
    width: 100%;
    border: 1px solid rgba(49, 75, 55, 0.2);
    border-radius: 18px;
    padding: 12px 18px;
    background: rgba(255, 252, 246, 0.92);
    color: #25553b;
    font: inherit;
    cursor: pointer;
}

.gm-logout-button:hover,
.gm-logout-button:focus-visible {
    background: rgba(37, 85, 59, 0.08);
}

.gm-back-link,
.gm-plant-link {
    color: #25553b;
    text-decoration: none;
}

.gm-back-link:hover,
.gm-back-link:focus-visible,
.gm-plant-link:hover,
.gm-plant-link:focus-visible {
    text-decoration: underline;
}

.gm-action-button:hover,
.gm-action-button:focus-visible {
    background: #1d462f;
}

.gm-action-button:disabled {
    cursor: wait;
    background: #5b666d;
    opacity: 0.88;
}

.gm-inline-feedback {
    border: 1px solid rgba(24, 33, 38, 0.12);
    border-radius: 18px;
    padding: 14px 18px;
    background: rgba(255, 252, 247, 0.9);
}

.gm-inline-feedback--success {
    border-color: rgba(37, 85, 59, 0.28);
    background: rgba(220, 233, 212, 0.72);
    color: #1f4a34;
}

.gm-inline-feedback--error {
    border-color: rgba(155, 63, 63, 0.28);
    background: rgba(255, 233, 233, 0.9);
    color: #7f2222;
}

.typo3-messages {
    display: grid;
    gap: 12px;
}

.typo3-message {
    border: 1px solid rgba(24, 33, 38, 0.12);
    border-radius: 18px;
    padding: 14px 18px;
    background: rgba(255, 252, 247, 0.9);
}

.typo3-message--ok {
    border-color: rgba(37, 85, 59, 0.28);
    background: rgba(220, 233, 212, 0.72);
}

.typo3-message--error {
    border-color: rgba(155, 63, 63, 0.28);
    background: rgba(255, 233, 233, 0.9);
}

.gm-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gm-stats--summary {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.gm-stats span {
    color: #5f686f;
}

.gm-stats strong {
    display: block;
    margin-top: 10px;
    font-size: 2rem;
}

.gm-forecast-stat small {
    display: block;
    margin-top: 7px;
    color: #5f686f;
    font-size: 0.78rem;
    line-height: 1.35;
}

.gm-grid {
    grid-template-columns: minmax(0, 3fr) minmax(260px, 0.9fr);
}

.gm-grid section {
    min-width: 0;
}

.gm-grid--details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gm-vivosun {
    grid-template-columns: minmax(0, 1fr);
}

.gm-vivosun-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.gm-vivosun-chart-card {
    background: rgba(255, 252, 247, 0.9);
    border: 1px solid rgba(24, 33, 38, 0.12);
    border-radius: 18px;
    padding: 18px;
}

.gm-followup-summary,
.gm-followup-summary-grid {
    display: grid;
    gap: 16px;
}

.gm-followup-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gm-followup-summary-card {
    background: rgba(255, 252, 247, 0.9);
    border: 1px solid rgba(24, 33, 38, 0.12);
    border-radius: 18px;
    padding: 18px;
}

.gm-followup-summary-card strong {
    display: block;
    margin-top: 12px;
    font-size: 1.8rem;
}

.gm-detail-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.gm-table {
    width: 100%;
    border-collapse: collapse;
}

.gm-table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-gutter: stable;
}

.gm-table th,
.gm-table td {
    padding: 12px 8px;
    border-bottom: 1px solid rgba(24, 33, 38, 0.12);
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.gm-subtle {
    margin-top: 6px;
    color: #5f686f;
    font-size: 0.85rem;
    line-height: 1.4;
}

.gm-detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
    margin: 16px 0 0;
}

.gm-detail-list div {
    padding-top: 10px;
    border-top: 1px solid rgba(24, 33, 38, 0.12);
}

.gm-detail-list dt {
    color: #5f686f;
    font-size: 0.88rem;
}

.gm-detail-list dd {
    margin: 6px 0 0;
    font-weight: 600;
}

.gm-note--strong {
    color: #182126;
    white-space: pre-line;
}

.gm-events article {
    padding: 12px 0;
    border-bottom: 1px solid rgba(24, 33, 38, 0.12);
}

.gm-events {
    max-height: 720px;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-gutter: stable;
}

.gm-events p {
    margin: 6px 0 0;
}

.gm-event-add-button {
    min-height: auto;
    white-space: nowrap;
}

.gm-event-plant {
    display: block;
    margin-top: 5px;
    color: #25553b;
    font-size: 0.86rem;
    text-decoration: none;
}

.gm-event-plant:hover,
.gm-event-plant:focus-visible {
    text-decoration: underline;
}

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

.gm-plant-form {
    gap: 18px;
}

.gm-form-section {
    overflow: hidden;
    border: 1px solid rgba(24, 33, 38, 0.12);
    border-radius: 18px;
    background: rgba(255, 252, 247, 0.9);
}

.gm-form-section summary {
    padding: 17px 20px;
    background: rgba(237, 242, 227, 0.78);
    color: #25553b;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
}

.gm-form-section-body {
    display: grid;
    gap: 18px;
    padding: 20px;
}

.gm-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.gm-form-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gm-form-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gm-form-grid--five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.gm-harvest-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.gm-harvest-form-grid section {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(24, 33, 38, 0.1);
    border-radius: 14px;
    background: rgba(244, 241, 231, 0.58);
}

.gm-harvest-form-grid h3 {
    margin: 0;
    color: #25553b;
}

.gm-field--date {
    max-width: 340px;
}

.gm-checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 24px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(237, 242, 227, 0.58);
}

.gm-form-actions {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.45fr);
    gap: 12px;
}

.gm-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 52px;
    border: 1px solid rgba(37, 85, 59, 0.22);
    border-radius: 18px;
    padding: 12px 18px;
    background: rgba(255, 252, 247, 0.92);
    color: #25553b;
    text-decoration: none;
}

.gm-secondary-button:hover,
.gm-secondary-button:focus-visible {
    background: rgba(37, 85, 59, 0.08);
}

.gm-field {
    display: grid;
    gap: 8px;
}

.gm-field span {
    color: #5f686f;
}

.gm-field input,
.gm-field textarea,
.gm-field select {
    width: 100%;
    border: 1px solid rgba(24, 33, 38, 0.12);
    border-radius: 14px;
    padding: 12px 14px;
    background: rgba(255, 252, 247, 0.9);
    color: #182126;
    font: inherit;
}

.gm-checkbox-field {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #182126;
}

.gm-checkbox-field input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.gm-checkbox-field span {
    color: #182126;
}

.gm-photo-toggle-form {
    margin-top: 8px;
}

.gm-photo-zone-actions,
.gm-zone-selector-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gm-zone-action,
.gm-zone-selector-options label {
    min-height: 34px;
    border: 1px solid rgba(24, 33, 38, 0.14);
    border-radius: 6px;
    background: rgba(255, 252, 247, 0.9);
    color: #182126;
    font: inherit;
}

.gm-zone-action {
    padding: 6px 12px;
    cursor: pointer;
}

.gm-zone-selector {
    margin: 0;
    padding: 0;
    border: 0;
}

.gm-zone-selector legend {
    margin-bottom: 8px;
    color: #5f686f;
}

.gm-zone-selector-options label {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
}

.gm-zone-selector-options input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gm-zone-selector-options span {
    padding: 7px 12px;
}

.gm-zone-selector-options input:checked + span {
    background: #25553b;
    color: #fff;
}

.gm-link-button {
    appearance: none;
    border: 0;
    background: transparent;
    color: #25553b;
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-align: left;
}

.gm-link-button:hover,
.gm-link-button:focus-visible {
    text-decoration: underline;
}

.gm-measurement {
    padding: 12px 0;
    border-bottom: 1px solid rgba(24, 33, 38, 0.12);
}

.gm-measurement-values {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 6px;
    color: #182126;
}

.gm-measurement p {
    margin: 8px 0 0;
}

.gm-divider {
    height: 1px;
    margin: 8px 0 4px;
    background: rgba(24, 33, 38, 0.12);
}

.gm-photo-grid {
    display: grid;
    gap: 16px;
}

.gm-photo-card {
    display: grid;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(24, 33, 38, 0.12);
}

.gm-photo-image {
    display: block;
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(24, 33, 38, 0.12);
    background: rgba(255, 252, 247, 0.9);
}

.gm-photo-meta p {
    margin: 8px 0 0;
}

.gm-empty {
    color: #5f686f;
}

.gm-analysis-panel {
    display: grid;
    gap: 16px;
}

.gm-harvest-zone-panel {
    display: grid;
    gap: 14px;
}

.gm-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.gm-harvest-zones {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.gm-harvest-zone {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid rgba(24, 33, 38, 0.12);
    border-radius: 8px;
    background: rgba(255, 252, 247, 0.75);
}

.gm-harvest-zone span {
    color: #5f686f;
    font-size: 0.82rem;
}

.gm-harvest-zone--complete {
    border-color: rgba(37, 85, 59, 0.22);
    background: rgba(220, 233, 212, 0.55);
}

.gm-harvest-zone--active {
    border-color: #25553b;
    box-shadow: inset 3px 0 0 #25553b;
}

.gm-zone-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border: 1px solid rgba(24, 33, 38, 0.14);
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(255, 252, 247, 0.9);
    color: #182126;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.gm-zone-badge--top {
    border-color: rgba(180, 143, 46, 0.3);
    color: #72530b;
}

.gm-zone-badge--growth {
    border-color: rgba(78, 121, 70, 0.3);
    color: #365f30;
}

.gm-zone-badge--mid {
    border-color: rgba(37, 85, 59, 0.3);
    color: #1f4a34;
}

.gm-zone-badge--bottom {
    border-color: rgba(78, 92, 132, 0.3);
    color: #39476f;
}

.gm-analysis-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.gm-stats--analysis {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.gm-list {
    margin: 0;
    padding-left: 20px;
    color: #182126;
}

.gm-list li + li {
    margin-top: 8px;
}

.gm-analysis-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.gm-analysis-summary strong {
    font-size: 1.05rem;
}

.gm-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1;
    border: 1px solid transparent;
    white-space: nowrap;
}

.gm-badge--neutral {
    background: rgba(24, 33, 38, 0.08);
    border-color: rgba(24, 33, 38, 0.12);
    color: #182126;
}

.gm-badge--cool {
    background: rgba(220, 233, 212, 0.88);
    border-color: rgba(37, 85, 59, 0.18);
    color: #1f4a34;
}

.gm-badge--watch {
    background: rgba(245, 235, 196, 0.9);
    border-color: rgba(180, 143, 46, 0.22);
    color: #7a5b10;
}

.gm-badge--warm {
    background: rgba(250, 225, 201, 0.9);
    border-color: rgba(196, 120, 57, 0.22);
    color: #8e4c17;
}

.gm-badge--hot {
    background: rgba(255, 221, 221, 0.92);
    border-color: rgba(170, 67, 67, 0.24);
    color: #8c2a2a;
}

.gm-forecast-cell {
    display: grid;
    gap: 6px;
}

.gm-priority {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    border: 1px solid transparent;
    white-space: nowrap;
}

.gm-priority--neutral {
    background: rgba(24, 33, 38, 0.08);
    border-color: rgba(24, 33, 38, 0.12);
    color: #182126;
}

.gm-priority--cool {
    background: rgba(220, 233, 212, 0.88);
    border-color: rgba(37, 85, 59, 0.18);
    color: #1f4a34;
}

.gm-priority--watch {
    background: rgba(245, 235, 196, 0.9);
    border-color: rgba(180, 143, 46, 0.22);
    color: #7a5b10;
}

.gm-priority--warm {
    background: rgba(250, 225, 201, 0.9);
    border-color: rgba(196, 120, 57, 0.22);
    color: #8e4c17;
}

.gm-priority--hot {
    background: rgba(255, 221, 221, 0.92);
    border-color: rgba(170, 67, 67, 0.24);
    color: #8c2a2a;
}

.gm-followup {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    border: 1px solid transparent;
    white-space: nowrap;
}

.gm-followup--neutral {
    background: rgba(24, 33, 38, 0.08);
    border-color: rgba(24, 33, 38, 0.12);
    color: #182126;
}

.gm-followup--soon {
    background: rgba(220, 233, 212, 0.88);
    border-color: rgba(37, 85, 59, 0.18);
    color: #1f4a34;
}

.gm-followup--today {
    background: rgba(245, 235, 196, 0.9);
    border-color: rgba(180, 143, 46, 0.22);
    color: #7a5b10;
}

.gm-followup--late {
    background: rgba(255, 221, 221, 0.92);
    border-color: rgba(170, 67, 67, 0.24);
    color: #8c2a2a;
}

.gm-analysis-history {
    display: grid;
    gap: 14px;
}

.gm-analysis-entry {
    border: 1px solid rgba(24, 33, 38, 0.12);
    border-radius: 18px;
    padding: 16px 18px;
    background: rgba(255, 252, 247, 0.9);
}

.gm-trend-chart {
    display: grid;
    gap: 16px;
}

.gm-trend-chart-head,
.gm-trend-chart-axis {
    display: grid;
    gap: 12px;
}

.gm-trend-chart-head {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gm-trend-chart-head span,
.gm-trend-chart-axis span {
    display: block;
    color: #5f686f;
    font-size: 0.82rem;
}

.gm-trend-chart-head strong {
    display: block;
    margin-top: 6px;
    font-size: 1.15rem;
}

.gm-trend-chart-canvas {
    position: relative;
    min-height: 220px;
    border: 1px solid rgba(24, 33, 38, 0.12);
    border-radius: 18px;
    background:
        linear-gradient(to top, rgba(24, 33, 38, 0.08) 1px, transparent 1px) 0 0 / 100% 25%,
        rgba(255, 252, 247, 0.9);
    overflow: hidden;
}

.gm-trend-chart-grid {
    position: absolute;
    inset: 10px auto 10px 10px;
    display: grid;
    align-content: space-between;
    z-index: 1;
    pointer-events: none;
}

.gm-trend-chart-grid span {
    color: #5f686f;
    font-size: 0.76rem;
}

.gm-trend-chart-svg {
    position: absolute;
    inset: 12px 14px 22px 42px;
    display: block;
    width: calc(100% - 56px);
    height: calc(100% - 34px);
    z-index: 2;
}

.gm-trend-chart-svg {
    overflow: visible;
}

.gm-trend-chart-line {
    fill: none;
    stroke: #25553b;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.gm-trend-chart-point {
    fill: #25553b;
    stroke: rgba(255, 252, 247, 0.96);
    stroke-width: 0.95;
}

.gm-trend-chart-points {
    position: absolute;
    inset: 12px 14px 22px 42px;
    pointer-events: none;
    z-index: 3;
}

.gm-trend-chart-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #25553b;
    border: 1px solid rgba(255, 252, 247, 0.96);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 1px rgba(24, 33, 38, 0.08);
}

.gm-trend-chart-axis {
    grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
}

.gm-chart-toolbar {
    display: grid;
    gap: 10px;
}

.gm-chart-range-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gm-chart-range-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(24, 33, 38, 0.14);
    border-radius: 999px;
    background: rgba(255, 252, 247, 0.88);
    color: #182126;
    font-size: 0.84rem;
    text-decoration: none;
}

.gm-chart-range-link.is-active {
    border-color: #25553b;
    background: #25553b;
    color: #fff;
}

.gm-chart-period {
    display: grid;
    gap: 4px;
    margin: 0;
}

.gm-chart-period span {
    color: #5f686f;
    font-size: 0.76rem;
}

.gm-chart-period strong {
    font-size: 0.92rem;
    font-weight: 600;
}

.gm-analysis-entry-head,
.gm-analysis-entry-meta,
.gm-analysis-entry-grid {
    display: grid;
    gap: 12px;
}

.gm-analysis-entry-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    margin-bottom: 12px;
}

.gm-analysis-entry-meta {
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
}

@media (max-width: 720px) {
    .gm-section-head {
        display: grid;
    }

    .gm-harvest-zones {
        grid-template-columns: 1fr;
    }
}

.gm-analysis-entry-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 10px;
}

.gm-analysis-entry-grid span {
    display: block;
    color: #5f686f;
    margin-bottom: 6px;
}

.gm-trend {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.82rem;
    line-height: 1;
    white-space: nowrap;
}

.gm-trend--up {
    background: rgba(255, 221, 221, 0.92);
    color: #8c2a2a;
}

.gm-trend--down {
    background: rgba(220, 233, 212, 0.88);
    color: #1f4a34;
}

.gm-trend--flat {
    background: rgba(24, 33, 38, 0.08);
    color: #182126;
}

.gm-status {
    display: inline-block;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.gm-status-done {
    background: #d8efe6;
    color: #25553b;
}

.gm-status-open {
    background: rgba(24, 33, 38, 0.08);
    color: #182126;
}

@media (max-width: 900px) {
    .gm-hero,
    .gm-detail-head,
    .gm-detail-grid,
    .gm-grid,
    .gm-stats,
    .gm-followup-summary-grid,
    .gm-vivosun-chart-grid {
        grid-template-columns: 1fr;
    }

    .gm-analysis-head {
        flex-direction: column;
    }

    .gm-analysis-summary {
        align-items: flex-start;
    }

    .gm-analysis-entry-head,
    .gm-analysis-entry-meta,
    .gm-analysis-entry-grid,
    .gm-trend-chart-head {
        grid-template-columns: 1fr;
    }

    .gm-chart-range-group {
        gap: 6px;
    }

    .gm-form-grid {
        grid-template-columns: 1fr;
    }

    .gm-harvest-form-grid,
    .gm-form-actions {
        grid-template-columns: 1fr;
    }

    .gm-table {
        min-width: 940px;
    }
}
