/* Project Management Dashboard Styles */
:root {
    /* Dark Theme Colors */
    --color-primary: #579DFF;
    --color-primary-hover: #85B8FF;
    --color-surface: #1D2125;
    --color-surface-hover: #22272B;
    --color-text: #B6C2CF;
    --color-text-secondary: #9FADBC;
    --color-border: #3E4C59;
    --color-success: #4BCE97;
    --color-warning: #F5CD47;
    --color-error: #F87168;
    --color-info: #579DFF;
    --color-background: #0C1013;
}

body {
    background-color: var(--color-background);
    color: var(--color-text);
}

.project-dashboard {
    padding: 2rem;
    max-width: 1400px;
    margin: 80px auto 0;
    min-height: calc(100vh - 80px);
    width: 100%;
}

/* Header Styles */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.project-selector {
    position: relative;
    min-width: 200px;
}

.project-selector select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-surface);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: all 0.2s;
}

.project-selector::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-secondary);
    pointer-events: none;
}

.project-selector select:hover {
    border-color: var(--color-primary-hover);
}

.project-selector select:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(87, 157, 255, 0.2);
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.create-issue-btn {
    background: var(--color-primary);
    color: var(--color-surface);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.create-issue-btn:hover {
    background: var(--color-primary-hover);
}

.view-options {
    display: flex;
    gap: 0.5rem;
}

.view-options button {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 0.5rem 1rem;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text);
    transition: all 0.2s;
}

.view-options button:hover {
    background: var(--color-surface-hover);
}

.view-options button.active {
    background: var(--color-primary);
    color: var(--color-surface);
    border-color: var(--color-primary);
}

/* Filter Styles */
.dashboard-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 3px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-btn {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 0.5rem 1rem;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text);
}

.filter-btn:hover {
    background: var(--color-surface-hover);
}

.quick-filters {
    display: flex;
    gap: 0.5rem;
}

.quick-filters button {
    background: none;
    border: none;
    padding: 0.5rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    border-radius: 3px;
}

.quick-filters button:hover {
    background: var(--color-surface-hover);
}

.quick-filters button.active {
    color: var(--color-primary);
    font-weight: 500;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 3px;
    padding: 0.5rem 1rem;
    width: 300px;
}

.search-bar input {
    border: none;
    outline: none;
    width: 100%;
    color: var(--color-text);
    background: transparent;
}

.search-bar input::placeholder {
    color: var(--color-text-secondary);
}

.search-bar i {
    color: var(--color-text-secondary);
}

/* Board Styles */
.project-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.board-column {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 3px;
    min-height: 500px;
}

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

.column-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    text-transform: uppercase;
}

.task-count {
    background: var(--color-surface-hover);
    color: var(--color-text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
}

.task-list {
    padding: 1rem;
    min-height: 100px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    border-radius: 3px;
}

/* Task Card Styles */
.task-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 3px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    cursor: move;
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
}

.task-card:hover {
    background: var(--color-surface-hover);
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.task-card.dragging {
    opacity: 0.5;
    transform: scale(0.95);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.task-card.drop-success {
    animation: dropSuccess 0.5s ease;
}

@keyframes dropSuccess {
    0% {
        transform: scale(1.05);
        box-shadow: 0 0 0 2px var(--color-success);
    }
    100% {
        transform: scale(1);
        box-shadow: none;
    }
}

/* Task List Styles */
.task-list.drag-over {
    background: rgba(87, 157, 255, 0.1);
    border: 2px dashed var(--color-primary);
    box-shadow: 0 0 0 4px rgba(87, 157, 255, 0.1);
}

.task-list.drag-over::before {
    content: 'Drop here';
    display: block;
    text-align: center;
    color: var(--color-primary);
    font-size: 0.875rem;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 3px;
    background: rgba(87, 157, 255, 0.1);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.6;
    }
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.task-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-secondary);
    font-size: 0.75rem;
}

.task-id {
    color: var(--color-text-secondary);
}

.task-priority i {
    font-size: 0.875rem;
}

.task-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.task-description {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-assignee {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.assignee-avatar {
    width: 24px;
    height: 24px;
    background: var(--color-primary);
    color: var(--color-surface);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 500;
}

.task-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

/* Backlog Styles */
.project-backlog {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 3px;
    margin-top: 1.5rem;
    width: 100%;
    min-width: 1200px;
    overflow-x: auto;
}

.backlog-container {
    width: 100%;
    min-width: 1200px;
    display: table;
    table-layout: fixed;
}

.backlog-header {
    display: table-header-group;
    width: 100%;
}

.backlog-header-row {
    display: table-row;
    background: var(--color-surface-hover);
}

.backlog-body {
    display: table-row-group;
    width: 100%;
}

.backlog-row {
    display: table-row;
    width: 100%;
}

.backlog-column {
    display: table-cell;
    padding: 1rem 0.5rem;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.backlog-column.title {
    white-space: normal;
    min-width: 300px;
}

.backlog-column.type,
.backlog-column.priority,
.backlog-column.status {
    text-align: center;
    width: 120px;
}

.backlog-column.id {
    width: 80px;
    font-family: monospace;
    color: var(--color-text-secondary);
}

.backlog-column.assignee {
    width: 150px;
}

.backlog-column.actions {
    width: 120px;
}

/* Drag and Drop Styles */
.backlog-row {
    cursor: move;
    transition: all 0.2s ease;
}

.backlog-row.dragging {
    opacity: 0.5;
    background: var(--color-surface-hover);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.backlog-row.drag-over {
    border-top: 2px solid var(--color-primary);
}

.backlog-row.drag-over-top {
    border-top: 2px solid var(--color-primary);
}

.backlog-row.drag-over-bottom {
    border-bottom: 2px solid var(--color-primary);
}

/* Status Badge Styles */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
    text-align: center;
    min-width: 100px;
    transition: all 0.2s ease;
}

.status-badge.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.status-todo {
    background: rgba(75, 206, 151, 0.1);
    color: var(--color-success);
}

.status-in-progress {
    background: rgba(87, 157, 255, 0.1);
    color: var(--color-info);
}

.status-review {
    background: rgba(245, 205, 71, 0.1);
    color: var(--color-warning);
}

.status-done {
    background: rgba(75, 206, 151, 0.1);
    color: var(--color-success);
}

/* Roadmap Styles */
.project-roadmap {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 3px;
    margin-top: 1.5rem;
    padding: 1.5rem;
}

.timeline-sprint {
    margin-bottom: 2rem;
}

.timeline-sprint h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1rem;
}

.sprint-issues {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.timeline-issue {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 3px;
}

.issue-id {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

.issue-summary {
    flex: 1;
    color: var(--color-text);
    font-size: 0.875rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--color-surface);
    border-radius: 8px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--color-surface);
    z-index: 1;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-header h2 i {
    color: var(--color-primary);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.close-modal:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

#issue-form {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.form-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text);
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--color-text);
    background: var(--color-surface);
    transition: all 0.2s;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--color-primary-hover);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(87, 157, 255, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group .description-toolbar {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1px solid var(--color-border);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    background: var(--color-surface-hover);
}

.description-toolbar button {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.875rem;
}

.description-toolbar button:hover {
    background: var(--color-surface);
    color: var(--color-text);
}

.form-group .description-editor {
    border-radius: 0 0 4px 4px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    grid-column: 1 / -1;
}

.cancel-btn {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    color: var(--color-text);
    font-weight: 500;
    transition: all 0.2s;
}

.cancel-btn:hover {
    background: var(--color-surface-hover);
    border-color: var(--color-primary-hover);
}

.submit-btn {
    background: var(--color-primary);
    color: var(--color-surface);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.submit-btn i {
    font-size: 1rem;
}

/* Form Field Groups */
.field-group {
    background: var(--color-surface-hover);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 1rem;
}

.field-group-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.field-group-title i {
    color: var(--color-primary);
}

/* Required Field Indicator */
.required-field label::after {
    content: '*';
    color: var(--color-error);
    margin-left: 0.25rem;
}

/* Form Validation Styles */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: var(--color-error);
}

.error-message {
    color: var(--color-error);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        max-width: 100%;
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }

    #issue-form {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .form-sidebar {
        order: -1;
    }
}

/* Utility Classes */
.text-red { color: var(--color-error); }
.text-orange { color: #FF8B00; }
.text-yellow { color: var(--color-warning); }
.text-green { color: var(--color-success); }
.text-blue { color: var(--color-info); }

/* Drag and Drop Styles */
.task-list.drag-over {
    background: rgba(87, 157, 255, 0.1);
    border: 2px dashed var(--color-primary);
}

.task-card.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .project-board {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-backlog,
    .backlog-container {
        min-width: 1000px;
    }
}

@media (max-width: 768px) {
    .project-board {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .dashboard-filters {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-group {
        width: 100%;
        justify-content: space-between;
    }

    .search-bar {
        width: 100%;
    }

    .project-backlog,
    .backlog-container {
        min-width: 100%;
    }

    .backlog-column {
        display: block;
        width: 100%;
        padding: 0.5rem 0;
    }

    .backlog-column::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 0.5rem;
        color: var(--color-text-secondary);
    }
}

/* Task Action Buttons */
.task-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.task-card:hover .task-actions {
    opacity: 1;
}

.action-btn {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    padding: 0.25rem;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.action-btn:hover {
    color: var(--color-text);
    background: var(--color-surface-hover);
}

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

.email-btn:hover {
    color: var(--color-success);
}

.delete-btn:hover {
    color: var(--color-error);
}

/* Email Form Styles */
#email-form {
    padding: 1.5rem;
}

#email-form .form-group {
    margin-bottom: 1rem;
}

#email-form textarea {
    font-family: monospace;
    line-height: 1.5;
}

/* Delete Confirmation Modal */
.delete-confirmation {
    max-width: 500px;
}

.delete-confirmation .modal-header {
    background-color: #fff3f3;
    border-bottom: 1px solid #ffcdd2;
}

.delete-confirmation .modal-header h2 {
    color: #d32f2f;
}

.delete-confirmation .modal-body {
    padding: 20px;
}

.delete-confirmation .issue-details {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.delete-confirmation .issue-details p {
    margin: 5px 0;
}

.delete-confirmation .warning-text {
    color: #d32f2f;
    font-weight: 500;
    margin-top: 15px;
}

.delete-confirmation .modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.delete-confirmation .delete-btn {
    background-color: #d32f2f;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.delete-confirmation .delete-btn:hover {
    background-color: #b71c1c;
}

.delete-confirmation .cancel-btn {
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.delete-confirmation .cancel-btn:hover {
    background-color: #e0e0e0;
}

/* Toast Messages */
.toast-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease-out;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.toast-message.success {
    background-color: #4caf50;
}

.toast-message.error {
    background-color: #f44336;
}

.toast-message i {
    font-size: 1.2em;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
} 