/* Reback theme look for EasyAdmin: its orange accent, dark sidebar, soft grey page
   and "Wix Madefor Text" font. EasyAdmin's own CSS lives in cascade layers, so these
   unlayered rules win without !important. */

:root,
.ea-dark-scheme {
    --ea-primary: #ff6c2f;
    --ea-radius: 0.475rem;
    --font-family-sans-serif: "Wix Madefor Text", system-ui, -apple-system, "Segoe UI", sans-serif;

    --sidebar-bg: #262d34;
    --sidebar-border-color: #2f3944;
    --sidebar-logo-color: #ffffff;
    --sidebar-menu-color: #9097a7;
    --sidebar-menu-icon-color: #9097a7;
    --sidebar-menu-header-color: #6c7589;
    --sidebar-menu-hover-color: #ffffff;
    --sidebar-item-hover-bg: #2e363f;
    --sidebar-item-icon-tile-hover-bg: #36404a;
    --sidebar-menu-active-item-bg: rgba(255, 108, 47, 0.14);
    --sidebar-menu-active-item-color: #ff6c2f;
    --responsive-header-bg: #262d34;
    --responsive-header-border-color: #2f3944;
    --responsive-header-logo-color: #ffffff;
}

:root {
    --body-bg: #f8f8fa;
    --content-bg: #f8f8fa;
}

.ea-dark-scheme {
    --body-bg: #22282e;
    --content-bg: #22282e;
}

.reback-logo {
    height: 26px;
    width: auto;
    margin-right: 0.35rem;
    vertical-align: -6px;
}

/* Tables and forms sit on white "cards", like the Reback pages. */
.ea .datagrid,
.ea .form-fieldset,
.ea .ea-detail-fieldset {
    background: var(--white, #fff);
    border-radius: 0.625rem;
    box-shadow: 0 3px 4px rgba(15, 34, 58, 0.05);
}

.ea-dark-scheme .datagrid,
.ea-dark-scheme .form-fieldset,
.ea-dark-scheme .ea-detail-fieldset {
    background: #282f36;
}

/* Overview page */
.rb-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.rb-card {
    background: var(--white, #fff);
    border-radius: 0.625rem;
    box-shadow: 0 3px 4px rgba(15, 34, 58, 0.05);
    padding: 1.25rem 1.5rem;
}

.ea-dark-scheme .rb-card {
    background: #282f36;
}

.rb-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.rb-stat-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex: none;
    border-radius: 0.625rem;
    font-size: 1.35rem;
}

.rb-tone-primary { background: rgba(255, 108, 47, 0.14); color: #ff6c2f; }
.rb-tone-success { background: rgba(55, 165, 147, 0.14); color: #37a593; }
.rb-tone-warning { background: rgba(245, 185, 25, 0.16); color: #c98d06; }
.rb-tone-danger  { background: rgba(239, 95, 95, 0.14); color: #ef5f5f; }

.rb-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-color);
}

.rb-stat-label {
    color: var(--text-muted, #5d7186);
    font-size: 0.875rem;
}

.rb-card h2 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem;
}

.rb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.rb-table th {
    text-align: left;
    font-weight: 600;
    color: var(--text-muted, #5d7186);
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border-color, #eaedf1);
}

.rb-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border-color, #eaedf1);
}

.rb-table tr:last-child td {
    border-bottom: 0;
}

.rb-table-wrap {
    overflow-x: auto;
}

.rb-source {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 50rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
}

.rb-source-airbnb { background: #e11d48; }
.rb-source-booking_com { background: #2563eb; }

.rb-missing {
    color: #ef5f5f;
    font-weight: 600;
}

/* Login page: white card on the soft grey page. */
.page-login {
    background: var(--body-bg);
}

.page-login .login-wrapper {
    background: var(--white, #fff);
    border-radius: 0.625rem;
    box-shadow: 0 3px 4px rgba(15, 34, 58, 0.05);
    padding: 2rem;
}

.ea-dark-scheme .page-login .login-wrapper {
    background: #282f36;
}

/* Channel logos (booking source) */
.rb-logo {
    display: inline-flex; align-items: center; justify-content: center; position: relative;
    width: 28px; height: 28px; border-radius: 8px; vertical-align: middle; line-height: 1;
}
.rb-logo-airbnb { color: #ff385c; background: rgba(255, 56, 92, 0.1); font-size: 17px; }
.rb-logo-booking {
    color: #fff; background: #003580; font: 700 16px/1 "Wix Madefor Text", Arial, sans-serif; padding-right: 3px;
}
.rb-logo-dot {
    position: absolute; right: 6px; bottom: 7px; width: 4px; height: 4px; border-radius: 50%; background: #009fe3;
}

/* Net amount per booking, with breakdown on hover */
.rb-net { position: relative; display: inline-flex; align-items: center; gap: 6px; cursor: help; white-space: nowrap; }
.rb-net-warn { color: #c98d06; font-size: 0.8rem; }
.rb-net-box {
    display: none; position: absolute; z-index: 30; right: calc(100% + 10px); top: 50%; transform: translateY(-50%);
    min-width: 230px; padding: 8px 10px; border-radius: 8px; background: #0e1a2b; color: #fff;
    font-size: 0.8rem; font-weight: 400; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.rb-net:hover .rb-net-box, .rb-net:focus .rb-net-box { display: block !important; }
.rb-net-row { display: flex; justify-content: space-between; gap: 16px; }
.rb-net-note { display: block; margin-top: 4px; opacity: 0.7; }
