/* ===== Root Variables ===== */
:root {
    --sp-bg: #f4f6f9;
    --sp-card: #ffffff;
    --sp-border: #e2e6ed;
    --sp-text: #1e293b;
    --sp-text-muted: #64748b;
    --sp-primary: #3b82f6;
    --sp-primary-dark: #1e40af;
    --sp-nav-bg: #0f172a;
    --sp-nav-accent: #3b82f6;
    --sp-radius: 12px;
    --sp-radius-sm: 8px;
    --sp-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --sp-shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --sp-shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --sp-transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ===== General ===== */
body {
    background: var(--sp-bg);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--sp-text);
    -webkit-font-smoothing: antialiased;
}

.main-content {
    padding: 1.25rem;
    max-width: 1440px;
    margin: 0 auto;
}

/* ===== Navbar ===== */
.navbar {
    background: var(--sp-nav-bg) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    padding: 0.4rem 0;
    z-index: 1050;
}
.navbar-brand {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}
.brand-icon {
    width: 32px;
    height: 32px;
    background: var(--sp-nav-accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.navbar .nav-link {
    color: rgba(255,255,255,0.7) !important;
    font-size: 0.87rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem !important;
    border-radius: 6px;
    transition: var(--sp-transition);
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.1);
}
.user-info {
    display: flex !important;
    align-items: center;
    gap: 0.4rem;
}
.role-badge {
    font-size: 0.65rem;
    padding: 0.15em 0.5em;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.role-manager { background: #7c3aed; color: #fff; }
.role-supervisor { background: #0ea5e9; color: #fff; }

/* ===== Filter Bar ===== */
.filter-bar {
    background: var(--sp-card);
    border-radius: var(--sp-radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--sp-border);
    box-shadow: var(--sp-shadow-sm);
}
.filter-bar .form-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--sp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}
.filter-bar .form-select,
.filter-bar .form-control {
    font-size: 0.85rem;
    border-radius: var(--sp-radius-sm);
}
.filter-bar .input-group-text {
    background: transparent;
    border-right: 0;
    color: var(--sp-text-muted);
}
.filter-bar .input-group .form-control {
    border-left: 0;
}

/* ===== Empty Project Banner ===== */
.empty-project-banner {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--sp-card);
    border-radius: var(--sp-radius);
    border: 2px dashed var(--sp-border);
}
.empty-project-banner i {
    font-size: 3rem;
    color: var(--sp-text-muted);
    margin-bottom: 1rem;
    display: block;
}

/* ===== Board Layout ===== */
.board-row {
    display: flex;
    gap: 1.25rem;
    align-items: stretch;
}
.board-col {
    flex: 1;
    min-width: 0;
}

.board-column {
    background: var(--sp-card);
    border-radius: var(--sp-radius);
    border: 1px solid var(--sp-border);
    display: flex;
    flex-direction: column;
    min-height: 70vh;
    box-shadow: var(--sp-shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.3s;
}
.board-column:hover {
    box-shadow: var(--sp-shadow-md);
}
.column-planned { border-top: 3px solid var(--sp-primary); }
.column-supervisor { border-top: 3px solid #0ea5e9; }
.column-closed { border-top: 3px solid #94a3b8; }
.board-column-header {
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.85rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--sp-text);
    border-bottom: 1px solid var(--sp-border);
    background: #fafbfc;
}
.column-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #eef2ff;
    color: var(--sp-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}
.column-icon.supervisor {
    background: #f0f9ff;
    color: #0ea5e9;
}
.column-icon.closed {
    background: #f1f5f9;
    color: #64748b;
}
.board-col-closed {
    flex: 0 0 320px;
    min-width: 280px;
}
.column-closed {
    background: #f8fafc;
}
.column-closed .task-card {
    opacity: 0.7;
    cursor: pointer;
}
.column-closed .task-card:hover {
    opacity: 1;
}

/* Compact card for closed column */
.task-card-compact {
    background: var(--sp-card);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-sm);
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.4rem;
    cursor: pointer;
    transition: box-shadow var(--sp-transition), opacity var(--sp-transition);
    box-shadow: var(--sp-shadow-sm);
    opacity: 0.75;
}
.task-card-compact:hover {
    box-shadow: var(--sp-shadow-md);
    opacity: 1;
}
.task-card-compact .compact-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--sp-text);
    line-height: 1.3;
    margin-bottom: 0.25rem;
}
.task-card-compact .compact-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    color: var(--sp-text-muted);
}

/* Medium screen: stack closed column below */
@media (min-width: 768px) and (max-width: 1199.98px) {
    .board-row {
        flex-wrap: wrap;
    }
    .board-col {
        flex: 1 1 45%;
        min-width: 300px;
    }
    .board-col-closed {
        flex: 1 1 100%;
        min-width: 100%;
    }
    .board-col-closed .board-column {
        min-height: auto;
    }
    .board-col-closed .task-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .board-col-closed .task-card-compact {
        flex: 1 1 220px;
        max-width: 300px;
        margin-bottom: 0;
    }
}
.task-list {
    flex: 1;
    padding: 0.75rem;
    min-height: 100px;
}
.board-column-footer {
    padding: 0.6rem 1rem;
    border-top: 1px solid var(--sp-border);
    background: #fafbfc;
    font-size: 0.75rem;
    text-align: center;
    color: var(--sp-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.board-column-footer i {
    font-size: 0.85rem;
    opacity: 0.6;
}

/* ===== Empty States ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--sp-text-muted);
}
.empty-state i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
    opacity: 0.3;
}
.empty-state p {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
}
.empty-state small {
    font-size: 0.78rem;
    color: #94a3b8;
}

/* ===== Task Card ===== */
.task-card {
    background: var(--sp-card);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-sm);
    padding: 0.85rem 1rem;
    margin-bottom: 0.5rem;
    cursor: grab;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease, opacity 0.3s ease;
    color: inherit;
    display: block;
    box-shadow: var(--sp-shadow-sm);
    position: relative;
}
.task-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: #b0bccc;
}
.task-card:active {
    cursor: grabbing;
    transform: scale(0.98);
}

/* Priority indicators */
.task-card.priority-high { border-left: 4px solid #ef4444; }
.task-card.priority-medium { border-left: 4px solid #f59e0b; }
.task-card.priority-low { border-left: 4px solid #06b6d4; }

.task-card.overdue {
    background: #fef2f2;
    border-color: #fecaca;
}

.task-card .card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: var(--sp-text);
    line-height: 1.35;
}
.task-card .card-location {
    font-size: 0.78rem;
    color: var(--sp-text-muted);
    margin-bottom: 0.3rem;
}
.task-card .card-description {
    font-size: 0.78rem;
    color: var(--sp-text-muted);
    margin-bottom: 0.3rem;
    line-height: 1.4;
}
.task-card .card-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.4rem;
    padding-top: 0.4rem;
    border-top: 1px solid #f1f5f9;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.task-card .card-meta {
    font-size: 0.72rem;
    color: var(--sp-text-muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
}
.task-card .card-assignee {
    font-size: 0.72rem;
    color: var(--sp-text-muted);
}
.task-card .card-meta-icon {
    font-size: 0.72rem;
    color: var(--sp-text-muted);
}
.task-card .due-date {
    font-size: 0.72rem;
}

/* State badges */
.state-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2em 0.55em;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.state-planned  { background: #dbeafe; color: #1e40af; }
.state-started  { background: #dcfce7; color: #166534; }
.state-paused   { background: #fef3c7; color: #92400e; }
.state-blocked  { background: #fee2e2; color: #991b1b; }
.state-finished { background: #d1fae5; color: #065f46; }
.state-closed   { background: #e2e8f0; color: #475569; }

/* Priority badges */
.priority-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2em 0.55em;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.priority-bg-high   { background: #fee2e2; color: #991b1b; }
.priority-bg-medium { background: #fef3c7; color: #92400e; }
.priority-bg-low    { background: #cffafe; color: #155e75; }

.fs-badge {
    font-size: 0.75rem;
    padding: 0.3em 0.65em;
}

/* Drag & drop */
.sortable-ghost {
    opacity: 0.25;
    background: #dbeafe !important;
    border: 2px dashed var(--sp-primary) !important;
    border-radius: var(--sp-radius-sm);
    min-height: 60px;
}
.sortable-chosen {
    box-shadow: 0 12px 40px rgba(59,130,246,0.25) !important;
    transform: rotate(1.5deg) !important;
    z-index: 100;
    border-color: var(--sp-primary) !important;
}
.sortable-drag {
    box-shadow: 0 16px 48px rgba(59,130,246,0.3) !important;
    transform: rotate(1.5deg) scale(1.03) !important;
}
body.is-dragging .task-card {
    transition: none !important;
}
/* Drop zone highlight when dragging */
body.is-dragging .task-list {
    border: 2px dashed transparent;
    border-radius: var(--sp-radius-sm);
    transition: border-color 0.2s, background 0.2s;
}
body.is-dragging .column-planned .task-list {
    border-color: rgba(59,130,246,0.2);
    background: rgba(219,234,254,0.15);
}
body.is-dragging .column-supervisor .task-list {
    border-color: rgba(14,165,233,0.2);
    background: rgba(240,249,255,0.15);
}

/* Subtask progress in card */
.subtask-progress {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    color: var(--sp-text-muted);
}
.subtask-progress .progress {
    height: 4px;
    width: 40px;
    border-radius: 2px;
    background: #e2e8f0;
}
.subtask-progress .progress-bar {
    border-radius: 2px;
    background: #22c55e;
}

/* ===== Mobile Tab Bar ===== */
.mobile-tab-bar {
    display: flex;
    gap: 0.5rem;
    background: var(--sp-card);
    padding: 0.35rem;
    border-radius: var(--sp-radius);
    border: 1px solid var(--sp-border);
    box-shadow: var(--sp-shadow-sm);
}
.mobile-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.6rem 0.5rem;
    border-radius: var(--sp-radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--sp-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: var(--sp-transition);
}
.mobile-tab.active {
    background: var(--sp-primary);
    color: #fff;
}
.mobile-tab .tab-count {
    font-size: 0.7rem;
    background: rgba(0,0,0,0.15);
    padding: 0.1em 0.45em;
    border-radius: 10px;
    font-weight: 700;
}
.mobile-tab.active .tab-count {
    background: rgba(255,255,255,0.25);
}

/* Mobile card improvements */
.task-card.mobile-card {
    cursor: pointer;
}
.task-card.mobile-card .card-title {
    flex: 1;
    min-width: 0;
}

/* Mobile assign / unassign buttons */
.btn-assign-full {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.45rem 0.75rem;
    border-radius: 6px;
}
.btn-unassign {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    font-size: 0.78rem;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
}
.btn-assign {
    font-size: 0.78rem;
    padding: 0.35rem 0.6rem;
    white-space: nowrap;
    border-radius: 6px;
    flex-shrink: 0;
}

/* ===== Detail Pages ===== */
.detail-container {
    padding: 0 0.5rem;
}
.detail-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.back-link {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--sp-text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: var(--sp-transition);
}
.back-link:hover {
    color: var(--sp-primary);
}
.detail-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--sp-text);
    letter-spacing: -0.02em;
}
.detail-description {
    color: var(--sp-text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0;
}

.detail-section {
    background: var(--sp-card);
    border-radius: var(--sp-radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid var(--sp-border);
    box-shadow: var(--sp-shadow-sm);
}
.detail-header-section {
    padding: 1.5rem 1.25rem;
}

.section-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
    color: var(--sp-text);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Detail info grid */
.detail-info-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}
.info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    min-width: 140px;
}
.info-item i {
    font-size: 1rem;
    color: var(--sp-text-muted);
    margin-top: 0.15rem;
}
.info-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--sp-text-muted);
    display: block;
}
.info-value {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--sp-text);
    display: block;
}

/* Detail grid (main + sidebar) */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 1rem;
    align-items: start;
}
@media (max-width: 991.98px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

/* State changer */
.state-changer {
    padding-top: 1rem;
    border-top: 1px solid var(--sp-border);
}
.state-changer-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--sp-text-muted);
    margin-bottom: 0.5rem;
    display: block;
}
.state-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.state-btn {
    border: 1px solid var(--sp-border);
    background: var(--sp-card);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--sp-transition);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--sp-text-muted);
}
.state-btn:hover:not(:disabled) {
    border-color: var(--sp-primary);
    color: var(--sp-primary);
    background: #f0f5ff;
}
.state-btn.active {
    font-weight: 700;
}
.state-btn-planned.active  { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.state-btn-started.active  { background: #dcfce7; color: #166534; border-color: #86efac; }
.state-btn-paused.active   { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.state-btn-blocked.active  { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.state-btn-finished.active { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.state-btn-closed.active   { background: #e2e8f0; color: #475569; border-color: #94a3b8; }

.state-btn:disabled {
    opacity: 1;
    cursor: default;
}

/* ===== Subtasks ===== */
.subtask-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 6px;
    transition: background var(--sp-transition);
}
.subtask-item:hover {
    background: #f8fafc;
}
.subtask-item:last-child {
    border-bottom: none;
}
.subtask-item.completed .subtask-label {
    text-decoration: line-through;
    color: #94a3b8;
}
.subtask-check {
    width: 18px;
    height: 18px;
    border-radius: 4px !important;
    cursor: pointer;
}
.subtask-label {
    font-size: 0.88rem;
    cursor: default;
}
.subtask-meta {
    font-size: 0.7rem;
    color: #94a3b8;
    white-space: nowrap;
}
.btn-icon {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.75rem;
}
.subtask-total-progress {
    display: inline-flex;
    align-items: center;
    margin-left: 0.5rem;
}
.add-subtask-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}

/* ===== Comments ===== */
.comment-item {
    padding: 0.85rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.comment-item:last-child { border-bottom: none; }
.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}
.comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--sp-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}
.comment-author {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--sp-text);
}
.comment-time {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-left: 0.25rem;
}
.comment-body {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.55;
    padding-left: calc(28px + 0.5rem);
}
.comment-form {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}
.comment-form textarea {
    border-radius: var(--sp-radius-sm);
    font-size: 0.88rem;
    resize: vertical;
    flex: 1;
}

/* ===== Attachments ===== */
.attachment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.attachment-item {
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-sm);
    overflow: hidden;
    text-align: center;
    background: #fafbfc;
    transition: box-shadow var(--sp-transition), transform var(--sp-transition);
    text-decoration: none;
    color: inherit;
    display: block;
}
.attachment-item:hover {
    box-shadow: var(--sp-shadow-md);
    transform: translateY(-2px);
}
.att-thumb img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    display: block;
}
.att-icon {
    padding: 1rem;
    font-size: 2rem;
}
.att-name {
    font-size: 0.68rem;
    padding: 0.3rem 0.4rem;
    word-break: break-all;
    color: #475569;
    border-top: 1px solid var(--sp-border);
    background: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Upload area */
.upload-form {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}
.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 1rem;
    border: 2px dashed var(--sp-border);
    border-radius: var(--sp-radius-sm);
    cursor: pointer;
    transition: var(--sp-transition);
    color: var(--sp-text-muted);
    font-size: 0.82rem;
}
.upload-area:hover {
    border-color: var(--sp-primary);
    color: var(--sp-primary);
    background: #f0f5ff;
}
.upload-area i {
    font-size: 1.5rem;
}

/* ===== History ===== */
.history-list {
    position: relative;
    padding-left: 1rem;
}
.history-list::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}
.history-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.8rem;
    color: #475569;
    position: relative;
}
.history-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #94a3b8;
    border: 2px solid var(--sp-card);
    flex-shrink: 0;
    margin-top: 4px;
    margin-left: -1rem;
    position: relative;
    z-index: 1;
}
.history-time {
    font-size: 0.7rem;
    color: #94a3b8;
}

/* ===== Login Page ===== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    padding: 1rem;
}
.login-card {
    background: var(--sp-card);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
}
.login-logo {
    width: 56px;
    height: 56px;
    background: var(--sp-primary);
    color: #fff;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
}
.login-title {
    font-weight: 700;
    color: var(--sp-text);
    margin-bottom: 0.2rem;
}
.login-subtitle {
    color: var(--sp-text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}
.login-card .form-label {
    text-align: left;
    display: block;
}
.login-card .input-group-text {
    background: transparent;
    border-right: 0;
    color: var(--sp-text-muted);
}
.login-card .input-group .form-control {
    border-left: 0;
}
.login-card .btn-lg {
    padding: 0.65rem;
    font-weight: 600;
}

/* ===== User Avatar ===== */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--sp-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* ===== Add Form ===== */
.add-form {
    background: #f8fafc;
    border-radius: var(--sp-radius-sm);
    padding: 1rem;
    border: 1px solid #e2e8f0;
}
.add-form .form-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

/* ===== List Group Enhancements ===== */
.list-group-item {
    border-left: 0;
    border-right: 0;
    transition: background var(--sp-transition);
}
.list-group-item:hover {
    background: #f8fafc;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 767.98px) {
    .main-content {
        padding: 0.75rem;
    }
    .task-card {
        cursor: default;
        padding: 0.75rem;
    }
    .filter-bar {
        padding: 0.75rem;
    }
    .detail-section {
        padding: 1rem;
    }
    .detail-info-grid {
        gap: 0.75rem;
    }
    .info-item {
        min-width: calc(50% - 0.5rem);
    }
    .state-buttons {
        gap: 0.3rem;
    }
    .state-btn {
        font-size: 0.75rem;
        padding: 0.35rem 0.55rem;
    }
    .comment-form {
        flex-direction: column;
    }
    .detail-topbar {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

@media (max-width: 575.98px) {
    .info-item {
        min-width: 100%;
    }
}

/* ===== Toast Customization ===== */
.toast {
    border-radius: var(--sp-radius-sm) !important;
    font-size: 0.88rem;
}

/* ===== Form Enhancements ===== */
.form-control:focus,
.form-select:focus {
    border-color: var(--sp-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* ===== Modal Enhancements ===== */
.modal-content {
    border: none;
    border-radius: var(--sp-radius);
    box-shadow: var(--sp-shadow-lg);
}

/* ===== Badge defaults ===== */
.badge {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ===== Scrollbar ===== */
.task-list::-webkit-scrollbar {
    width: 6px;
}
.task-list::-webkit-scrollbar-track {
    background: transparent;
}
.task-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
.task-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
