/* Modal Sizes */
.modal-content-large {
    width: 800px;
    max-width: 90vw;
}

.modal-content-xlarge {
    width: 1200px;
    max-width: 95vw;
    max-height: 90vh;
}

/* Bug Report Modal */
#bugReportModal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

#bugReportModal .modal-body {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

#bugReportModal .modal-footer {
    flex-shrink: 0;
    margin-top: 0;
}

/* Task Modal Body */
.task-modal-body {
    padding: 32px;
    max-height: calc(90vh - 100px);
    overflow-y: auto;
}

.task-name-input {
    width: 100%;
    background: transparent;
    border: none;
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    padding: 0 0 20px 0;
    margin-bottom: 20px;
}

.task-name-input:focus {
    outline: none;
}

.task-name-input::placeholder {
    color: #555;
}

/* Task Properties Bar */
.task-properties-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 0;
    margin-bottom: 24px;
    overflow-x: auto;
    flex-wrap: nowrap;
}

.property-select {
    font-family: 'Geologica', sans-serif;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 8px 32px 8px 12px;
    color: #bbb;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg width="10" height="6" viewBox="0 0 10 6" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L5 5L9 1" stroke="%23888" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: all 0.15s;
    min-width: 140px;
    white-space: nowrap;
}

.property-select option {
    font-family: 'Geologica', sans-serif;
    background-color: #2a2a2a;
    color: #ffffff;
}

.property-select:hover {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.18);
}

.property-select:focus {
    outline: none;
    border-color: #3259e8;
    background-color: rgba(255, 255, 255, 0.04);
}

input[type="date"].property-select {
    padding: 8px 12px;
    background-image: none;
    color: #888;
}

input[type="date"].property-select::-webkit-calendar-picker-indicator {
    filter: invert(0.6);
    cursor: pointer;
}

/* Section Labels */
.section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #888;
    margin-bottom: 12px;
}

.section-label svg {
    color: #666;
}

/* Form Textarea */
.form-textarea {
    width: 100%;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 12px 14px;
    font-family: 'Geologica', sans-serif;
    font-size: 14px;
    color: #ddd;
    resize: vertical;
    min-height: 120px;
    transition: all 0.2s;
}

.form-textarea:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background-color: rgba(255, 255, 255, 0.02);
}

.form-textarea:focus {
    outline: none;
    border-color: #3259e8;
    background-color: rgba(255, 255, 255, 0.03);
    box-shadow: 0 0 0 2px rgba(50, 89, 232, 0.2);
}

.form-textarea::placeholder {
    color: #666;
}

/* Add Field Button */
.add-field-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #888;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.add-field-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Task Modal Footer */
.task-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 24px;
    margin-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Task View Modal - NEW LAYOUT */
.task-view-modal-new {
    display: flex;
    width: 900px;
    max-width: 95vw;
    max-height: 90vh;
    height: auto;
    background: #111111;
    border-radius: 12px;
    overflow: hidden;
}

.task-view-left {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.task-view-divider {
    width: 1px;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.task-view-right {
    width: 280px;
    padding: 32px 24px;
    overflow-y: auto;
    flex-shrink: 0;
    background: #111111;
    display: flex;
    flex-direction: column;
}

.task-view-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.task-status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.task-status-badge svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.status-icon-todo,
.status-icon-done {
    display: none;
}

/* Status Icon Circle */
.status-icon-circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-icon-circle.status-todo {
    background: #888;
}

.status-icon-circle.status-discussion {
    background: #ff9800;
}

.status-icon-circle.status-in_work,
.status-icon-circle.status-in-work {
    background: #2196f3;
}

.status-icon-circle.status-done_for_test,
.status-icon-circle.status-done-for-test {
    background: #9c27b0;
}

.status-icon-circle.status-done {
    background: #4caf50;
}

.task-badge-divider {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 4px;
}

.task-id-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    font-family: 'SF Mono', 'Monaco', monospace;
    letter-spacing: 0.5px;
}

.task-id-badge::before {
    content: '#';
    color: #888;
}

.task-view-title-new {
    font-size: 28px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 24px 0;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.task-view-description {
    margin-bottom: 32px;
}

.task-view-description p {
    font-size: 14px;
    line-height: 1.6;
    color: #bbb;
    margin: 0;
}

.task-subtasks-section {
    margin-bottom: 24px;
}

.task-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 16px 0;
}

.task-subtasks-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.add-subtask-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #888;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    width: fit-content;
    margin-right: auto;
}

.add-subtask-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
}

/* Task Tags Inline */
.task-tag-inline {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    margin-right: 6px;
}

.add-tag-btn-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #888;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition: all 0.15s;
    vertical-align: middle;
}

.add-tag-btn-inline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ddd;
}

.task-property-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.task-property-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.task-property-label {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-property-value {
    font-size: 14px;
    color: #ddd;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-height: 24px;
}

/* Subtask Item */
.subtask-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    transition: all 0.2s;
}

.subtask-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.subtask-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
    position: relative;
}

.subtask-checkbox:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.subtask-checkbox.checked {
    background: #3259e8;
    border-color: #3259e8;
}

.subtask-checkbox.checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.subtask-text {
    flex: 1;
    font-size: 14px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s;
}

.subtask-text.completed {
    text-decoration: line-through;
    color: #666;
}

/* Task View Container (OLD - keep for backwards compat) */
.task-view-container {
    padding: 24px;
}

.task-view-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #666;
}

.breadcrumb-item {
    color: #888;
}

.breadcrumb-separator {
    color: #444;
}

.task-view-layout {
    display: flex;
    gap: 32px;
    margin-top: 24px;
}

.task-view-main {
    flex: 1;
    min-width: 0;
}

.task-view-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.task-view-title {
    font-family: 'Geologica', sans-serif;
    font-size: 26px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 24px 0;
    line-height: 1.3;
    padding: 0;
    border-radius: 0;
    min-height: auto;
}

.task-view-title[contenteditable="true"]:hover {
    cursor: text;
}

.task-view-title[contenteditable="true"]:focus {
    outline: none;
}

/* Task View Properties */
.task-view-properties {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 0;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.task-view-property {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.property-label-inline {
    color: #888;
    min-width: 100px;
    font-weight: 500;
}

.property-value-inline {
    color: #ddd;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* Task Sections */
.task-section {
    margin-bottom: 32px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.section-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.section-header svg {
    color: #666;
}

.add-subtask-btn {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #888;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.add-subtask-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.task-description {
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    color: #ccc;
    font-size: 14px;
    line-height: 1.6;
    min-height: 80px;
    transition: all 0.2s;
}

.task-description[contenteditable="true"]:hover {
    background: rgba(255, 255, 255, 0.04);
}

.task-description[contenteditable="true"]:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(50, 89, 232, 0.5);
    box-shadow: 0 0 0 3px rgba(50, 89, 232, 0.1);
}

.task-description:empty:before {
    content: "Нет описания";
    color: #555;
}

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

/* Status Indicator */
.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #888;
}

.status-indicator.todo {
    background: #888;
}

.status-indicator.discussion {
    background: #ff9800;
}

.status-indicator.in_work {
    background: #2196f3;
}

.status-indicator.done_for_test {
    background: #9c27b0;
}

.status-indicator.done {
    background: #4caf50;
}

/* Assignee Info */
.assignee-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.assignee-avatar-small {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

/* Sidebar */
.sidebar-section {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-label {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.sidebar-value {
    color: #fff;
    font-size: 14px;
    margin-bottom: 8px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.user-avatar-tiny {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.sidebar-btn,
.sidebar-btn-danger {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #888;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.sidebar-btn-danger {
    color: #f44336;
    border-color: rgba(244, 67, 54, 0.2);
}

.sidebar-btn-danger:hover {
    background: rgba(244, 67, 54, 0.1);
    border-color: rgba(244, 67, 54, 0.4);
}

/* Profile Modal */
.profile-content {
    padding: 16px 0;
}

.profile-header {
    display: flex;
    gap: 16px;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 12px;
}

.profile-info h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: #fff;
}

.profile-discord-id {
    font-family: 'SF Mono', 'Monaco', monospace;
    font-size: 13px;
    color: #666;
    margin: 0;
}

.profile-section {
    margin-bottom: 24px;
}

.profile-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

.profile-projects-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.stat-label {
    font-size: 12px;
    color: #666;
}

.stat-value {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
}

/* Tags in Properties */
.property-tags-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    min-width: 140px;
    min-height: 36px;
    transition: all 0.15s;
}

.property-tags-wrapper:hover {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.18);
}

.property-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
}

.property-tag-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    background-color: #888888;
    transition: all 0.2s;
}

.property-tag-item:hover {
    opacity: 0.85;
}

.property-tag-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border: none;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 3px;
    color: #fff;
    cursor: pointer;
    font-size: 10px;
    line-height: 1;
    padding: 0;
    transition: all 0.2s;
}

.property-tag-remove:hover {
    background: rgba(0, 0, 0, 0.5);
}

.property-add-tag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 3px;
    color: #888;
    font-size: 16px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

.property-add-tag-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ddd;
}

/* Tag Selector Dropdown */
.tag-selector-dropdown {
    position: fixed;
    background: #2c2c2c;
    border: 1px solid #454545;
    border-radius: 8px;
    padding: 8px;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    z-index: 10001;
}

.tag-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.tag-option:hover {
    background-color: #353535;
}

.tag-option.selected {
    background-color: rgba(50, 89, 232, 0.2);
}

.tag-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tag-option-name {
    font-size: 14px;
    color: #fff;
    flex: 1;
}

.create-tag-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-top: 1px solid #454545;
    margin-top: 8px;
    color: #3259e8;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.create-tag-option:hover {
    background-color: rgba(50, 89, 232, 0.1);
}

/* Tag on task card */
.task-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.task-tag-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    background-color: #888888;
}

.add-tag-btn-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: #888;
    cursor: pointer;
    transition: all 0.15s;
    vertical-align: middle;
    margin-left: 4px;
}

.add-tag-btn-inline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ddd;
}

.add-tag-btn-inline svg {
    width: 12px;
    height: 12px;
}

/* Color Picker */
.color-picker-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
}

.color-option {
    position: relative;
    cursor: pointer;
}

.color-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.color-box {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.color-option:hover .color-box {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.color-option input[type="radio"]:checked + .color-box {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* Responsive */
@media (max-width: 1024px) {
    .task-view-layout {
        flex-direction: column;
    }
    
    .task-view-sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }
    
    .modal-content-xlarge {
        width: 95vw;
    }
}

@media (max-width: 768px) {
    /* Modals */
    .modal-overlay {
        padding: 0;
    }
    
    .modal-content {
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 0;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
    }
    
    .modal-content-large,
    .modal-content-xlarge {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh;
    }
    
    .modal-header {
        padding: 16px;
    }
    
    .modal-title {
        font-size: 18px;
    }
    
    .task-modal-body {
        padding: 16px;
        max-height: calc(100vh - 140px);
        overflow-y: auto;
    }
    
    /* Properties bar in create modal */
    .task-properties-bar {
        flex-direction: column;
        gap: 10px;
        overflow-x: visible;
        flex-wrap: nowrap;
    }
    
    .property-select {
        width: 100%;
        min-width: auto;
        font-size: 14px;
    }
    
    .property-tags-wrapper {
        width: 100%;
        min-width: auto;
    }
    
    /* Task name input */
    .task-name-input {
        font-size: 16px;
        padding: 12px 0;
        margin-bottom: 16px;
    }
    
    /* Form textarea */
    .form-textarea {
        min-height: 120px;
        font-size: 14px;
        padding: 12px;
    }
    
    /* Task view modal */
    .task-view-modal-new {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0;
        flex-direction: column;
    }
    
    .task-view-left {
        padding: 20px 16px;
        overflow-y: auto;
        flex: 1;
        min-height: 0;
    }
    
    .task-view-divider {
        width: 100%;
        height: 1px;
    }
    
    .task-view-right {
        padding: 20px 16px;
        width: 100%;
        overflow-y: auto;
        max-height: 40vh;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }
    
    .task-view-badges {
        margin-bottom: 16px;
        flex-shrink: 0;
    }
    
    .task-view-title,
    .task-view-title-new {
        font-size: 22px;
        line-height: 1.3;
        margin-bottom: 20px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        flex-shrink: 0;
    }
    
    /* Task view properties */
    .task-view-properties {
        padding: 12px 0;
        gap: 10px;
    }
    
    .task-view-property {
        font-size: 13px;
        flex-wrap: wrap;
    }
    
    .property-label-inline {
        font-size: 12px;
        min-width: 90px;
    }
    
    .property-value-inline {
        font-size: 13px;
    }
    
    /* Subtasks */
    .subtasks-section {
        margin-top: 20px;
    }
    
    .subtask-item {
        padding: 10px 12px;
    }
    
    .subtask-text {
        font-size: 13px;
    }
    
    /* Profile */
    .profile-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 16px;
    }
    
    .profile-avatar {
        width: 80px;
        height: 80px;
    }
    
    /* Color picker */
    .color-picker-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }
    
    .color-box {
        width: 48px;
        height: 48px;
    }
    
    /* Tag selector dropdown */
    .tag-selector-dropdown {
        position: fixed !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: calc(100vw - 40px);
        max-width: 400px;
        max-height: 70vh;
    }
    
    /* Modal footer */
    .modal-footer {
        padding: 16px;
        gap: 10px;
        position: sticky;
        bottom: 0;
        background: #1a1a1a;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        z-index: 10;
    }
    
    .task-modal-footer {
        flex-direction: column-reverse;
        gap: 10px;
        padding: 16px;
    }
    
    .task-modal-footer button {
        width: 100%;
        padding: 12px;
        font-size: 15px;
    }
    
    .task-modal-footer-left,
    .task-modal-footer-right {
        width: 100%;
    }
    
    .task-modal-footer-right {
        justify-content: center;
    }
    
    .task-delete-btn,
    .task-test-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Modal buttons */
    .btn-primary,
    .btn-secondary {
        min-height: 44px;
        font-size: 15px;
        padding: 12px 16px;
    }
    
    /* Селекты и инпуты */
    .property-select,
    .form-input,
    .form-textarea {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
    
    /* Увеличиваем зоны нажатия */
    button,
    .property-tag-remove,
    .property-add-tag-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .property-tag-item {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .property-tag-remove {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }
    
    /* Dropdown меню */
    .tag-list {
        max-height: 50vh;
    }
    
    .tag-item-option {
        padding: 12px 14px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    /* Ultra compact for small phones */
    .modal-content {
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        border-radius: 0 !important;
        max-height: 100vh;
        height: 100vh !important;
        position: fixed;
        top: 0;
        left: 0;
    }
    
    .modal-header {
        padding: 14px 12px;
    }
    
    .modal-title {
        font-size: 16px;
    }
    
    .modal-close-btn {
        width: 28px;
        height: 28px;
        top: 12px;
        right: 12px;
    }
    
    .task-modal-body {
        padding: 12px;
        max-height: calc(100vh - 130px);
    }
    
    .task-name-input {
        font-size: 15px;
        padding: 10px 0;
        margin-bottom: 12px;
    }
    
    .task-view-left {
        padding: 16px 12px;
    }
    
    .task-view-right {
        padding: 16px 12px;
        max-height: 35vh;
    }
    
    .task-view-title,
    .task-view-title-new {
        font-size: 20px;
        line-height: 1.3;
        margin-bottom: 16px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .task-view-badges {
        margin-bottom: 12px;
        flex-wrap: wrap;
        flex-shrink: 0;
    }
    
    .task-view-description {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .property-select {
        font-size: 13px;
        padding: 10px 32px 10px 12px;
    }
    
    .form-textarea {
        font-size: 13px;
        padding: 10px;
        min-height: 100px;
    }
    
    .color-picker-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    
    .color-box {
        width: 44px;
        height: 44px;
    }
    
    .tag-selector-dropdown {
        width: calc(100vw - 24px) !important;
        left: 12px !important;
        right: 12px !important;
        max-width: none !important;
        transform: none !important;
    }
    
    .task-view-left {
        padding: 16px 12px;
    }
    
    .task-view-right {
        padding: 16px 12px;
    }
    
    .task-view-properties {
        gap: 8px;
    }
    
    .task-view-property {
        font-size: 12px;
    }
    
    .property-label-inline {
        min-width: 75px;
        font-size: 11px;
    }
    
    .property-value-inline {
        font-size: 12px;
    }
    
    .task-properties-bar {
        gap: 8px;
    }
    
    .subtask-item {
        padding: 8px 10px;
    }
    
    .subtask-text {
        font-size: 12px;
    }
    
    .modal-footer,
    .task-modal-footer {
        padding: 12px;
        gap: 8px;
        position: sticky;
        bottom: 0;
        background: #1a1a1a;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        z-index: 10;
    }
    
    /* Bug report modal */
    #bugReportModal .modal-content {
        display: flex;
        flex-direction: column;
        height: 100vh;
    }
    
    #bugReportModal .modal-body {
        flex: 1;
        overflow-y: auto;
        padding-bottom: 20px;
    }
    
    #bugReportModal .modal-footer {
        margin-top: 0;
        padding: 12px;
        flex-shrink: 0;
        position: sticky;
        bottom: 0;
        background: #111111;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        z-index: 10;
    }
    
    #bugReportForm .form-group {
        margin-bottom: 16px;
    }
    
    #bugReportForm .form-input,
    #bugReportForm .form-textarea {
        font-size: 15px;
    }
    
    .task-modal-footer button {
        padding: 10px;
        font-size: 13px;
    }
    
    /* Профиль */
    .profile-avatar {
        width: 70px;
        height: 70px;
    }
    
    .profile-info h2 {
        font-size: 18px;
    }
    
    .profile-username {
        font-size: 13px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    /* Touch targets */
    button:not(.property-tag-remove) {
        min-height: 40px;
    }
    
    .property-tag-item {
        padding: 5px 8px;
        font-size: 12px;
    }
    
    .tag-item-option {
        padding: 10px 12px;
    }
}

/* Task Modal Footer Buttons */
.task-modal-footer-left {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid #2a2a2a;
    flex-shrink: 0;
}

.task-modal-footer-right {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid #2a2a2a;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.task-delete-btn,
.task-test-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #333;
    border-radius: 8px;
    background: transparent;
    color: #fff;
    font-family: 'Geologica', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

.task-test-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #3b82f6;
}

.task-delete-btn:active,
.task-test-btn:active {
    transform: scale(0.98);
}

.task-delete-btn svg,
.task-test-btn svg {
    width: 16px;
    height: 16px;
}

/* ==================== COMPACT CREATE TASK MODAL ==================== */

.modal-content-compact {
    width: 620px;
    max-width: 90vw;
    background: #111111;
    border: 1px solid #3b3b3b;
    border-radius: 20px;
    padding: 0;
}

.create-task-container {
    padding: 32px 40px;
}

.create-task-title {
    width: 100%;
    background: transparent;
    border: none;
    font-size: 24px;
    font-weight: 600;
    color: #7b7b7b;
    padding: 0;
    margin-bottom: 16px;
    font-family: 'Inter', 'Geologica', sans-serif;
}

.create-task-title:focus {
    outline: none;
    color: #fff;
}

.create-task-title::placeholder {
    color: #7b7b7b;
}

.create-task-description {
    width: 100%;
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: #7b7b7b;
    padding: 0;
    margin-bottom: 48px;
    resize: none;
    font-family: 'Inter', 'Geologica', sans-serif;
    line-height: 1.5;
}

.create-task-description:focus {
    outline: none;
    color: #fff;
}

.create-task-description::placeholder {
    color: #7b7b7b;
}

.create-task-pills {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.task-pill {
    background: #191919;
    border: 1px solid #3b3b3b;
    border-radius: 8px;
    padding: 6px 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', 'Geologica', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
}

.task-pill:hover {
    background: #222;
    border-color: #4a4a4a;
}

.task-pill:focus {
    outline: none;
    border-color: #3259e8;
}

.task-pill-tags {
    background: #191919;
    border: 1px solid #3b3b3b;
}

.task-pill-tags:hover {
    background: #222;
}

.create-task-submit {
    background: #3259e8;
    border: none;
    border-radius: 12px;
    padding: 10px 24px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Inter', 'Geologica', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 192px;
}

.create-task-submit:hover {
    background: #2847c7;
}

.create-task-submit:active {
    transform: scale(0.98);
}

.baron-btn {
    background: linear-gradient(135deg, #ff6b35, #f7931e) !important;
    margin-left: 12px;
}

.baron-btn:hover {
    background: linear-gradient(135deg, #e55a2b, #e88516) !important;
}

.modal-content-compact .modal-close {
    display: none;
}
