/* src/nextlist/frontend/css/completed-applications.css */

.completed-apps-page {
    padding: 24px;
    max-width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ─── Header ─────────────────────────────────────────────── */
.completed-apps-page .completed-apps-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.completed-apps-page .completed-apps-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px;
}

html.dark-theme .completed-apps-page .completed-apps-title {
color: #fff;
}

.completed-apps-page .completed-apps-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

/* ─── Filtros ────────────────────────────────────────────── */
.completed-apps-page .completed-apps-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.completed-apps-page .filter-group {
    flex: 1;
    min-width: 160px;
}

    .completed-apps-page .filter-input {
        width: 100%;
        padding: 20px 12px;
        border: none;
        border-color: 2px var(--primary-color);
        border-radius: 7px;
        font-size: 13px;
        color: #111827;
        outline: none;
        box-sizing: border-box;
        background-color: var(--background-inputs-light-mode);
        text-transform: uppercase;
    }

    .completed-apps-page .filter-input::placeholder {
    text-transform: none;
}

    html.dark-theme .completed-apps-page input[type="date"] {
        color-scheme: dark;
    }

    html.dark-theme .completed-apps-page .filter-input {
    background-color: var(--background-dark-mode);
    border: none;
    color: white;
    text-transform: uppercase;
    }

.completed-apps-page .filter-input:focus {
    border-color: 2px var(--primary-color);
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.12);
}

.completed-apps-page .filter-date {
    cursor: pointer;
}

.completed-apps-page .btn-filter-clear {
    background: var(--primary-color);
    border: none;
    border-radius: 7px;
    font-size: 13px;
    color: var(--primary-color-contrast);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    padding: 20px 100px;
    flex-shrink: 0
}

.completed-apps-page .completed-apps-count {
    font-size: 12px;
    color: #9ca3af;
    padding: 0 2px;
}

.completed-apps-page .completed-apps-table-wrap {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
     overflow: visible;
}

.completed-apps-page .completed-apps-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.completed-apps-page .completed-apps-table thead tr {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}
html.dark-theme .completed-apps-page thead tr{
    background-color: var(--surface-dark-mode);
}

html.dark-theme .completed-apps-page .completed-apps-table tbody{
    background-color: var(--background-dark-mode);
    
}

.completed-apps-page .completed-apps-table th {
    padding: 20px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: #6b7280;
    white-space: nowrap;
    text-transform: uppercase;
}

html.dark-theme .completed-apps-page .completed-apps-table th{
    background-color: var(--background-dark-mode);
    
}

.completed-apps-page .completed-apps-table td {
    padding: 12px 14px;
    color: #111827;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

html.dark-theme .completed-apps-page .completed-apps-table td{
color: #fff;
}

.completed-apps-page .completed-apps-table tbody tr:last-child td {
    border-bottom: none;
}

.completed-apps-page .app-code-badge {
    display: inline-block;
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
    border-radius: 5px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 700;
    font-family: monospace;
}

.completed-apps-page .col-name {
    font-weight: 500;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.completed-apps-page .col-unit {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.completed-apps-page .unit-name {
    font-weight: 500;
    font-size: 13px;
}

.completed-apps-page .setor-name {
    font-size: 11px;
    color: #9ca3af;
}

.completed-apps-page .col-date {
    white-space: nowrap;
    font-size: 12px;
    color: #6b7280;
}

.completed-apps-page .col-progress {
    min-width: 110px;
}

.completed-apps-page .progress-bar-wrap {
    height: 5px;
    background: #f3f4f6;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.completed-apps-page .progress-bar-fill {
    height: 100%;
    background: #f97316;
    border-radius: 3px;
    transition: width 0.3s;
}

.completed-apps-page .progress-label {
    font-size: 11px;
    color: #6b7280;
}

.completed-apps-page .nc-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.completed-apps-page .col-actions {
    width: 40px;
    text-align: center;
}

.completed-apps-page .btn-row-actions {
    background: none;
    border: 1px solid transparent;
    border-radius: 5px;
    width: 30px;
    height: 30px;
    font-size: 18px;
    cursor: pointer;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.completed-apps-page .btn-row-actions:hover {
    border-color: #d1d5db;
    color: #374151;
    background: #f9fafb;
}

.completed-apps-page .actions-dropdown {
    position: fixed;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    min-width: 180px;
    z-index: 999;
    overflow: visible;
}

.completed-apps-page .actions-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    text-align: left;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    transition: background 0.12s;
}

.completed-apps-page .actions-dropdown-item:hover {
    background: #f9fafb;
}

.completed-apps-page .actions-dropdown-item--danger {
    color: #dc2626;
}

.completed-apps-page .actions-dropdown-item--danger:hover {
    background: #fee2e2;
}

.completed-apps-page .actions-dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 4px 0;
}

.completed-apps-page .completed-apps-empty {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    color: #9ca3af;
    gap: 10px;
}

.completed-apps-page .empty-icon {
    font-size: 36px;
}

.completed-apps-page .completed-apps-empty p {
    font-size: 14px;
    margin: 0;
}


.completed-apps-page #completed-apps-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 0 0.5rem;
}

.completed-apps-page #completed-apps-pagination-info {
    font-size: 0.8125rem;
    color: var(--text-secondary, #6b7280);
}

.completed-apps-page #completed-apps-pagination-controls {
    display: flex;
    flex-direction: row;
    gap: 0.25rem;
}