:root {
    --bg-main: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-input: #f1f5f9;
    --border-color: rgba(148, 163, 184, 0.2);
    --text-main: #0f172a;
    --text-muted: #475569;
    
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.15);
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.15);
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.15);
}

html {
    overflow-x: hidden;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: radial-gradient(circle at top left, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    color: var(--text-main);
    min-height: 100vh;
    padding: 32px 16px;
    line-height: 1.5;
    overflow-x: hidden;
    width: 100%;
}

.app-shell {
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    min-width: 0;
}

/* Glassmorphism Cards */
.hero-card,
.panel,
.summary-card,
.reminder-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 25px -5px rgba(148, 163, 184, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hero Section */
.hero-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    z-index: 0;
}

.hero-card > div {
    position: relative;
    z-index: 1;
}

.eyebrow {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--primary);
    margin-bottom: 12px;
}

.hero-card h1 {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-card p {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 100%;
}

.hero-badge {
    position: relative;
    z-index: 1;
    min-width: 0;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    color: white;
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 10px 25px var(--primary-glow);
}

.hero-badge-icon {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.hero-badge span {
    display: block;
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 4px;
}

.hero-badge small {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

/* Summary Grid */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.summary-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(148, 163, 184, 0.2);
    border-color: rgba(148, 163, 184, 0.3);
}

.summary-icon {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid var(--border-color);
    color: var(--primary);
    border-radius: 14px;
    font-size: 1.2rem;
    margin-bottom: 6px;
}

.summary-card.pending .summary-icon { color: var(--primary); }
.summary-card.in-progress .summary-icon { color: var(--warning); }
.summary-card.completed .summary-icon { color: var(--success); }
.summary-card.danger .summary-icon { color: var(--danger); }
.summary-card.blocker .summary-icon { color: #f59e0b; }

.summary-card h3 {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}

.summary-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.summary-card.danger {
    border-color: rgba(239, 68, 68, 0.2);
}
.summary-card.danger:hover {
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 15px 30px var(--danger-glow);
}

.summary-card.blocker {
    border-color: rgba(245, 158, 11, 0.2);
}
.summary-card.blocker.active {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(254, 243, 199, 0.4) 100%);
    border-color: rgba(245, 158, 11, 0.4);
}
.summary-card.blocker:hover {
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 0 15px 30px rgba(245, 158, 11, 0.15);
}

/* Content Layout */
.content-grid {
    display: grid;
    grid-template-columns: 360px 1fr; /* left form fixed, right list flexible */
    gap: 28px;
}

.tasks-full-layout {
    display: block;
    width: 100%;
}

/* Keep panels sized to their content instead of stretching to row height */
.content-grid {
    align-items: start;
}

/* If viewport is narrow, switch to stacked panels (mobile) */
@media (max-width: 900px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

.panel {
    padding: 32px;
}

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

.panel-header h2 {
    font-size: 1.3rem;
    font-weight: 850;
    letter-spacing: -0.01em;
}

/* Forms & Inputs */
.task-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Filter Form - redesigned */
.filter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
    background: rgba(148, 163, 184, 0.03);
    padding: 16px;
    border-radius: 16px;
    border: 1px dashed var(--border-color);
}

.filter-search-row {
    width: 100%;
}

.filter-search-row input {
    width: 100%;
}

.filter-selects-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-selects-row select {
    flex: 1;
    min-width: 130px;
}

.filter-submit-btn {
    flex-shrink: 0;
    padding: 12px 20px !important;
    white-space: nowrap;
}

/* Export Excel Button */
.export-excel-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.08);
    border: 1.5px solid rgba(16, 185, 129, 0.2);
    color: #059669;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.export-excel-btn i {
    color: #10b981;
    font-size: 1rem;
}

.export-excel-btn:hover {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.25);
    transform: translateY(-1px);
}

.export-excel-btn:hover i {
    color: #ffffff;
}

label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input,
textarea,
select {
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    font: inherit;
    background: var(--bg-input);
    color: var(--text-main);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 0.9rem;
    width: 100%;
    min-width: 0;
}

textarea {
    resize: vertical;
}

input::placeholder {
    color: #94a3b8;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    background: #ffffff;
}

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

.inline-form{
    display:inline-flex;
}

.task-item{
    overflow:hidden;
}

.task-main p{
    white-space:normal;
    word-break:break-word;
}

/* Buttons */
.link-btn,
.secondary-btn,
.danger-btn,
.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.85rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
    filter: brightness(1.1);
}

.link-btn {
    background: rgba(59, 130, 246, 0.08);
    color: var(--primary);
    border: 1.5px solid rgba(59, 130, 246, 0.15);
}

.link-btn:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 20px var(--primary-glow);
}

.secondary-btn {
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.secondary-btn:hover {
    background: rgba(148, 163, 184, 0.15);
    border-color: rgba(148, 163, 184, 0.3);
}

.danger-btn {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.danger-btn:hover {
    background: var(--danger);
    color: white;
    box-shadow: 0 8px 20px var(--danger-glow);
}

.primary-btn:disabled,
.secondary-btn:disabled,
.danger-btn:disabled,
.primary-btn.disabled,
.secondary-btn.disabled,
.danger-btn.disabled {
    opacity: 0.45 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Reminder Box */
.reminder-box {
    padding: 20px;
    background: linear-gradient(135deg, rgba(241, 245, 249, 0.6) 0%, rgba(226, 232, 240, 0.6) 100%);
    margin-bottom: 24px;
    border-color: rgba(59, 130, 246, 0.15);
}

.reminder-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.reminder-top h3 {
    font-size: 1rem;
    font-weight: 850;
    color: var(--primary);
}

.reminder-pill {
    display: inline-block;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 850;
    box-shadow: 0 4px 10px var(--primary-glow);
}

.reminder-help {
    margin-bottom: 14px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
}

.reminder-empty {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.reminder-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reminder-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 14px;
    background: white;
    border: 1px solid var(--border-color);
}

.reminder-item strong {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
}

.reminder-item p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 2px;
}

.reminder-chip {
    white-space: nowrap;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--primary-glow);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 850;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Task List */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.task-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 24px;
    border-radius: 20px;
    background: white;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.task-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(148, 163, 184, 0.15);
    border-color: rgba(148, 163, 184, 0.3);
}

.task-item.overdue {
    border-color: rgba(239, 68, 68, 0.25);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.02) 0%, rgba(255, 255, 255, 0.9) 100%);
}

.task-main {
    width: 100%;
    min-width: 0;
}

.task-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.task-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.task-title {
    margin: 0;
    font-size: 0.60rem;
    font-weight: 800;
}

.task-collapse-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: rgba(148, 163, 184, 0.06);
    color: var(--text-main);
    cursor: pointer;
}

.task-collapse-btn i {
    transition: transform 0.18s ease;
}

.task-collapse-btn.active i {
    transform: rotate(180deg);
}

/* Collapsed task: show only header title and collapse button */
.task-item.collapsed .task-main > :not(.task-header) {
    display: none;
}

.task-item.collapsed .priority-badge {
    display: none;
}

.task-item.collapsed {
    padding-bottom: 8px;
}

.task-item.collapsed .task-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

/* Hide actions and subtasks when task is collapsed */
.task-item.collapsed .task-actions,
.task-item.collapsed .subtasks-container,
.task-item.collapsed .add-subtask-form,
.task-item.collapsed .subtask-date-group,
.task-item.collapsed .subtasks-header {
    display: none !important;
}

.task-header h3 {
    font-size: 1.35rem;
    line-height: 1.3;
    margin: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.priority-badge {
    align-self: flex-start;
    margin-top: 4px;
    white-space: nowrap;
}

.task-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    width: 100%;
}

.task-actions > * {
    flex: 1 1 180px;
    min-width: 140px;
    max-width: 240px;
}

.task-actions .toggle-subtasks-btn {
    flex: 0 0 auto;
    max-width: 180px;
    width: auto;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.08);
}

/* Make Sub-Tugas toggle full-width on desktop, keep mobile column behavior */
@media (min-width: 769px) {
    .task-actions .toggle-subtasks-btn {
        flex: 1 1 100%;
        max-width: none;
        width: 100%;
        border-radius: 12px;
    }

    /* Make all action items share the same available width on desktop */
    .task-actions > * {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
    }

    .task-actions form .secondary-btn,
    .task-actions form .primary-btn,
    .task-actions form .danger-btn,
    .task-actions > a,
    .task-actions .secondary-btn,
    .task-actions .primary-btn,
    .task-actions .danger-btn {
        width: 100%;
        justify-content: center;
        flex: 1 1 0;
    }

    /* Make desktop action buttons visually match Sub-Tugas button */
    .task-actions form .secondary-btn,
    .task-actions form .primary-btn,
    .task-actions form .danger-btn,
    .task-actions > a {
        padding: 10px 16px;
        border-radius: 12px;
    }
}

.task-actions form,
.task-actions a {
    width: auto;
}

.task-actions form .secondary-btn,
.task-actions form .danger-btn,
.task-actions form .primary-btn,
.task-actions > a {
    width: 100%;
}

@media (max-width: 768px) {
    .task-actions {
        flex-direction: column;
    }

    .task-actions > * {
        flex: 1 1 100%;
        min-width: 0;
        max-width: none;
    }

    .task-actions form,
    .task-actions a {
        width: 100%;
    }

    .task-actions form .secondary-btn,
    .task-actions form .danger-btn,
    .task-actions form .primary-btn,
    .task-actions > a {
        width: 100%;
    }

    /* Make Sub-Tugas button match other buttons on mobile */
    .task-actions .toggle-subtasks-btn {
        flex: 1 1 100%;
        width: 100%;
        max-width: none;
        padding: 10px 14px;
        border-radius: 12px;
        justify-content: center;
    }
}

/* Status specific opacity for completed tasks */
.task-item.completed {
    opacity: 0.7;
    background: #f8fafc;
}

.task-item.completed .task-header h3 {
    text-decoration: line-through;
    color: var(--text-muted);
}

.priority-badge {
    text-transform: uppercase;
    font-size: 0.65rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 850;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.05em;
}

.priority-low {
    background: rgba(16, 185, 129, 0.08);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.priority-medium {
    background: rgba(245, 158, 11, 0.08);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.15);
}

.priority-high {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.task-item p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 12px;
}

.task-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.78rem;
}

.task-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(148, 163, 184, 0.05);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 600;
}

.task-meta span.status-pending {
    background: rgba(59, 130, 246, 0.08);
    color: var(--primary);
    border-color: rgba(59, 130, 246, 0.15);
}

.task-meta span.status-in_progress {
    background: rgba(245, 158, 11, 0.08);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.15);
}

.task-meta span.status-completed {
    background: rgba(16, 185, 129, 0.08);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.15);
}

.task-meta span.date-overdue {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.15);
}

.task-item-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:20px;
    width:100%;
    flex-wrap:nowrap;
}

.task-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    margin-top: 16px;
}

.task-actions > * {
    flex-shrink: 0;
}

.toggle-subtasks-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.toggle-subtasks-btn i {
    transition: transform 0.25s ease;
}

.toggle-subtasks-btn.active i {
    transform: rotate(-180deg);
}

.subtasks-container {
    transition: max-height 0.35s ease, opacity 0.35s ease, padding-top 0.35s ease, border-top-width 0.35s ease;
    overflow: hidden;
}

.subtasks-container.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    border-top-width: 0;
}

.comments-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
    max-height: 600px;
    opacity: 1;
    transition: max-height 0.35s ease, opacity 0.35s ease;
}

.comments-container.collapsed {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

.subtasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    gap: 12px;
}

.subtasks-title {
    font-size: 0.8rem;
    font-weight: 850;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.subtasks-summary-count {
    font-size: 0.8rem;
    font-weight: 850;
    color: var(--primary);
}

.subtask-date-group {
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 12px;
    background: rgba(148, 163, 184, 0.03);
}

.subtask-date-label {
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-main);
}

.subtask-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.subtask-item {
    padding: 12px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 600;
}

.subtask-display-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.subtask-meta-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.subtask-due-badge {
    background: rgba(59, 130, 246, 0.08);
    color: var(--primary);
    border-radius: 14px;
    padding: 6px 10px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.subtask-action-btn,
.subtask-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: none;
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-main);
    cursor: pointer;
    text-decoration: none;
}

.subtask-action-btn:hover,
.subtask-delete-btn:hover {
    background: rgba(148, 163, 184, 0.2);
}

.subtask-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 10px;
}

.subtask-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    word-break: break-word;
}

.subtask-kendala {
    display: block;
    margin-top: 8px;
    background: rgba(254, 242, 242, 0.8);
    border: 1px solid rgba(248, 113, 113, 0.15);
    padding: 10px 12px;
    border-radius: 10px;
}

.subtask-kendala-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--danger, #b91c1c);
    text-transform: uppercase;
}

.subtask-kendala-desc {
    margin-top: 6px;
    font-size: 0.70rem;
    color: var(--danger, #b91c1c);
    line-height: 1.35;
    white-space: pre-wrap;
}

.subtask-item.completed .subtask-text {
    opacity: 0.7;
    text-decoration: line-through;
}

.empty-state {
    padding: 40px 20px;
    border: 2px dashed var(--border-color);
    border-radius: 20px;
    text-align: center;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.01);
}

/* Navigation Bar */
.app-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 16px 28px;
    margin-bottom: 28px;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 25px -5px rgba(148, 163, 184, 0.08);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-brand i,
.nav-brand-img,
.brand-logo-img {
    width: 90px;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 8px var(--primary-glow));
}

.nav-brand h2 {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-main);
}

.nav-brand span {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 18px;
}

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

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--success) 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    text-transform: uppercase;
    box-shadow: 0 4px 10px var(--primary-glow);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.user-role {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.nav-divider {
    width: 1.5px;
    height: 24px;
    background: var(--border-color);
}

.logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.08);
    border: 1.5px solid rgba(239, 68, 68, 0.15);
    color: var(--danger);
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: var(--danger);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px var(--danger-glow);
}

/* Media Queries */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 992px) {
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        padding: 16px 10px;
    }
    /* Nav */
    .app-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 18px 20px;
    }
    .nav-user {
        justify-content: space-between;
        border-top: 1px solid var(--border-color);
        padding-top: 14px;
    }
    .nav-divider {
        display: none;
    }
    /* Hero */
    .hero-card {
        flex-direction: column;
        align-items: stretch;
        padding: 24px;
        gap: 20px;
    }
    .hero-badge {
        width: 100%;
        text-align: center;
    }
    /* Panel */
    .panel {
        padding: 20px 16px;
    }
    .panel-header {
        flex-wrap: wrap;
        gap: 10px;
    }
    .panel-header .export-excel-btn {
        width: 100%;
        justify-content: center;
    }
    /* Form */
    .form-row {
        grid-template-columns: 1fr;
    }
    .filter-selects-row {
        flex-direction: column;
        gap: 10px;
    }
    .filter-selects-row select,
    .filter-submit-btn {
        width: 100%;
        min-width: unset;
        flex: none;
    }
    /* Task List */
    .task-item {
        padding: 16px;
    }
    .task-item-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .task-actions {
        min-width: unset;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .task-actions > * {
        flex: 1 1 100%;
        min-width: 0;
    }
    .task-actions form,
    .task-actions a {
        width: 100%;
    }
    .task-actions .secondary-btn,
    .task-actions .danger-btn,
    .task-actions .primary-btn {
        flex: none;
        width: 100%;
        justify-content: center;
        min-width: 0;
    }
    /* Subtasks */
    .subtask-form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .subtask-add-btn {
        width: 100%;
        justify-content: center;
    }
    .subtask-display-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .subtask-meta-actions {
        margin-left: 0;
        justify-content: flex-end;
        width: 100%;
    }
}

@media (max-width: 576px) {
    body {
        padding: 12px 8px;
    }
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .hero-card h1 {
        font-size: 1.6rem;
    }
    .panel {
        padding: 16px 14px;
        border-radius: 18px;
    }
    .task-item {
        padding: 14px;
        border-radius: 16px;
    }
    .link-btn,
    .secondary-btn,
    .danger-btn,
    .primary-btn {
        padding: 10px 14px;
        font-size: 0.8rem;
    }
    .task-form .primary-btn {
        width: 100%;
        justify-content: center;
    }
    .summary-card {
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .task-top {
        flex-wrap: wrap;
        gap: 8px;
    }
    .task-top h3 {
        width: 100%;
    }
}

@media (max-width: 400px) {
    body {
        padding: 10px 6px;
    }
    .summary-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .app-nav {
        padding: 12px 12px;
        border-radius: 16px;
    }
    .nav-brand h2 {
        font-size: 0.95rem;
    }
    .hero-card {
        padding: 18px;
        border-radius: 18px;
    }
    .hero-card h1 {
        font-size: 1.4rem;
    }
    .panel {
        padding: 14px 12px;
        border-radius: 16px;
    }
    .panel-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .panel-header button,
    .panel-header a {
        width: 100%;
        justify-content: center;
    }
    .task-item {
        padding: 12px;
        border-radius: 14px;
    }
    .link-btn,
    .secondary-btn,
    .danger-btn,
    .primary-btn {
        padding: 8px 12px;
        font-size: 0.78rem;
    }
    .task-actions .secondary-btn,
    .task-actions .danger-btn,
    .task-actions .primary-btn {
        font-size: 0.78rem;
        padding: 8px 10px;
        min-width: 0;
    }
    .summary-card {
        padding: 14px;
    }
}

@media (max-width: 360px) {
    body {
        padding: 8px 4px;
    }
    .panel {
        padding: 12px 8px;
        border-radius: 12px;
    }
    .summary-grid {
        grid-template-columns: 1fr;
    }
    .nav-user {
        flex-wrap: wrap;
        gap: 8px;
    }
    .user-details {
        display: none;
    }
}

/* Sub-tasks Premium Styling classes */
.subtask-form-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: flex-end;
    margin-top: 8px;
}

.subtask-display-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 12px;
}

.subtask-toggle-form {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
}

.subtask-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    align-self: flex-start;
    margin-top: 2px;
}

.subtask-text {
    line-height: 1.4;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 600;
}

.subtask-text.completed {
    text-decoration: line-through;
    color: var(--text-muted);
}

.subtask-meta-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
}

.subtask-due-badge {
    font-size: 0.72rem;
    padding: 3px 8px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 20px;
    color: var(--primary);
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.subtask-action-btn {
    color: var(--primary);
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-glow);
    text-decoration: none;
    transition: all 0.2s ease;
}

.subtask-action-btn:hover {
    background: var(--primary);
    color: #ffffff;
}

.subtask-delete-form {
    display: inline;
}

.subtask-delete-btn {
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--danger-glow);
    transition: all 0.2s ease;
}

.subtask-delete-btn:hover {
    background: var(--danger);
    color: #ffffff;
}

.add-subtask-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(148, 163, 184, 0.03);
    border: 1.5px solid var(--border-color);
    padding: 14px;
    border-radius: 14px;
    margin-top: 12px;
}

.subtask-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.subtask-label {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.subtask-input {
    padding: 8px 12px;
    font-size: 0.82rem;
    border-radius: 10px;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    color: var(--text-main);
    font-family: inherit;
    font-weight: 600;
    transition: all 0.2s ease;
}

.subtask-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.subtask-input-date {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 10px;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    color: var(--text-main);
    font-family: inherit;
    font-weight: 600;
    width: 100%;
}

.subtask-add-btn {
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.8rem;
    border: none;
    height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Global text wrapping constraints */
.task-item p,
.user-name,
.subtask-text,
.reminder-item strong {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Blocker Visual Highlights */
.task-item.has-blocker {
    border-left: 5px solid #d97706 !important;
    background: linear-gradient(90deg, rgba(254, 243, 199, 0.15) 0%, rgba(255, 255, 255, 0.9) 100%) !important;
}

.subtask-item.has-blocker {
    border-left: 4px solid #d97706 !important;
    background: rgba(254, 243, 199, 0.15) !important;
    padding-left: 10px !important;
    border-radius: 8px;
}

.blocker-badge {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(217, 119, 6, 0.1);
    border: 1px solid rgba(217, 119, 6, 0.3);
    color: #d97706;
}

/* Pulsing warning animation */
.pulsing {
    box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.4);
    animation: pulse-warn 2s infinite;
}

@keyframes pulse-warn {
    0% {
        box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.4);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(217, 119, 6, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(217, 119, 6, 0);
    }
}

/* Toast Notification System */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
    max-width: 380px;
    width: calc(100% - 48px);
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
    backdrop-filter: blur(10px);
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-message {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    flex-grow: 1;
    line-height: 1.4;
}

.toast-close-btn {
    border: none;
    background: none;
    font-size: 1.3rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.toast-close-btn:hover {
    opacity: 1;
}

/* Toast Variant Colors */
.toast-success {
    border-left: 5px solid var(--success);
}
.toast-success .toast-icon {
    color: var(--success);
}

.toast-error {
    border-left: 5px solid var(--danger);
}
.toast-error .toast-icon {
    color: var(--danger);
}

.toast-info {
    border-left: 5px solid var(--primary);
}
.toast-info .toast-icon {
    color: var(--primary);
}

.toast-warning {
    border-left: 5px solid var(--warning);
}
.toast-warning .toast-icon {
    color: var(--warning);
}

/* --- SIDEBAR DASHBOARD SHELL STYLES --- */

/* Main Container Grid */
.dashboard-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: radial-gradient(circle at top left, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    overflow-x: hidden;
}

/* Sidebar Styling */
.app-sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-right: 1.5px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 32px 24px;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 10px 0 30px rgba(148, 163, 184, 0.05);
}

/* Sidebar Brand */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 36px;
    padding-bottom: 20px;
    border-bottom: 1.5px solid var(--border-color);
}

.sidebar-brand .brand-logo-img {
    width: 42px;
    height: auto;
    filter: drop-shadow(0 4px 8px var(--primary-glow));
}

.sidebar-brand h2 {
    font-size: 1.15rem;
    font-weight: 850;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.sidebar-brand span {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
}

/* Sidebar User Info Card */
.sidebar-user {
    background: rgba(148, 163, 184, 0.06);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 20px 16px;
    text-align: center;
    margin-bottom: 32px;
}

.user-avatar-large {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    color: white;
    font-size: 1.4rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: 0 6px 15px var(--primary-glow);
}

.user-name-large {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

/* Sidebar Nav Menu */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 16px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 750;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: all 0.2s ease;
    text-decoration: none;
}

.sidebar-menu-item i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    transition: transform 0.2s ease;
}

.sidebar-menu-item:hover {
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-main);
}

.sidebar-menu-item:hover i {
    transform: translateX(2px);
}

.sidebar-menu-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 20px var(--primary-glow);
}

.sidebar-menu-item.active:hover {
    color: white;
}

.sidebar-menu-item.active i {
    transform: none;
}

.sidebar-spacer {
    flex: 1;
}

.logout-link {
    color: var(--danger);
    margin-top: auto;
}

.logout-link:hover {
    background: var(--danger-glow);
    color: var(--danger);
}

/* Main Content Layout */
.main-content {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    min-width: 0;
}

/* Top Workspace Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1.5px solid var(--border-color);
}

.top-bar-title h1 {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.date-display {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 750;
    color: var(--text-muted);
}

/* Tab Views Styling */
.workspace-view {
    display: none;
    animation: fadeInView 0.35s ease;
}

.workspace-view.active {
    display: block;
}

@keyframes fadeInView {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contributors View Layout */
.contributors-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 28px;
    align-items: start;
}

@media (max-width: 1024px) {
    .contributors-layout {
        grid-template-columns: 1fr;
    }
}

/* Responsive sidebar toggling / adjustments */
@media (max-width: 768px) {
    .dashboard-shell {
        flex-direction: column;
    }
    .app-sidebar {
        width: 100%;
        height: auto;
        position: static;
        padding: 20px;
    }
    .sidebar-user {
        display: none;
    }
    .sidebar-spacer {
        display: none;
    }
    .main-content {
        padding: 20px;
    }
    .top-bar {
        padding-bottom: 14px;
    }
}

/* Clean body padding reset when dashboard shell is used */
body {
    padding: 0 !important;
}

/* --- MODAL TASK FORM STYLES --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    width: 100%;
    max-width: 520px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.modal-card::-webkit-scrollbar {
    width: 6px;
}

.modal-card::-webkit-scrollbar-track {
    background: transparent;
}

.modal-card::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 20px;
}

.modal-overlay.show .modal-card {
    transform: scale(1);
}

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

.modal-header h2 {
    font-size: 1.3rem;
    font-weight: 850;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.modal-close-btn {
    border: none;
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: var(--danger-glow);
    color: var(--danger);
}

/* Custom Premium File Upload area */
.custom-file-upload {
    position: relative;
    width: 100%;
    margin-top: 8px;
    margin-bottom: 8px;
}

.custom-file-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: rgba(148, 163, 184, 0.02);
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    text-align: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-color: rgba(148, 163, 184, 0.4);
}

.file-upload-label i {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 12px;
    transition: transform 0.25s ease;
}

.custom-file-upload:hover .file-upload-label {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.04);
}

.custom-file-upload:hover .file-upload-label i {
    transform: translateY(-3px);
}

.upload-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.upload-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

.file-name-display {
    margin-top: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    animation: slideInUp 0.2s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Approved / Locked Subtask Checkbox === */
.subtask-checkbox.locked {
    cursor: not-allowed;
    opacity: 0.75;
    accent-color: #10b981;
    filter: drop-shadow(0 0 3px rgba(16, 185, 129, 0.4));
    pointer-events: auto;
}

.subtask-checkbox.locked:hover {
    outline: 2px solid rgba(16, 185, 129, 0.5);
    border-radius: 3px;
}

/* === Repositori Kode Styles === */
.repositories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 8px;
}

.repo-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.015);
    min-height: 220px;
}

.repo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
}

.repo-card-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.repo-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(37, 99, 235, 0.1) 100%);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.repo-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.repo-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.repo-author {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.repo-author .badge {
    font-size: 0.65rem;
    font-weight: 850;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.repo-author .admin-badge {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.repo-author .dev-badge {
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.repo-card-body {
    flex-grow: 1;
    margin-bottom: 20px;
}

.repo-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.repo-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed var(--border-color);
    padding-top: 16px;
    gap: 12px;
}

.repo-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.repo-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 750;
    padding: 6px 12px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.repo-link-btn.git-url {
    background: rgba(15, 23, 42, 0.05);
    color: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.1);
}

.repo-link-btn.git-url:hover {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.repo-link-btn.zip-download {
    background: rgba(16, 185, 129, 0.08);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.repo-link-btn.zip-download:hover {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
}

.repo-actions {
    display: flex;
    gap: 6px;
}

.repo-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.repo-action-btn.edit {
    color: var(--primary);
}

.repo-action-btn.edit:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--primary);
}

.repo-action-btn.delete {
    color: #ef4444;
}

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

/* === Repository Codebase Explorer Styles === */
.repo-explorer-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.01);
}

.repo-explorer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1.5px solid var(--border-color);
}

.repo-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 1.15rem;
    font-weight: 800;
}

.breadcrumb-item {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb-item:hover {
    color: #1d4ed8;
}

.breadcrumb-item.home {
    color: var(--text-main);
}

.breadcrumb-item.file-crumb {
    color: var(--text-main);
    font-weight: 700;
    pointer-events: none;
}

.breadcrumb-separator {
    color: var(--text-muted);
    opacity: 0.5;
    font-weight: 500;
}

.explorer-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.explorer-content-panel {
    border: 1.5px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-card);
    overflow: hidden;
}

/* File explorer directory table */
.repo-explorer-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.repo-explorer-table th,
.repo-explorer-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
}

.repo-explorer-table th {
    background: rgba(148, 163, 184, 0.04);
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.repo-explorer-table tr:last-child td {
    border-bottom: none;
}

.explorer-row:hover {
    background: rgba(148, 163, 184, 0.02);
}

.explorer-item-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    transition: color 0.15s ease;
}

.explorer-item-link:hover {
    color: var(--primary);
}

/* File viewer & editor */
.file-viewer-container {
    display: flex;
    flex-direction: column;
}

.file-viewer-header {
    background: rgba(148, 163, 184, 0.04);
    padding: 12px 20px;
    border-bottom: 1.5px solid var(--border-color);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
}

.code-editor-block {
    display: flex;
    background: #0f172a;
    color: #f8fafc;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto;
    min-height: 300px;
    max-height: 600px;
}

.code-line-numbers {
    background: #1e293b;
    color: #64748b;
    padding: 16px 12px;
    text-align: right;
    user-select: none;
    border-right: 1.5px solid #334155;
    display: flex;
    flex-direction: column;
    min-width: 48px;
}

.code-pre-content {
    margin: 0;
    padding: 16px 20px;
    flex-grow: 1;
    overflow-x: auto;
    white-space: pre;
    font-family: inherit;
}

.code-textarea-editor {
    width: 100%;
    background: #0f172a;
    color: #f8fafc;
    border: none;
    border-radius: 0;
    padding: 16px 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
    outline: none;
}

.code-textarea-editor:focus {
    box-shadow: none;
    background: #0f172a;
    border: none;
}

.editor-textarea-wrapper {
    background: #0f172a;
    border-bottom: 1px solid #334155;
}

/* === Premium Subtasks Badges & Buttons Styles === */
.subtask-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 750;
    line-height: 1.2;
    border: 1.5px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.subtask-badge.badge-success {
    background: #ecfdf5;
    border-color: #d1fae5;
    color: #065f46;
}

.subtask-badge.badge-info {
    background: #eff6ff;
    border-color: #dbeafe;
    color: #1e40af;
}

.subtask-badge.badge-warning {
    background: #fffbeb;
    border-color: #fef3c7;
    color: #92400e;
}

.subtask-badge.badge-purple {
    background: #f5f3ff;
    border-color: #ede9fe;
    color: #5b21b6;
}

.subtask-select-picker {
    padding: 5px 28px 5px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 750;
    border: 1.5px solid var(--border-color);
    background: #ffffff;
    color: var(--text-main);
    cursor: pointer;
    width: auto;
    height: 30px;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569' stroke-width='3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
}

.subtask-select-picker:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2.5px var(--primary-glow);
    outline: none;
}

.subtask-btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--border-color);
    background: #ffffff;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    box-sizing: border-box;
}

.subtask-btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(148, 163, 184, 0.1);
}

.subtask-btn-action.edit:hover {
    color: var(--primary);
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.05);
}

.subtask-btn-action.discuss:hover {
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.05);
}

.subtask-btn-action.delete:hover {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.05);
}

.subtask-btn-action:disabled,
.subtask-btn-action.disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    background: #f1f5f9 !important;
    border-color: var(--border-color) !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
    transform: none !important;
}


