* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f5f7fa;
    color: #222;
    line-height: 1.5;
}

.container {
    width: 95%;
    max-width: 1200px;
    margin: auto;
}

.topbar {
    background: #005baa;
    color: white;
    padding: 16px 0;
}

.topbar h1 {
    margin-bottom: 8px;
    font-size: 26px;
}

.userbar {
    font-size: 14px;
    margin-bottom: 8px;
}

.userbar span {
    opacity: 0.85;
    margin-left: 5px;
}

.logout-link {
    color: #ffd6d6;
    margin-left: 10px;
}

.topbar nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.topbar nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.topbar nav a:hover {
    text-decoration: underline;
}

main.container {
    padding: 28px 0;
}

h2 {
    margin-bottom: 12px;
}

h3 {
    margin: 24px 0 12px;
}

form {
    background: white;
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}

label {
    font-weight: bold;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    max-width: 420px;
    padding: 10px;
    margin-top: 4px;
    border: 1px solid #ccd3dd;
    border-radius: 8px;
    background: white;
}

textarea {
    resize: vertical;
}

button {
    padding: 10px 16px;
    border: 0;
    border-radius: 8px;
    background: #005baa;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

button:hover {
    background: #004985;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

th,
td {
    padding: 10px;
    border-bottom: 1px solid #e4e8ee;
    text-align: left;
}

th {
    background: #eef4fb;
    font-weight: bold;
}

tr:hover td {
    background: #f8fbff;
}

.alert,
p[style*="green"],
p[style*="red"] {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

p[style*="green"] {
    background: #e7f8ed;
    color: #176b35 !important;
}

p[style*="red"] {
    background: #ffe5e5;
    color: #9b1c1c !important;
}

.dashboard {
    padding: 30px 0;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.footer {
    margin-top: 50px;
    padding: 20px 0;
    text-align: center;
    background: #eee;
}

.auth-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.auth-card h2 {
    margin-bottom: 8px;
}

.muted {
    color: #666;
    margin-bottom: 20px;
}

.auth-card label {
    display: block;
    margin-top: 15px;
    margin-bottom: 6px;
}

.auth-card input {
    max-width: none;
}

.auth-card button {
    width: 100%;
    margin-top: 22px;
}

.alert-error {
    background: #ffe5e5;
    color: #9b1c1c;
}

@media (max-width: 700px) {
    .topbar h1 {
        font-size: 21px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    input,
    select,
    textarea {
        max-width: none;
    }
}

.timesheet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.day-card {
    margin-bottom: 0;
}

.day-card.weekend {
    background: #fafafa;
    border: 1px solid #e1e1e1;
}

.day-card-header,
.day-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.day-card-header {
    margin-bottom: 12px;
}

.day-card-header span {
    display: block;
    color: #667;
    font-size: 13px;
}

.check-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: bold;
}

.check-label input {
    width: auto;
    max-width: none;
}

.day-card input,
.day-card select,
.day-card textarea {
    max-width: none;
    margin-bottom: 10px;
}

.day-card-footer {
    margin-top: 8px;
}

.day-card-footer button {
    width: 44px;
    height: 38px;
    padding: 0;
    font-size: 18px;
}

.excel-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.excel-toolbar input,
.excel-toolbar select {
    max-width: 260px;
}

.excel-table {
    font-size: 14px;
}

.excel-table th {
    text-align: center;
}

.excel-table td {
    padding: 6px;
    vertical-align: middle;
}

.excel-table input,
.excel-table select {
    width: 100%;
    max-width: none;
    padding: 6px;
    margin: 0;
    border-radius: 4px;
}

.excel-table input[type="time"] {
    min-width: 95px;
}

.excel-table input[type="number"] {
    min-width: 70px;
}

.excel-code {
    font-weight: bold;
    text-align: center;
}

.weekend-row td {
    background: #f2f2f2;
}

.excel-table button {
    padding: 6px 10px;
}

/* Pontaj - layout */
.admin-timesheet-wrap {
    overflow: auto;
    max-height: 80vh;
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.admin-timesheet {
    min-width: 1200px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
}

.admin-timesheet th,
.admin-timesheet td {
    border: 1px solid #ccd3dd;
    padding: 4px 6px;
    text-align: center;
    white-space: nowrap;
}

.admin-timesheet th {
    background: #e8f1fb;
}

.admin-timesheet .name-cell {
    text-align: left;
    font-weight: bold;
}

.admin-timesheet .weekend-col {
    background: #f1f1f1;
}

.admin-timesheet thead th {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #e8f1fb;
}

.admin-timesheet thead tr:nth-child(2) th {
    top: 33px;
    z-index: 21;
}

.admin-timesheet td:first-child,
.admin-timesheet th:first-child {
    position: sticky;
    left: 0;
    z-index: 10;
    background: #f4f7fb;
}

.admin-timesheet td:nth-child(2),
.admin-timesheet th:nth-child(2) {
    position: sticky;
    left: 55px;
    z-index: 11;
    background: white;
    min-width: 220px;
    max-width: 220px;
}

.admin-timesheet td:nth-child(3),
.admin-timesheet th:nth-child(3) {
    position: sticky;
    left: 275px;
    z-index: 11;
    background: white;
    min-width: 120px;
}

.admin-timesheet thead th:first-child,
.admin-timesheet thead th:nth-child(2),
.admin-timesheet thead th:nth-child(3) {
    z-index: 30;
}

.admin-timesheet tbody tr:hover td {
    background: #f7fbff;
}

.admin-timesheet tbody tr:hover td:first-child,
.admin-timesheet tbody tr:hover td:nth-child(2),
.admin-timesheet tbody tr:hover td:nth-child(3) {
    background: #edf5ff;
}

.collective-select:focus {
    outline: 2px solid #005baa;
    background: #fff;
}

@media (max-width: 1200px) {

    .admin-timesheet td:nth-child(2),
    .admin-timesheet th:nth-child(2) {
        min-width: 180px;
        max-width: 180px;
    }

    .admin-timesheet td:nth-child(3),
    .admin-timesheet th:nth-child(3) {
        min-width: 100px;
    }
}

.admin-timesheet th:nth-last-child(6),
.admin-timesheet td:nth-last-child(6) {
    background: #dbeafe !important;
}

.admin-timesheet th:nth-last-child(5),
.admin-timesheet td:nth-last-child(5) {
    background: #fff3b0 !important;
}

.admin-timesheet th:nth-last-child(4),
.admin-timesheet td:nth-last-child(4) {
    background: #ffd1d1 !important;
}

.admin-timesheet th:nth-last-child(3),
.admin-timesheet td:nth-last-child(3) {
    background: #d8f8d8 !important;
}

.admin-timesheet th:nth-last-child(2),
.admin-timesheet td:nth-last-child(2) {
    background: #ffe8a3 !important;
}

.admin-timesheet th:nth-last-child(1),
.admin-timesheet td:nth-last-child(1) {
    background: #ff9b9b !important;
}
/* ==========================================================
   PONTAJ LEGEND COLORS
   ========================================================== */

   .legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin: 18px 0;
    font-size: 13px;
    color: #2f3747;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #ccd3dd;
}

/* Ore normale */
.legend-ore {
    background: #ffffff;
}

/* Concedii */
.legend-co {
    background: #b7f0c0;
}

.legend-cm {
    background: #d7f3d8;
}

.legend-cr {
    background: #00a651;
}

.legend-fs {
    background: #f5c6cb;
}

.legend-r {
    background: #dbeafe;
}

.legend-a {
    background: #fecaca;
}

.legend-d {
    background: #e5e7eb;
}

/* Liber / legal */
.legend-l {
    background: #ffe99a;
}

.legend-ll {
    background: #ffd6d6;
}

/* Ture */
.legend-12z {
    background: #dbeafe;
}

.legend-12n {
    background: #c7d2fe;
}

.legend-24 {
    background: #fef3c7;
}

.legend-r1 {
    background: #dcfce7;
}

.legend-r2 {
    background: #dbeafe;
}

.legend-r3 {
    background: #ede9fe;
}

/* =========================
   PONTAJ COLECTIV
========================= */

/* Pontaj - layout */
.timesheet-wrapper {
    width: 100%;
    max-width: 100%;
    max-height: 70vh;
    overflow-x: auto;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #d6dde6;
    border-radius: 12px;
    padding: 10px;
}

/* Pontaj - table */
.timesheet-table {
    border-collapse: separate;
    border-spacing: 0;
    width: max-content;
    min-width: 100%;
    font-size: 13px;
}

.timesheet-table th,
.timesheet-table td {
    border-right: 1px solid #d6dde6;
    border-bottom: 1px solid #e6ebf0;
    padding: 6px 8px;
    text-align: center;
    background: #fff;
}

/* Pontaj - sticky columns */
.timesheet-table th {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #e8eef5;
    font-weight: 700;
}

.timesheet-table th:first-child,
.timesheet-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 15;
    width: 210px;
    min-width: 210px;
    max-width: 210px;
    text-align: left;
    background: #fff;
    font-weight: 600;
    white-space: normal;
}

.timesheet-table th:nth-child(2),
.timesheet-table td:nth-child(2) {
    display: none !important;
}

.timesheet-table th:first-child {
    z-index: 30;
    background: #e8eef5;
}

.timesheet-table td {
    height: 44px;
}

.timesheet-table input[type="text"] {
    width: 38px;
    height: 30px;
    padding: 0;
    text-align: center;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.timesheet-table input[type="text"]:focus {
    outline: none;
    border-color: #0b65b9;
    box-shadow: 0 0 0 2px rgba(11, 101, 185, 0.15);
}

.timesheet-table tr:nth-child(even) td {
    background: #fbfcfe;
}

.timesheet-table tr:hover td {
    background: #f2f7fc;
}

.timesheet-table tr:hover td:first-child {
    background: #eef5fb;
}

/* Pontaj - cell states */

/* Lățire pagină pentru pontaj colectiv */
.container,
main,
.page,
.content {
    max-width: 98vw !important;
    width: 98vw !important;
}


/* Filtru pontaj pe o singură linie */
.filter-card,
.filters,
.card form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.card form input,
.card form select {
    max-width: 360px;
}

/* =====================================================
   PONTAJ COLECTIV - FOAIE TIP EXCEL
===================================================== */

.pontaj-excel-page {
    position: relative;
    left: 50%;
    width: 98vw;
    max-width: 98vw;
    margin-left: -49vw;
    padding: 0 12px 30px;
}

.pontaj-excel-toolbar {
    /* Pontaj - sticky toolbar */
    position: sticky;
    top: 0;
    z-index: 50; /* above table body but below sticky table headers */
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 12px;
    margin-bottom: 0; /* toolbar occupies its own space when sticky */
    background: rgba(255,255,255,0.97);
    border-bottom: 1px solid rgba(15,23,42,0.06);
    box-shadow: 0 2px 6px rgba(2,6,23,0.04);
}

.pontaj-excel-toolbar h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.pontaj-excel-subtitle {
    margin-top: 4px;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
}

.pontaj-excel-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.pontaj-excel-filter label {
    margin-bottom: 0;
    font-weight: 700;
    white-space: nowrap;
}

.pontaj-excel-filter input[type="month"] {
    width: 180px;
    height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    padding: 0 10px;
    background: #ffffff;
}

.pontaj-excel-filter button,
.pontaj-actions button {
    height: 42px;
    border: 0;
    border-radius: 7px;
    padding: 0 16px;
    background: #0f5ea8;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.pontaj-excel-filter button:hover,
.pontaj-actions button:hover {
    background: #0b4f8d;
}

.btn-export-excel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 16px;
    border-radius: 7px;
    background: #1d6f42;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.btn-export-excel:hover {
    background: #165834;
}

.pontaj-sheet-wrapper {
    width: 100%;
    max-width: 100%;
    max-height: 72vh;
    overflow: auto;
    background: #ffffff;
    border: 1px solid #9ca3af;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.10);
}

.pontaj-sheet {
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    width: max-content;
    min-width: 100%;
    font-size: 12px;
    color: #111827;
}

.pontaj-sheet th,
.pontaj-sheet td {
    border-right: 1px solid #9ca3af;
    border-bottom: 1px solid #9ca3af;
    padding: 0;
    text-align: center;
    vertical-align: middle;
    background: #ffffff;
}

.pontaj-title-row th {
    position: sticky;
    top: 0;
    z-index: 70;
    height: 34px;
    background: #f8fafc;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pontaj-month-row th {
    position: sticky;
    top: 34px;
    z-index: 65;
    height: 30px;
    background: #e5e7eb;
    font-weight: 800;
}

.pontaj-days-row th {
    position: sticky;
    top: 64px;
    z-index: 60;
    height: 28px;
    background: #dbeafe;
    font-weight: 800;
}

.pontaj-dow-row th {
    position: sticky;
    top: 92px;
    z-index: 60;
    height: 28px;
    background: #eff6ff;
    font-weight: 800;
    font-size: 11px;
}

.month-title {
    background: #fef3c7 !important;
    font-size: 14px;
    text-transform: uppercase;
}

.calc-title,
.calc-col {
    background: #e2e8f0 !important;
    font-weight: 800;
}

.sticky-col {
    position: sticky;
    z-index: 45;
}

.pontaj-sheet thead .sticky-col {
    z-index: 80;
}

.col-nr {
    left: 0;
    width: 42px;
    min-width: 42px;
    max-width: 42px;
}

.col-name {
    left: 42px;
    width: 230px;
    min-width: 230px;
    max-width: 230px;
    text-align: left !important;
    padding-left: 8px !important;
}

.col-role {
    left: 272px;
    width: 165px;
    min-width: 165px;
    max-width: 165px;
    text-align: left !important;
    padding-left: 8px !important;
}

.col-hours {
    left: 437px;
    width: 58px;
    min-width: 58px;
    max-width: 58px;
}

.pontaj-sheet tbody .sticky-col {
    background: #ffffff;
}

.pontaj-sheet tbody tr:nth-child(even) .sticky-col {
    background: #f8fafc;
}

.pontaj-sheet tbody tr:hover .sticky-col {
    background: #e0f2fe;
}

.day-col,
.day-cell {
    width: 34px;
    min-width: 34px;
    max-width: 34px;
}

.day-cell {
    height: 30px;
}

.day-cell input {
    display: block;
    width: 100%;
    height: 30px;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #111827;
    text-transform: uppercase;
}

.weekend-col {
    background: #e5e7eb !important;
}

.weekend-col input {
    background: #e5e7eb !important;
}

.total-cell,
.calc-col {
    width: 58px;
    min-width: 58px;
    max-width: 58px;
}

.total-cell {
    background: #fef9c3 !important;
    font-weight: 800;
}

.employee-name {
    font-weight: 700;
}

.pontaj-sheet tbody tr:nth-child(even) td {
    background: #f8fafc;
}

.pontaj-sheet tbody tr:hover td {
    background: #e0f2fe;
}

.empty-row {
    height: 48px;
    font-weight: 700;
    color: #64748b;
}

.pontaj-legend {
    margin-top: 16px;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #d8dee8;
    border-radius: 10px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
    align-items: center;
}

.pontaj-legend .legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.875rem;
    line-height: 1;
    border: 1px solid rgba(17,24,39,0.06);
    background: #ffffff;
    color: #0f172a;
    white-space: nowrap;
}

/* Legend items reuse the same colors as .day-cell.code-* */
.pontaj-legend .legend-item.code-12z { background: #e6f3f4 !important; color: #0f172a !important; }
.pontaj-legend .legend-item.code-12n { background: #e8edf7 !important; color: #0f172a !important; }
.pontaj-legend .legend-item.code-24  { background: #f4f5f7 !important; color: #0f172a !important; }
.pontaj-legend .legend-item.code-g   { background: #eef2e7 !important; color: #0f172a !important; }
.pontaj-legend .legend-item.code-l,
.pontaj-legend .legend-item.code-ll { background: var(--excel-yellow) !important; color: #111827 !important; }
.pontaj-legend .legend-item.code-co,
.pontaj-legend .legend-item.code-cm { background: var(--excel-green) !important; color: #111827 !important; }
.pontaj-legend .legend-item.code-fs { background: #f9ecec !important; color: #0f172a !important; }
.pontaj-legend .legend-item.code-cr { background: var(--excel-cr) !important; color: #ffffff !important; }
.pontaj-legend .legend-item.code-r  { background: var(--excel-r) !important; color: #111827 !important; }
.pontaj-legend .legend-item.code-r1 { background: #dcfce7 !important; color: #14532d !important; }
.pontaj-legend .legend-item.code-r2 { background: #dbeafe !important; color: #1e3a8a !important; }
.pontaj-legend .legend-item.code-r3 { background: #ede9fe !important; color: #4c1d95 !important; }

/* =====================================================
   PONTAJ COLECTIV - CULORI DIN EXCEL
===================================================== */

:root {
    --excel-blue: #B4C7E7;
    --excel-blue-light: #D9E2F3;
    --excel-green: #C6DEB5;
    --excel-green-strong: #A9CE91;
    --excel-yellow: #FFE699;
    --excel-gray: #C9C9C9;
    --excel-cr: #00B050;
    --excel-r: #00B0F0;
    --excel-red: #FF0000;
    --excel-border: #9CA3AF;
}

/* Titlu foaie */
.pontaj-title-row th {
    background: #F8FAFC !important;
    color: #111827 !important;
    border-color: var(--excel-border) !important;
}

/* Rând lună / zone laterale */
.pontaj-month-row th {
    background: var(--excel-blue-light) !important;
    border-color: var(--excel-border) !important;
}

.pontaj-month-row .month-title {
    background: var(--excel-green) !important;
    color: #111827 !important;
    font-weight: 800 !important;
}

.pontaj-month-row .calc-title {
    background: var(--excel-blue) !important;
    color: #111827 !important;
}

/* Header angajat / funcție / program ore */
.pontaj-days-row .sticky-col,
.pontaj-dow-row .sticky-col {
    background: var(--excel-blue) !important;
    color: #111827 !important;
}

/* Header zile și zilele săptămânii */
.pontaj-days-row .day-col,
.pontaj-dow-row .day-col {
    background: var(--excel-green) !important;
    color: #111827 !important;
    border-color: var(--excel-border) !important;
}

/* Header calcule */
.pontaj-days-row .calc-col {
    background: var(--excel-blue) !important;
    color: #111827 !important;
    border-color: var(--excel-border) !important;
}

/* CO header */
.pontaj-days-row .calc-col:nth-last-child(4) {
    background: var(--excel-green-strong) !important;
}

/* CR header */
.pontaj-days-row .calc-col:nth-last-child(3) {
    background: var(--excel-cr) !important;
    color: #ffffff !important;
}

/* R header */
.pontaj-days-row .calc-col:nth-last-child(2) {
    background: var(--excel-r) !important;
    color: #111827 !important;
}

/* CM header */
.pontaj-days-row .calc-col:nth-last-child(1) {
    background: var(--excel-green-strong) !important;
}

/*
|--------------------------------------------------------------------------
| Weekend normal
|--------------------------------------------------------------------------
*/

.weekend-col,
.weekend-col input,
.day-cell.code-l input {
    background: #f8e7a2 !important;
    color: #5b4a00 !important;
}

/*
|--------------------------------------------------------------------------
| Sărbători legale
|--------------------------------------------------------------------------
*/

.day-cell.code-ll,
.day-cell.code-ll input,
.legal-holiday-col {
    background: #ffd6d6 !important;
    color: #991b1b !important;
    font-weight: 700;
}

/* Prezent */
.day-cell.code-8 input,
.day-cell.code-p input {
    background: #ffffff !important;
    color: #111827 !important;
}

/* Concedii */
.day-cell.code-co input,
.day-cell.code-cm input {
    background: var(--excel-green) !important;
    color: #111827 !important;
}

/* Concediu restant */
.day-cell.code-cr,
.day-cell.code-cr input {
    background: var(--excel-cr) !important;
    color: #ffffff !important;
}

/* Recuperare */
.day-cell.code-r,
.day-cell.code-r input,
.day-cell.code-lr input {
    background: var(--excel-r) !important;
    color: #111827 !important;
}

/* Ture speciale */
.day-cell.code-12z,
.day-cell.code-12z input {
    background: #e6f3f4 !important;
    color: #0f172a !important;
}

.day-cell.code-12n,
.day-cell.code-12n input {
    background: #e8edf7 !important;
    color: #0f172a !important;
}

.day-cell.code-24,
.day-cell.code-24 input {
    background: #f4f5f7 !important;
    color: #0f172a !important;
}

/* Radiologie - ture 6/6/12 */
.day-cell.code-r1,
.day-cell.code-r1 input {
    background: #dcfce7 !important;
    color: #14532d !important;
}

.day-cell.code-r2,
.day-cell.code-r2 input {
    background: #dbeafe !important;
    color: #1e3a8a !important;
}

.day-cell.code-r3,
.day-cell.code-r3 input {
    background: #ede9fe !important;
    color: #4c1d95 !important;
}

.day-cell.code-g,
.day-cell.code-g input {
    background: #eef2e7 !important;
    color: #0f172a !important;
}

.day-cell.code-fs,
.day-cell.code-fs input {
    background: #f9ecec !important;
    color: #0f172a !important;
}

/* Delegatie / obligatii */
.day-cell.code-d input,
.day-cell.code-o input {
    background: var(--excel-blue-light) !important;
    color: #111827 !important;
}

/* Absent / nemotivat / fara salariu */
.day-cell.code-a input {
    background: #FCA5A5 !important;
    color: #111827 !important;
}

.day-cell.code-n input {
    background: var(--excel-red) !important;
    color: #ffffff !important;
}

/* Totaluri dreapta - stil Excel */
.pontaj-sheet tbody .total-cell {
    background: #ffffff !important;
    color: #111827 !important;
    font-weight: 800 !important;
}

/* Total CO */
.pontaj-sheet tbody td:nth-last-child(4) {
    background: var(--excel-green) !important;
}

/* Total CR */
.pontaj-sheet tbody td:nth-last-child(3) {
    background: var(--excel-cr) !important;
    color: #ffffff !important;
}

/* Total R */
.pontaj-sheet tbody td:nth-last-child(2) {
    background: var(--excel-r) !important;
    color: #111827 !important;
}

/* Total CM */
.pontaj-sheet tbody td:nth-last-child(1) {
    background: var(--excel-green-strong) !important;
    color: #111827 !important;
}

/* Borduri mai apropiate de Excel */
.pontaj-sheet th,
.pontaj-sheet td {
    border-color: var(--excel-border) !important;
}

/* Focus pe celulă, fără să strice culoarea */
.day-cell input:focus {
    outline: 2px solid #2563EB !important;
    outline-offset: -2px;
    background: #ffffff !important;
}
/* legend styles unified above */

/* Pontaj - actions */
.pontaj-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
}

.btn-generate-shifts {
    background: #2563eb;
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 600;
}

.btn-generate-shifts:hover {
    background: #1d4ed8;
}

.generate-message {
    font-weight: 600;
}

.generate-message.success {
    color: #15803d;
}

.generate-message.error {
    color: #b91c1c;
}

/* Pontaj - loading overlay */
.shift-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.75);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.shift-spinner {
    width: 38px;
    height: 38px;
    border: 4px solid #ddd;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: shiftSpin .8s linear infinite;
}

@keyframes shiftSpin {
    to { transform: rotate(360deg); }
}

/* Pontaj - Buton export */
.btn-export-excel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 14px;
    border-radius: 6px;
    background: #1d6f42;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
    white-space: nowrap;
}

.btn-export-excel:hover {
    background: #165834;
}

.pontaj-excel-filter button {
    height: 42px;
}

/* Blocare Luna */

.badge-locked {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: #7f1d1d;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.btn-lock-month {
    background: #991b1b;
    color: #ffffff;
    border: 1px solid #7f1d1d;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 600;
}

.btn-unlock-month {
    background: #166534;
    color: #ffffff;
    border: 1px solid #14532d;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 600;
}

button:disabled,
input:disabled,
select:disabled {
    opacity: .55;
    cursor: not-allowed;
}

/*
|--------------------------------------------------------------------------
| Export PDF button
|--------------------------------------------------------------------------
*/

.btn-export-pdf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #b91c1c;
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid #991b1b;
    transition: .15s ease;
}

.btn-export-pdf:hover {
    background: #991b1b;
}

.footer {
    margin-top: 20px;
    font-size: 10px;
    text-align: right;
}

/* ==========================================================================
   Dashboard cards
   ========================================================================== */
   .dashboard {
    padding: 48px 32px;
}

.dashboard h2 {
    margin-bottom: 28px;
    font-size: 28px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    align-items: stretch;
}

.card {
    background: #fff;
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    min-height: 190px;
}

.card h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 20px;
}

.card p {
    margin: 0 0 12px;
    line-height: 1.5;
}

.card ul {
    margin: 8px 0 14px 18px;
    padding: 0;
}

.card li {
    margin-bottom: 6px;
}

.card a {
    color: #005baa;
    font-weight: 600;
    text-decoration: none;
}

.card a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Dashboard cards hover
   ========================================================================== */

.card {
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.12);
}

.card-link {
    margin-top: 18px;
}

.card-link a {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    font-weight: 600;
    text-decoration: none;
}



/*
|--------------------------------------------------------------------------
| Toolbar pontaj
|--------------------------------------------------------------------------
*/

.pontaj-excel-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

/*
|--------------------------------------------------------------------------
| Search box pontaj
|--------------------------------------------------------------------------
*/

.pontaj-search-box {
    display: flex;
    align-items: center;
}

.pontaj-search-box input {
    width: 420px;
    max-width: 100%;
    min-width: 320px;

    padding: 12px 16px;

    border: 1px solid #cbd5e1;
    border-radius: 10px;

    font-size: 14px;
    font-weight: 500;

    background: #ffffff;
    color: #0f172a;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.pontaj-search-box input:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.15);
}

.pontaj-search-box input::placeholder {
    color: #64748b;
}
