body {
    background: #E5E5E566;
    font-family: 'Nunito', sans-serif !important;
}

@media only screen and (min-width: 1200px) {
    html {
        font-size: 14.6px !important;
    }
}

@media only screen and (max-width: 1467px) {
    .menu-item span {
        display: none;
    }
}

form[name='user'] input {
    margin: 8px 0px 8px 0px !important;
    padding: 0px 8px !important;
}

input,
select,
textarea {
    border: 1px solid #f2f2f2 !important;
}

/* Themed focus states for all form fields */
input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary) !important;
    outline: none !important;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0), 0 0 0 2px var(--primary-100) !important;
}

/* Materialize input underline override on focus */
.input-field input[type="text"]:focus,
.input-field input[type="email"]:focus,
.input-field input[type="tel"]:focus,
.input-field input[type="number"]:focus,
.input-field input[type="search"]:focus,
.input-field input[type="password"]:focus,
.input-field textarea:focus {
    border-bottom: 2px solid var(--primary) !important;
    box-shadow: 0 1px 0 0 var(--primary) !important;
}

.input-field input:focus+label,
.input-field textarea:focus+label,
.input-field .select-wrapper input.select-dropdown:focus+label {
    color: var(--primary-700) !important;
}

/* Materialize select dropdown input */
.select-wrapper input.select-dropdown:focus {
    border-bottom: 2px solid var(--primary) !important;
    box-shadow: 0 1px 0 0 var(--primary) !important;
}

/* Browser default selects we use with class browser-default */
select.browser-default:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px var(--primary-100) !important;
}

.brand-logo {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px;
    /* small gap between logo and title */
    font-weight: 600;
    color: #1a237e !important;
    vertical-align: middle;
    line-height: 1;
}

.brand-logo-image {
    width: 60px !important;
    height: 60px !important;
    display: inline-block !important;
    vertical-align: middle;
}

.brand-title {
    display: inline-block;
    margin: 0;
    /* spacing handled by .brand-logo gap */
    font-size: 1.5rem;
    /* increased size */
    font-weight: 700;
    color: var(--primary-700);
    line-height: 1;
    transform: none;
    /* flex centering handles alignment */
    vertical-align: middle;
}

/* Fix the top menu and avoid overlap with page titles */
nav.white {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1002;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

/* Make header content vertically centered on larger screens
           Keep mobile/tablet behavior unchanged by applying only above the MD breakpoint */
@media (min-width: 993px) {
    .nav-wrapper.container {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    /* Push the right-side menu to the end of the flex row */
    .nav-wrapper.container .right {
        margin-left: auto;
    }
}

/* Static padding for content below fixed nav */
main {
    padding-top: 56px;
}

@media (max-width: 992px) {
    main {
        padding-top: 80px;
    }
}

.container {
    max-width: 1400px;
}

.status-chip {
    text-transform: capitalize;
}

.card {
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06) !important;
    border: 1px solid #eeeeee;
    width: 100%;
}

.card-title {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    margin-bottom: 20px !important;
    color: var(--primary-700) !important;
}

.card .card-content {
    padding: 14px 14px;
}

.card-title {
    margin-bottom: 14px !important;
}

/* THEME DEFINITIONS */
:root[data-theme="sunset"] {
    --primary: #E6682F;
    --primary-600: #d25d2a;
    --primary-700: #b85025;
    --primary-100: #fde5db;
    --primary-200: #f9ccb9;
    --text-on-primary: #ffffff;
    --neutral-800: #2f3b42;
    --neutral-600: #546e7a;
    --neutral-200: #eceff1;
}

:root[data-theme="ocean"] {
    --primary: #147C8A;
    --primary-600: #106a75;
    --primary-700: #0d5861;
    --primary-100: #def1f4;
    --primary-200: #bfe5ea;
    --text-on-primary: #ffffff;
    --neutral-800: #23343a;
    --neutral-600: #5c6f75;
    --neutral-200: #e6eff1;
}

/* Cartes compactes (étiquettes) en haut du tableau de bord */
.compact-card .card-content {
    padding: 8px 12px;
}

.compact-card .card-title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.1;
}

.compact-card h4 {
    margin: 2px 0 0;
    font-size: 1.6rem;
    line-height: 1.2;
}

.compact-card {
    margin-bottom: 12px;
}

/* Carte filtre tableau de bord: alignement et espacement améliorés */
.dashboard-filter {
    border: 1px solid var(--neutral-200);
}

.dashboard-filter .card-content {
    padding: 12px 20px;
}

.dashboard-filter .row {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.dashboard-filter .input-field {
    margin: 0;
}

.dashboard-filter .input-field .prefix {
    color: #607d8b;
    top: 0.6rem;
}

/* Ajuster la hauteur de l'input pour aligner avec le bouton */
.dashboard-filter .input-field input[type="text"] {
    height: 2.8rem;
    line-height: 2.8rem;
}

/* Disposer l'icône et le champ date côte à côte avec écart; le trait commence après l'icône */
.dashboard-filter .date-field {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    max-width: none;
}

.dashboard-filter .date-field .prefix {
    position: static;
    top: auto;
    left: auto;
    transform: none;
    margin: 0;
    line-height: 1;
}

.dashboard-filter .date-field input[type="text"] {
    width: 220px;
}

@media (min-width: 1200px) {
    .dashboard-filter .date-field input[type="text"] {
        width: 200px;
    }
}

/* Zone d'actions poussée à droite en desktop et éléments côte à côte */
.dashboard-filter .actions {
    margin-left: auto;
    text-align: right;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Bouton plus agréable visuellement */
.dashboard-filter .btn {
    border-radius: 8px;
    padding: 0 16px;
    height: 40px;
    line-height: 40px;
}

@media (max-width: 992px) {
    .dashboard-filter .btn {
        width: 100%;
        margin-top: 8px;
    }

    .dashboard-filter .actions {
        margin-left: 0;
        text-align: left;
        justify-content: flex-start;
    }
}

/* Thème personnalisé — palette brand (#F5AF16) */
:root {
    --primary: #F5AF16;
    --primary-600: #d89f13;
    /* one stop darker */
    --primary-700: #b87f0f;
    /* two stops darker */
    --primary-100: #fff6e6;
    /* pale bg */
    --primary-200: #fff0cc;
    /* soft bg */
    --text-on-primary: #ffffff;
    --neutral-800: #2f3b42;
    --neutral-600: #546e7a;
    --neutral-200: #eceff1;
}

/* Navigation et titres orientés primaire */
.brand-logo {
    color: var(--primary-700) !important;
}

/* Remove the blue outline on the Reservations menu trigger when focused by mouse
           Keep :focus-visible for keyboard accessibility */
[data-target="reservation-dropdown"]:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none !important;
}

/* Also remove outline on focus/active when not keyboard-driven */
[data-target="reservation-dropdown"]:active,
[data-target="reservation-dropdown"]:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* If keyboard user, keep a visible focus ring */
[data-target="reservation-dropdown"]:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
}

.indigo-text.text-darken-4 {
    color: var(--neutral-800) !important;
}

nav.white {
    border-bottom: 1px solid var(--neutral-200);
}

/* Harmonisation des cartes colorées (dashboard + flashes) */
.card.blue.lighten-1 {
    background-color: var(--primary) !important;
    color: var(--text-on-primary) !important;
}

.card.orange.lighten-1 {
    background-color: var(--primary-600) !important;
    color: var(--text-on-primary) !important;
}

.card.red.lighten-1 {
    background-color: var(--primary-700) !important;
    color: var(--text-on-primary) !important;
}

.card.grey.darken-1 {
    background-color: var(--neutral-600) !important;
    color: #fff !important;
}

/* Boutons orientés primaire */
.btn.blue,
.btn-small.blue {
    background-color: var(--primary) !important;
    color: var(--text-on-primary) !important;
}

.btn.blue:hover,
.btn-small.blue:hover {
    background-color: var(--primary-600) !important;
}

/* Boutons qui utilisaient indigo dans les templates */
.btn.indigo,
.btn-small.indigo,
.indigo.darken-1 {
    background-color: var(--primary) !important;
    color: var(--text-on-primary) !important;
}

.btn.indigo:hover,
.btn-small.indigo:hover {
    background-color: var(--primary-600) !important;
}

/* Chips de statut : versions plus intégrées à la palette (tout en gardant le code couleur) */
.chip.green {
    background-color: var(--primary-100) !important;
    color: var(--primary-700) !important;
}

.chip.orange {
    background-color: var(--primary) !important;
    color: var(--text-on-primary) !important;
}

.chip.red {
    background-color: var(--primary-700) !important;
    color: #fff !important;
}

.chip.grey {
    background-color: var(--neutral-600) !important;
    color: #fff !important;
}

/* Pagination: harmoniser l'état actif */
.pagination li.active {
    background-color: var(--primary) !important;
}

.pagination li.active a {
    color: var(--text-on-primary) !important;
}

.pagination li a {
    color: var(--neutral-800);
}

.pagination li a:hover {
    color: var(--primary-700);
}

/* Compact pagination utility */
.compact-pagination {
    padding-top: 2px !important;
    padding-bottom: 2px !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compact-pagination .pagination {
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.compact-pagination .pagination li {
    height: 22px;
    line-height: 22px;
    display: inline-flex;
    align-items: center;
}

.compact-pagination .pagination li a {
    padding: 0 6px;
    font-size: 12px;
    line-height: 22px;
    display: inline-flex;
    align-items: center;
}

.compact-pagination .pagination li i.material-icons {
    font-size: 18px;
    line-height: 22px;
    display: inline-block;
    vertical-align: middle;
}

.compact-pagination-row {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    display: flex;
    align-items: center;
}

.compact-pagination-row>.col {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cartes neutres: en-têtes et fonds plus doux */
/*.card:not(.blue):not(.orange):not(.red):not(.grey) .card-content {
            background-color: #fff;
        }*/

.btn,
.btn-small {
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08) !important;
}

/* Affiner les ombres globales Materialize */
.z-depth-1,
.z-depth-2,
.z-depth-3,
.z-depth-4,
.z-depth-5 {
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08) !important;
}

.dropdown-content,
.modal {
    box-shadow: 0 2px 6px rgba(0, 0, 0, .10) !important;
}

.collection {
    border: 1px solid #eeeeee;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

.card .card-content {
    width: 100%;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
}

/* Liens et boutons plats aux couleurs primaires */
a,
.btn-flat {
    color: var(--primary-700);
}

a:hover,
.btn-flat:hover {
    color: var(--primary-600);
    background-color: transparent;
}

/* Champs de formulaire aux couleurs primaires */
.input-field input[type="text"]:focus,
.input-field input[type="number"]:focus,
.input-field input[type="email"]:focus,
.input-field input[type="tel"]:focus,
.input-field input[type="date"]:focus,
.input-field textarea:focus,
.input-field .select-wrapper input.select-dropdown:focus {
    border-bottom: 1px solid var(--primary) !important;
    box-shadow: 0 1px 0 0 var(--primary) !important;
}

.input-field input:focus+label,
.input-field textarea:focus+label,
.input-field .select-wrapper input.select-dropdown:focus+label,
label.active {
    color: var(--primary-700) !important;
    top: -0.6rem !important;
}

/* Select dropdown caret */
.select-wrapper .caret {
    fill: var(--primary-700);
}

/* Pastel light: cartes compactes du dashboard en fond doux avec texte sombre */
.compact-card {
    background-color: var(--primary-100) !important;
    border-color: var(--primary-200) !important;
}

.compact-card,
.compact-card .card-content,
.compact-card .card-title,
.compact-card h4 {
    color: var(--neutral-800) !important;
}

.compact-card .material-icons {
    color: inherit !important;
}

/* Icônes dans cartes héritent de la couleur du texte */
.card .material-icons {
    color: inherit;
}

/* En-têtes de tableau pastels et lisibles */
table thead th {
    background-color: var(--primary-100);
    color: var(--primary-700);
    font-weight: 600;
}

table thead th,
table tbody td {
    padding: 10px 12px;
}

/* Login form: fix email field width */
.auth-login .input-field {
    width: 100%;
}

.auth-login .input-field input[type="email"],
.auth-login .input-field input[type="password"] {
    width: 100%;
    box-sizing: border-box;
}

/* Neutralize Materialize row negative margins and keep gentle column padding */
.auth-login .row {
    margin-left: 0;
    margin-right: 0;
}

.auth-login .col {
    padding-left: .75rem;
    padding-right: .75rem;
}

/* Prefix icons: use padding-left on inputs to avoid total width overflow */
.auth-login .input-field .prefix {
    left: 0;
}

.auth-login .input-field .prefix~input,
.auth-login .input-field .prefix~textarea {
    padding-left: 2.5rem;
}

.auth-login .input-field .prefix~label {
    left: 2.5rem;

}

.auth-login .input-field input,
.auth-login .input-field textarea {
    max-width: 100%;
}

/* Form fields full width and consistent box-sizing */
.input-field input[type="text"],
.input-field input[type="password"],
.input-field input[type="date"],
.input-field input[type="number"],
.input-field input[type="email"],
.input-field input[type="tel"],
.input-field .select-wrapper input.select-dropdown,
.input-field select,
.input-field textarea {
    box-sizing: border-box;
    /* include padding/border in width */
    width: 100% !important;
    display: block;
}

/* Password visibility toggle button */
.input-field {
    position: relative;
}

.input-field input[type="password"] {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: -28px;
    /* 4px gap from the edge */
    top: 44%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    color: rgba(0, 0, 0, 0.54);
}

.password-toggle:focus {
    outline: none;
}

.select-wrapper {
    width: 100%;
}

.input-field {
    margin-bottom: 14px;
}

/* public/css/app.css */
.has-error {
    color: red;
    font-size: 0.9em;
    list-style-type: none;
    padding-left: 0;
}


a.active {

    background-color: #E5E5E5;
}

.active.indigo-text.text-darken-4,
.active i.material-icons {
    color: var(--primary-700) !important;
}

.myButton:disabled {
    cursor: not-allowed !important;
}