/* Component Styles */

/* Login Box */
#loginBox {
    max-width: 400px;
    margin: 80px auto;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
    text-align: center;
    border: 1px solid var(--primary-dark);
}

/* Organization Info */
.org-info {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--primary);
    text-shadow: 0 0 5px rgba(46, 152, 152, .5);
}

/* When org-info is placed in the header logo container, use normal flow instead of absolute centering */
.logo-container .org-info {
    position: static !important;
    left: auto !important;
    transform: none !important;
    text-shadow: none !important;
    color: var(--text-main) !important;
    font-weight: 600;
}

/* Top Controls */
.top-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.filters {
    display: flex;
    gap: 10px;
    flex: 1;
}

.btn-add {
    background: var(--success);
    width: auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-add:hover {
    background: #059669;
}

/* Parts Table */
.parts-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 20px;
}

.parts-table th {
    text-align: left;
    padding: 0 20px 10px;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
}

.parts-table tbody tr {
    background: var(--bg-card);
    transition: all .2s;
    position: relative;
    box-shadow: 0 0 0 2px var(--primary-dark);
    border-radius: 8px;
}

.parts-table tbody tr:hover {
    transform: scale(1.005);
    background: #4f5a63;
    box-shadow: 0 0 0 2px var(--primary), 0 4px 12px rgba(46, 152, 152, 0.3);
}

.parts-table td {
    padding: 18px 20px;
}

.parts-table td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.parts-table td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Priority Badges */
.priority-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.prio-Haute {
    background: rgba(239, 68, 68, .2);
    color: #fca5a5;
    border: 1px solid #ef4444;
}

.prio-Moyenne {
    background: rgba(245, 158, 11, .2);
    color: #fcd34d;
    border: 1px solid #f59e0b;
}

.prio-Basse {
    background: rgba(16, 185, 129, .2);
    color: #6ee7b7;
    border: 1px solid #10b981;
}

/* Task Section */
.task-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #5a656e;
}

.task-input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.task-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.task-item {
    background: rgba(0, 0, 0, .2);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid var(--text-muted);
    transition: .2s;
}

.task-item.completed {
    border-left-color: var(--success);
    opacity: 0.6;
}

.task-item.completed .task-desc {
    text-decoration: line-through;
}

.task-check {
    cursor: pointer;
    width: 20px;
    height: 20px;
    accent-color: var(--success);
}

.task-pts {
    font-size: 12px;
    font-weight: bold;
    color: var(--score-gold);
    background: rgba(0, 0, 0, .3);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Task Inline List (in table) */
.task-inline-list {
    list-style: none;
    padding: 8px 0 0 20px;
    margin: 8px 0 0 0;
    font-size: .9em;
    border-left: 2px solid var(--primary);
}

.task-inline-list li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(90, 101, 110, 0.3);
}

.task-inline-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* User List */
.user-list {
    list-style: none;
    padding: 0;
}

.user-list li {
    background: var(--bg-dark);
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid var(--primary);
}

.current-user-highlight {
    background: rgba(46, 152, 152, 0.25) !important;
    border-left: 4px solid var(--primary) !important;
    box-shadow: 0 0 10px rgba(46, 152, 152, 0.3);
}

.current-user-highlight .user-name {
    color: white !important;
    font-weight: bold !important;
}

/* Copy button in detail modal */
.btn-copy {
    border: none;
    background: transparent;
    padding: 2px;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    line-height: 1;
    min-width: 0;
}
.btn-copy:focus {
    outline: none;
    box-shadow: none;
}

/* Detail modal: reference and copy button on same line */
.detail-ref-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}