/* FONTS - cargadas via <link> en gateway.php y dashboard.php con preconnect
----------------------------------------- */

/* RESET CSS
----------------------------------------- */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
html {
    overflow-y: scroll;
    overflow-x: hidden;
}

body {
	line-height: 1.25;
    max-width: 100vw;
    overflow-x: hidden;
}
html.modal-open,
body.modal-open {
    overflow: hidden;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* VARIABLES
----------------------------------------- */
:root {
    /* MDUI Modifiers */
    --mdui-color-primary-light: 46, 125, 50;
    --mdui-color-background-light: 240, 253, 244;
    --mdui-color-surface-container-highest-light: 195, 238, 210;

    /* Paleta de colores corporativa */
    --verde-principal:              #2e7d32;
    --verde-principal-rgb:          0, 181, 107;
    --verde-secundario:             #66bb6a;
    --verde-claro:                  #a5d6a7;
    --fondo:                        linear-gradient(45deg, #18ccc6, #cbe909);
    --dashboard-container:          rgba(255, 255, 255, 0.8);
    --blanco:                       #ffffff;
    --negro:                        #000000;
    --font-color:                   #343d4e;

    /* Background Colors Consolidadas */
    --bg-light-green:               #f4fcf6;
    --bg-light-green-alt:           #d9f8da;
    --bg-form-column:               #f0fdf4;
    --hover-green:                  #c3eed2;
    --modal-container:              rgba(244, 252, 246, 0.8);

    /* Notifications */
    --backcolornotiferror:          #f83223;
    --backcolornotifsuccess:        #019901;
    --fontcolornotifications:       #FFFFFF;

    /* Status Colors */
    --pending-color:                #fa4134;
    --issue-color:                  #f88323;
    --confirmed-color:              #2973fc;
    --paid-color:                   #66bb6a;

    /* Table Colors */
    --table-border-dark-color:      #5c5c5c;
    --table-border-light-color:     #cecece;
    --table-font-thead-color:       #5c5c5c;
    --table-font-body-color:        #000000;
    --table-font-tfoot-color:       #5c5c5c;
    --table-active-row-color:       #008000;
    --table-inactive-row-color:     #f83223;

    /* Fonts */
    --fontfamilyroboto:             "Roboto";
    --fontfamilyubuntu:             "Ubuntu";



    /* Font Sizes */
    --fontsizehuge:                 clamp(3rem, 2.7359rem + 0.8451vw, 3.75rem);         /* 48-60 500x1920 */
    --fontsizebigtitle:             clamp(1.125rem, 0.8609rem + 0.8451vw, 1.875rem);    /* 18-30 500x1920 */
    --fontsizetitle:                clamp(0.9375rem, 0.6549rem + 0.7042vw, 1.5rem);     /* 15-24 500x1920 */
    --fontsizenotes:                clamp(0.8125rem, 0.662rem + 0.2817vw, 1rem);         /* 13-16 500x1920 */
    --fontsizepassinstructions:     clamp(0.6875rem, 0.537rem + 0.2817vw, 0.875rem);    /* 11-14 500x1920 */
    --fontsizesmallnotes:           clamp(0.5625rem, 0.412rem + 0.2817vw, 0.75rem);     /*  9-12 500x1920 */
    --table-fontsize:               clamp(0.6875rem, 0.537rem + 0.2817vw, 0.875rem);    /* 11-14 500x1920 */
    --table-fontsize-small:         clamp(0.625rem, 0.4745rem + 0.2817vw, 0.8125rem);   /* 10-13 500x1920 */

    /* Spacing Scale */
    --spacing-xs:                   5px;
    --spacing-sm:                   10px;
    --spacing-md:                   15px;
    --spacing-lg:                   20px;
    --spacing-xl:                   30px;
    --spacing-2xl:                  50px;

    /* Border Radius */
    --border-radius-sm:             5px;
    --border-radius-md:             10px;
    --border-radius-lg:             15px;

    /* Box Shadows */
    --box-shadow-light:             0 4px 10px rgba(0,0,0,0.1);
    --box-shadow-standard:          2px 8px 20px rgba(0,0,0,0.2);
    --box-shadow-modal:             0 5px 20px rgba(0,0,0,0.3);
    --box-shadow-inset:             inset 0 0 10px rgba(27, 150, 48, 0.4);

    /* Transitions */
    --transition-fast:              all 0.2s ease;
    --transition-standard:          all 0.3s ease;
    --transition-fade:              opacity 0.3s ease;
    --transition-color:             color 0.3s ease;
    --transition-bg:                background-color 0.3s ease;

    /* Text Shadow */
    --text-shadow-outline:          -1px -1px 0 #ffffff, 1px -1px 0 #ffffff,
                                    -1px 1px 0 #ffffff, 1px 1px 0 #ffffff;

    /* Legacy Variables (mantener compatibilidad) */
    --header-fondo:                 var(--bg-light-green);
    --containerboxshadow:           var(--box-shadow-standard);
}

/* SCROLLBAR GLOBAL
----------------------------------------- */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--verde-claro) transparent;
}
*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
*::-webkit-scrollbar-track {
    background: transparent;
}
*::-webkit-scrollbar-thumb {
    background-color: var(--verde-claro);
    border-radius: 3px;
}

/* ESTRUCTURA
----------------------------------------- */
*{
    /*user-select: none;*/
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

img {
    -webkit-user-drag: none;
}

/* Valores de detalle siempre seleccionables */
.cfi-value,
.cd-value,
.profile-data-value {
    user-select: text;
}

/* user-select: none solo en elementos interactivos/decorativos donde
   seleccionar texto sería accidental o molesto.                       */
button,
mdui-button,
mdui-fab,
mdui-tab,
mdui-tab-panel,
mdui-navigation-bar-item,
thead th,
table td,
table tr,
header,
.drawer,
.nav-link,
.drawer-link,
.toolbar,
.cd-action-bar,
.contractdetail_modal-header,
.modal-header-left,
.cd-label,
.liq-badge,
.comm-badge,
.contract-status,
.schedule-action-btn,
.comm-page-btn,
.comm-size-btn,
.comm-page-buttons,
.comm-page-size,
.helpbox {
    user-select: none;
}

/* Utility Classes - Clases Reutilizables
----------------------------------------- */
.flex-center{
    display: flex;
    justify-content: center;
    align-items: center;
}

.pager-base{
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-sm);
    font-family: var(--fontfamilyroboto);
    text-align: center;
}

.pager-item-strong{
    border: 1px solid;
    margin: 0 2px;
    padding: var(--spacing-sm);
    font-weight: bold;
}

.pager-item-link a{
    border-radius: var(--border-radius-md);
    margin: 0 2px;
    padding: var(--spacing-sm);
    text-decoration: none;
    color: var(--verde-principal);
    transition: var(--transition-standard);
}

.pager-item-link a:hover{
    background-color: var(--verde-principal);
    color: var(--blanco);
}

.dashboard-box-base{
    display: flex;
    flex: 1;
    justify-content: center;
    align-items: flex-start;
    background-color: var(--dashboard-container);
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow-standard);
    margin: var(--spacing-sm);
    padding: 8px 12px;
    transition: var(--transition-fast);
}

.dashboard-box-base:hover{
    cursor: pointer;
}

.mdui-menu {
    max-height: 200px; /* Ajusta según necesites */
    overflow-y: auto;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--fondo);
    font-family: Arial, sans-serif;
    min-height: 100vh;
}

body.env-nerdnomada {
    --fondo: linear-gradient(45deg, #187ecc, #e9a209);
}

body.font-ubuntu {
    --fontfamilyroboto: "Ubuntu";
    font-family: "Ubuntu", sans-serif;
}

body.font-ubuntu input,
body.font-ubuntu textarea,
body.font-ubuntu select {
    font-family: "Ubuntu", sans-serif;
}

body.font-inter {
    --fontfamilyroboto: "Inter";
    font-family: "Inter", sans-serif;
}

body.font-inter input,
body.font-inter textarea,
body.font-inter select {
    font-family: "Inter", sans-serif;
}

/* Installer Module */
.installer-module{
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.installer-container {
    background-color: var(--blanco);
    padding: 2rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow-light);
    width: 100%;
    max-width: 700px;
}

.installer-logo{
    text-align: center;
    margin-bottom: 20px;
}

.installer-container img{
    max-width: 100%;
}

.installer-log{
    margin-top: 50px;
}

/* → Estilos del login en css/login.css */

input[type="email"],
input[type="password"],
input[type="text"],
input[type="tel"],
input[type="date"],
input[type="number"],
textarea,
select {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    text-align: center;
    width: 200px;
    padding: var(--spacing-sm);
    outline: 1px solid var(--verde-claro);
    border: 0;
    border-radius: var(--border-radius-sm);
    box-sizing: border-box;
    transition: var(--transition-fast);

    &:hover {
        outline: 2px solid var(--verde-claro);
    }

    &:focus {
        outline: 2px solid var(--verde-principal);
        background-color: var(--verde-claro);
    }
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button{
    -webkit-appearance: none;
    margin: 0;
}

button,
input[type="button"] {
    margin-top: 1.5rem;
    background-color: var(--verde-principal);
    color: var(--blanco);
    border: none;
    padding: 0.8rem;
    font-size: 1rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-bg);

    &:hover {
        background-color: var(--verde-secundario);
    }
}

/* Dashboard Header */
nav{
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
    font-family: var(--fontfamilyroboto);
    color: var(--negro);
}

.nav-left{
    display: flex;
    align-items: center;
    flex: 1 1 0;
    min-width: 80px;
    gap: 6px;
}

.nav-center{
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 12px;
    font-family: var(--fontfamilyroboto);
    font-weight: bold;
    color: var(--verde-principal);
    font-size: 24px;
    white-space: nowrap;
}

.nav-right{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1 1 0;
    min-width: 160px;
    gap: 6px;

    .nav-right-user{
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        color: var(--verde-principal);

        div:nth-child(1){
            font-size: 18px;
            font-weight: bold;
            margin: 0 5px;
            max-width: 280px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        div:last-child{
            font-size: 12px;
            margin: 0 5px;
            max-width: 280px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
    }
}


/* Utility: ellipsis en celdas de tabla */
.col-ellipsis {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mc-client-row {
    height: 65px;
}

.mc-client-row td {
    overflow: hidden;
}

.mc-name-col {
    width: 400px;
    max-width: 400px;
}

.mc-user-col {
    width: 120px;
    max-width: 120px;
}

.contract-count-none {
    color: #bbb;
    font-size: 13px;
}

/* → Badges de manageclients (cc-badge, mc-*, comm-search-select) en css/manageclients.css */

/* Simulation Nav Badge */
.simulate-nav-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e65100;
    color: #fff;
    border-radius: 12px;
    padding: 2px 8px 2px 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 10px;
    vertical-align: middle;
    white-space: nowrap;
}

.simulate-select {
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 13px;
    margin: 0;
    align-self: center;
}

/* Dashboard Module */
.dashboard-module{
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 70%;
    flex: 1;
    padding-top: 16px;
}

.dashboard-main-distribution{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
    margin-top: 0px;
}

.dashboard-main-welcome{
    grid-column: 1 / 5;
    font-family: var(--fontfamilyroboto);
    font-size: var(--fontsizebigtitle);
    font-weight: bold;
    color: var(--font-color);
}

.dashboard-main-4mini{
    grid-column: 1 / 5;
    display: flex;
    justify-content: center;
}

.dashboard-main-2mid{
    grid-column: 1 / 3;
    display: flex;
    flex-direction: column;
}

.dashboard-main-1max{
    grid-column: 3 / 5;
    display: flex;
}

.dashboard-main-4mini-box{
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: flex-start;
    align-items: center;
    background-color: var(--dashboard-container);
    border-radius: var(--border-radius-md);
    box-shadow: var(--containerboxshadow);
    margin: var(--spacing-sm);
    margin-top: 20px;
    padding: 8px 12px;
    height: 150px;
    transition: var(--transition-fast);
    text-decoration: none;
    color: inherit;

    &:hover{
        cursor: pointer;
        transform: scale(1.05);
    }
}

.dashboard-main-2mid-box{
    display: flex;
    flex: 0 0 200px;
    justify-content: center;
    align-items: flex-start;
    background-color: var(--dashboard-container);
    border-radius: var(--border-radius-md);
    box-shadow: var(--containerboxshadow);
    margin: var(--spacing-sm);
    padding: 8px 12px;
    transition: var(--transition-fast);

    &:hover{
        cursor: pointer;
        transform: scale(1.03);
    }
}

.mini-coming-soon {
    padding: 6px;
    gap: 6px;
    width: 100%;
    height: 100%;
}

.mini-coming-soon .coming-soon-icon {
    width: 28px;
    height: 28px;
}

.mini-coming-soon .coming-soon-title {
    font-size: 10px;
    letter-spacing: 2px;
}

.mini-coming-soon .coming-soon-sub {
    font-size: 10px;
    text-align: center;
}

.db-summary-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 4px 2px;
    gap: 2px;
}

.db-summary-card-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--verde-principal);
    text-transform: uppercase;
    margin-bottom: 4px;
    opacity: 0.8;
}

.db-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 6px;
    border-radius: 6px;
    transition: background 0.15s;
    text-decoration: none;
    cursor: pointer;
    color: inherit;
}

.db-summary-row:hover {
    background: rgba(0,0,0,0.06);
}

.db-summary-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-primary);
}

.db-summary-label img {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

.db-summary-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--verde-principal);
    min-width: 32px;
    text-align: right;
    white-space: nowrap;
}

.db-summary-own {
    font-size: 11px;
    font-weight: 400;
    color: #888;
}

.db-summary-divider {
    height: 1px;
    background: rgba(0,0,0,0.07);
    margin: 1px 0;
}

.dashboard-main-2mid-box .coming-soon-container {
    padding: 10px;
    width: 100%;
    height: 100%;
}

.dashboard-main-1max-box{
    display: flex;
    flex: 1;
    justify-content: center;
    align-items: flex-start;
    background-color: var(--dashboard-container);
    border-radius: var(--border-radius-md);
    box-shadow: var(--containerboxshadow);
    margin: var(--spacing-sm);
    padding: 8px 12px;
    transition: var(--transition-fast);

    &:hover{
        cursor: pointer;
        transform: scale(1.02);
    }
}

.dashboard-main-box-title{
    display: flex;
    justify-content: center;
    color: var(--verde-principal);
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    opacity: 0.8;
    width: 100%;
    margin-bottom: var(--spacing-sm);

    p:first-child{
        display: flex;
        align-items: center;
        flex: 9;
        text-align: left;
        font-size: 10px;
    }

    p:last-child{
        flex: 1;
        text-align: right;
    }
}

.dashboard-main-box-value-numeric{
    display: flex;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-family: var(--fontfamilyroboto);
    font-size: var(--fontsizehuge);
    font-weight: bold;
    color: var(--verde-principal);
}

/* Dashboard Submodules */
.dashboard-submodule-title{
    display: flex;
    align-items: center;
    margin: 40px 0 10px 0;
    width: 100%;
    font-family: var(--fontfamilyroboto);
    font-size: var(--fontsizetitle);
    font-weight: bold;

    img{
        margin-right: 10px;
        width: 50px;
    }
}

.dashboard-submodule-title2{
    margin: 0 0 10px 0;
}

.dashboard-submodule-box{
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    margin-bottom: 50px;
    padding: 30px;
    justify-content: flex-start;
    align-items: center;
    background-color: var(--dashboard-container);
    border-radius: var(--border-radius-md);
    box-shadow: var(--containerboxshadow);

    /* Buttons */
    .container-buttons{
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;

        .buttons-left{
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .buttons-right{
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            justify-content: flex-end;
            margin-left: auto;
        }

        .buttons-right.buttons-equal {
            display: grid;
            grid-auto-flow: column;
            grid-auto-columns: 1fr;
        }
    }

    /* Search Panel */
    .search-panel{
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, opacity 0.3s ease, margin 0.35s ease;
        opacity: 0;
        margin-top: 0;
    }

    .search-panel.open{
        max-height: 200px;
        opacity: 1;
        margin-top: 20px;
    }

    .search-panel-fields{
        display: flex;
        gap: 12px;
        padding: 10px 0;
    }

    /* Options & Filters */
    .options-area{
        display: flex;
        flex-direction: row;
        margin-top: 20px;
        width: 100%;
        font-family: var(--fontfamilyroboto);

        .left-fields{
            display: flex;
            align-items: center;
            justify-content: left;
            font-family: var(--fontfamilyroboto);
            font-size: var(--fontsizesmallnotes);
            padding: 10px 0;
            width: 50%;
        }

        .right-fields{
            display: flex;
            align-items: center;
            justify-content: right;
            font-family: var(--fontfamilyroboto);
            font-size: var(--fontsizesmallnotes);
            padding: 10px 0;
            width: 50%;
        }
    }

    /* Tables */
    .container-body{
        width: 100%;
    }
}

/* Generic JS pagination bar - used by manageclients, manageusers, etc. */
.page-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 20px 16px;
    min-height: 44px;
    margin-top: 20px;
}

.page-bar-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.page-bar-size {
    justify-self: end;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .page-bar {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 8px;
    }
    .page-bar-size {
        justify-self: center;
    }
}

.page-bar-size span {
    display: inline;
    font-size: 11px;
    color: #888;
    margin-right: 2px;
}

.page-btn {
    margin-top: 0;
    padding: 5px 11px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #fff;
    font-size: 12px;
    cursor: pointer;
    color: #444;
    transition: background 0.1s, border-color 0.1s;
}
.page-btn:hover    { background: #f0f0f0; }
.page-btn.active   { background: var(--verde-principal); border-color: var(--verde-principal); color: #fff; font-weight: 600; }
.page-btn:disabled { opacity: 0.4; cursor: default; }

.page-size-btn {
    margin-top: 0;
    padding: 4px 9px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #fff;
    font-size: 11px;
    cursor: pointer;
    color: #666;
    transition: background 0.1s, border-color 0.1s;
}
.page-size-btn:hover  { background: #f0f0f0; }
.page-size-btn.active { background: var(--verde-principal); border-color: var(--verde-principal); color: #fff; font-weight: 600; }

.page-ellipsis {
    display: inline-flex;
    align-items: center;
    padding: 5px 4px;
    font-size: 13px;
    color: #aaa;
    user-select: none;
}

/* Legacy pagination (kept for compatibility) */
.pagination{
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-sm);
    font-family: var(--fontfamilyroboto);
    font-size: var(--fontsizepassinstructions);
    text-align: center;
}

/* Items Per Page Options */
.itemsperpage {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: var(--spacing-sm);
    font-family: var(--fontfamilyroboto);
    font-size: var(--fontsizesmallnotes);
}

.itemsperpage-strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border: 1px solid var(--verde-principal);
    border-radius: 5px;
    background: var(--verde-principal);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    min-width: 28px;
}

.itemsperpage-link a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #fff;
    color: #444;
    font-size: 11px;
    text-decoration: none;
    min-width: 28px;
    transition: background 0.1s, border-color 0.1s;
}

.itemsperpage-link a:hover {
    background: #f0f0f0;
}

.contract-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
    min-width: 140px;
    text-align: center;
}

.cs-solic-presup   { border: 1.5px solid #7030a0; background: rgba(112,  48, 160, 0.50); color: #7030a0; }
.cs-presup-enviado { border: 1.5px solid #92d050; background: rgba(146, 208,  80, 0.50); color: #4d7c00; }
.cs-sms-enviado    { border: 1.5px solid #00b0f0; background: rgba(  0, 176, 240, 0.50); color: #006b93; }
.cs-pte-valid-adm  { border: 1.5px solid #ffc000; background: rgba(255, 192,   0, 0.50); color: #7a5000; }
.cs-tramitando     { border: 1.5px solid #2db82d; background: rgba(102, 255, 102, 0.50); color: #008000; }
.cs-pte-verif-tlf  { border: 1.5px solid #ff99ff; background: rgba(255, 153, 255, 0.50); color: #cc00cc; }
.cs-activado       { border: 1.5px solid #1a7a1a; background: rgba(  0, 160,   0, 0.55); color: #004400; }
.cs-scoring        { border: 1.5px solid #ed7d31; background: rgba(237, 125,  49, 0.50); color: #c05a00; }
.cs-ko             { border: 1.5px solid #a6a6a6; background: rgba(166, 166, 166, 0.50); color: #555; }
.cs-baja           { border: 1.5px solid #ff0000; background: rgba(255,   0,   0, 0.50); color: #cc0000; }
.cs-renovable      { border: 1.5px solid #8ea9db; background: rgba(142, 169, 219, 0.50); color: #3a6aab; }
.cs-tacita         { border: 1.5px solid #9b59b6; background: rgba(155,  89, 182, 0.25); color: #6c3483; }
.cs-eliminado      { border: 1.5px solid #333333; background: rgba( 51,  51,  51, 0.75); color: #ffffff; }

/* Status tooltip - shared across all views */
.status-tip {
    position: relative;
    cursor: default;
}
.status-tip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    font-size: 11px;
    font-weight: 400;
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 5px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 200;
}
.status-tip::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 200;
}
.status-tip:hover::after,
.status-tip:hover::before {
    opacity: 1;
}

/* Dashboard Form Style
---------------------------------------------------------------------*/
.form-section{
    margin-bottom: 20px;
    padding: 20px;
    border-radius: var(--border-radius-md);
    background-color: var(--bg-light-green);
    border: 1px solid var(--verde-claro);

    h3{
        font-size: 1.3rem;
        color: var(--font-color);
        font-weight: 600;
    }
}

.form-row{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.form-two-columns{
    flex-direction: row;
    align-items: flex-start;

    .left-column-back{
        display: flex;
        flex-direction: column;
        border: 1px solid var(--verde-secundario);
        background-color: var(--bg-form-column);
        border-radius: var(--border-radius-md);
        align-items: flex-start;
        justify-content: flex-start;
        width: 50%;
        margin: 30px 10px;
        padding: 20px;

        .datos{
            display: flex;
            flex-direction: row;
            width: 100%;
            margin: 5px 0;

            div:first-child{
                margin-right: var(--spacing-xs);
                flex: 1;
                text-align: left;
            }

            div:last-child{
                margin-left: var(--spacing-xs);
                flex: 3;
                text-align: right;
            }
        }
    }

    .left-column{
        border: none;
        background-color: transparent;
    }

    .right-column{
        width: 50%;
        margin: 30px 10px;

        .input-element{
            display: flex;
            justify-content: center;
            align-items: center;
            margin-bottom: 20px;
            
            div:nth-child(1){
                margin: 0 20px;
            }

            div:nth-child(2){
                margin: 0 20px;
            }

            span{
                margin: var(--spacing-sm);
            }
        }

        .password1{
            margin: 0 10px;
        }

        .password2{
            margin: 0 10px;
        }
    }
}


.form-input{
    margin: var(--spacing-sm);
    width: 250px;
}

/* → Estilos de fl-field / fl-province / form-input-* en css/fl-field.css */
/* → Estilos de login en css/login.css */




/* Notifications */
.notifications-container{
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 25%;
    min-width: 320px;
    max-width: 500px;
    z-index: 10000;

    a{
        text-decoration: none;
        background-color: rgba(255, 255, 255, 0.95);
        border-radius: 6px;
        margin-left: 8px;
        padding: 4px 12px;
        color: var(--verde-principal);
        font-weight: 600;
        transition: all 0.2s;

        &:hover{
            color: white;
            background-color: rgba(255, 255, 255, 0.3);
            transform: translateY(-1px);
        }
    }
}

.notifications-container-index{
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    min-width: 320px;
    max-width: 500px;
    z-index: 10000;

    a{
        text-decoration: none;
        background-color: rgba(255, 255, 255, 0.95);
        border-radius: 6px;
        margin-left: 8px;
        padding: 4px 12px;
        color: var(--verde-principal);
        font-weight: 600;
        transition: all 0.2s;

        &:hover{
            color: white;
            background-color: rgba(255, 255, 255, 0.3);
            transform: translateY(-1px);
        }
    }
}

.notifications-bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--fontfamilyroboto);
    color: var(--fontcolornotifications);
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2),
                0 4px 10px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
    opacity: 0;
    transform: translateY(-30px);
    animation: slideInDown 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
               fadeOut 0.4s ease-in 2.6s forwards;
}

.notifications-bar::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(255, 255, 255, 0.4);
    animation: progressBar 3s linear forwards;
}

.notification-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.notification-text {
    flex: 1;
    text-align: left;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.notification-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    font-size: 16px;
    line-height: 24px;
    padding: 0;
    margin: auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-weight: bold;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
}

.notifications-success {
    background: linear-gradient(135deg, #019901 0%, #027d02 100%);
    border-left: 5px solid #00dd00;
}

.notifications-error {
    background: linear-gradient(135deg, #f83223 0%, #d62817 100%);
    border-left: 5px solid #ff5544;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-15px);
    }
}

@keyframes progressBar {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}


/* Tables
---------------------------------------------------------------------*/
table{
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-family: var(--fontfamilyroboto);

    /* --- HEADER --- */
    thead th{
        color: var(--table-font-thead-color);
        padding: 5px 10px 10px 10px;
        text-align: left;
        font-size: var(--table-fontsize);
        border-bottom: 2px solid var(--table-border-dark-color);
    }

    /* --- BODY --- */
    tbody{
        color: var(--table-font-body-color);
        font-size: var(--table-fontsize);

        tr:hover{
            cursor: hand;
            background-color: var(--hover-green);
        }

        td{
            padding: 12px;
            border-bottom: 1px solid var(--table-border-light-color);
            vertical-align: middle;

            .namecolumn{
                display: flex;
                flex-direction: row;
                align-items: center;

                div:first-child{
                    margin-right: var(--spacing-sm);
                }
            }

            .ellipsis{
                overflow: hidden;
                text-overflow: ellipsis;
            }
        }

        .letrapequeña{
            font-size: var(--table-fontsize-small);
            color: var(--table-active-row-color);
        }

        .letrapequeñaroja{
            font-size: var(--table-fontsize-small);
            color: var(--table-inactive-row-color);
        }

        .line-height{
            line-height: 1.6;
        }

        .email{
            text-transform: lowercase;
        }

        .activo{
            color: var(--table-active-row-color);
            font-weight: bold;
        }

        .inactivo{
            color: var(--table-inactive-row-color);
            font-weight: bold;
        }
    }

    /* --- BADGES DE ROL --- */
    .role-badge {
        display: inline-block;
        width: 110px;
        text-align: center;
        padding: 3px 0;
        border-radius: 5px;
        font-size: 0.72rem;
        font-weight: 600;
        letter-spacing: 0.03em;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
    .role-badge-comercial {
        background: rgba(21, 101, 192, 0.10);
        border: 1px solid rgba(21, 101, 192, 0.35);
        color: #1565c0;
    }
    .role-badge-supervisor {
        background: rgba(230, 81, 0, 0.10);
        border: 1px solid rgba(230, 81, 0, 0.35);
        color: #e65100;
    }
    .role-badge-administrador {
        background: rgba(106, 27, 154, 0.10);
        border: 1px solid rgba(106, 27, 154, 0.35);
        color: #6a1b9a;
    }
    .role-badge-desarrollador {
        background: rgba(0, 105, 92, 0.10);
        border: 1px solid rgba(0, 105, 92, 0.35);
        color: #00695c;
    }

    /* --- FOOTER --- */
    tfoot{
        td{
            border-top: 2px solid var(--table-border-dark-color);
            color: var(--table-font-tfoot-color);
            font-size: var(--table-fontsize);
            padding: var(--spacing-sm);
            text-align: right;

            .negrita{
                font-weight: bold;
            }
        }
    }

    .centered_row{
        text-align: center;
    }

    .right_row{
        text-align: right;
    }
}
/*---------------------------------------------------------------------*/

/* General */

.span-notes{
    font-family: var(--fontfamilyroboto);
    font-weight: bold;
}



.install-back-index{
    display: flex;
    justify-content: center;
    padding: 20px;
}

.margin-top30{
    margin-top: 30px;
}

.margin-bottom10{
    margin-bottom: 10px;
}

/* Header & Footer */
header{
    border-bottom: 2px solid var(--verde-principal);
    width: 100%;
    box-sizing: border-box;
    padding: 5px;
    background-color: var(--header-fondo);
    box-shadow: var(--box-shadow-light);
}

footer{
    width: 100%;
    box-sizing: border-box;
    margin-top: 20px;
    padding: var(--spacing-sm);
    text-align: center;
    color: var(--blanco);
    background-color: var(--verde-principal);
    font-size: clamp(0.9375rem, 0.7917rem + 0.2778vw, 1.125rem);
}

/* Modal Forms */
.modal {
    display: none;
    position: fixed;
    background-color: var(--modal-container);
    top: 100px;
    padding: 20px;
    border-radius: var(--border-radius-md);
    width: 90%;
    z-index: 1000;
    box-shadow: var(--box-shadow-modal);
}

.modalnewemployee {
    width: 35%;
    min-width: 550px;
}

.modalnewclient {
    width: 75%;
    min-width: 550px;
    top: 20px;
}

.modal.open {
    display: block;
}

.modal-header{
    display: flex;

    .modal-header-left{
        display: flex;
        justify-content: left;
        align-items: center;
        margin: var(--spacing-sm);
        width: 50%;
        font-family: var(--fontfamilyroboto);
        font-size: var(--fontsizetitle);
        font-weight: bold;

        img{
            margin-right: 10px;
            width: 50px;
        }
    }

    .modal-header-right{
        display: flex;
        justify-content: right;
        align-items: center;
        margin: var(--spacing-sm);
        width: 50%;
    }
}

.modal-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}
.modal-header-left img { width: 32px; height: 32px; }
.modal-header-left h3 {
    margin: 0;
    font-family: var(--fontfamilyroboto);
    font-size: 18px;
    font-weight: bold;
    color: var(--font-color);
}
.modal-header-right { display: flex; align-items: center; }

.modalOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fade);
    z-index: 900;
}

.modalOverlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-close {
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    color: #666;
    transition: var(--transition-color);
}

.modal-close:hover {
    color: #000;
}

/* Material Design */

/* NEW CLIENT STYLE */
.newMDUI-input{
    height: 40px;

    &::part(label) {
        top: 50%;
        left: 10px;
        background-color: var(--bg-light-green);
        font-size: 16px;
        transform: translateY(-50%);
        transition: var(--transition-fast);
    }

    &[focused]::part(label),
    &[has-value]::part(label) {
        font-size: 12px;
        top: 0;
    }

    &:not([has-value]):not([focused])::part(label) {
        top: 50%;
        left: 10px;
        font-size: 16px;
    }
}

#newemployee_supervisor.newMDUI-Select,
#supervisor_id.newMDUI-Select {
    height: unset;
}

.newMDUI-Select{
    height: 40px;

    &::part(menu) {
        background-color: var(--hover-green);
        max-height: 250px;
        overflow-y: auto;
    }

    mdui-menu-item::part(container){
        height: 35px;
    }

    .menu-icon-flags{
        border: 1px solid;
        width: 25px;
        height: auto;
    }
}

.newMDUI-Button{
    background-color: transparent;
    width: 25px;
    height: 25px;

    &:hover{
        background-color: var(--verde-secundario);
    }
}

.newMDUI-input2{
    width: 370px;
    height: 40px;

    &::part(label) {
        top: 50%;
        left: 10px;
        background-color: var(--verde-claro);
        font-size: 16px;
        transform: translateY(-50%);
        transition: var(--transition-fast);
    }

    &[focused]::part(label),
    &[has-value]::part(label) {
        font-size: 12px;
        top: 0;
    }

    &:not([has-value]):not([focused])::part(label) {
        top: 50%;
        left: 10px;
        font-size: 16px;
    }
}

.newMDUI-Button2{
    background-color: transparent;
    width: 30px;
    height: 30px;

    &:hover{
        background-color: rgba(0, 0, 0, 0.08);
        border-radius: 50%;
    }
}

.schedule-icon-btn {
    width: 20px;
    height: 20px;
    cursor: pointer;
    vertical-align: middle;
    transition: filter 0.15s;
}

.schedule-icon-btn:hover {
    filter: brightness(1.3);
}

.newMDUI-Select2{
    width: 50px;
    height: 40px;

    &::part(menu) {
        border: 1px solid var(--verde-principal);
        text-align: center;
        background-color: var(--hover-green);
        box-shadow: var(--containerboxshadow);
    }

    &::part(value){
        text-align: center;
    }
}

/* -------- STANDARD -------- */
/* -------------------------- */
/* Margin */
.margin-top-10px{
    margin-top: 10px;
}

.margin-right-10px{
    margin-right: 5px;
}

/* Padding */

.padding-left-45px{
    padding-left: 45px;
}

.padding-left-right-2px{
    padding: 0 2px;
}

/* Width */

.width-30px{
    width: 30px;
}

.width-50px{
    width: 50px;
}

.width-60px{
    width: 60px;
}

.width-75px{
    width: 75px;
}

.width-100px{
    width: 100px;
}

.width-150px{
    width: 150px;
}

.width-175px{
    width: 175px;
}

.width-200px{
    width: 200px;
}

.width-300px{
    width: 300px;
}

/* ---- Client type selector (pills) ---- */
.client-type-wrap {
    margin-bottom: 16px;
}

.client-type-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.client-type-selector-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--verde-principal);
    border-left: 3px solid var(--verde-principal);
    padding-left: 8px;
    margin-bottom: 13px;
}

.client-type-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 18px 7px 46px;
    margin: 0;
    border: 2px solid #bbb;
    border-radius: 24px;
    background: #ebebeb;
    cursor: pointer;
    font-family: var(--fontfamilyroboto);
    font-size: 14px;
    font-weight: 500;
    color: #555;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.client-type-btn img {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    filter: grayscale(100%) opacity(0.6);
    transition: filter 0.15s;
}

.client-type-btn.active {
    border-color: var(--verde-principal);
    background: var(--verde-claro);
    color: var(--verde-principal);
    font-weight: 600;
}

.client-type-btn.active img {
    filter: none;
}

.client-type-btn:hover:not(.active) {
    border-color: var(--verde-principal);
    color: var(--verde-principal);
}

.client-type-btn:hover:not(.active) img {
    filter: grayscale(0%) opacity(0.65);
}

.client-type-btn-disabled,
.client-type-btn-disabled:hover,
.client-type-btn:disabled,
.client-type-btn:disabled:hover {
    opacity: 0.45;
    cursor: not-allowed;
    border-color: #ccc;
    background: #f0f0f0;
    color: #aaa;
}

.width-400px{
    width: 400px;
}

.width-600px{
    width: 600px;
}

/* Height */
.height-15px{
    height: 15px;
}

/* Text */
.text-centered{
    text-align: center;
}

.text-middle{
    vertical-align: middle;
}

.fontsize-10-14px{
    font-size: clamp(0.8125rem, 0.662rem + 0.2817vw, 1rem);
}

.line-through{
    text-decoration: line-through;
}

.red-text{
    color: var(--pending-color);
}

.role-col {
    width: 28px;
    min-width: 28px;
    max-width: 28px;
    text-align: center;
    font-weight: bold;
}

/* Effects */
.nohover{
    &:hover{
        background-color: transparent;
        cursor: default;
    }
}

/* Border */
.borderright{
    border-right: 1px solid;
}


/* RESPONSIVE DESIGN - Media Queries
----------------------------------------- */

/* PC mediano */
@media (max-width: 1280px) {
    .nav-center { font-size: 20px; }
    .nav-right .nav-right-user div:nth-child(1) { font-size: 16px; max-width: 200px; }
    .nav-right .nav-right-user div:last-child { max-width: 200px; }
    .dashboard-module { width: 80%; }
    .dashboard-main-distribution { margin-top: 0; }
}

/* PC pequeño */
@media (max-width: 1100px) {
    .nav-center { font-size: 17px; }
    .nav-right .nav-right-user div:nth-child(1) { font-size: 14px; max-width: 140px; }
    .nav-right .nav-right-user div:last-child { max-width: 140px; }
}

/* Tablets and Small Desktops */
@media (max-width: 1024px) {
    .dashboard-module{
        width: 85%;
    }

    .dashboard-main-distribution { margin-top: 0; }

    .nav-center { font-size: 15px; }
    .nav-right .nav-right-user div:nth-child(1) { font-size: 13px; max-width: 110px; }
    .nav-right .nav-right-user div:last-child { max-width: 110px; }

    .modal.modalnewclient {
        width: 85%;
    }
}

/* Tablet Portrait mediano (iPad Air ~820px) */
/* Tablets Portrait */
@media (max-width: 768px) {
    .dashboard-module{
        width: 95%;
        padding-top: 24px;
    }

    .dashboard-main-distribution{
        grid-template-columns: repeat(2, 1fr);
        margin-top: 0;
    }

    .dashboard-main-welcome,
    .dashboard-main-4mini{
        grid-column: 1 / 3;
    }

    .dashboard-main-2mid{
        grid-column: 1 / 3;
    }

    .dashboard-main-1max{
        grid-column: 1 / 3;
    }

    .dashboard-main-4mini{
        flex-wrap: wrap;
    }

    .dashboard-main-4mini-box{
        min-width: 45%;
    }

    .form-two-columns{
        flex-direction: column;

        .left-column-back,
        .right-column{
            width: 100%;
            margin: var(--spacing-sm) 0;
        }
    }

    .modal.modalnewclient,
    .modal.modalnewemployee {
        width: 95%;
        min-width: unset;
        top: var(--spacing-sm);
    }

    table{
        font-size: var(--table-fontsize-small);
    }

}

/* Mobile Devices */
@media (max-width: 480px) {
    .dashboard-module{
        width: 100%;
        padding: 0 var(--spacing-xs);
    }

    .installer-container{
        padding: 1rem;
        max-width: 100%;
    }

    .login-container{
        max-width: 100%;
        padding: 1.5rem;
    }

    .dashboard-main-distribution{
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .dashboard-main-welcome,
    .dashboard-main-4mini,
    .dashboard-main-2mid,
    .dashboard-main-1max{
        grid-column: 1;
    }

    /* Bienvenida más compacta */
    .dashboard-main-welcome {
        font-size: 1.2rem;
        text-align: center;
    }

    /* Mini boxes: grid 2×2 */
    .dashboard-main-4mini{
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin: 0;
        padding: 0;
    }

    .dashboard-main-4mini-box{
        width: 100%;
        min-width: unset;
        margin: 0;
        height: 110px;
        padding: 8px;
    }

    /* Mid boxes: full width */
    .dashboard-main-2mid-box{
        width: 100%;
        min-width: unset;
        margin: 4px 0;
    }

    .dashboard-main-1max {
        flex-direction: column;
    }

    .dashboard-main-1max-box{
        width: 100%;
        min-width: unset;
        margin: 4px 0;
    }

    .dashboard-submodule-box{
        padding: var(--spacing-md);
    }

    .search-panel-fields{
        flex-direction: column;
        gap: 8px;

        mdui-text-field{
            width: 100% !important;
        }
    }

    .options-area{
        flex-direction: column;
        gap: var(--spacing-sm);

        .left-fields,
        .right-fields{
            width: 100%;
            justify-content: center;
        }
    }

    .notifications-container{
        width: 90%;
        top: var(--spacing-sm);
    }

    .notifications-container-index{
        width: 95%;
    }

    table{
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        width: 100%;
        box-sizing: border-box;
    }

    /* Tablas simples de 2 columnas: volver a display:table para ocupar ancho completo */
    #sc-table,
    #sc-table thead,
    #sc-table tbody,
    #sc-table tr {
        display: revert;
        white-space: normal;
    }
    #sc-table {
        width: 100%;
    }

    .form-input{
        width: 100%;
    }

    input[type="email"],
    input[type="password"],
    input[type="text"],
    input[type="number"],
    select {
        width: 100%;
    }

    /* Header - ocultar título decorativo */
    .nav-center { display: none; }

    /* Botones ficha - apilar en columna */
    .dashboard-submodule-box .container-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    .dashboard-submodule-box .container-buttons .buttons-left,
    .dashboard-submodule-box .container-buttons .buttons-right {
        width: 100%;
        margin-left: 0;
        justify-content: center;
        flex-wrap: wrap;
    }

}

/* Dashboard Contact Watermark */
.dashboard-contact-watermark {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(24px, 6vw, 100px);
    opacity: 0.85;
    pointer-events: none;
    user-select: none;
    width: 100%;
    padding: clamp(32px, 8vh, 120px) 16px 24px;
    box-sizing: border-box;
}

.dashboard-contact-person {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.dashboard-contact-name {
    font-family: var(--fontfamilyroboto);
    font-size: clamp(0.8125rem, 0.6rem + 0.5vw, 1.1rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #ffffff;
    text-transform: uppercase;
    white-space: nowrap;
}

.dashboard-contact-phone,
.dashboard-contact-email {
    font-family: var(--fontfamilyroboto);
    font-size: clamp(0.6875rem, 0.55rem + 0.4vw, 0.95rem);
    font-weight: 400;
    letter-spacing: 0.15em;
    color: #ffffff;
    white-space: nowrap;
}

/* Large Screens */
@media (min-width: 2560px) {
    .dashboard-module{
        width: 60%;
    }

    .installer-container{
        max-width: 900px;
    }
}

/* Required note - global (used outside modals too) */
.modal-required-note {
    display: block;
    width: 100%;
    text-align: right;
    font-size: 13px;
    color: #7cb87e;
    margin-bottom: 8px;
}

/* → Estilos de Enviar Circular / sendmemo en css/sendmemo.css */

/* File type badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    font-family: var(--fontfamilyroboto);
}

.badge-documento {
    background-color: #e8f0fe;
    color: #1a56db;
}

.badge-imagen {
    background-color: #fce8ff;
    color: #9c27b0;
}

.badge-excel {
    background-color: #e8f5e9;
    color: #2e7d32;
}

/* =========================================
   Badges globales - iguales en todas las vistas
   ========================================= */

.liq-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
    min-width: 88px;
    text-align: center;
    box-sizing: border-box;
}
.liq-badge-pendiente  { background: #f0f0f0; color: #888; }
.liq-badge-cobrado    { background: #fff8e1; color: #f57f17; }
.liq-badge-pagado     { background: #d4edda; color: #155724; }
.liq-badge-baja       { background: #fce4ec; color: #c62828; }
.liq-badge-rechazado  { background: #fce4ec; color: #c62828; }
.liq-badge-estudio    { background: #e3f2fd; color: #1565c0; }
.liq-badge-tacita     { background: rgba(155, 89, 182, 0.18); color: #6c3483; }
.liq-badge-preparado  { background: #fff8e1; color: #f57f17; }
.liq-badge-reclamado  { background: #f57f17; color: #fff8e1; }
.liq-badge-gestionado { background: #fce4ec; color: #c62828; }

.comm-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    min-width: 90px;
    text-align: center;
    box-sizing: border-box;
}
.comm-badge-paid       { background: #e6f4ea; color: #2e7d32; }
.comm-badge-pendiente  { background: #fff8e1; color: #f57f17; }
.comm-badge-rechazado  { background: #fce4ec; color: #c62828; }
.comm-badge-estudio    { background: #e3f2fd; color: #1565c0; }
.comm-badge-incidencia { background: #fbe9e7; color: #bf360c; font-style: italic; }

.comm-badge-amount          { font-size: 12px; padding: 3px 10px; border-radius: 10px; min-width: 86px; text-align: center; box-sizing: border-box; display: inline-block; }
.comm-badge-amount-positive { background: #e6f4ea; color: #2e7d32; }
.comm-badge-amount-negative { background: #fce4ec; color: #c62828; }

/* =========================================
   Coming-soon / estado vacío - global
   ========================================= */

.coming-soon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 20px;
    opacity: 0.45;
}
.coming-soon-icon  { width: 56px; height: 56px; filter: grayscale(1); }
.coming-soon-title { font-family: var(--fontfamilyroboto); font-size: 22px; font-weight: 700; letter-spacing: 3px; color: var(--verde-principal); }
.coming-soon-sub   { font-family: var(--fontfamilyroboto); font-size: 13px; color: #888; }

/* =========================================
   Toolbar compartida - global
   (contracts, commissions, liquidation,
   saleschannels, manageusers…)
   ========================================= */

.comm-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 4px;
}

input.comm-search {
    flex: 1;
    min-width: 180px;
    padding: 7px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 12px;
    outline: none;
    background: #fff;
    color: #333;
    transition: border-color 0.15s;
    box-sizing: border-box;
    height: 33px;
    text-align: left;
}
input.comm-search:hover { border-color: var(--verde-principal); outline: 2px solid var(--verde-claro); }
input.comm-search:focus { border-color: var(--verde-principal); outline: 2px solid var(--verde-principal); }

select.comm-filter {
    padding: 7px 28px 7px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 12px;
    outline: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 10px center;
    -webkit-appearance: none;
    appearance: none;
    color: #333;
    cursor: pointer;
    transition: border-color 0.15s;
    box-sizing: border-box;
    height: 33px;
    text-align: left;
}
select.comm-filter:hover { border-color: var(--verde-principal); outline: 2px solid var(--verde-claro); }
select.comm-filter:focus { border-color: var(--verde-principal); outline: 2px solid var(--verde-principal); }

.comm-toolbar .btn-sm { min-width: 100px; }

/* display:contents hace que el wrapper desaparezca en desktop y los botones
   actúen como hijos directos del flex, restaurando el orden original.      */
.comm-toolbar-btns { display: contents; }
.comm-toolbar-btns .btn:first-child { order: 1; }
.comm-toolbar-btns .btn:last-child  { order: 3; }
.comm-count { order: 2; }

.comm-count   { margin-left: auto; font-size: 11px; color: #888; white-space: nowrap; min-width: 90px; text-align: right; }
.comm-pending { color: #bbb; font-size: 11px; }

/* Toolbar responsiva - móvil vertical */
@media (max-width: 480px) {
    .comm-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px 12px;
    }

    input.comm-search,
    select.comm-filter,
    select.comm-search-select {
        min-width: unset;
        width: 100%;
        flex: unset;
    }

    .comm-check-label {
        font-size: 13px;
    }

    .comm-count {
        margin-left: 0;
        text-align: right;
        min-width: unset;
        order: unset;
    }

    /* Botones: ancho completo en móvil */
    .comm-toolbar mdui-button,
    .comm-toolbar .btn {
        width: 100%;
        min-width: unset;
    }

    /* Wrapper de botones: fila 50/50 en móvil */
    .comm-toolbar-btns {
        display: flex;
        width: 100%;
        gap: 8px;
    }
    .comm-toolbar-btns .btn {
        flex: 1;
        width: unset;
        min-width: 0;
    }
}

/* =========================================
   Celdas de icono y cliente - global
   ========================================= */

.comm-icon-col    { width: 22px; height: 22px; display: block; margin: 0 auto; }
.comm-client-col  { width: 250px; }
.comm-client-text { width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.comm-user-col    { width: 120px; }
.comm-cups-label  { text-transform: uppercase; }
.comm-badge-stack { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.comm-user-text   { width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }

.comm-contract-row { cursor: pointer; height: 65px; }
.comm-contract-row:hover td { background-color: rgba(0, 150, 80, 0.06); }

tr[data-row='clients'] { cursor: pointer; }
tr[data-row='clients']:hover td { background-color: rgba(0, 150, 80, 0.06); }

/* ---- Tooltip mini ficha comercial ---- */
.comm-user-hover { cursor: pointer; position: relative; }
.comm-user-card  { position: fixed; z-index: 9999; background: #fff; border: 1px solid #e0e0e0; border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,0.13); padding: 16px; width: 200px; display: none; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.comm-user-card.visible { display: flex; }
.comm-user-card-avatar  { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--verde-principal); }
.comm-user-card-avatar-placeholder { width: 64px; height: 64px; border-radius: 50%; background: #f5f5f5; border: 2px solid #e0e0e0; display: flex; align-items: center; justify-content: center; }
.comm-user-card-avatar-placeholder img { width: 36px; height: 36px; opacity: 0.4; filter: grayscale(1); }
.comm-user-card-name { font-family: var(--fontfamilyroboto); font-size: 13px; font-weight: 700; color: #333; text-align: center; line-height: 1.3; }
.comm-user-card-soon { display: flex; flex-direction: column; align-items: center; gap: 4px; opacity: 0.45; padding: 8px 0 4px; }
.comm-user-card-soon img  { width: 28px; height: 28px; filter: grayscale(1); }
.comm-user-card-soon span { font-family: var(--fontfamilyroboto); font-size: 10px; font-weight: 700; letter-spacing: 2px; color: var(--verde-principal); }

/* =========================================
   Paginación compartida - global
   ========================================= */

.comm-pagination    { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; box-sizing: border-box; padding: 12px 20px 16px; min-height: 44px; margin-top: 20px; }
.comm-page-buttons  { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.comm-page-size     { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); display: flex; flex-wrap: nowrap; align-items: center; gap: 5px; white-space: nowrap; }
.comm-page-size span { display: inline; font-size: 11px; color: #888; margin-right: 2px; }
@media (max-width: 480px) {
    .comm-pagination   { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 12px 14px; }
    .comm-page-size    { position: static; transform: none; justify-content: center; }
    .comm-page-buttons { gap: 2px; flex-wrap: nowrap; }
    .comm-page-btn,
    .page-ellipsis     { width: 26px; height: 22px; font-size: 10px; }
}
.comm-size-btn { margin-top: 0; padding: 4px 9px; border: 1px solid #ccc; border-radius: 5px; background: #fff; font-size: 11px; cursor: pointer; color: #666; transition: background 0.1s, border-color 0.1s; }
.comm-size-btn:hover  { background: #f0f0f0; }
.comm-size-btn.active { background: var(--verde-principal); border-color: var(--verde-principal); color: #fff; font-weight: 600; }
.comm-page-btn,
.page-ellipsis { display: flex; align-items: center; justify-content: center; width: 38px; height: 26px; border: 1px solid #ccc; border-radius: 5px; background: #fff; font-size: 12px; box-sizing: border-box; margin: 0; padding: 0; }
.comm-page-btn { cursor: pointer; color: #444; transition: background 0.1s, border-color 0.1s, color 0.1s; }
.comm-page-btn:hover:not(:disabled)    { background: var(--bg-light-green); border-color: var(--verde-principal); color: var(--verde-principal); }
.comm-page-btn.active   { background: var(--verde-principal); border-color: var(--verde-principal); color: #fff; font-weight: 600; }
.comm-page-btn:disabled { opacity: 0.4; cursor: default; }
.comm-page-buttons .comm-page-btn:first-child,
.comm-page-buttons .comm-page-btn:last-child  { border-color: transparent; background: transparent; font-size: 16px; color: #888; }
.comm-page-buttons .comm-page-btn:first-child:hover:not(:disabled),
.comm-page-buttons .comm-page-btn:last-child:hover:not(:disabled)  { background: var(--bg-light-green); border-color: transparent; color: var(--verde-principal); }
.page-ellipsis { color: #aaa; cursor: default; pointer-events: none; border-color: transparent; background: transparent; }

/* =========================================
   Caja de ayuda - global
   ========================================= */

.help-box {
    background: rgba(var(--verde-principal-rgb), 0.06);
    border: 1px solid rgba(var(--verde-principal-rgb), 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
    width: 100%;
    box-sizing: border-box;
}
.help-row  { display: flex; align-items: center; gap: 10px; }
.help-icon { flex-shrink: 0; width: 20px; height: 20px; }
.help-text { font-family: var(--fontfamilyroboto); font-size: 12px; color: #555; line-height: 1.6; }
.help-text strong { color: #333; }
.help-link {
    display: inline-block;
    background: rgba(var(--verde-principal-rgb), 0.12);
    color: var(--verde-principal);
    border: 1px solid rgba(var(--verde-principal-rgb), 0.35);
    border-radius: 4px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: background 0.15s, color 0.15s;
    vertical-align: middle;
}
.help-link:hover {
    background: var(--verde-principal);
    color: #fff;
}
