/* PM Task Tracker Frontend Styles - Clean Version */

/* ========================================
   BASE STYLES & LAYOUT
======================================== */

html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

body {
    margin-right: calc(-1 * (100vw - 100%));
}

.pmtt-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
}

/* ========================================
   AUTHENTICATION & WELCOME
======================================== */

.pmtt-login-required {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    margin: 20px 0;
}

.pmtt-login-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 400px;
    width: 100%;
    border: 1px solid #e2e8f0;
}

.pmtt-login-card h3 {
    color: #2d3748;
    font-size: 24px;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.pmtt-login-card p {
    color: #4a5568;
    margin: 0 0 20px 0;
    line-height: 1.6;
    font-size: 16px;
}

.pmtt-login-btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.pmtt-login-btn:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(66, 153, 225, 0.4);
    color: white;
    text-decoration: none;
}

.pmtt-welcome-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pmtt-welcome-text {
    font-weight: 500;
    font-size: 16px;
}

.pmtt-logout-link {
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.pmtt-logout-link:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
    color: white;
    text-decoration: none;
}

/* ========================================
   STATISTICS CARDS
======================================== */

.pmtt-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.pmtt-stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.pmtt-stat-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.pmtt-stat-card:active,
.pmtt-stat-card.clicked {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.pmtt-stat-number {
    font-size: 32px;
    font-weight: bold;
    display: block;
}

.pmtt-stat-label {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 5px;
}

.pmtt-stat-projects::after,
.pmtt-stat-active::after {
    content: "↗";
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 12px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.pmtt-stat-projects:hover::after,
.pmtt-stat-active:hover::after {
    opacity: 1;
}

/* ========================================
   PROJECT GRID & CARDS
======================================== */

.pmtt-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.pmtt-projects-block {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.pmtt-project-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
    border-left-width: 12px;
    cursor: pointer;
    padding-bottom: 25px;
}

.pmtt-project-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.pmtt-project-card.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
    z-index: 1000;
}

/* Project Card States */
.pmtt-project-card.completed {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.pmtt-project-card.completed .pmtt-project-title,
.pmtt-project-card.completed .pmtt-project-description,
.pmtt-project-card.completed .pmtt-project-meta {
    color: white !important;
}

.pmtt-project-card.completed .pmtt-project-priority {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.pmtt-project-card.overdue {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    border-left-color: #e53e3e !important;
}

.pmtt-project-card.overdue .pmtt-project-title {
    color: #742a2a;
}

.pmtt-project-card.overdue .pmtt-project-due {
    background: #e53e3e;
    color: white;
    font-weight: bold;
    animation: pulse 2s infinite;
}

/* Project Card Content */
.pmtt-project-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.pmtt-project-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.pmtt-project-actions-header {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pmtt-project-actions-header .pmtt-btn {
    padding: 4px 6px;
    font-size: 12px;
    min-width: auto;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.pmtt-project-card:hover .pmtt-project-actions-header .pmtt-btn {
    opacity: 1;
}

.pmtt-project-description {
    color: #718096;
    line-height: 1.5;
    margin-bottom: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.pmtt-project-priority {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.pmtt-priority-high { 
    background: #fee; 
    color: #c53030; 
}

.pmtt-priority-medium { 
    background: #fff4e6; 
    color: #dd6b20; 
}

.pmtt-priority-low { 
    background: #f0fff4; 
    color: #38a169; 
}

/* Progress Bar */
.pmtt-project-progress {
    margin-bottom: 15px;
}

.pmtt-progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.pmtt-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4299e1, #3182ce);
    transition: width 0.3s ease;
}

.pmtt-progress-text {
    font-size: 12px;
    color: #718096;
    margin-top: 5px;
}

/* Project Stats */
.pmtt-project-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #718096;
    margin-bottom: 15px;
}

.pmtt-project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #718096;
    border-top: 1px solid #e2e8f0;
    padding-top: 15px;
}

/* Progress Dots */
.pmtt-project-progress-indicators {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.pmtt-progress-dots {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #718096;
}

.pmtt-progress-dots-line {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    max-width: 120px;
}

.pmtt-progress-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #e2e8f0;
    border: 1px solid rgba(255,255,255,0.3);
}

.pmtt-progress-dot.expired {
    background: #e53e3e;
    border-color: #c53030;
    box-shadow: 0 0 3px rgba(229, 62, 62, 0.5);
}

.pmtt-progress-dot.completed {
    background: #48bb78;
    border-color: #38a169;
    box-shadow: 0 0 3px rgba(72, 187, 120, 0.5);
}

.pmtt-progress-legend {
    display: flex;
    gap: 10px;
    font-size: 10px;
    color: #718096;
}

.pmtt-legend-item {
    display: flex;
    align-items: center;
    gap: 3px;
}

.pmtt-dots-label {
    font-size: 10px;
    color: #718096;
    margin-right: 5px;
}

/* ========================================
   TASK SECTIONS & CONTAINERS
======================================== */

.pmtt-tasks-container {
    margin-top: 20px;
}

.pmtt-section {
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    position: relative;
    min-height: 120px;
    transition: all 0.2s ease;
}

.pmtt-section-header-container {
    position: relative;
}

.pmtt-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #e2e8f0;
    border-bottom: 1px solid #cbd5e0;
    transition: background-color 0.2s ease;
    position: relative;
}

.pmtt-section-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #e2e8f0;
    border-radius: 2px;
}

.pmtt-section.urgent .pmtt-section-header::before {
    background: linear-gradient(to bottom, #e53e3e, #c53030);
}

.pmtt-section.warning .pmtt-section-header::before {
    background: linear-gradient(to bottom, #ed8936, #dd6b20);
}

.pmtt-section.completed .pmtt-section-header::before {
    background: linear-gradient(to bottom, #48bb78, #38a169);
}

.pmtt-section-header:hover {
    background: #d1d9e0;
}

.pmtt-section-header.pmtt-no-section {
    background: #f7fafc;
    border: 2px dashed #cbd5e0;
    color: #718096;
}

.pmtt-section-header.pmtt-no-section:hover {
    background: #edf2f7;
    border-color: #a0aec0;
}

.pmtt-section-name {
    font-weight: 600;
    color: #2d3748;
    flex: 1;
}

.pmtt-section-name-input {
    flex: 1;
    padding: 4px 8px;
    border: 2px solid #4299e1;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    background: white;
}

.pmtt-section-name-input:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.pmtt-section-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pmtt-task-count {
    font-size: 11px;
    color: #718096;
    background: #f7fafc;
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.pmtt-add-task-to-section-btn,
.pmtt-add-section-btn {
    background: none;
    border: none;
    color: #4a5568;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.pmtt-add-task-to-section-btn:hover,
.pmtt-add-section-btn:hover {
    background: #e2e8f0;
    color: #2d3748;
    opacity: 1;
}

.pmtt-delete-section-btn {
    background: none;
    border: none;
    color: #e53e3e;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.pmtt-delete-section-btn:hover {
    background: #fed7d7;
    color: #c53030;
    opacity: 1;
}

.pmtt-section-header:hover .pmtt-delete-section-btn {
    opacity: 1;
}

.pmtt-section-add-task-btn {
    position: absolute;
    bottom: 10px;
    left: 15px;
    width: 32px;
    height: 32px;
    background: #4299e1;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.3);
    transition: all 0.2s ease;
    opacity: 0.8;
}

.pmtt-section-add-task-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 1;
}

.pmtt-section-add-task-btn:hover {
    background: #3182ce;
    opacity: 1;
    transform: scale(1.05);
}

/* ========================================
   TASK LISTS & ITEMS
======================================== */

.pmtt-task-list {
    padding: 0 0 50px 0;
    margin: 0;
    list-style: none;
    min-height: 60px;
    position: relative;
}

.pmtt-task-item {
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    border-left-width: 9px;
    position: relative;
    overflow: visible;
    margin-bottom: 12px;
    padding-top: 12px;
    cursor: grab;
}

.pmtt-task-item:hover {
    background: #f7fafc;
}

.pmtt-task-item:last-child {
    border-bottom: none;
}

.pmtt-task-item:active {
    cursor: grabbing;
}

.pmtt-task-item.dragging {
    opacity: 0.4;
    transform: rotate(2deg);
    z-index: 1000;
    border: 2px dashed #4299e1;
    background: #f0f9ff;
}

/* Task States */
.pmtt-task-item.completed {
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
    border-left-color: #48bb78 !important;
}

.pmtt-task-item.completed .pmtt-task-title {
    color: #22543d;
    text-decoration: line-through;
}

.pmtt-task-item.overdue {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    border-left-color: #e53e3e !important;
}

.pmtt-task-item.overdue .pmtt-task-title {
    color: #742a2a;
}

.pmtt-task-item.overdue .pmtt-task-due {
    background: #e53e3e;
    color: white;
    font-weight: bold;
    animation: pulse 2s infinite;
}

.pmtt-task-item.warning {
    border-left-color: #ed8936 !important;
    background: linear-gradient(135deg, #fef5e7 0%, #fed7aa 100%);
}

.pmtt-task-item.warning .pmtt-task-due {
    background: #ed8936 !important;
    color: white !important;
    font-weight: bold;
    animation: warningPulse 3s ease-in-out infinite;
}

/* Task Content */
.pmtt-task-left {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pmtt-task-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.pmtt-task-checkbox.completed {
    background: #48bb78;
    border-color: #48bb78;
}

.pmtt-task-checkbox.completed::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    top: 1px;
    left: 4px;
}

.pmtt-task-content {
    flex: 1;
    min-width: 0;
}

.pmtt-task-title {
    font-size: 16px;
    font-weight: 500;
    color: #2d3748;
    margin: 0 0 4px 0;
}

.pmtt-task-description-preview {
    font-size: 12px;
    color: #718096;
    line-height: 1.4;
    margin: 4px 0;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.pmtt-task-meta {
    font-size: 12px;
    color: #718096;
}

.pmtt-task-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pmtt-task-assignee-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pmtt-task-assignee,
.pmtt-unassigned-indicator {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #4299e1;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pmtt-unassigned-indicator {
    background: #a0aec0;
}

.pmtt-task-assignee:hover,
.pmtt-unassigned-indicator:hover {
    transform: scale(1.1);
}

.pmtt-assignee-name {
    font-size: 11px;
    color: #718096;
}

.pmtt-task-due {
    font-size: 11px;
    color: #718096;
    background: #f7fafc;
    padding: 4px 8px;
    border-radius: 4px;
}

.pmtt-task-due.overdue {
    background: #fed7d7;
    color: #c53030;
}



/* New Task Labels */
.pmtt-new-task-label {
    position: absolute;
    top: 8px;
    right: -10px;
    background: linear-gradient(45deg, #48bb78, #38a169);
    color: white;
    padding: 3px 10px 3px 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 0 100%, 6px 50%);
    box-shadow: 0 2px 6px rgba(72, 187, 120, 0.4);
    z-index: 15;
    animation: newTaskPulse 2s ease-in-out infinite;
}

.pmtt-new-indicator {
    background: linear-gradient(45deg, #48bb78, #38a169);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 8px;
}

/* ========================================
   KANBAN VIEW
======================================== */

.pmtt-kanban {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
}

.pmtt-kanban-column {
    min-width: 300px;
    background: #f8fafc;
    border-radius: 8px;
    padding: 15px;
}

.pmtt-kanban-header {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pmtt-kanban-count {
    background: #cbd5e0;
    color: #4a5568;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.pmtt-kanban-task {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 15px;
    cursor: grab;
    transition: all 0.2s ease;
    position: relative;
    border-left-width: 9px;
    padding-top: 15px;
    overflow: visible;
}

.pmtt-kanban-task:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.pmtt-kanban-task:active {
    cursor: grabbing;
}

.pmtt-kanban-task.dragging {
    opacity: 0.5;
}

.pmtt-kanban-task.completed {
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
    border-left-color: #48bb78 !important;
}

.pmtt-kanban-task.overdue {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    border-left-color: #e53e3e !important;
}

.pmtt-kanban-task.warning {
    border-left-color: #ed8936 !important;
    background: linear-gradient(135deg, #fef5e7 0%, #fed7aa 100%);
}

.pmtt-kanban-task .pmtt-new-task-label {
    top: 5px;
    right: -8px;
    font-size: 9px;
    padding: 2px 8px 2px 5px;
}

.pmtt-kanban-assignee,
.pmtt-kanban-unassigned {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #4299e1;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
}

.pmtt-kanban-unassigned {
    background: #a0aec0;
}

.pmtt-task-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.pmtt-task-tag {
    background: #e2e8f0;
    color: #4a5568;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
}

/* ========================================
   DRAG AND DROP
======================================== */

.pmtt-section.drag-active {
    transition: all 0.2s ease;
}

.pmtt-section.drag-over {
    background: #e6f3ff;
    border: 2px solid #4299e1;
    transform: scale(1.01);
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.3);
}

.pmtt-section.drag-over .pmtt-section-header {
    background: #bee3f8;
    color: #1a365d;
}

.pmtt-task-list.drag-over {
    background: #f0f9ff;
    min-height: 80px;
    border: 2px dashed #4299e1;
    border-radius: 8px;
    margin: 10px;
}

.pmtt-drop-indicator {
    height: 4px;
    background: linear-gradient(90deg, #4299e1, #3182ce);
    margin: 8px 0;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
    position: relative;
}

.pmtt-drop-indicator.active {
    opacity: 1;
    animation: pulse 1.5s infinite;
}

.pmtt-drop-indicator::before {
    content: '';
    position: absolute;
    left: -6px;
    top: -4px;
    width: 12px;
    height: 12px;
    background: #4299e1;
    border-radius: 50%;
    border: 2px solid white;
}

/* ========================================
   BUTTONS & CONTROLS
======================================== */

.pmtt-btn {
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    min-width: 100px;
    box-sizing: border-box;
    white-space: nowrap;
    gap: 8px;
}

.pmtt-btn-primary {
    background: #4299e1;
    color: white;
    border-color: #4299e1;
}

.pmtt-btn-primary:hover {
    background: #3182ce;
    border-color: #3182ce;
}

.pmtt-btn-primary:disabled {
    background: #a0aec0;
	border-color: #a0aec0;
   cursor: not-allowed;
}

.pmtt-btn-secondary {
    background: white;
    color: #4a5568 !important;
    border-color: #cbd5e0;
}

.pmtt-btn-secondary:hover {
    background: #f7fafc;
    border-color: #a0aec0;
    color: #2d3748 !important;
}

.pmtt-btn-danger {
   background: #dc3545;
   color: white;
   border-color: #dc3545;
}

.pmtt-btn-danger:hover {
   background: #c82333;
   border-color: #c82333;
}

.pmtt-btn-link {
   background: white;
   border: 1px solid #cbd5e0;
   color: #4a5568;
   text-decoration: none;
}

.pmtt-btn-link:hover {
   background: #f7fafc;
   border-color: #a0aec0;
   text-decoration: none;
}

.pmtt-btn:focus {
   outline: none;
   box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
   border-color: #4299e1;
}

.pmtt-btn:disabled {
   background: #f7fafc;
   color: #a0aec0;
   cursor: not-allowed;
   border-color: #e2e8f0;
}

/* View Toggle */
.pmtt-view-toggle {
   display: flex;
   gap: 8px;
}

.pmtt-view-btn {
   padding: 10px 16px;
   background: white;
   border: 1px solid #cbd5e0;
   cursor: pointer;
   font-size: 14px;
   transition: all 0.2s ease;
   color: #4a5568;
   font-weight: 500;
   min-height: 38px;
   min-width: 80px;
   display: flex;
   align-items: center;
   justify-content: center;
   border-radius: 6px;
}

.pmtt-view-btn:hover:not(.active) {
   background: #f7fafc;
   border-color: #a0aec0;
}

.pmtt-view-btn.active {
   background: #4299e1;
   color: white;
   border-color: #4299e1;
}

.pmtt-view-btn:focus {
   outline: none;
   box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
   border-color: #4299e1;
}

/* ========================================
  LAYOUT SECTIONS
======================================== */

.pmtt-tasks-header-row {
   display: flex;
   justify-content: space-between;
   align-items: flex-start;
   margin-bottom: 20px;
   gap: 20px;
}

.pmtt-tasks-title-section {
   flex: 1;
}

.pmtt-quick-add-and-controls {
   display: flex;
   gap: 20px;
   align-items: flex-start;
   flex: 2;
}

.pmtt-task-controls {
   display: flex;
   gap: 10px;
   align-items: flex-start;
   margin-top: 20px;
}

.pmtt-left-controls {
   display: flex;
   gap: 12px;
   align-items: center;
   flex-wrap: wrap;
}

/* ========================================
  QUICK ADD SECTION
======================================== */

.pmtt-quick-add-section {
   flex: 1;
   background: #f8fafc;
   padding: 20px;
   border-radius: 8px;
   border: 2px solid #e2e8f0;
   margin: 0;
}

.pmtt-quick-add-title {
   display: flex;
   align-items: center;
   gap: 8px;
   margin: 0 0 15px 0;
   font-size: 16px;
   font-weight: 600;
   color: #2d3748;
}

.pmtt-quick-add-title .dashicons {
   color: #4299e1;
}

.pmtt-quick-task-container {
   display: flex;
   gap: 12px;
   align-items: center;
   margin-bottom: 12px;
}

.pmtt-quick-task-input {
   flex: 1;
   padding: 10px 15px;
   border: 2px solid #cbd5e0;
   border-radius: 6px;
   font-size: 14px;
   transition: all 0.2s ease;
   background: white;
   min-height: 38px;
   box-sizing: border-box;
}

.pmtt-quick-task-input:focus {
   outline: none;
   border-color: #4299e1;
   box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.pmtt-quick-task-input:disabled {
   background: #f7fafc;
   color: #a0aec0;
   cursor: not-allowed;
   border-color: #e2e8f0;
}

.pmtt-detailed-task-btn {
   white-space: nowrap;
   padding: 10px 16px;
   min-width: 120px;
}

.pmtt-detailed-task-btn:disabled {
   opacity: 0.5;
   cursor: not-allowed;
}

.pmtt-quick-add-help {
   font-size: 12px;
   color: #718096;
   margin: 0;
   display: flex;
   align-items: flex-start;
   gap: 6px;
   line-height: 1.4;
}

.pmtt-quick-add-help .dashicons {
   font-size: 14px;
   margin-top: 1px;
   color: #4299e1;
}

/* ========================================
  FILTERS
======================================== */

.pmtt-filters-wrapper {
   margin-bottom: 20px;
}

.pmtt-filters-header {
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin-bottom: 15px;
   flex-wrap: wrap;
   gap: 10px;
}

.pmtt-filters-toggle {
   display: flex;
   align-items: center;
   gap: 8px;
   padding: 8px 12px;
   background: #f8fafc;
   border: 1px solid #e2e8f0;
   border-radius: 6px;
   cursor: pointer;
   transition: all 0.2s ease;
   font-size: 13px;
   color: #4a5568;
   font-weight: 500;
}

.pmtt-filters-toggle:hover {
   background: #edf2f7;
   border-color: #cbd5e0;
}

.pmtt-filters-toggle.active {
   background: #4299e1;
   color: white;
   border-color: #3182ce;
}

.pmtt-filters-toggle .dashicons {
   font-size: 16px;
}

.pmtt-toggle-text {
   font-weight: 500;
}

.pmtt-filters {
   background: white;
   border: 1px solid #e2e8f0;
   border-radius: 8px;
   padding: 20px;
   margin-bottom: 20px;
   box-shadow: 0 2px 4px rgba(0,0,0,0.05);
   display: none;
}

.pmtt-filter-controls {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
   gap: 15px;
   align-items: end;
}

.pmtt-filter-group {
   display: flex;
   flex-direction: column;
   gap: 5px;
}

.pmtt-filter-label {
   font-size: 13px;
   font-weight: 500;
   color: #4a5568;
}

.pmtt-sort-select,
.pmtt-filter-select,
.pmtt-search-input {
   padding: 10px 12px;
   border: 1px solid #cbd5e0;
   border-radius: 6px;
   font-size: 14px;
   min-height: 38px;
   background: white;
   box-sizing: border-box;
}

.pmtt-sort-select:focus,
.pmtt-filter-select:focus,
.pmtt-search-input:focus {
   outline: none;
   box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
   border-color: #4299e1;
}

/* ========================================
  MODALS
======================================== */

.pmtt-modal {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background: rgba(0,0,0,0.5);
   display: flex;
   align-items: center;
   justify-content: center;
   z-index: 1000;
   overflow-y: auto;
   scrollbar-width: thin;
}

.pmtt-modal::-webkit-scrollbar {
   width: 8px;
}

.pmtt-modal::-webkit-scrollbar-track {
   background: #f1f1f1;
}

.pmtt-modal::-webkit-scrollbar-thumb {
   background: #c1c1c1;
   border-radius: 4px;
}

.pmtt-modal-content {
   background: white;
   border-radius: 12px;
   padding: 30px;
   max-width: 500px;
   width: 90%;
   max-height: 80vh;
   overflow-y: auto;
}

.pmtt-modal-wide {
   max-width: 800px;
   width: 95%;
}

.pmtt-modal-header {
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin-bottom: 20px;
   padding-bottom: 15px;
   border-bottom: 1px solid #e2e8f0;
}

.pmtt-modal-title {
   font-size: 20px;
   font-weight: 600;
   color: #2d3748;
   margin: 0;
}

.pmtt-modal-close {
   background: none;
   border: none;
   font-size: 24px;
   cursor: pointer;
   color: #718096;
   padding: 0;
   width: 30px;
   height: 30px;
   display: flex;
   align-items: center;
   justify-content: center;
}

/* ========================================
  FORMS
======================================== */

.pmtt-form-group {
   margin-bottom: 25px;
}

.pmtt-form-row {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 20px;
   margin-bottom: 25px;
}

.pmtt-form-label {
   display: block;
   font-weight: 500;
   color: #2d3748;
   margin-bottom: 5px;
}

.pmtt-form-input,
.pmtt-form-textarea,
.pmtt-form-select {
   width: 100%;
   padding: 10px 12px;
   border: 1px solid #cbd5e0;
   border-radius: 6px;
   font-size: 14px;
   transition: border-color 0.2s ease;
   box-sizing: border-box;
}

.pmtt-form-input:focus,
.pmtt-form-textarea:focus,
.pmtt-form-select:focus {
   outline: none;
   border-color: #4299e1;
   box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.pmtt-form-textarea {
   resize: vertical;
   min-height: 80px;
}

.pmtt-form-textarea-large {
   min-height: 200px;
   resize: vertical;
}

.pmtt-progress-slider {
   width: 100%;
   margin: 10px 0;
}

.pmtt-progress-value {
   font-weight: 600;
   color: #2271b1;
}

.pmtt-form-actions {
   display: flex;
   gap: 12px;
   justify-content: flex-end;
   margin-top: 20px;
   padding-top: 20px;
   border-top: 1px solid #e2e8f0;
}

.pmtt-modal-wide .pmtt-form-actions {
   justify-content: space-between;
   align-items: center;
}

.pmtt-modal-wide .pmtt-form-actions .pmtt-btn-danger {
   margin-right: auto;
}

/* User Selection */
.pmtt-assigned-users-group {
   border: 1px solid #e2e8f0;
   border-radius: 8px;
   padding: 15px;
   background: #f9fafb;
}

.pmtt-user-select-container {
   max-height: 200px;
   overflow-y: auto;
   border: 1px solid #e2e8f0;
   border-radius: 6px;
   padding: 15px;
   background: #f8fafc;
}

.pmtt-user-select-container::-webkit-scrollbar {
   width: 6px;
}

.pmtt-user-select-container::-webkit-scrollbar-track {
   background: #f1f1f1;
   border-radius: 3px;
}

.pmtt-user-select-container::-webkit-scrollbar-thumb {
   background: #cbd5e0;
   border-radius: 3px;
}

.pmtt-user-select-container::-webkit-scrollbar-thumb:hover {
   background: #a0aec0;
}

.pmtt-user-checkbox {
   display: block;
   margin-bottom: 10px;
   cursor: pointer;
   padding: 8px 12px;
   border-radius: 4px;
   transition: background-color 0.2s ease;
}

.pmtt-user-checkbox:last-child {
   margin-bottom: 0;
}

.pmtt-user-checkbox:hover {
   background: #e2e8f0;
}

.pmtt-user-checkbox input[type="checkbox"] {
   margin-right: 10px;
   transform: scale(1.2);
}

.pmtt-checkbox-label {
   font-size: 14px;
   color: #2d3748;
   user-select: none;
}

/* Color Picker */
.pmtt-color-picker-modal .pmtt-modal-content {
   max-width: 400px;
}

.pmtt-color-grid {
   display: grid;
   grid-template-columns: repeat(6, 1fr);
   gap: 10px;
   margin: 20px 0;
}

.pmtt-color-option {
   width: 40px;
   height: 40px;
   border-radius: 8px;
   cursor: pointer;
   border: 2px solid transparent;
   transition: all 0.2s ease;
}

.pmtt-color-option:hover {
   transform: scale(1.1);
   border-color: #333;
}

.pmtt-color-picker-btn {
   padding: 4px 6px;
   font-size: 12px;
   min-width: auto;
}

/* ========================================
  NOTIFICATIONS & ALERTS
======================================== */

.pmtt-loading {
   display: inline-block;
   width: 20px;
   height: 20px;
   border: 2px solid #e2e8f0;
   border-radius: 50%;
   border-top-color: #4299e1;
   animation: spin 1s ease-in-out infinite;
}

.pmtt-loading-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    background: rgba(255,255,255,0.95);
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    font-size: 14px;
    color: #4a5568;
    font-weight: 500;
}

.pmtt-loading-overlay::after {
    content: "Saving...";
    margin-left: 10px;
}

.pmtt-alert {
   padding: 12px 16px;
   border-radius: 6px;
   margin-bottom: 20px;
   font-size: 14px;
}

.pmtt-alert-success {
   background: #f0fff4;
   color: #22543d;
   border: 1px solid #c6f6d5;
}

.pmtt-alert-error {
   background: #fed7d7;
   color: #742a2a;
   border: 1px solid #feb2b2;
}

.pmtt-alert-warning {
   background: #fffbeb;
   color: #744210;
   border: 1px solid #fbd38d;
}

.pmtt-alert-info {
   background: #f0f9ff;
   color: #0369a1;
   border: 1px solid #0ea5e9;
}

.pmtt-notifications {
   position: fixed;
   top: 20px;
   right: 20px;
   z-index: 9999;
}

/* ========================================
  ANIMATIONS
======================================== */

@keyframes spin {
   to { transform: rotate(360deg); }
}

@keyframes pulse {
   0%, 100% { opacity: 1; }
   50% { opacity: 0.6; }
}

@keyframes newTaskPulse {
   0%, 100% { 
       box-shadow: 0 2px 6px rgba(72, 187, 120, 0.4);
       transform: scale(1);
   }
   50% { 
       box-shadow: 0 3px 8px rgba(72, 187, 120, 0.6);
       transform: scale(1.02);
   }
}

@keyframes warningPulse {
   0%, 100% { 
       background: #ed8936 !important;
   }
   50% { 
       background: #dd6b20 !important;
   }
}

/* ========================================
  RESPONSIVE DESIGN
======================================== */

@media (max-width: 768px) {
   .pmtt-dashboard {
       padding: 15px;
   }
   
   .pmtt-stats {
       grid-template-columns: repeat(2, 1fr);
   }
   
   .pmtt-projects-grid {
       grid-template-columns: 1fr;
   }
   
   .pmtt-kanban {
       flex-direction: column;
   }
   
   .pmtt-kanban-column {
       min-width: auto;
   }
   
   .pmtt-modal-wide {
       max-width: 95%;
       margin: 10px;
   }
   
   .pmtt-form-row {
       grid-template-columns: 1fr;
       gap: 15px;
   }
   
   .pmtt-tasks-header-row {
       flex-direction: column;
       gap: 15px;
   }
   
   .pmtt-quick-add-and-controls {
       flex-direction: column;
       width: 100%;
   }
   
   .pmtt-task-controls {
       justify-content: flex-start;
       margin-top: 0;
   }
   
   .pmtt-btn {
       min-width: 80px;
       padding: 8px 12px;
       font-size: 13px;
       min-height: 36px;
   }
   
   .pmtt-view-btn {
       min-width: 60px;
       padding: 8px 12px;
       font-size: 13px;
       min-height: 36px;
   }
   
   .pmtt-quick-task-input {
       min-height: 36px;
       padding: 8px 12px;
   }
   
   .pmtt-quick-task-container {
       flex-direction: column;
       align-items: stretch;
       gap: 10px;
   }
   
   .pmtt-detailed-task-btn {
       width: 100%;
       justify-content: center;
   }
   
   .pmtt-user-select-container {
       max-height: 150px;
   }
   
   .pmtt-form-textarea-large {
       min-height: 120px;
   }
   
   .pmtt-filters-header {
       flex-direction: column;
       align-items: stretch;
   }
   
   .pmtt-filter-controls {
       grid-template-columns: 1fr;
       gap: 12px;
   }
   
   .pmtt-new-task-label {
       font-size: 8px;
       padding: 2px 6px 2px 4px;
       top: 5px;
       right: -6px;
   }
   
   .pmtt-progress-dots-line {
       max-width: 100px;
   }
   
   .pmtt-progress-dot {
       width: 4px;
       height: 4px;
   }
   
   .pmtt-project-progress-indicators {
       flex-direction: column;
       gap: 8px;
       align-items: flex-start;
   }
   
   .pmtt-progress-legend {
       justify-content: flex-start;
       gap: 8px;
   }
   
   .pmtt-welcome-bar {
       flex-direction: column;
       align-items: flex-start;
       gap: 10px;
       padding: 12px 15px;
   }
   
   .pmtt-welcome-text {
       font-size: 14px;
   }
   
   .pmtt-task-item {
       flex-direction: column;
       align-items: flex-start;
       gap: 10px;
   }
   
   .pmtt-task-right {
       width: 100%;
       justify-content: flex-end;
   }
   
   .pmtt-task-count {
       display: none;
   }
}

@media (max-width: 480px) {
   .pmtt-stats {
       grid-template-columns: 1fr;
   }
   
   .pmtt-login-card {
       padding: 25px 15px;
   }
   
   .pmtt-welcome-bar {
       text-align: center;
       align-items: center;
   }
   
   .pmtt-filters-container .pmtt-view-btn {
       padding: 6px 10px;
       font-size: 12px;
   }
   
   .pmtt-filters-toggle {
       padding: 10px 15px;
       font-size: 14px;
   }
}

body::before {
    content: "\f464";
    font-family: dashicons;
    font-size: 30px;
    color: red;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 99999;
}

.pmtt-dashboard .pmtt-btn {
    color: #4a5568 !important;
    background: white !important;
    border: 1px solid #cbd5e0 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    padding: 6px 10px !important;
    min-width: auto !important;
    line-height: 1.2 !important;
}

.pmtt-dashboard .pmtt-btn:hover {
    color: #2d3748 !important;
    background: #f7fafc !important;
    border-color: #a0aec0 !important;
}

/* Selected task highlighting */
.pmtt-task-item.pmtt-task-selected {
    background: #e6f3ff;
    border-left-color: #4299e1 !important;
}

.pmtt-task-item.pmtt-task-selected .pmtt-task-checkbox {
    background: #4299e1;
    border-color: #4299e1;
}

.pmtt-task-item.pmtt-task-selected .pmtt-task-checkbox::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    top: 1px;
    left: 4px;
}

/* Bulk delete button */
.pmtt-bulk-delete-btn {
    position: absolute;
    bottom: 10px;
    left: 55px;
    min-width: auto;
    padding: 8px 12px;
    height: 32px;
    border-radius: 16px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pmtt-bulk-delete-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}
/* Bulk action buttons */
.pmtt-bulk-complete-btn,
.pmtt-bulk-delete-btn {
    position: absolute;
    bottom: 10px;
    min-width: auto;
    padding: 8px 12px;
    height: 32px;
    border-radius: 16px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pmtt-bulk-complete-btn {
    left: 55px;
}

.pmtt-bulk-delete-btn {
    left: 165px; /* Adjust based on Complete button width */
}

.pmtt-bulk-complete-btn .dashicons,
.pmtt-bulk-delete-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}