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

body {
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    background: #0b0b0d;
    color: #f5f5f5;

    font-family: Arial, Helvetica, sans-serif;

    overflow: hidden;
}

.container {
    width: 90%;
    max-width: 900px;

    text-align: center;
}

.message {
    font-size: clamp(1.4rem, 3vw, 2.5rem);
    font-weight: 600;

    line-height: 1.3;
    letter-spacing: -0.03em;
}

.brand {
    display: inline-block;

    color: #ff1744;
    font-weight: 900;

    white-space: nowrap;

    text-shadow:
        0 0 10px rgba(255, 23, 68, 0.5),
        0 0 30px rgba(255, 23, 68, 0.25);

    animation: shake 1.8s infinite;
}

.subtitle {
    margin-top: 12px;

    font-size: clamp(1rem, 2vw, 1.25rem);

    color: #a5a5aa;
}

.login-button {
    display: inline-block;

    margin-top: 35px;
    padding: 15px 42px;

    color: #ffffff;
    background: #ff1744;

    border: 2px solid #ff1744;
    border-radius: 50px;

    font-size: 1rem;
    font-weight: 800;

    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;

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

.login-button:hover {
    background: transparent;
    color: #ff1744;

    transform: translateY(-4px);

    box-shadow:
        0 10px 35px rgba(255, 23, 68, 0.3);
}

.login-button:active {
    transform: translateY(-1px);
}


/* Animazione afanculo.it */

@keyframes shake {

    0%,
    100% {
        transform: rotate(0deg) scale(1);
    }

    5% {
        transform: rotate(-2deg) scale(1.03);
    }

    10% {
        transform: rotate(2deg) scale(1.03);
    }

    15% {
        transform: rotate(-1deg) scale(1);
    }

    20% {
        transform: rotate(0deg) scale(1);
    }
}


/* Responsive */



@media (max-width: 768px) {

    .container {
        width: 88%;
    }

    .message {
        font-size: 1.5rem;
    }

    .message-small{
        font-size: 1rem;
    }

    .login-button {
        width: 100%;
        max-width: 280px;
    }
}

@media (min-width: 768px) {

    .message-small{
        font-size: 2rem;
    }
}




/* Login form */

form {
    margin-top: 30px;
}

form input {
    display: block;

    width: 100%;
    max-width: 320px;

    margin: 10px auto;
    padding: 14px 18px;

    background: #151518;
    color: #f5f5f5;

    border: 2px solid #333338;
    border-radius: 50px;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;

    outline: none;

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

form input:focus {
    border-color: #ff1744;

    box-shadow:
        0 0 15px rgba(255, 23, 68, 0.2);
}

form input::placeholder {
    color: #77777d;
}

form .login-button {
    cursor: pointer;
}

.login-success {
    margin: 20px auto;
    padding: 12px 15px;

    max-width: 320px;

    background: rgba(255, 23, 68, 0.08);

    border: 1px solid rgba(255, 23, 68, 0.5);
    border-radius: 8px;

    color: #f5f5f5;

    font-size: 0.9rem;
}

/* Area personale */

body.area-page {
    min-height: 100vh;
    height: auto;
    overflow-y: auto;
    padding: 40px 0;
}


/* stili statistiche.php */
.stats-select {
    display: block;

    width: 100%;
    max-width: 320px;

    margin: 10px auto;
    padding: 14px 18px;

    background: #151518;
    color: #f5f5f5;

    border: 2px solid #333338;
    border-radius: 50px;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;

    outline: none;
}

.stats-select:focus {
    border-color: #ff1744;
}

.stats-box {
    width: 100%;
    max-width: 600px;

    margin: 30px auto;
}

.stats-primary {
    padding: 25px;

    background: #151518;

    border: 2px solid #ff1744;
    border-radius: 15px;

    box-shadow:
        0 0 25px rgba(255, 23, 68, 0.15);
}

.stats-primary span {
    display: block;

    color: #a5a5aa;

    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stats-primary strong {
    display: block;

    margin-top: 8px;

    color: #ff1744;

    font-size: 3rem;
    font-weight: 900;
}

.stats-secondary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;

    margin-top: 15px;
}

.stats-secondary div {
    padding: 18px;

    background: #151518;

    border: 1px solid #333338;
    border-radius: 12px;
}

.stats-secondary span {
    display: block;

    color: #77777d;

    font-size: 0.8rem;
}

.stats-secondary strong {
    display: block;

    margin-top: 5px;

    color: #f5f5f5;

    font-size: 1.3rem;
}

@media (max-width: 600px) {

    .stats-secondary {
        grid-template-columns: 1fr;
    }

    .stats-primary strong {
        font-size: 2.5rem;
    }
}


/* fine stili statistiche.php */



/* stili utenti.php */
.users-list {
    width: 100%;
    max-width: 700px;

    margin: 30px auto;
}

.user-card {
    margin-bottom: 15px;
    padding: 20px;

    background: #151518;

    border: 1px solid #333338;
    border-radius: 12px;

    text-align: left;
}

.user-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 15px;
}

.user-card-header strong {
    font-size: 1.2rem;
}

.user-status {
    padding: 5px 10px;

    border-radius: 20px;

    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.user-status.active {
    color: #ffffff;
    background: rgba(255, 23, 68, 0.8);
}

.user-status.inactive {
    color: #a5a5aa;
    background: #333338;
}

.user-card-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;

    margin-top: 20px;
}

.user-card-details div {
    padding: 10px;

    border-radius: 8px;
    background: #0b0b0d;
}

.user-card-details span {
    display: block;

    color: #77777d;

    font-size: 0.75rem;
}

.user-card-details strong {
    display: block;

    margin-top: 4px;

    font-size: 0.9rem;

    word-break: break-word;
}

.user-card .login-button {
    margin-top: 20px;
    padding: 10px 25px;

    font-size: 0.85rem;
}

@media (max-width: 600px) {

    .user-card-details {
        grid-template-columns: 1fr;
    }

    .user-card-header {
        align-items: flex-start;
        flex-direction: column;
    }
}
/* fine stili utenti.php */

/* stili admin/utente.php */
.login-error {
    margin: 20px auto;
    padding: 12px 15px;

    max-width: 320px;

    background: rgba(255, 23, 68, 0.12);

    border: 1px solid rgba(255, 23, 68, 0.7);
    border-radius: 8px;

    color: #ff6b88;

    font-size: 0.9rem;
}

.user-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    max-width: 320px;

    margin: 20px auto;

    color: #a5a5aa;

    font-size: 0.9rem;
}

.user-checkbox input {
    width: auto;
    margin: 0;

    accent-color: #ff1744;
}
/* fine stili admin/utente.php */

/* stili admin/statistiche.php */
input[type="date"] {
    display: block;

    width: 100%;
    max-width: 320px;

    margin: 10px auto;
    padding: 14px 18px;

    background: #151518;
    color: #f5f5f5;

    border: 2px solid #333338;
    border-radius: 50px;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;

    outline: none;
}

input[type="date"]:focus {
    border-color: #ff1744;

    box-shadow:
        0 0 15px rgba(255, 23, 68, 0.2);
}

.user-card-header a {
    transition: color 0.2s ease;
}

.user-card-header a:hover {
    color: #ff1744 !important;
}
/* fine stili admin/statistiche.php */

/*  area/statistiche.php */

.stats-comparison {
    display: flex;
    align-items: stretch;
}

.stats-my-average {
    width: 66.666%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.stats-team-average {
    width: 33.333%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.stats-my-average span {
    font-size: 1rem;
}

.stats-my-average strong {
    font-size: 3rem;
}

.stats-team-average span {
    font-size: 0.75rem;
    opacity: 0.7;
}

.stats-team-average strong {
    font-size: 1.4rem;

}
.stats-my-average strong.above-team {
    color: #00e676;
}

.stats-my-average strong.below-team {
    color: #ff1744;
}
/*  fine area/statistiche.php */


/* Stili  area/record.php */
 body.records-page .container {
            width: min(1100px, calc(100% - 32px));
            max-width: 1100px;
        }

        .records-heading {
            margin: 24px 0 14px;
            text-align: left;
            font-size: 1.05rem;
            font-weight: 700;
        }

        .records-summary {
            margin: 18px 0;
            padding: 14px 18px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.035);
            color: #d8d8dc;
            text-align: left;
        }

        .records-table-wrapper {
            width: 100%;
            overflow-x: auto;
            margin: 18px 0 24px;
            border: 1px solid #34343a;
            border-radius: 12px;
            background: #111114;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
            -webkit-overflow-scrolling: touch;
        }

        table.records-table {
            width: 100%;
            min-width: 900px;
            border-collapse: separate;
            border-spacing: 0;
            table-layout: fixed;
            color: #f5f5f5;
            font-size: 0.98rem;
        }

        .records-table th,
        .records-table td {
            padding: 16px 20px;
            border-bottom: 1px solid #303036;
            text-align: left;
            vertical-align: middle;
            white-space: nowrap;
        }

        .records-table thead th {
            position: sticky;
            top: 0;
            z-index: 1;
            background: #242429;
            color: #ff526c;
            font-size: 0.82rem;
            font-weight: 800;
            letter-spacing: 0.045em;
            text-transform: uppercase;
        }

        .records-table tbody tr:nth-child(even) {
            background: #19191e;
        }

        .records-table tbody tr {
            transition: background-color 0.15s ease;
        }

        .records-table tbody tr:hover {
            background: #292027;
        }

        .records-table tbody tr:last-child td {
            border-bottom: 0;
        }

        .records-table .numeric-cell {
            text-align: right;
            font-variant-numeric: tabular-nums;
        }

        .records-table .date-cell {
            font-weight: 700;
        }

        .records-table .hours-cell {
            font-weight: 700;
            color: #ffffff;
        }

        .records-table .counter-cell {
            color: #c8c8cf;
        }

        .records-table .effective-cell {
            color: #ff526c;
            font-weight: 800;
        }

        .records-table .rate-cell {
            color: #8fe3b0;
            font-weight: 800;
        }

        .records-empty {
            margin: 22px 0;
            padding: 24px;
            border: 1px dashed #45454d;
            border-radius: 12px;
            color: #d8d8dc;
            text-align: center;
        }

        .records-actions {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 12px;
            margin-top: 24px;
        }

        .records-actions .login-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        @media (max-width: 600px) {
            body.records-page .container {
                width: calc(100% - 20px);
            }

            .records-table th,
            .records-table td {
                padding: 14px 16px;
            }

            .records-heading {
                font-size: 1rem;
            }
        }

        
/* fine Stili  area/record.php */

/* Form per aggiungere un record dalla pagina admin/utente-statistiche.php */
.admin-add-record {
    margin: 1.5rem 0;
}
.admin-add-record > summary {
    display: block;
    width: fit-content;
    cursor: pointer;
    list-style: none;
    text-align: center;
}
.admin-add-record > summary::-webkit-details-marker {
    display: none;
}
.admin-add-record-form {
    margin-top: 1rem;
    padding: 1.25rem;
    border: 1px solid #333;
    border-radius: 10px;
    background: #111114;
}
.admin-add-record-form .login-button {
    width: auto;
    margin-top: 1rem;
}
@media (max-width: 640px) {
    .admin-add-record > summary {
        width: 100%;
    }
    .admin-add-record-form .login-button {
        width: 100%;
    }
}

/* pagina index/utente.php

/* Messaggio confronto media team */
.team-comparison-message {
    margin-top: 25px;
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.5;
    text-align: center;
    background: #171719;
    border: 1px solid #333;
}

/* Sopra la media */
.team-comparison-message.above-team {
    color: #ff1744;
    border-color: #ff1744;
    box-shadow: 0 0 10px rgba(255, 23, 68, 0.15);
}

/* Sotto la media */
.team-comparison-message.below-team {
    color: #ffb74d;
    border-color: #ffb74d;
}

/* In linea con la media */
.team-comparison-message.equal-team {
    color: #4caf50;
    border-color: #4caf50;
}

/* fine pagina index/utente.php

