* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #e74c3c;
    --primary-dark: #c0392b;
    --primary-light: #fdf2f2;
    --secondary: #2c3e50;
    --bg: #f8f9fa;
    --card-bg: #fff;
    --text: #1a1a1a;
    --text-light: #666;
    --border: #e5e5e5;
    --hover-bg: #f5f5f5;
    --todo-color: #e74c3c;
    --doing-color: #f39c12;
    --done-color: #2ecc71;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--secondary);
}

.login-container { width: 100%; max-width: 380px; padding: 20px; }

.login-box {
    background: var(--card-bg);
    padding: 48px 40px;
}

.login-logo {
    display: block;
    margin: 0 auto 24px;
    height: 60px;
}

.login-box .subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 32px;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.form-group { margin-bottom: 20px; }

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    font-size: 15px;
    transition: border-color 0.2s;
    background: var(--card-bg);
    color: var(--text);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.error-msg {
    color: var(--primary);
    font-size: 13px;
    margin-bottom: 15px;
    text-align: center;
    min-height: 20px;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    letter-spacing: 1px;
}

.btn-login:hover { background: var(--primary-dark); }

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 240px;
    height: 100vh;
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    display: block;
    margin: 0 auto;
    height: 52px;
}

.sidebar-nav { flex: 1; padding: 16px 0; }

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: var(--text-light);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 14px;
}

.nav-item:hover { background: var(--hover-bg); color: var(--text); }
.nav-item.active { color: var(--primary); background: var(--primary-light); font-weight: 500; }

.nav-item .icon { margin-right: 12px; font-size: 18px; }

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
}

.user-name { font-size: 14px; color: var(--text); font-weight: 500; }
.user-role { font-size: 12px; color: var(--text-light); }

.main-content {
    margin-left: 240px;
    min-height: 100vh;
    padding: 32px 40px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-title { font-size: 24px; font-weight: 600; letter-spacing: -0.5px; }

.btn-primary {
    padding: 12px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover { background: var(--primary-dark); }

.board-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.board-column {
    background: var(--card-bg);
    padding: 0;
    min-height: calc(100vh - 180px);
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 2px solid var(--border);
}

.column-title {
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.col-dot {
    width: 10px;
    height: 10px;
    background: currentColor;
}

.todo-col .col-dot { background: var(--todo-color); }
.doing-col .col-dot { background: var(--doing-color); }
.done-col .col-dot { background: var(--done-color); }

.todo-col .column-title { color: var(--todo-color); }
.doing-col .column-title { color: var(--doing-color); }
.done-col .column-title { color: var(--done-color); }

.column-count {
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-light);
    background: var(--bg);
    border-radius: 12px;
}

.todo-col .column-header { border-color: var(--todo-color); }
.doing-col .column-header { border-color: var(--doing-color); }
.done-col .column-header { border-color: var(--done-color); }

.task-list { padding: 16px; min-height: 200px; max-height: calc(100vh - 280px); overflow-y: auto; }

.task-card {
    background: var(--card-bg);
    padding: 16px;
    margin-bottom: 12px;
    cursor: grab;
    transition: all 0.15s;
    border: 1px solid var(--border);
    border-left: 3px solid transparent;
}

.task-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.task-card.priority-high { border-left-color: #e74c3c; }
.task-card.priority-medium { border-left-color: #f39c12; }
.task-card.priority-low { border-left-color: #27ae60; }

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.task-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.task-title-row .task-title {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 0;
    word-break: break-word;
}

.task-extra-row {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.task-badges {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    margin-left: 8px;
}

.task-badges .task-type-tag,
.task-badges .status-badge {
    font-size: 11px;
    padding: 2px 6px;
}

.task-subtask-badge,
.task-comment-badge {
    font-size: 12px;
    color: #666;
    padding: 4px 8px;
    background: #f5f5f5;
    border-radius: 4px;
}
.task-subtask-badge span,
.task-comment-badge span {
    font-size: 10px;
}
.task-subtask-badge.clickable {
    cursor: pointer;
    transition: background 0.2s;
}
.task-subtask-badge.clickable:hover {
    background: #e0e0e0;
}

.task-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--text);
    line-height: 1.4;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: var(--text-light);
    align-items: center;
}

.task-tag {
    padding: 4px 10px;
    font-size: 12px;
}

.task-tag.dept { background: var(--primary-light); color: var(--primary); }
.task-tag.assignee { background: #fef3e6; color: #e67e22; }
.task-tag.due { background: #fef9e7; color: #9a7b4f; }

.task-actions {
    display: none;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.task-card:hover .task-actions { display: flex; }

.btn-icon {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s;
}

.btn-icon:hover { border-color: var(--primary); color: var(--primary); }

.btn-send { color: #27ae60; }
.btn-send:hover { background: #e8f8f5; border-color: #27ae60; }

.subtask-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    padding: 6px 8px;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
}
.subtask-progress:hover { background: #eee; }
.task-attachment {
    font-size: 12px;
    color: #666;
    margin-right: 8px;
}
.task-attachment span {
    font-size: 10px;
}
.subtask-progress-bar {
    flex: 1;
    height: 6px;
    background: #e5e5e5;
    border-radius: 3px;
    overflow: hidden;
}
.subtask-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 3px;
    transition: width 0.3s;
}
.subtask-progress-text {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}
.subtask-progress-text span {
    font-size: 10px;
}

.table-progress {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 80px;
}
.table-progress-bar {
    width: 50px;
    height: 6px;
    background: #e5e5e5;
    border-radius: 3px;
    overflow: hidden;
}
.table-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 3px;
}
.table-progress span {
    font-size: 11px;
    color: #666;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.active { display: flex; }

.modal {
    background: var(--card-bg);
    padding: 32px;
    width: 480px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.modal-title { font-size: 18px; font-weight: 600; }

.modal-close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    cursor: pointer;
    font-size: 20px;
    transition: all 0.15s;
}

.modal-close:hover { border-color: var(--primary); color: var(--primary); }

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

.form-field { margin-bottom: 16px; }

.form-field label {
    display: block;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    font-size: 14px;
    background: var(--card-bg);
    color: var(--text);
}

.form-field textarea { resize: vertical; min-height: 100px; }

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.btn-secondary {
    padding: 12px 24px;
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-secondary:hover { border-color: var(--text); }

.filter-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    align-items: center;
}

.filter-bar select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    font-size: 13px;
    min-width: 140px;
    background: var(--card-bg);
    color: var(--text);
}

.table-container {
    background: var(--card-bg);
    padding: 0;
}

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

th, td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td { font-size: 14px; }

tr:hover { background: var(--hover-bg); }

.role-badge {
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 500;
}

.role-badge.admin { background: var(--primary-light); color: var(--primary); }
.role-badge.member { background: #e8f4fd; color: #3498db; }

.action-btns { display: flex; gap: 8px; }

.btn-small {
    padding: 8px 14px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-small:hover { border-color: var(--text); }
.btn-small.delete:hover { border-color: var(--primary); color: var(--primary); }

.btn-danger {
    padding: 10px 20px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}
.btn-danger:hover { background: #c0392b; }

.dragging { opacity: 0.5; }
.drag-over { background: var(--primary-light) !important; }

.hidden { display: none !important; }

.stat-item {
    background: var(--card-bg);
    padding: 20px 28px;
}

.stat-item .num { font-size: 28px; font-weight: 600; color: var(--primary); }
.stat-item .label { font-size: 12px; color: var(--text-light); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

.comment-modal { width: 500px; }
#subtaskModal .modal-title { font-size: 16px; }
#subtaskModal .comment-form input { font-size: 14px; padding: 12px; }
#subtaskModal .btn-primary { font-size: 14px; padding: 10px 20px; }
#subtaskModal { display: none; }
.comment-list { max-height: 400px; overflow-y: auto; margin-bottom: 16px; }
.comment-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: none; }
.comment-user { font-weight: 600; font-size: 13px; color: var(--primary); margin-bottom: 4px; }
.comment-content { font-size: 14px; line-height: 1.5; color: var(--text); margin-bottom: 4px; }
.comment-time { font-size: 11px; color: var(--text-light); }
.comment-form { display: flex; gap: 10px; }
.comment-form textarea { flex: 1; padding: 10px; border: 1px solid var(--border); resize: none; font-size: 14px; background: var(--card-bg); color: var(--text); }
.comment-form .btn-primary { white-space: nowrap; height: fit-content; }

.task-comment-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    font-size: 11px;
    color: var(--text-light);
    background: var(--bg);
    border: none;
    cursor: pointer;
    margin-top: 8px;
}
.task-comment-btn:hover { color: var(--primary); }

.task-modal { width: 600px; }

.task-type-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    margin-right: 6px;
}
.task-type-tag .icon { font-size: 10px; }
.task-type-tag.short { background: #e8f4fd; color: #3498db; }
.task-type-tag.long { background: #fef5e7; color: #e67e22; }
.task-type-tag.recurring { background: #e8f8f5; color: #27ae60; }
.task-type-tag.loop { background: #f5eef8; color: #9b59b6; }

.priority-tag {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
}
.priority-tag.high { background: #fde8e8; color: #e74c3c; }
.priority-tag.medium { background: #fef9e7; color: #f39c12; }
.priority-tag.low { background: #e8f4fd; color: #3498db; }

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: bold;
    line-height: 1;
}
.status-badge:hover { transform: scale(1.1); }
.status-badge.status-todo { background: #ecf0f1; color: #95a5a6; }
.status-badge.status-doing { background: #f39c12; color: #fff; }
.status-badge.status-done { background: #27ae60; color: #fff; box-shadow: 0 2px 4px rgba(39, 174, 96, 0.3); }

.table-status {
    width: auto;
    height: auto;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
}
.table-status:hover { transform: none; opacity: 0.8; }

.status-menu {
    position: fixed;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    overflow: hidden;
}
.status-menu-item {
    padding: 10px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
}
.status-menu-item:hover { background: var(--hover-bg); }
.status-menu-item.active { color: var(--primary); font-weight: 600; }

.time-left {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
}
.time-left.normal { background: var(--bg); color: var(--text-light); }
.time-left.week { background: #fef9e7; color: #f39c12; }
.time-left.today { background: #fef5e7; color: #e67e22; }
.time-left.tomorrow { background: #fde8e8; color: #e74c3c; }
.time-left.overdue { background: #fde8e8; color: #fff; }

.role-badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 4px;
    margin-right: 4px;
}
.role-badge.executor { background: #fde8e8; color: #e74c3c; }
.role-badge.follower { background: #fef5e7; color: #e67e22; }
.role-badge.supporter { background: #e8f4fd; color: #3498db; }

.gantt-container {
    background: var(--card-bg);
    overflow-x: auto;
    padding: 20px;
}

.reminder-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 20px;
    width: 300px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 2000;
}
.reminder-toast .reminder-title { font-weight: 600; color: var(--primary); margin-bottom: 10px; }
.reminder-toast .reminder-content { font-size: 14px; margin-bottom: 15px; line-height: 1.5; }

#settingsPage .page-header + div {
    max-width: 500px;
    background: var(--card-bg);
    padding: 24px;
    border: 1px solid var(--border);
}
.reminder-toast button { width: 100%; padding: 8px; background: var(--primary); color: #fff; border: none; cursor: pointer; }

.task-list select[multiple] { height: 60px; }

.role-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 0;
    min-height: 48px;
}
.role-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 52px;
    padding: 6px 4px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--card-bg);
}
.role-item:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
}
.role-item.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.2);
}
.role-item .avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), #34495e);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 3px;
}
.role-item.selected .avatar {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}
.role-item .name {
    font-size: 10px;
    color: var(--text);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.subtask-list {
    max-height: 150px;
    overflow-y: auto;
    margin-bottom: 8px;
}
.subtask-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    gap: 10px;
}
.subtask-item:last-child { border-bottom: none; }
.subtask-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.subtask-item.done .subtask-title {
    text-decoration: line-through;
    color: #999;
}
.subtask-item .subtask-title {
    flex: 1;
    font-size: 13px;
}
.subtask-item .subtask-completed-by {
    font-size: 11px;
    color: #27ae60;
    margin-left: 8px;
}
.subtask-item .subtask-delete {
    color: #999;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
}
.subtask-item .subtask-delete:hover { color: var(--primary); }
.subtask-add {
    display: flex;
    gap: 8px;
}
.subtask-add input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
}
.subtask-add button {
    padding: 8px 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .mobile-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        background: var(--card-bg);
        border-bottom: 1px solid var(--border);
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    .mobile-menu-btn {
        width: 40px;
        height: 40px;
        border: 1px solid var(--border);
        background: var(--card-bg);
        border-radius: 8px;
        font-size: 20px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-logo {
        height: 32px;
    }
    
    .main-content {
        margin-left: 0;
        padding: 12px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 12px;
    }
    
    .page-title {
        font-size: 18px;
    }
    
    .filter-bar {
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 12px;
    }
    
    .filter-bar select,
    .filter-bar input {
        flex: 1;
        min-width: 80px;
        font-size: 12px;
        padding: 6px 8px;
    }
    
    .board-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .board-column {
        min-height: 150px;
    }
    
    .column-header {
        padding: 12px 16px;
    }
    
    .column-header h3 {
        font-size: 14px;
    }
    
    .task-card {
        padding: 10px;
    }
    
    .task-title-row {
        flex-direction: column;
        gap: 6px;
    }
    
    .task-title-row .task-title {
        font-size: 13px;
    }
    
    .status-badge {
        width: 20px;
        height: 20px;
        font-size: 10px;
        align-self: flex-start;
    }
    
    .task-meta {
        gap: 4px;
    }
    
    .task-tag, .priority-tag, .task-type-tag {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .task-extra-row {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .task-actions {
        display: flex !important;
    }
    
    .btn-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .subtask-progress {
        padding: 4px 6px;
    }
    
    .subtask-progress-bar {
        width: 40px;
        height: 4px;
    }
    
    .subtask-progress-text {
        font-size: 10px;
    }
    
    .modal {
        width: 95% !important;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-header {
        padding: 12px 16px;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .form-field {
        margin-bottom: 12px;
    }
    
    .form-field label {
        font-size: 13px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .role-grid {
        gap: 4px;
    }
    
    .role-item {
        width: 44px;
        padding: 4px 2px;
    }
    
    .role-item .avatar {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
    
    .role-item .name {
        font-size: 9px;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    table {
        font-size: 11px;
    }
    
    th, td {
        padding: 6px 4px !important;
        white-space: nowrap;
    }
    
    .gantt-container {
        overflow-x: auto;
    }
    
    .task-list {
        padding: 10px;
        min-height: 100px;
    }
    
    .task-card .task-title {
        font-size: 13px;
    }
    
    .task-card .task-meta {
        font-size: 10px;
    }
    
    .comment-modal {
        width: 95% !important;
    }
    
    .task-modal {
        width: 95% !important;
    }
}
        gap: 4px;
    }
    
    .role-item {
        width: 44px;
        padding: 4px 2px;
    }
    
    .role-item .avatar {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
    
    .role-item .name {
        font-size: 9px;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px !important;
        white-space: nowrap;
    }
    
    .gantt-container {
        overflow-x: auto;
    }
}

.field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
}
.field-header:hover label { color: var(--primary); }
.field-toggle {
    font-size: 10px;
    color: var(--text-light);
    transition: transform 0.2s;
}
.collapsed .field-toggle { transform: rotate(-90deg); }
.field-content {
    padding-top: 8px;
}

.attachment-list {
    max-height: 150px;
    overflow-y: auto;
    margin-bottom: 8px;
}
.attachment-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    gap: 10px;
}
.attachment-item:last-child { border-bottom: none; }
.attachment-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.attachment-info {
    flex: 1;
    min-width: 0;
}
.attachment-name {
    font-size: 13px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.attachment-meta {
    font-size: 11px;
    color: var(--text-light);
}
.attachment-delete {
    color: #999;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
}
.attachment-delete:hover { color: var(--primary); }
.attachment-upload {
    margin-top: 8px;
}
