*{box-sizing:border-box}:root{--bg:#f4f5f7;--card:#fff;--text:#2b2f33;--muted:#6f757b;--line:#d9dde2;--accent:#4b8b83;--accent2:#39756e;--danger:#a73a3a}
html,body{margin:0;padding:0;font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--text)}a{color:var(--accent2);text-decoration:none}.topbar{height:58px;background:#fff;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;padding:0 28px}.page{max-width:900px;margin:38px auto;padding:0 18px 60px}.card{background:#fff;border:1px solid #e1e4e8;border-radius:7px;box-shadow:0 2px 10px rgba(0,0,0,.05);padding:38px}.form-card{max-width:760px;margin:auto}.auth-card{max-width:520px;margin:auto}.wide-card{max-width:900px}h1{font-size:30px;font-weight:600;margin:0 0 8px}.lead{color:var(--muted);font-size:16px;margin:0 0 30px;line-height:1.5}form label{display:block;font-weight:600;font-size:14px;margin:22px 0 8px}input,select,textarea{width:100%;border:1px solid #cfd4da;border-radius:4px;padding:12px 13px;font-size:15px;background:#fff}input:focus,select:focus,textarea:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px rgba(75,139,131,.12)}textarea{resize:vertical;min-height:150px}button{margin-top:28px;background:var(--accent);border:0;color:#fff;padding:13px 24px;border-radius:4px;font-size:16px;font-weight:700;cursor:pointer}.filebox{border:1px dashed #b7bdc3;border-radius:5px;padding:18px;background:#fafbfc}.filebox input{border:0;padding:0}.filebox span{display:block;margin-top:8px;color:var(--muted);font-size:12px}.alert{padding:12px 14px;border-radius:4px;margin:18px 0;background:#eef5f4}.alert.error{background:#fbeeee;color:var(--danger)}.alert.success{background:#eaf5ee;color:#236b3b}.small{font-size:13px;color:var(--muted);margin-top:24px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:14px}th,td{text-align:left;border-bottom:1px solid var(--line);padding:12px 10px}th{background:#f7f8f9}@media(max-width:650px){.card{padding:24px 18px}.topbar{padding:0 14px;font-size:13px}h1{font-size:25px}}

/* ===== RDL BRAND THEMES START ===== */

/*
 * TENANT DEFAULT: OVALE
 */
:root {
    --bg:#f6f8fc;
    --card:#ffffff;
    --text:#17213a;
    --muted:#667085;
    --line:#dce3ef;

    --accent:#2f56bf;
    --accent2:#24479f;

    --accent-soft:#eef2ff;
    --accent-border:#cbd6f7;

    --danger:#b42318;
}

html,
body {
    background:var(--bg);
    color:var(--text);
}

a {
    color:var(--accent);
}

a:hover {
    color:var(--accent2);
}

.topbar {
    min-height:68px;
    height:auto;
    background:#ffffff;
    border-bottom:1px solid var(--line);
    box-shadow:0 1px 8px rgba(24,39,75,.05);
}

.card,
.panel,
.kpi {
    border-color:#e3e8f2 !important;
    box-shadow:0 4px 18px rgba(32,58,120,.06);
}

button {
    background:var(--accent);
    border-radius:6px;
    transition:
        background .15s ease,
        box-shadow .15s ease,
        transform .15s ease;
}

button:hover {
    background:var(--accent2);
    box-shadow:0 4px 12px rgba(47,86,191,.20);
}

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

input:focus,
select:focus,
textarea:focus {
    border-color:var(--accent);
    box-shadow:0 0 0 3px rgba(47,86,191,.13);
}

th {
    background:#f0f3fa;
    color:#344054;
}

.status {
    background:var(--accent-soft) !important;
    color:var(--accent2);
}

.alert {
    background:#edf2ff;
}

.filebox {
    background:#fafbff;
    border-color:#bfcbea;
}


/*
 * ADMIN INTERNO: RAGGIO DI LUCE
 */
body.admin-theme {
    --bg:#f4f4f2;
    --card:#ffffff;
    --text:#1d1d1b;
    --muted:#686868;
    --line:#dadada;

    --accent:#1d1d1b;
    --accent2:#000000;
    --accent-soft:#fffbd6;
    --accent-border:#ffef00;
}

body.admin-theme {
    background:#f4f4f2;
}

body.admin-theme .topbar {
    background:#171717;
    color:#ffffff;
    border-bottom:3px solid #ffef00;
    box-shadow:none;
}

body.admin-theme .topbar strong {
    color:#ffffff;
}

body.admin-theme .topbar a {
    color:#ffef00;
}

body.admin-theme .topbar a:hover {
    color:#ffffff;
}

body.admin-theme button {
    background:#1d1d1b;
    color:#ffffff;
}

body.admin-theme button:hover {
    background:#333333;
}

body.admin-theme input:focus,
body.admin-theme select:focus,
body.admin-theme textarea:focus {
    border-color:#c9b900;
    box-shadow:0 0 0 3px rgba(255,239,0,.25);
}

body.admin-theme .card-kpi,
body.admin-theme .menu a,
body.admin-theme .panel,
body.admin-theme .card {
    background:#ffffff;
    border-color:#dedede !important;
}

body.admin-theme .menu a:hover {
    border-color:#e4cf00 !important;
    box-shadow:0 4px 14px rgba(0,0,0,.08);
}

body.admin-theme th {
    background:#f2f2ee;
}

/* ===== RDL BRAND THEMES END ===== */

/* ===== OVALE PUBLIC PALETTE FINAL ===== */
body:not(.admin-theme) {
    --bg:#f7f9fd;
    --card:#ffffff;
    --text:#102653;
    --muted:#68758f;
    --line:#dfe7f3;

    --accent:#134cc5;
    --accent2:#0f3f9f;

    --accent-soft:#eaf2ff;
    --accent-border:#bfd3ff;
}

body:not(.admin-theme) a {
    color:var(--accent);
}

body:not(.admin-theme) button {
    background:var(--accent);
}

body:not(.admin-theme) button:hover {
    background:var(--accent2);
}

body:not(.admin-theme) input:focus,
body:not(.admin-theme) select:focus,
body:not(.admin-theme) textarea:focus {
    border-color:var(--accent);
    box-shadow:0 0 0 3px rgba(19,76,197,.14);
}

body:not(.admin-theme) .status {
    background:var(--accent-soft) !important;
    color:var(--accent2);
}
/* ===== /OVALE PUBLIC PALETTE FINAL ===== */


/* ===== RDL PORTAL BRAND RESTORE FINAL ===== */

/*
 * PORTALE OVALE
 *
 * Le pagine tenant usano il logo Ovale centrato nella testata.
 * Il testo del tenant rimane strutturalmente presente,
 * ma il logo costituisce il brand visibile.
 */

body.tenant-public {
    --bg:#f7f9fd;
    --card:#ffffff;
    --text:#102653;
    --muted:#68758f;
    --line:#dfe7f3;
    --accent:#134cc5;
    --accent2:#0f3f9f;
    --accent-soft:#eaf2ff;
    --accent-border:#bfd3ff;
}

body.tenant-public .topbar {
    position:relative;

    min-height:82px;
    height:auto;

    background-color:#ffffff;
    background-image:
        url('/assets/clients/ovale.png');

    background-repeat:no-repeat;
    background-position:center center;
    background-size:auto 58px;

    border-bottom:1px solid #dfe7f3;

    box-shadow:
        0 1px 10px rgba(16,38,83,.07);
}

/*
 * ticket.php contiene già il logo nel markup:
 * viene nascosto perché ora la testata lo centra
 * indipendentemente dal numero di elementi laterali.
 */
body.tenant-public .topbar .brand {
    visibility:hidden;
}

/*
 * Dashboard / elenco / dettaglio contengono
 * il nome tenant come primo elemento.
 * Mantiene il suo spazio così il menu destro
 * non sposta il logo dal centro geometrico.
 */
body.tenant-public .topbar > strong {
    visibility:hidden;
}

body.tenant-public h1,
body.tenant-public h2,
body.tenant-public h3 {
    color:#102653;
}

body.tenant-public a {
    color:var(--accent);
}

body.tenant-public a:hover {
    color:var(--accent2);
}

body.tenant-public button {
    background:var(--accent);
}

body.tenant-public button:hover {
    background:var(--accent2);
}

body.tenant-public .card,
body.tenant-public .panel,
body.tenant-public .kpi {
    border-color:#dfe7f3 !important;

    box-shadow:
        0 4px 18px rgba(19,76,197,.06);
}

body.tenant-public .kpi strong {
    color:var(--accent);
}

body.tenant-public th {
    background:#f2f6fd;
    color:#243b67;
}

body.tenant-public input:focus,
body.tenant-public select:focus,
body.tenant-public textarea:focus {
    border-color:var(--accent);

    box-shadow:
        0 0 0 3px rgba(19,76,197,.14);
}


/*
 * AREA AMMINISTRATIVA RAGGIO DI LUCE
 * Mantiene il precedente admin-theme.
 */

body.admin-theme .topbar {
    position:relative;
    min-height:68px;
    padding-left:190px;
}

body.admin-theme .topbar::before {
    content:"";

    position:absolute;
    left:22px;
    top:50%;

    transform:translateY(-50%);

    width:145px;
    height:48px;

    background-image:
        url('/assets/internal/raggio-di-luce.png?v=white-20260928');

    background-repeat:no-repeat;
    background-position:center;
    background-size:contain;
}


@media(max-width:700px) {

    body.tenant-public .topbar {
        min-height:72px;
        background-size:auto 46px;
    }
}

/* ===== /RDL PORTAL BRAND RESTORE FINAL ===== */


/* ===== RDL_OVALE_FORM_MATCH_V1 ===== */
/* Personalizzazione esclusiva del modulo pubblico OVALE. */

body.tenant-public.rdl-ovale-ticket-form {
    --bg: #ffffff;
    --text: #3b2d25;
    --muted: #665b54;
    background: #ffffff;
}

body.tenant-public.rdl-ovale-ticket-form .page {
    max-width: 760px;
    margin: 10px auto 42px;
    padding: 0 16px;
}

body.tenant-public.rdl-ovale-ticket-form .form-card {
    max-width: 680px;
    margin: auto;
    padding: 0;
    border: 1px solid #e0e3e8 !important;
    border-radius: 3px;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,.08);
}

body.tenant-public.rdl-ovale-ticket-form .form-card > h1 {
    margin: 0;
    padding: 27px 18px 4px;
    color: #3b2b20;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
}

body.tenant-public.rdl-ovale-ticket-form .form-card > .lead {
    margin: 0 0 12px;
    padding: 0 18px 28px;
    border-bottom: 1px solid #d5dbe4;
    color: #463b33;
    text-align: center;
    font-size: 12px;
    line-height: 1.5;
}

body.tenant-public.rdl-ovale-ticket-form
.form-card > .alert {
    margin: 12px 36px;
}

body.tenant-public.rdl-ovale-ticket-form
.form-card form {
    padding: 0 36px 28px;
}

body.tenant-public.rdl-ovale-ticket-form
.rdl-ovale-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
    row-gap: 14px;
    align-items: start;
}

body.tenant-public.rdl-ovale-ticket-form
.rdl-ovale-field {
    min-width: 0;
}

body.tenant-public.rdl-ovale-ticket-form form label {
    display: block;
    margin: 19px 0 7px;
    color: #3d3029;
    font-size: 12px;
    font-weight: 400;
}

body.tenant-public.rdl-ovale-ticket-form
.rdl-ovale-field label {
    margin-top: 7px;
}

body.tenant-public.rdl-ovale-ticket-form
form input:not([type="hidden"]):not([type="file"]),
body.tenant-public.rdl-ovale-ticket-form form select,
body.tenant-public.rdl-ovale-ticket-form form textarea {
    width: 100%;
    border: 1px solid #cad2df;
    border-radius: 3px;
    background: #ffffff;
    color: #382e28;
    font-size: 12px;
    padding: 8px 9px;
}

body.tenant-public.rdl-ovale-ticket-form
form input:not([type="hidden"]):not([type="file"]),
body.tenant-public.rdl-ovale-ticket-form form select {
    min-height: 32px;
}

body.tenant-public.rdl-ovale-ticket-form form textarea {
    min-height: 115px;
    resize: vertical;
}

body.tenant-public.rdl-ovale-ticket-form
form input::placeholder,
body.tenant-public.rdl-ovale-ticket-form
form textarea::placeholder {
    color: #888f9b;
}

body.tenant-public.rdl-ovale-ticket-form .filebox {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 100px;
    border: 1px dashed #b9c9df;
    border-radius: 3px;
    background: #f8faff;
    text-align: center;
}

body.tenant-public.rdl-ovale-ticket-form
.filebox::before {
    content: "\2601";
    font-size: 29px;
    line-height: 1;
    color: #8495b4;
}

body.tenant-public.rdl-ovale-ticket-form
.filebox input[type="file"] {
    width: 100%;
    max-width: 320px;
    font-size: 12px;
    padding: 5px;
}

body.tenant-public.rdl-ovale-ticket-form
.filebox span {
    margin-top: 0;
    font-size: 10px;
}

body.tenant-public.rdl-ovale-ticket-form
form > button[type="submit"] {
    display: block;
    margin: 25px auto 0;
    min-width: 140px;
    padding: 10px 18px;
    border: 0;
    border-radius: 3px;
    background: #134cc5;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

body.tenant-public.rdl-ovale-ticket-form
form > button[type="submit"]:hover {
    background: #0f3f9f;
}

@media (max-width: 650px) {
    body.tenant-public.rdl-ovale-ticket-form
    .rdl-ovale-fields {
        grid-template-columns: 1fr;
        row-gap: 6px;
    }

    body.tenant-public.rdl-ovale-ticket-form
    .form-card form {
        padding: 0 18px 24px;
    }

    body.tenant-public.rdl-ovale-ticket-form
    .form-card > h1 {
        font-size: 22px;
    }
}

/* ===== /RDL_OVALE_FORM_MATCH_V1 ===== */
