/* Mis cosas — alineado con content-header + entity-table del resto de cloudOS */

#things.container {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#things .content-header {
    flex-shrink: 0;
    gap: 16px;
}

#things .things-header-titles {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

#things .things-back-link {
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    line-height: 1.2;
}

#things .things-back-link:hover {
    color: #111827;
}

#things .things-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.things-root {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.things-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 32px 24px;
    flex: 1;
    min-height: 0;
    min-width: 0;
}

.things-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.things-search {
    flex: 1;
    max-width: 360px;
    min-width: 160px;
}

.things-onboarding {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 28px 24px;
}

.things-onboarding h2 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.things-onboarding p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.things-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.things-card-wrap {
    position: relative;
}

.things-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    text-align: left;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 40px 16px 18px;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.things-card-del {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #9ca3af;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.55;
}

.things-card-wrap:hover .things-card-del,
.things-card-del:focus {
    opacity: 1;
}

.things-card-del:hover {
    background: #f3f4f6;
    color: #111827;
}

.things-card:hover {
    border-color: #9ca3af;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
}

.things-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.things-card-emoji {
    display: block;
    font-size: 20px;
    line-height: 1;
    font-style: normal;
    transform: translateY(1px);
}

.things-card-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.things-card-body strong {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.things-card-body span {
    font-size: 13px;
    color: #6b7280;
}

.modal-body:has(.things-tpl-list),
.modal-body:has(.things-chooser),
.modal-body:has(.things-form) {
    padding: 8px 24px 20px;
}

.things-chooser {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 0 8px;
}

.things-chooser > p {
    margin: 0 0 4px;
    color: #6b7280;
    font-size: 14px;
}

.things-chooser-btn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
}

.things-chooser-btn:hover {
    border-color: #111827;
}

.things-chooser-btn:disabled,
.things-chooser-soon {
    opacity: .55;
    cursor: not-allowed;
}

.things-chooser-btn span {
    color: #6b7280;
    font-size: 13px;
}

.things-tpl-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.things-tpl-wrap #things-tpl-search {
    flex-shrink: 0;
}

.things-tpl-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 52vh;
    overflow: auto;
    padding: 4px 0 12px;
}

.things-tpl-empty {
    margin: 8px 0 0;
    color: #6b7280;
    font-size: 14px;
    text-align: center;
}

.things-tpl-group h4 {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #9ca3af;
}

.things-tpl {
    width: 100%;
    display: flex;
    gap: 14px;
    align-items: center;
    text-align: left;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 8px;
    cursor: pointer;
}

.things-tpl:hover {
    border-color: #111827;
}

.things-tpl .things-card-icon {
    width: 40px;
    height: 40px;
    background: #f3f4f6;
}

.things-tpl .things-card-emoji {
    font-size: 20px;
}

.things-tpl-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.things-tpl-text span {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.35;
}

.things-tpl strong {
    color: #111827;
    font-size: 14px;
    font-weight: 600;
}

.things-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px;
}

.things-form label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.things-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.things-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.things-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}

.things-type-card {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 10px;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
}

.things-type-card.active {
    border-color: #111827;
    box-shadow: 0 0 0 1px #111827;
}

.things-type-card strong {
    display: block;
    font-size: 13px;
}

.things-type-card small {
    color: #6b7280;
    font-size: 11px;
}

.things-option-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.things-opt-handle {
    cursor: grab;
    color: #9ca3af;
}

.things-opt-color {
    width: 40px;
    height: 34px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0;
}

.things-list-area {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    min-width: 0;
    gap: 12px;
}

.things-table-scroll-wrapper {
    flex: 1;
    min-height: 0;
    overflow: auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    -webkit-overflow-scrolling: touch;
}

.things-table-scroll-wrapper .table-wrapper.entity-table-wrapper.things-table-wrap {
    overflow: visible;
    border: none;
    border-radius: 0;
    max-height: none;
    min-height: 0;
}

.things-table-scroll-wrapper .table-wrapper.entity-table-wrapper.things-table-wrap table.things-table,
.things-table-scroll-wrapper .things-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    font-size: 14px;
}

.things-table th,
.things-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
    vertical-align: middle;
}

.things-table thead th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.things-th-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.things-th-label {
    cursor: pointer;
}

.things-th-menu {
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #9ca3af;
    padding: 0 2px;
}

.things-th-add {
    width: 42px;
}

.things-add-col {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px dashed #d1d5db;
    background: #fff;
    cursor: pointer;
}

.things-td-check {
    width: 40px;
    text-align: center;
}

.things-td-title {
    min-width: 180px;
}

.things-title-link {
    color: #111827;
    font-weight: 600;
    text-decoration: none;
}

.things-title-link:hover {
    text-decoration: underline;
}

.things-td-edit {
    cursor: pointer;
}

.things-td-edit:hover {
    background: #f8fafc;
}

.things-td.is-editing,
.things-field-value.is-editing {
    background: #eff6ff;
}

.things-inline-input,
.things-filter-val,
.things-filter-op {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 13px;
    background: #fff;
}

.things-col-filter .things-filter-val,
.things-col-filter .entity-col-filter-input {
    width: 100%;
    min-width: 0;
}

.things-textarea {
    min-height: 72px;
    resize: vertical;
}

.things-empty {
    padding: 56px 20px;
    text-align: center;
    color: #6b7280;
}

.things-empty p {
    margin: 0 0 16px;
    font-size: 14px;
}

.things-empty-cell {
    color: #d1d5db;
}

.things-muted,
.things-hint {
    color: #6b7280;
    font-size: 13px;
}

.things-file-count {
    color: #4b5563;
}

.things-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid transparent;
}

.things-rel-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.things-rel-link:hover {
    text-decoration: underline;
}

.things-toggle {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.things-toggle input {
    display: none;
}

.things-toggle span {
    width: 36px;
    height: 20px;
    border-radius: 999px;
    background: #d1d5db;
    position: relative;
    display: inline-block;
}

.things-toggle span:after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform .15s ease;
}

.things-toggle input:checked + span {
    background: #16a34a;
}

.things-toggle input:checked + span:after {
    transform: translateX(16px);
}

.things-lookup {
    position: relative;
}

.things-lookup-list {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 30;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    max-height: 200px;
    overflow: auto;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

.things-lookup-item {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: #fff;
    padding: 8px 10px;
    cursor: pointer;
}

.things-lookup-item:hover {
    background: #f3f4f6;
}

.things-multi {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.things-multi-item {
    font-size: 13px;
}

#things-selection-bar.selection-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.1);
    padding: 10px 16px;
    z-index: 9999;
    max-width: 95vw;
}

#things-selection-bar .selection-bar-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

#things-selection-bar .selection-bar-info {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
}

#things-selection-bar .selection-bar-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

#things-selection-bar .selection-bar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: transparent;
    border: none;
    border-radius: 25px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

#things-selection-bar .selection-bar-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

#things-selection-bar .selection-bar-btn.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

#things-selection-bar .selection-bar-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    flex-shrink: 0;
}

.things-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #6b7280;
    font-size: 13px;
    flex-shrink: 0;
    padding: 4px 0 0;
}

.things-col-pop {
    position: absolute;
    z-index: 80;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .1);
    min-width: 200px;
    padding: 6px;
    display: flex;
    flex-direction: column;
}

.things-col-pop button {
    border: 0;
    background: transparent;
    text-align: left;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
}

.things-col-pop button:hover {
    background: #f3f4f6;
}

.things-record-page {
    overflow: auto;
}

.things-record-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 4px;
    flex-wrap: wrap;
}

.things-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    overflow-x: auto;
    flex-shrink: 0;
}

.things-tab {
    border: 0;
    background: transparent;
    padding: 12px 16px;
    font-weight: 500;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
}

.things-tab.active {
    color: #111827;
    border-bottom-color: #111827;
}

.things-record-panel {
    padding: 20px 0 24px;
}

.things-section {
    margin-bottom: 28px;
}

.things-section h3 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.things-field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.things-field label {
    display: block;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 4px;
    font-weight: 500;
}

.things-field-value {
    min-height: 28px;
    padding: 4px 0;
    font-size: 14px;
    color: #111827;
}

.things-note,
.things-msg {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: #fff;
}

.things-note header,
.things-msg {
    display: block;
}

.things-note time,
.things-msg time {
    color: #9ca3af;
    font-size: 12px;
    margin-left: 8px;
}

.things-activity {
    max-width: 640px;
    padding: 4px 4px 8px;
}

.things-act-day {
    margin-bottom: 22px;
}

.things-act-day:last-child {
    margin-bottom: 0;
}

.things-act-day-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9ca3af;
    margin: 0 0 10px 22px;
}

.things-act {
    position: relative;
    display: flex;
    gap: 12px;
    padding: 0 0 14px 0;
    margin: 0;
    border: 0;
    background: transparent;
}

.things-act:last-child {
    padding-bottom: 0;
}

.things-act:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 14px;
    bottom: 0;
    width: 1px;
    background: #e5e7eb;
}

.things-act-dot {
    flex-shrink: 0;
    width: 11px;
    height: 11px;
    margin-top: 3px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #cbd5e1;
    box-sizing: border-box;
    z-index: 1;
}

.things-act--created .things-act-dot { border-color: #16a34a; }
.things-act--change .things-act-dot { border-color: #94a3b8; }
.things-act--note .things-act-dot { border-color: #d97706; }
.things-act--chat .things-act-dot { border-color: #2563eb; }
.things-act--file .things-act-dot { border-color: #7c3aed; }
.things-act--removed .things-act-dot { border-color: #dc2626; }

.things-act-body {
    min-width: 0;
    flex: 1;
}

.things-act-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 5px 6px;
    font-size: 12.5px;
    line-height: 1.45;
    color: #6b7280;
}

.things-act-who {
    font-weight: 600;
    color: #111827;
}

.things-act-verb {
    color: #6b7280;
}

.things-act-field {
    color: #374151;
    font-weight: 500;
}

.things-act time {
    margin-left: auto;
    color: #9ca3af;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.things-act-diff {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.4;
}

.things-act-old,
.things-act-new,
.things-act-val {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.things-act-old {
    color: #9ca3af;
    text-decoration: line-through;
    text-decoration-color: #e5e7eb;
}

.things-act-new {
    color: #111827;
}

.things-act-arrow {
    color: #d1d5db;
    font-size: 11px;
}

.things-act-empty {
    color: #d1d5db;
}

.things-act-val .things-pill {
    font-size: 11px;
    padding: 1px 7px;
    font-weight: 600;
}

.things-act-val .things-rel-link {
    font-weight: 500;
    font-size: 12px;
}

.things-note p,
.things-msg p {
    margin: 8px 0 0;
    white-space: pre-wrap;
}

.things-chat-compose {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.things-files {
    max-width: 720px;
}

.things-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 112px;
    padding: 22px 16px;
    border: 1px dashed #d1d5db;
    border-radius: 14px;
    background: #fafafa;
    color: #6b7280;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.things-drop input[type="file"] {
    display: none;
}

.things-drop:hover,
.things-drop.is-over {
    border-color: #111827;
    background: #fff;
    color: #111827;
}

.things-drop.is-busy {
    pointer-events: none;
    opacity: 0.7;
}

.things-drop-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-bottom: 4px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #374151;
}

.things-drop-title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.things-drop-hint {
    font-size: 12px;
    color: #9ca3af;
}

.things-upload-dest {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 0;
    font-size: 12px;
    color: #6b7280;
}

.things-upload-dest label {
    font-weight: 500;
}

.things-upload-dest select {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 8px;
    padding: 5px 8px;
    font-size: 12px;
    color: #111827;
}

.things-file-head {
    margin: 18px 0 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9ca3af;
}

.things-files-empty {
    padding: 18px 4px 6px;
    color: #9ca3af;
}

.things-files-empty p {
    margin: 0 0 2px;
    font-size: 13px;
    color: #6b7280;
}

.things-files-empty span {
    font-size: 12px;
}

.things-file-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.things-file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fff;
}

.things-file-thumb {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.things-file-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.things-file-thumb.is-doc {
    background: #111827;
}

.things-file-ext {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
}

.things-file-meta {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.things-file-name {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.things-file-name:hover {
    text-decoration: underline;
}

.things-file-sub {
    font-size: 11.5px;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.things-file-del {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #9ca3af;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.things-file-del:hover {
    background: #f3f4f6;
    color: #111827;
}

.things-c360 {
    margin-top: 18px;
}

.things-c360-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.things-c360-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    text-decoration: none;
    color: inherit;
}

.things-c360-item:hover {
    border-color: #111827;
}

.things-views {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.things-view-switch {
    display: inline-flex;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.things-view-tab {
    border: 0;
    background: #fff;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
}

.things-view-tab.active {
    background: #111827;
    color: #fff;
}

.things-mode-label,
.things-cal-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #4b5563;
}

.things-cal-label {
    text-transform: capitalize;
    font-weight: 600;
    min-width: 140px;
    text-align: center;
}

.things-kanban {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    align-items: flex-start;
    min-height: 360px;
    padding-bottom: 12px;
}

.things-kanban-col {
    min-width: 260px;
    max-width: 280px;
    flex-shrink: 0;
    background: #f9fafb;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 280px);
}

.things-kanban-col-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
}

.things-kanban-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.things-kanban-count {
    margin-left: auto;
    font-size: 11px;
    color: #9ca3af;
    background: #e5e7eb;
    border-radius: 10px;
    padding: 1px 6px;
}

.things-kanban-cards {
    padding: 0 8px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 40px;
    overflow-y: auto;
}

.things-kanban-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
}

.things-kanban-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.things-kanban-card strong {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
}

.things-kanban-meta {
    font-size: 12px;
    color: #6b7280;
}

.things-calendar {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.things-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-align: center;
}

.things-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.things-cal-day {
    min-height: 92px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 6px;
    background: #fff;
}

.things-cal-day.is-out {
    background: #f9fafb;
    color: #9ca3af;
}

.things-cal-num {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
}

.things-cal-item {
    display: block;
    width: 100%;
    border: 0;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 6px;
    padding: 3px 6px;
    font-size: 11px;
    text-align: left;
    margin-bottom: 3px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.things-related-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.things-related-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    text-decoration: none;
    color: inherit;
}

.things-related-item:hover {
    border-color: #111827;
}

.things-checklist {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.things-check-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.things-check-progress {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

.things-mention-wrap {
    position: relative;
}

.things-import-steps {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 13px;
}

.things-import-step {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #9ca3af;
}

.things-import-step span {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid #d1d5db;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.things-import-step.is-on,
.things-import-step.is-done {
    color: #111827;
    font-weight: 600;
}

.things-import-step.is-on span,
.things-import-step.is-done span {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

.things-import-line {
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.things-import-table {
    width: 100%;
}

.things-import-table td {
    padding: 6px 4px;
}

.things-import-errors {
    margin: 8px 0 0;
    padding-left: 18px;
    color: #b91c1c;
    font-size: 13px;
}

.things-auto-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.things-auto-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
}

.things-auto-row.is-off {
    opacity: .55;
}

.things-auto-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.things-auto-meta span {
    color: #6b7280;
    font-size: 13px;
}

.things-auto-row-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.things-auto-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.things-auto-section {
    margin: 10px 0 2px;
    font-weight: 600;
}

.things-auto-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.things-auto-extra {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 22px;
}

.things-auto-cond-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.things-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.things-kpi {
    min-width: 120px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.things-kpi span {
    font-size: 12px;
    color: #6b7280;
}

.things-kpi strong {
    font-size: 16px;
}

.things-table tfoot td {
    font-weight: 600;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.things-formula-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.things-formula-ro {
    color: #6b7280;
    font-size: 12px;
}

.things-tpl-preview-col ul {
    margin: 6px 0 12px;
    padding-left: 18px;
}

@media (max-width: 720px) {
    .things-page {
        padding: 12px 16px 24px;
    }

    .things-form-row,
    .things-toolbar {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .things-search {
        max-width: none;
        width: 100%;
    }

    #things .content-header {
        align-items: flex-start;
    }
}
