/* ==========================
   BASI GENERALI HR SUITE
========================== */

.hrsuite-card {
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.hrsuite-card-header {
    padding: 14px 18px;
    border-bottom: 1px solid #d0d7de;
    background: #f6f8fa;
}

.hrsuite-card-title {
    margin: 0;
    font-size: 17px;
}

.hrsuite-card-body {
    padding: 18px;
}

.hrsuite-form-group {
    margin-bottom: 15px;
}

.hrsuite-label {
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

.hrsuite-input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #c6cdd4;
    background: #fff;
    box-sizing: border-box;
}

.hrsuite-input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.hrsuite-btn {
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    border: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hrsuite-btn-primary {
    background: #2271b1;
    color: #fff;
}

.hrsuite-btn-primary:hover {
    background: #1a5c8f;
}

.hrsuite-btn-danger {
    background: #d63638;
    color: #fff;
}

.hrsuite-btn-danger:hover {
    background: #b42b2d;
}

.hrsuite-alert {
    padding: 10px 15px;
    border-radius: 6px;
    margin: 10px 0 15px;
    font-size: 13px;
}

.hrsuite-alert-success {
    background: #e7f5e8;
    border: 1px solid #b7e2bb;
    color: #1c7c2d;
}

.hrsuite-alert-error {
    background: #fdecea;
    border: 1px solid #f5c2c0;
    color: #b02a37;
}

/* ==========================
   LOGIN
========================== */

.hrsuite-login-wrap {
    max-width: 420px;
    margin: 25px auto;
}

.hrsuite-login-form button {
    width: 100%;
    justify-content: center;
}

.hrsuite-logout-top {
    max-width: 420px;
    margin: 25px auto 0;
    display: flex;
    justify-content: flex-end;
}

/* ==========================
   FUTURE: PORTALI HR / DIP
   (qui poi aggiungiamo stili
   per portale HR e dipendente)
========================== */

/* .hrsuite-hr-portal { ... }
   .hrsuite-dip-portal { ... }
   .hrsuite-table { ... }
*/

/* ==========================
   CAMBIO PASSWORD
========================== */

.hrsuite-pw-wrap {
    max-width: 420px;
    margin: 25px auto;
}

.hrsuite-pw-form .hrsuite-form-group {
    margin-bottom: 15px;
}

.hrsuite-help-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

/* ==========================
   PORTALE DIPENDENTE
========================== */

/* Contenitore principale portale */
.hrsuite-portal {
    max-width: 1100px;
    margin: 0 auto;
}

/* Header utente */
.hrsuite-portal .hrsuite-user-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin: 10px 0 20px;
    border-radius: 10px;
    border: 1px solid #d0d7de;
    background: linear-gradient(135deg, #f9fafb, #eef2f7);
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.04);
}
.hrsuite-portal .hrsuite-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #2271b1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 18px;
}
.hrsuite-portal .hrsuite-user-info-main {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}
.hrsuite-portal .hrsuite-user-info-sub {
    font-size: 12px;
    color: #4b5563;
}

/* Nav tab superiore */
.hrsuite-portal-nav-wrap {
    margin: 15px 0 20px;
}
.hrsuite-portal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.hrsuite-portal-nav a {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid #d0d7de;
    background: #f6f8fa;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.3;
    color: #24292f;
    box-shadow: 0 1px 2px rgba(15,23,42,0.04);
    transition:
        background 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease,
        border-color 0.15s ease,
        transform 0.1s ease;
}
.hrsuite-portal-nav a:hover {
    background: #eaeef2;
    border-color: #c0c7d1;
    box-shadow: 0 2px 4px rgba(15,23,42,0.08);
    transform: translateY(-1px);
}
.hrsuite-portal-nav a.hrsuite-tab-active {
    background: #2271b1;
    border-color: #1a5c8f;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.36);
}

/* Grid 2 colonne (richieste, dashboard, ecc.) */
.hrsuite-portal .hrsuite-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.5fr);
    gap: 16px;
}
@media (max-width: 900px) {
    .hrsuite-portal .hrsuite-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Card (solo nel portale, il login usa quelle base) */
.hrsuite-portal .hrsuite-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #d0d7de;
    box-shadow: 0 2px 5px rgba(15,23,42,0.04);
    overflow: hidden;
}
.hrsuite-portal .hrsuite-card-header {
    padding: 10px 14px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f9fafb, #eef2ff);
}
.hrsuite-portal .hrsuite-card-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}
.hrsuite-portal .hrsuite-card-body {
    padding: 12px 14px 14px;
    font-size: 13px;
    color: #111827;
}

/* Tabelle */
.hrsuite-portal .hrsuite-table-wrap {
    margin-top: 6px;
    overflow-x: auto;
}
.hrsuite-portal .hrsuite-table th,
.hrsuite-portal .hrsuite-table td {
    font-size: 12px;
    padding: 6px 8px;
    vertical-align: middle;
}
.hrsuite-portal .hrsuite-table thead th {
    background: #f3f4f6;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}
.hrsuite-portal .hrsuite-table tbody tr:nth-child(even) td {
    background-color: #f9fafb;
}

/* Tabelle compatte (timbrature di oggi) */
.hrsuite-portal .hrsuite-table-compact th,
.hrsuite-portal .hrsuite-table-compact td {
    font-size: 12px;
    padding: 5px 7px;
}

/* Badge / stato */
.hrsuite-portal .hrsuite-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid transparent;
}
.hrsuite-portal .hrsuite-badge-info {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}
.hrsuite-portal .hrsuite-badge-success {
    background: #ecfdf3;
    color: #166534;
    border-color: #bbf7d0;
}
.hrsuite-portal .hrsuite-badge-warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fed7aa;
}

/* FORMS – campi e select “belli” */
.hrsuite-portal .hrsuite-form {
    margin: 0;
}
.hrsuite-portal .hrsuite-form-row {
    margin-bottom: 10px;
}
.hrsuite-portal .hrsuite-form-row-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.hrsuite-portal .hrsuite-form-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 3px;
}
.hrsuite-portal .hrsuite-form-control {
    width: 100%;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #d0d7de;
    background: #ffffff;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 1px 0 rgba(15,23,42,0.02);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.hrsuite-portal .hrsuite-form-control:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px rgba(34,113,177,0.25);
}
.hrsuite-portal .hrsuite-form-control-small {
    max-width: 140px;
}

/* Select con freccetta custom */
.hrsuite-portal select.hrsuite-form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #6b7280 50%),
        linear-gradient(135deg, #6b7280 50%, transparent 50%);
    background-position:
        calc(100% - 14px) 11px,
        calc(100% - 10px) 11px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 26px;
}

/* Help text nel portale (sovrascrive quello generico se presente) */
.hrsuite-portal .hrsuite-help-text {
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 2px;
}

.hrsuite-portal .hrsuite-form-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-start;
}

/* Pulsanti nel portale */
.hrsuite-portal .button.button-primary {
    border-radius: 999px;
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    background: linear-gradient(135deg, #2271b1, #1a5c8f);
    box-shadow: 0 2px 6px rgba(37,99,235,0.35);
    text-shadow: none;
}
.hrsuite-portal .button.button-primary:hover {
    background: linear-gradient(135deg, #1a5c8f, #174972);
    box-shadow: 0 3px 8px rgba(30,64,175,0.45);
    transform: translateY(-0.5px);
}

.hrsuite-portal .button {
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 12px;
}

/* ==========================
   PORTALE HR
========================== */

.hrsuite-hr-portal {
    margin: 20px 0 40px;
}

/* Header HR */
.hrsuite-hr-portal .hrsuite-hr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.hrsuite-hr-portal .hrsuite-hr-title {
    margin: 0;
    font-size: 22px;
}

.hrsuite-hr-portal .hrsuite-hr-subtitle {
    margin: 4px 0 0;
    color: #555;
}

/* Nav tab superiore HR (riusa classi del portale dip, ma puoi differenziare qui) */
.hrsuite-hr-portal .hrsuite-portal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0 25px;
}

.hrsuite-hr-portal .hrsuite-portal-nav a {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid #d0d7de;
    background: #f6f8fa;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.3;
    color: #24292f;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: background 0.15s ease,
                color 0.15s ease,
                box-shadow 0.15s ease,
                border-color 0.15s ease;
}

.hrsuite-hr-portal .hrsuite-portal-nav a:hover {
    background: #eaeef2;
    border-color: #c0c7d1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.hrsuite-hr-portal .hrsuite-portal-nav a.hrsuite-tab-active {
    background: #2271b1;
    border-color: #1a5c8f;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

/* Card HR */
.hrsuite-hr-portal .hrsuite-card {
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.hrsuite-hr-portal .hrsuite-card-header {
    padding: 12px 16px;
    border-bottom: 1px solid #d0d7de;
    background: #f6f8fa;
}

.hrsuite-hr-portal .hrsuite-card-header h3 {
    margin: 0;
    font-size: 16px;
}

.hrsuite-hr-portal .hrsuite-card-body {
    padding: 16px;
}

/* Form HR */
.hrsuite-hr-portal .hrsuite-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px 18px;
}

.hrsuite-hr-portal .hrsuite-form-group {
    margin-bottom: 12px;
}

.hrsuite-hr-portal .hrsuite-form-group label {
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.hrsuite-hr-portal .hrsuite-form-group input,
.hrsuite-hr-portal .hrsuite-form-group select,
.hrsuite-hr-portal .hrsuite-form-group textarea {
    width: 100%;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #c6cdd4;
}

.hrsuite-hr-portal .hrsuite-form-group textarea {
    min-height: 60px;
}

/* Tabelle HR */
.hrsuite-hr-portal .hrsuite-table {
    width: 100%;
    border-collapse: collapse;
}

.hrsuite-hr-portal .hrsuite-table th,
.hrsuite-hr-portal .hrsuite-table td {
    border: 1px solid #d0d7de;
    padding: 6px 8px;
    font-size: 13px;
}

.hrsuite-hr-portal .hrsuite-table thead th {
    background: #f6f8fa;
}

.hrsuite-hr-portal .hrsuite-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

/* Pulsanti HR */
.hrsuite-hr-portal .hrsuite-btn {
    padding: 7px 14px;
    border-radius: 6px;
    border: 0;
    cursor: pointer;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.hrsuite-hr-portal .hrsuite-btn-primary {
    background: #2271b1;
    color: #fff;
}

.hrsuite-hr-portal .hrsuite-btn-primary:hover {
    background: #1a5c8f;
}

.hrsuite-hr-portal .hrsuite-btn-secondary {
    background: #eaeef2;
    color: #1f2328;
}

.hrsuite-hr-portal .hrsuite-btn-secondary:hover {
    background: #d7dde3;
}

.hrsuite-hr-portal .hrsuite-btn-danger {
    background: #d63638;
    color: #fff;
}

/* Alert HR */
.hrsuite-hr-portal .hrsuite-alert {
    padding: 10px 15px;
    margin: 10px 0 15px;
    border-radius: 6px;
    font-size: 13px;
}

.hrsuite-hr-portal .hrsuite-alert-success {
    background: #ecf9ec;
    border: 1px solid #c2e6c2;
    color: #1b5e20;
}

.hrsuite-hr-portal .hrsuite-alert-error {
    background: #fdecea;
    border: 1px solid #f5c2c7;
    color: #b71c1c;
}

/* ==========================
   CARTELLINO OROLOGIO
========================== */

.hrsuite-cartellino-table {
    border-collapse: collapse;
    width: 100%;
    background: #fff;
}

.hrsuite-cartellino-table th {
    background: #2271b1;
    color: #fff;
    padding: 10px;
    text-align: center;
}

.hrsuite-cartellino-table td {
    padding: 8px;
    vertical-align: top;
}

.hrsuite-cartellino-table tr:nth-child(even) {
    background: #f6f6f6;
}

.hrsuite-cartellino-table tr:nth-child(odd) {
    background: #ffffff;
}

.hrsuite-cartellino-festivo {
    background: #ffeaea !important;
    color: #c00;
    font-weight: bold;
}

.hrsuite-cartellino-timbratura {
    padding: 2px 4px;
    margin: 2px 0;
    background: #e8eef7;
    border-radius: 4px;
    font-size: 13px;
    display: inline-block;
}

.hrsuite-cartellino-timbratura strong {
    color: #333;
}

.hrsuite-cartellino-ore {
    font-weight: bold;
    text-align: right;
    white-space: nowrap;
}

.hrsuite-cartellino-total {
    background: #dfe9f5 !important;
    font-weight: bold;
}

.hrsuite-cartellino-empty {
    color: #aaa;
}
