/* =====================================================
   VXCSS — Core Design System
   ===================================================== */

/* ---------- Base ---------- */

body {
    font-family: Arial, sans-serif;
    background: #f4f6f8;
    margin: 10px;
    color: #222;
}

.vxcss_header {
    display: flex;
/*    max-width: 1400px; */
    justify-content: space-between; /* title left, logout right */
    align-items: center;
    flex-wrap: wrap;
    background: #888888;
    color: white;
    padding: 2rem;
}

.vxcss_header h1 {
    margin: 0;            /* remove extra spacing for perfect left alignment */
    font-size: 1.8rem;
}

.vxcss_header_user {
    display: flex;
    align-items: center;
    gap: 10px;           /* spacing between username and button */
}

.vxcss_btn.logout {
    background: #2d6cdf;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.2s;
}

.vxcss_btn.logout:hover {
    background-color: #35b1c4;
}

.vxcss_footer h3 {
    display: inline-block;
    background: #dee0e3;
    color: #003366;
    padding: 4px 40px 4px 10px;
    margin: 10px 5px 5px 10px;
    border-radius: 2px;
    font-size: 0.7rem;
    font-weight: bold;
    font-style: italic;
}

.vxcss_h2 {
    display: inline-block;
    background: #dee0e3;
    color: #003366;
    padding: 4px 40px 4px 10px;
    margin: 10px 5px 5px 3px;
    border-radius: 2px;
    font-size: 1.3em;
    font-weight: bold;
}

.vxcss_h4 {
    display: inline-block;
    background: #dee0e3;
    color: #003366;
    padding: 4px 40px 4px 10px;
    margin: 10px 5px 5px 3px;
    border-radius: 2px;
    font-size: 1.1em;
    font-weight: bold;
}

/* =========================================
   VXCSS LOGIN CARD
   ========================================= */
.vxcss_card_login {
    background: #fff;
    padding: 20px;
    margin: 2rem auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    max-width: 400px;
}

.vxcss_card_login vxcss_h2 {
    display: block;
    text-align: center;
    background-color: #dee0e3;
    color: #003366;
    padding: 4px 40px 4px 10px;
    margin: 10px 5px 15px 5px;
    border-radius: 2px;
    font-size: 1.3em;
    font-weight: bold;
}

.vxcss_card_login .field-group {
    margin-bottom: 15px;
}

.vxcss_card_login label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.vxcss_card_login input[type="text"],
.vxcss_card_login input[type="password"] {
    width: 90%;
    padding: 5px 10px 5px 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
}

.vxcss_card_login .inline-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vxcss_card_login .vxcss_btn {
    display: inline-block;
    background: #2d6cdf;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 1em;
    text-decoration: none;
    transition: background 0.2s;
}

.vxcss_card_login .vxcss_btn:hover {
    background: #35b1c4;
}


/* ---------- Menu ---------- */

.vxcss_menu {
    background: #ffffff;
    padding: 2px;
    margin: 5px 5px 5px 5px;
    border-radius: 0px;
    box-shadow: 0 5px 5px rgba(0,0,0,0.05);
}

.vxcss_menu_barra {
    /* max-width: 1400px; */
    display: flex;
    margin: 5px 5px 5px 5px;
}

.vxcss_menu-links {
    display: flex;
    flex-wrap: wrap;
    margin: 5px 5px 10px 5px;
    gap: 5px;
}

.vxcss_menu-links a {
    text-decoration: none;
}

/* ---------- Buttons ---------- */

.vxcss_btn,
.vxcss_menu-links a {
    background: #2d6cdf;
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 3px;
    font-size: 0.85em;
    cursor: pointer;
    border: none;
    display: inline-block;
    transition: background-color 0.15s ease-in-out;
}

.vxcss_btn_cancel {
    background: #f5773d;
    color: #ffffff;
    padding: 6px 10px;
    margin: 1px 1px 1px 5px;
    border-radius: 3px;
    font-size: 0.85em;
    cursor: pointer;
    border: none;
    display: inline-block;
    transition: background-color 0.15s ease-in-out;
}

.vxcss_btn:hover,
.vxcss_menu-links a:hover {
    background-color: #35b1c4;
}

.vxcss_btn--danger {
    background: #c0392b;
}

.vxcss_btn--danger:hover {
    background: #e74c3c;
}

/* ---------- Headers ---------- */



/* ---------- Layout ---------- */

.vxcss_inner_box_1 {
    margin: 15px;
}

.vxcss_inner_box_1_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.vxcss_inner_box_2 {
    margin: 10px;
}

/* ---------- Tables ---------- */

.vxcss_data-table_1 {
    width: max-content;
    table-layout: fixed;
    border-collapse: collapse;
    background: #fff;
    margin: 5px 5px 5px 0px;
}

.vxcss_data-table_1 th {
    border: 2px solid #2d6cdf;
    padding: 5px;
    margin: 5px 5px 5px 0px;    
    color: #2d6cdf;
    width: 175px;
    min-width: 175px;
    max-width: 175px;
}

.vxcss_data-table_1 td {
    border: 2px solid #ddd;
    padding: 3px 3px 3px 3px;
    margin: 5px 5px 5px 0px;
    vertical-align: middle;
    white-space: normal;
    word-break: break-word;
    justify-content: start;
    text-align: left;
    width: 175px;
    min-width: 175px;
    max-width: 175px;    
}

.vxcss_data-table_1 tr {
    display: table-row;
    vertical-align: inherit;
    unicode-bidi: isolate;
    border-color: inherit;
}

/* Table button alignment */

.vxcss_data-table_1 td .vxcss_button {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.85em;
    background-color: #2d6cdf;
    color: white;
    border-radius: 3px;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    transition: background 0.2s;
}

.vxcss_data-table_1 td .vxcss_button:hover {
    background-color: #35b1c4;
}

.vxcss_data-table_1 th:last-child,
.vxcss_data-table_1 td:last-child {
    min-width: auto;
    max-width: none;
    width: 1%;
    white-space: nowrap;
    text-align: center;
}

/* Align last column (buttons) to the right */
.vxcss_data-table_1 td:last-child {
    text-align: right;
    white-space: nowrap;
}

.vxcss_table_wrapper {
    max-width: 1400px;
    margin: 0 auto;
    overflow-x: hidden;
}

.region-tree {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.region-tree li {
    margin: 5px 0;
}

.region-tree .children {
    margin-left: 20px;
    border-left: 1px dotted #ccc;
    padding-left: 10px;
}

/* Visual cue for assigned regions */
.region-checkbox.assigned-region + label.assigned-region {
    color: #555;          /* Gray text */
    font-weight: bold;    /* Optional emphasis */
}

.region-checkbox.assigned-region {
    accent-color: #888;   /* Gray checkbox tint if supported */
}

.regions-cell {
    max-width: 100%;
    overflow: hidden;
}

.regions-cell label {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    white-space: normal;
}

.vxcss_panel {
    max-width: 1200px;
    justify-content: flex-start;
    margin: 10px 10px 10px 10px;
    padding: 5px;
    border: 2px solid #ddd;
    background: #fafafa;
    text-align: left;
}

.region-group {
    margin-bottom: 14px;
}

.region-group-title {
    font-weight: bold;
    margin-bottom: 6px;
}

.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 6px 12px;
}

.region-grid label {
    display: flex;
    align-items: center;
    white-space: normal;
}

.vxcss_checkbox_group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 6px 14px;
}

.vxcss_checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.region-level-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 6px 12px;
}

/* Add button style */
/* Add button wrapper — separate entity, right-aligned */
.vxcss_add_button_wrapper {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

/* Add button variant */
.vxcss_btn--add {
    padding: 6px 12px;
    font-size: 1em;
}

.vxcss_form_actions {
    display: flex;
    justify-content: flex-start;
    margin: 5px 5px 5px 5px;
}

.vxcss_actions_col {
    width: auto !important;
    min-width: 1px !important;
    max-width: none !important;
    white-space: nowrap;
}

.vxcss_thead {
    vertical-align: middle;
}

.vxcss_thead th {
    border: 3px solid #ddd;
    padding: 1px 1px 1px 1px;
    margin: 5px 5px 5px 0px;
    vertical-align: middle;
    white-space: normal;
    word-break: break-word;
    justify-content: start;
    text-align: center;
    min-width: 200px;
    max-width: 200px;    
}

.vxcss_tbody {
    vertical-align: middle;
}

.vxcss_tbody td {
    border: 1px solid #ddd;
    padding: 1px 1px 1px 5px;
    margin: 5px 5px 5px 0px;
    vertical-align: middle;
    white-space: normal;
    word-break: break-word;
    justify-content: start;
    text-align: left;
    min-width: 200px;
    max-width: 200px;    
}

.vxcss_input {
    appearance: auto;
    color: canvastext;
    background-color: canvas;
    border-top-width: 1px;
    border-right-width: 1px;
    border-bottom-width: 1px;
    border-left-width: 1px;
    border-top-style: groove;
    border-right-style: groove;
    border-bottom-style: groove;
    border-left-style: groove;
    border-top-color: red;
    border-right-color: red;
    border-bottom-color: red;
    border-left-color: red;
    border-image-source: none;
    border-image-slice: 100%;
    border-image-width: 1;
    border-image-outset: 0;
    border-image-repeat: stretch;
    padding-top: 0px;
    padding-right: 0px;
    padding-bottom: 0px;
    padding-left: 5px;
    -webkit-rtl-ordering: logical;
    -webkit-user-select: text;
    cursor: auto;
    font-size: 0.8em;
    width: 180px;
}

/* edition box style */
input::placeholder {
    white-space-collapse: preserve;
    text-wrap-mode: nowrap;
    overflow-wrap: normal;
    overflow-x: hidden;
    overflow-y: hidden;
    line-height: initial;
    justify-content: flex-start;
    width: 180px;
}


::placeholder {
    -webkit-text-security: none;
    color: #a6bade;
    direction: inherit;
    pointer-events: none;
    text-orientation: inherit;
    writing-mode: inherit;
    position: static;
    justify-content: flex-start;
    width: 180px;
}

/*
div {
    overflow-wrap: break-word;
    -webkit-nbsp-mode: space;
    line-break: after-white-space;
    -webkit-user-modify: read-write-plaintext-only;
}

address, article, aside, div, footer, header, hgroup, main, nav, search, section {
    display: block;
}
*/

/* Temporary aliases (safe to remove later) */
.vxcss_form_grid { composes: form-grid; }
.vxcss_field_group { composes: field-group; }
.vxcss_field_header { composes: field-header; }
