/* ==== dark-mode extras ==== */
body            { background-color:#121417; color:#e1e3e6; }
.project-card   { background:#1c1f23; border:none; box-shadow:0 0 .75rem #0007; }
.project-card:hover{ transform:translateY(-2px); box-shadow:0 .5rem 1rem #000b; }
.table-light th { background:#24272b; color:#fdfdfd; }
.table-bordered > :not(caption) > * > * { border-color:#2c3034; }
input.form-control,
input.form-control:focus { background:#1a1d21; border-color:#34383c; color:#e2e4e7; }
.btn-outline-secondary, .btn-outline-primary {
    --bs-btn-color:#9ea2a8; --bs-btn-border-color:#3a3e42;
}
.btn-outline-secondary:hover,
.btn-outline-primary:hover { background:#3a3e42; color:#fff; }
.btn-primary { background:#0d6efd;border:none; }
.hist-btn     { --bs-btn-color:#82b1ff; --bs-btn-border-color:#2d5bcc; }
.hist-btn:hover{ background:#2d5bcc;color:#fff; }
.edit-btn     { --bs-btn-border-color:#505457; }
.edit-btn.edited{ background:#198754;border:none; }
#histTable td, #histTable th { padding:.35rem .75rem; }
.modal-content{ background:#1d2024; border:none; }
.edit-input               { display:none; }          /* hidden by default   */
.view-span                { display:inline; }

tr.editing .edit-input    { display:block; }         /* reveal when editing */
tr.editing .view-span     { display:none; }
/* stronger coloured xs buttons */
.btn-xs{padding:.15rem .35rem;font-size:.75rem}
.btn-primary{background:#0d6efd;border:none}
.btn-success{background:#198754;border:none}
.btn-info{background:#0dcaf0;border:none;color:#000}
.btn-warning{background:#ffc107;border:none;color:#000}
.btn-danger{background:#dc3545;border:none}

/* ==== EQUAL HEIGHT CARDS & ALIGNED COLUMNS ==== */
/* Ensure all project cards have equal height and perfect column alignment */
.project-card {
    min-height: 400px; /* Set minimum height for consistency */
}

/* Perfect table column alignment across all cards */
.card .table th,
.card .table td {
    vertical-align: top; /* Align all content to top */
    text-align: center; /* Center all content horizontally */
    padding: 0.5rem 0.25rem; /* Consistent padding */
    word-wrap: break-word; /* Handle long text */
    overflow: hidden; /* Prevent overflow */
}

/* Special alignment for description column */
.card .table th:nth-child(4),
.card .table td:nth-child(4) {
    text-align: left; /* Left-align descriptions for readability */
    padding-left: 0.75rem;
}

/* Ensure table takes full width and columns are fixed */
.card .table {
    table-layout: fixed;
    width: 100%;
    margin-bottom: 0;
}

/* Make card body flex to fill available space */
.card-body.flex-grow-1 {
    display: flex;
    flex-direction: column;
}

/* Ensure buttons are consistently sized within their cells */
.card .table .btn {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Fix column widths to ensure perfect alignment across cards */
.card .table colgroup col:nth-child(1) { width: 12%; } /* NRREG */
.card .table colgroup col:nth-child(2) { width: 15%; } /* Data */
.card .table colgroup col:nth-child(3) { width: 15%; } /* Cod UNIC */
.card .table colgroup col:nth-child(4) { width: 30%; } /* Descriere */
.card .table colgroup col:nth-child(5) { width: 10%; } /* Status */
.card .table colgroup col:nth-child(6) { width: 8%; }  /* Istoric */
.card .table colgroup col:nth-child(7) { width: 5%; }  /* Sterge */
.card .table colgroup col:nth-child(8) { width: 5%; }  /* Arhiveaza */

/* Ensure headers are perfectly aligned */
.card .table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #24272b !important;
    font-weight: 600;
    font-size: 0.75rem;
    line-height: 1.2;
}

/* Make sort arrows more compact */
.sort-arrows {
    display: inline-block;
    margin-left: 0.25rem;
    font-size: 0.6rem;
}

.sort-arrows a {
    display: inline-block;
    margin: 0 0.1rem;
    text-decoration: none;
    color: #6c757d;
}

.sort-arrows a:hover {
    color: #28a745;
}

/* ==== STATUS CELL STYLING ==== */
/* Status cell text should always be black for readability */
.status-cell {
    color: #000 !important;
    font-weight: 500;
    border-radius: 4px;
    padding: 4px 8px !important;
}

/* JavaScript-applied classes for status coloring */
.status-rezolvat {
    background-color: #ff8c00 !important;
    color: #000 !important;
}

.status-in-operare {
    background-color: #dc3545 !important;
    color: #000 !important;
}

.status-rezolvat-favorabil,
.status-ridicat {
    background-color: #28a745 !important;
    color: #000 !important;
}

/* ==== UPDATE SIGNAL ICON STYLING ==== */
/* Make the icon column narrow and align to top */
.signal-col {
    width: 1.5rem;
    text-align: center;
    vertical-align: top;
}

/* Style & animate the warning icon */
.update-icon {
    color: #ffc107;
    font-size: 1.2em;
    animation: pulse 2s infinite;
}

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