.open-points-sidebar {
    padding-bottom: 0;
}
.open-points-project {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}
.open-points-project strong {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-size: 0.95rem;
}
.open-points-project a {
    color: #777;
    font-size: 0.75rem;
    text-decoration: none;
}
.open-points-add-trade {
    border-bottom: 1px solid #333;
}
.open-points-add-trade > summary {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 10px 24px;
    color: #fff;
    font-size: 0.78rem;
    letter-spacing: 0.7px;
    cursor: pointer;
    list-style: none;
}
.open-points-add-trade > summary::-webkit-details-marker {
    display: none;
}
.open-points-add-trade[open] > summary {
    background: #1d1d1d;
}
.open-points-add-trade form {
    padding: 11px 16px 14px;
    border-top: 1px solid #333;
    background: #151515;
}
.open-points-add-trade:not([open]) > form {
    display: none;
}
.open-points-add-trade input {
    margin-bottom: 10px;
    text-transform: uppercase;
}
.open-points-add-trade button {
    width: 100%;
    min-height: 32px;
    border: 1px solid #fff;
    border-radius: 4px;
    background: transparent;
    color: #fff;
    font: 400 0.72rem 'Inter', sans-serif;
    letter-spacing: 0.7px;
    cursor: pointer;
}
.open-points-sidebar .list-items {
    display: flex;
    flex-direction: column;
}
.open-points-filter-row {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 46px;
    padding: 6px 10px 6px 24px;
    border-bottom: 1px solid #222;
    color: #aaa;
}
.open-points-filter-row.is-pinned {
    order: -1;
}
.open-points-filter-row:hover {
    background: #1a1a1a;
}
.open-points-filter-row.active {
    border-left: 3px solid #fff;
    padding-left: 21px;
    background: #1d1d1d;
    color: #fff;
}
.open-points-filter-row .open-points-filter {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 32px;
    color: inherit;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    text-decoration: none;
}
.open-points-filter-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.open-points-filter-tools {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
}
.open-points-filter-row b {
    min-width: 25px;
    margin-left: 4px;
    padding: 3px 7px;
    border: 1px solid #444;
    border-radius: 999px;
    text-align: center;
    font-size: 0.7rem;
}
.open-points-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    flex: 0 0 auto;
}
.open-points-icon-btn svg {
    display: block;
    width: 17px;
    height: 17px;
}
.open-points-rename-toggle {
    color: #fff;
}
.open-points-rename-toggle:hover,
.open-points-filter-row.is-renaming .open-points-rename-toggle {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}
.open-points-delete-btn {
    color: var(--danger);
}
.open-points-delete-btn:hover {
    color: #ff6b6b;
    background: rgba(255, 68, 68, 0.14);
}
.open-points-filter-row .icon-check {
    display: none;
}
.open-points-filter-row.is-renaming .icon-pencil {
    display: none;
}
.open-points-filter-row.is-renaming .icon-check {
    display: block;
}
.open-points-filter-row.is-renaming .open-points-filter {
    display: none;
}
.open-points-rename-form {
    flex: 1 1 auto;
    min-width: 0;
}
.open-points-rename-form input {
    width: 100%;
    min-height: 28px;
    padding: 2px 0;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.open-points-delete-gewerk-form {
    display: none;
}
.open-points-workspace {
    padding: 12px 24px 24px;
}
.open-points-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}
.open-points-header .workspace-header {
    position: relative;
    top: -3px;
    margin: 0;
}
.open-points-header-actions {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.open-points-header-actions .btn-outline {
    border-color: #fff;
    color: #fff;
}
.open-point-create-toggle {
    width: auto;
    min-width: 220px;
}
.open-points-pdf {
    width: auto;
    min-width: 180px;
    text-decoration: none;
}
.open-points-message {
    margin-bottom: 8px;
    padding: 5px 10px;
    border: 1px solid #444;
    font-size: 0.75rem;
}
.open-points-message.success { color: var(--green); border-color: var(--green); }
.open-points-message.error { color: var(--danger); border-color: var(--danger); }

.open-point-create {
    margin-bottom: 24px;
    border: 1px solid #444;
    border-radius: 6px;
    background: #161616;
}
.open-point-form {
    padding: 10px 12px 8px;
}
.open-point-card .open-point-form {
    padding-bottom: 8px;
}
.open-point-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.open-point-form-grid .span-2 { grid-column: span 2; }
.open-point-edit-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}
.open-point-edit-grid .span-2 { grid-column: span 2; }
.open-point-edit-grid .span-3 { grid-column: span 3; }
.open-point-edit-grid .span-4 { grid-column: span 4; }
.open-point-edit-grid .span-6 { grid-column: span 6; }
.open-point-edit-grid > .form-group > label,
.open-point-detail-grid .form-group > label {
    box-sizing: border-box;
    height: 18px;
    margin: 0;
    font-size: 11px;
    line-height: 18px;
    white-space: nowrap;
}
.open-point-edit-grid > .form-group > input:not(.open-point-gewerk-custom),
.open-point-edit-grid > .form-group > select,
.open-point-detail-grid .form-group > input:not(.open-point-gewerk-custom),
.open-point-detail-grid .form-group > select,
.open-point-date-field > input {
    display: block;
    box-sizing: border-box;
    height: 32px;
    min-height: 32px;
    padding-top: 4px;
    padding-bottom: 4px;
    font-size: 1rem;
    line-height: 22px;
}
.open-point-edit-grid > .form-group,
.open-point-detail-grid .form-group {
    position: relative;
}
.open-point-gewerk.is-open {
    height: auto !important;
    min-height: 0 !important;
}
.open-point-detail-grid {
    display: grid;
    grid-template-columns: 309px minmax(0, 1fr);
    gap: 12px;
}
.open-point-detail-column {
    display: grid;
    align-content: start;
    gap: 8px;
    min-width: 0;
}
.open-point-detail-column + .open-point-detail-column {
    padding-left: 12px;
    border-left: 1px solid #333;
}
.open-point-meta-row,
.open-point-status-date-row {
    display: grid;
    gap: 10px;
}
.open-point-meta-row {
    grid-template-columns: minmax(0, 1fr) 150px;
}
.open-point-status-date-row {
    grid-template-columns: minmax(90px, 1fr) 150px;
}
.open-point-due-prefix {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0 0 4px;
}
.open-point-due-choice {
    position: relative;
    display: inline-flex;
    margin: 0;
    color: #8a8a8a;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1;
    text-transform: none;
    cursor: pointer;
}
.open-point-due-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
}
.open-point-due-choice span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 7px;
    border-bottom: 1px solid transparent;
}
.open-point-due-choice input:checked + span {
    color: #fff;
    border-bottom-color: #fff;
}
.open-point-due-choice input:focus-visible + span {
    outline: 1px solid #fff;
    outline-offset: 2px;
}
.open-point-date-field {
    position: relative;
    box-sizing: border-box;
    height: 32px;
    border-bottom: 1px solid #333;
}
.open-point-date-field > input {
    position: relative;
    height: 31px;
    min-height: 31px;
    padding-left: 0;
    padding-right: 38px;
    border-bottom: 0;
    cursor: pointer;
    text-align: left;
}
.open-point-date-field > input::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    right: 0;
    width: 36px;
    height: 32px;
    cursor: pointer;
    opacity: 0;
}
.open-point-date-field > input::-webkit-date-and-time-value,
.open-point-date-field > input::-webkit-datetime-edit,
.open-point-date-field > input::-webkit-datetime-edit-fields-wrapper {
    padding-left: 0;
    text-align: left;
}
.open-point-calendar-button {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 36px;
    height: auto;
    padding: 0;
    border: 0;
    border-left: 1px solid #333;
    background: transparent;
    color: #ccc;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: none;
    z-index: 2;
}
.open-point-description-field {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}
.open-point-form .open-point-description-field textarea {
    flex: 1;
    min-height: 108px;
}
.open-point-form textarea {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    padding: 6px 10px;
    border: 1px solid #333;
    border-radius: 4px;
    outline: none;
    background: #111;
    color: #fff;
    font: 300 0.95rem/1.35 'Inter', sans-serif;
    resize: none;
    overflow-y: hidden;
}
.open-point-form textarea:focus { border-color: #fff; }
.open-point-gewerk-custom { margin-top: 8px !important; }

.open-points-empty {
    padding: 35px 20px;
    border: 1px dashed #444;
    color: #777;
    text-align: center;
}
.open-points-group {
    margin-top: 8px;
}
.open-points-group h2 {
    margin-bottom: 9px;
    padding-bottom: 5px;
    border-bottom: 1px solid #333;
    color: #ddd;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 1px;
}
.open-point-card {
    position: relative;
    display: flex;
    align-items: stretch;
    margin-bottom: 8px;
    border: 1px solid #333;
    border-left: 3px solid #e0a52b;
    border-radius: 5px;
    background: #181818;
}
.open-point-sort {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    flex: 0 0 36px;
    border-right: 1px solid #2a2a2a;
}
.open-point-move {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
}
.open-point-move svg {
    display: block;
    width: 16px;
    height: 16px;
}
.open-point-move:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
}
.open-point-move:disabled {
    color: #3a3a3a;
    cursor: default;
}
.open-point-card-body {
    flex: 1 1 auto;
    min-width: 0;
}
.open-point-card.status-in_klaerung { border-left-color: #5b9bd5; }
.open-point-card.status-erledigt { border-left-color: var(--green); opacity: 0.75; }
.open-point-card > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 66px;
    padding: 10px 13px;
    cursor: pointer;
    list-style: none;
}
.open-point-summary-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.open-point-summary-main strong {
    overflow: hidden;
    color: #fff;
    font-size: 0.98rem;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.open-point-summary-main span {
    margin-top: 5px;
    color: #888;
    font-size: 0.76rem;
}
.open-point-summary-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}
.open-point-summary-meta img {
    width: 52px;
    height: 42px;
    border-radius: 4px;
    object-fit: cover;
}
.open-point-status {
    min-width: 82px;
    padding: 5px 8px;
    border: 1px solid #555;
    border-radius: 999px;
    color: #bbb;
    font-size: 0.68rem;
    text-align: center;
    text-transform: uppercase;
}
.open-point-card > .open-point-card-body {
    padding: 0;
}
.open-point-photos {
    margin: 0 12px 8px;
    padding-top: 8px;
    border-top: 1px solid #333;
}
.open-point-photo-tools {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
}
.open-point-photo-tools > .btn,
.open-point-save-inline {
    width: auto;
    min-width: 0;
    min-height: 30px;
    font-size: 0.68rem;
}
.open-point-copy-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #ccc;
    font-size: 0.78rem;
    text-transform: none;
    cursor: pointer;
}
.open-point-copy-option input {
    width: 18px;
    height: 18px;
    accent-color: #fff;
}
.open-point-upload-state {
    grid-column: 1 / -1;
    color: #888;
    font-size: 0.75rem;
    text-align: left;
}
.open-point-upload-state:empty { display: none; }
.point-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
    gap: 12px;
}
.point-photo-tile {
    position: relative;
    min-height: 95px;
    overflow: hidden;
    border-radius: 10px;
    background: #0e0e0e;
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}
.point-photo-tile img {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: cover;
    pointer-events: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}
.point-photo-delete {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: rgba(0,0,0,0.82);
    color: #fff;
    font-size: 18px;
    line-height: 28px;
    cursor: pointer;
}
.point-photo-tile.is-dragging {
    position: fixed;
    z-index: 10000;
    opacity: 0.92;
    pointer-events: none;
    box-shadow: 0 10px 28px rgba(0,0,0,0.55);
    transform: scale(1.03);
}
.point-photo-placeholder {
    min-height: 120px;
    border: 2px dashed #fff;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
}
.point-photo-pending { opacity: 0.55; cursor: default; }
.open-point-delete {
    margin: 0;
    justify-self: end;
    border: 0;
    background: transparent;
    color: var(--danger);
    font: inherit;
    font-size: 0.72rem;
    letter-spacing: 0.6px;
    cursor: pointer;
    white-space: nowrap;
}
.open-point-delete-form {
    display: none;
}

.point-photo-grid:empty { display: none; }
.point-photo-grid:not(:empty) { margin-top: 8px; }

@media (max-width: 900px) {
    .open-points-workspace { padding: 12px 16px 28px; overflow: visible; }
    .open-point-photo-tools { grid-template-columns: 1fr 1fr; }
    .open-point-photo-tools > .btn,
    .open-point-save-inline,
    .open-point-copy-option { width: 100%; }
    .open-point-delete { justify-self: start; }
    .open-point-upload-state { text-align: left; }
}
@media (max-width: 650px) {
    .open-points-header { align-items: stretch; flex-direction: column; }
    .open-points-header-actions { display: grid; grid-template-columns: 1fr; }
    .open-point-create-toggle,
    .open-points-pdf { width: 100%; min-width: 0; }
    .open-point-form-grid { grid-template-columns: 1fr; }
    .open-point-form-grid .span-2,
    .open-point-edit-grid .span-3,
    .open-point-edit-grid .span-4,
    .open-point-edit-grid .span-6 { grid-column: span 1; }
    .open-point-detail-grid { grid-template-columns: 1fr; }
    .open-point-meta-row,
    .open-point-status-date-row { grid-template-columns: 1fr 1fr; }
    .open-point-detail-column + .open-point-detail-column {
        padding-top: 12px;
        padding-left: 0;
        border-top: 1px solid #333;
        border-left: 0;
    }
}
