/* Rakietabus — charte visuelle */

:root {
    --rb-primary: #e85d04;
    --rb-primary-dark: #c44d00;
    --rb-secondary: #1a3a5c;
    --rb-secondary-light: #2d5a8a;
    --rb-accent: #f48c06;
    --rb-success: #2d6a4f;
    --rb-bg: #f0f4f8;
    --rb-card-shadow: 0 8px 32px rgba(26, 58, 92, 0.12);
    --rb-radius: 12px;
}

/* ── Page de connexion ── */
.rb-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--rb-secondary) 0%, #0d2137 50%, var(--rb-primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.rb-login-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.rb-login-card {
    background: #fff;
    border-radius: var(--rb-radius);
    box-shadow: var(--rb-card-shadow);
    width: 100%;
    max-width: 460px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.rb-login-header {
    background: linear-gradient(135deg, var(--rb-secondary), var(--rb-secondary-light));
    padding: 2rem 2rem 1.5rem;
    text-align: center;
    color: #fff;
}

.rb-login-logo {
    width: auto;
    height: auto;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    padding: 0.75rem 1.25rem;
}

.rb-brand-logo {
    display: block;
    max-width: 240px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.rb-login-logo .rb-brand-logo {
    max-width: 220px;
    max-height: 76px;
}

.rb-navbar-brand {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    height: 60px;
}

.rb-navbar-brand .rb-brand-logo {
    max-width: 180px;
    max-height: 52px;
}

.be-left-sidebar .rb-brand-logo {
    max-width: 160px;
    max-height: 48px;
    filter: brightness(1.1);
}

.be-top-header .be-navbar-header .rb-navbar-brand {
    display: flex;
    align-items: center;
    height: 60px;
    padding: 0 1rem;
    text-decoration: none;
}

.rb-hub-welcome .rb-brand-logo {
    max-width: 200px;
    max-height: 70px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
}

.rb-tagline {
    font-size: 0.8rem;
    opacity: 0.75;
    font-style: italic;
    margin-top: 0.25rem;
}

/* ── Accueil courriers ── */
.rb-courriers-home-header {
    background: linear-gradient(135deg, #2d6a4f, #40916c);
    border-radius: var(--rb-radius);
    color: #fff;
    padding: 1.25rem 1.75rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.rb-courriers-home-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.rb-courriers-home-header p {
    margin: 0.15rem 0 0;
    opacity: 0.85;
    font-size: 0.875rem;
}

.rb-agence-card {
    border-radius: var(--rb-radius);
    box-shadow: var(--rb-card-shadow);
    transition: transform 0.2s;
    border: none;
}

.rb-agence-card:hover {
    transform: translateY(-2px);
}

.rb-agence-card .card-header {
    background: var(--rb-bg);
    font-weight: 700;
    color: var(--rb-secondary);
    border-bottom: 2px solid #2d6a4f;
}

.rb-login-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    letter-spacing: 0.5px;
}

.rb-login-header p {
    margin: 0;
    opacity: 0.85;
    font-size: 0.875rem;
}

.rb-login-body {
    padding: 2rem;
}

.rb-login-body .form-group {
    margin-bottom: 1.25rem;
}

.rb-login-body .form-control {
    border-radius: 8px;
    border: 1.5px solid #dde3ea;
    padding: 0.65rem 1rem 0.65rem 2.5rem;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.rb-login-body .form-control:focus {
    border-color: var(--rb-primary);
    box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.15);
}

.rb-input-wrap {
    position: relative;
}

.rb-input-wrap i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa5b4;
    font-size: 0.9rem;
}

.rb-btn-login {
    width: 100%;
    background: linear-gradient(135deg, var(--rb-primary), var(--rb-accent));
    border: none;
    color: #fff;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    letter-spacing: 0.3px;
}

.rb-btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(232, 93, 4, 0.4);
    color: #fff;
}

.rb-login-footer {
    text-align: center;
    padding: 1rem 2rem 1.5rem;
    font-size: 0.8rem;
    color: #8896a6;
    border-top: 1px solid #eef1f5;
}

/* ── Hub d'accueil ── */
.rb-hub {
    padding: 1rem 0 2rem;
}

.rb-hub-welcome {
    background: linear-gradient(135deg, var(--rb-secondary), var(--rb-secondary-light));
    border-radius: var(--rb-radius);
    color: #fff;
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.rb-hub-welcome h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.rb-hub-welcome p {
    margin: 0;
    opacity: 0.85;
    font-size: 0.95rem;
}

.rb-hub-date {
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    text-align: center;
    font-size: 0.9rem;
}

.rb-hub-date strong {
    display: block;
    font-size: 1.1rem;
}

.rb-module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.rb-module-card {
    background: #fff;
    border-radius: var(--rb-radius);
    box-shadow: var(--rb-card-shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none !important;
    color: inherit !important;
    display: block;
}

.rb-module-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(26, 58, 92, 0.18);
    text-decoration: none;
    color: inherit;
}

.rb-module-card-top {
    padding: 2rem 1.5rem 1.25rem;
    text-align: center;
}

.rb-module-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.75rem;
    color: #fff;
}

.rb-module-icon.tickets { background: linear-gradient(135deg, var(--rb-primary), var(--rb-accent)); }
.rb-module-icon.courriers { background: linear-gradient(135deg, #2d6a4f, #52b788); }
.rb-module-icon.caisse { background: linear-gradient(135deg, #7b2cbf, #9d4edd); }
.rb-module-icon.finance { background: linear-gradient(135deg, #1a3a5c, #2d5a8a); }
.rb-module-icon.admin { background: linear-gradient(135deg, #495057, #6c757d); }

.rb-module-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--rb-secondary);
}

.rb-module-card p {
    font-size: 0.85rem;
    color: #6b7c93;
    margin: 0;
    line-height: 1.5;
}

.rb-module-card-footer {
    background: var(--rb-bg);
    padding: 0.85rem 1.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--rb-primary);
    text-align: center;
    border-top: 1px solid #e8edf2;
}

.rb-module-card.disabled {
    opacity: 0.55;
    pointer-events: none;
    cursor: not-allowed;
}

/* ── Sidebar simplifiée ── */
.be-left-sidebar .sidebar-elements .divider {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #9aa5b4;
    padding: 0.75rem 1.25rem 0.25rem;
}

.be-left-sidebar .sidebar-elements > li > a {
    font-size: 0.875rem;
}

.be-left-sidebar .sidebar-elements > li > a span {
    text-transform: none;
    letter-spacing: 0;
}

/* ── Vente billets — assistant par étapes ── */
.rb-vente-wizard {
    background: #fff;
    border-radius: var(--rb-radius);
    box-shadow: var(--rb-card-shadow);
    overflow: hidden;
}

.rb-wizard-steps {
    display: flex;
    background: var(--rb-bg);
    border-bottom: 1px solid #e8edf2;
    overflow-x: auto;
}

.rb-wizard-step {
    flex: 1;
    min-width: 120px;
    padding: 1rem 0.75rem;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #9aa5b4;
    border-bottom: 3px solid transparent;
    cursor: default;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.rb-wizard-step.active {
    color: var(--rb-primary);
    border-bottom-color: var(--rb-primary);
}

.rb-wizard-step.done {
    color: var(--rb-success);
    border-bottom-color: var(--rb-success);
}

.rb-wizard-step i {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.rb-wizard-panel {
    display: none;
    padding: 1.5rem;
}

.rb-wizard-panel.active {
    display: block;
}

.rb-wizard-panel .form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--rb-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.35rem;
}

.rb-wizard-nav {
    display: flex;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--rb-bg);
    border-top: 1px solid #e8edf2;
}

.rb-wizard-nav .btn-prev {
    background: #fff;
    border: 1.5px solid #dde3ea;
    color: var(--rb-secondary);
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
}

.rb-wizard-nav .btn-next,
.rb-wizard-nav .btn-submit-wizard {
    background: linear-gradient(135deg, var(--rb-primary), var(--rb-accent));
    border: none;
    color: #fff;
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
}

.rb-vente-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.rb-vente-header h4 {
    margin: 0;
    font-weight: 700;
    color: var(--rb-secondary);
}

.rb-vente-header h4 i {
    color: var(--rb-primary);
    margin-right: 0.5rem;
}

/* ── Tableau de bord accueil (billetterie / courriers) ── */
.rb-home-dashboard {
    padding: 0.5rem 0 2rem;
}

.rb-home-logo-wrap {
    margin-bottom: 0.75rem;
}

.rb-home-logo-wrap .rb-brand-logo {
    max-width: 180px;
    max-height: 56px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
}

.rb-home-shortcuts {
    margin-bottom: 2rem;
}

.rb-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e8edf2;
}

.rb-section-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--rb-secondary);
}

.rb-section-header h3 i {
    color: var(--rb-primary);
    margin-right: 0.35rem;
}

.rb-section-header p {
    margin: 0.2rem 0 0;
    font-size: 0.85rem;
    color: #6b7c93;
}

.rb-badge-count {
    background: var(--rb-bg);
    color: var(--rb-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid #dde3ea;
}

.rb-home-agence-card {
    height: 100%;
    border: none;
    border-radius: var(--rb-radius);
    box-shadow: var(--rb-card-shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.rb-home-agence-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(26, 58, 92, 0.16);
}

.rb-home-agence-card .card-header {
    background: linear-gradient(135deg, var(--rb-secondary), var(--rb-secondary-light));
    color: #fff;
    border: none;
    padding: 1rem 1.15rem;
}

.rb-courriers-agence-card .card-header {
    background: linear-gradient(135deg, #2d6a4f, #40916c);
}

.rb-agence-card-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.rb-agence-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.rb-agence-icon.courriers {
    background: rgba(255, 255, 255, 0.22);
}

.rb-agence-card-title strong {
    display: block;
    font-size: 1rem;
    line-height: 1.2;
}

.rb-agence-card-title small {
    opacity: 0.85;
    font-size: 0.78rem;
}

.rb-home-agence-card .card-body {
    padding: 1.15rem;
}

.rb-agence-meta {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.rb-agence-meta li {
    font-size: 0.875rem;
    color: #4a5568;
    padding: 0.3rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rb-agence-meta i {
    color: var(--rb-primary);
    width: 1rem;
    text-align: center;
}

.rb-finance-block {
    background: var(--rb-bg);
    border-radius: 10px;
    padding: 0.85rem;
    margin-bottom: 0.85rem;
}

.rb-finance-block-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7c93;
    margin-bottom: 0.65rem;
}

.rb-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.rb-stat-item {
    background: #fff;
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
    border-left: 3px solid #dde3ea;
}

.rb-stat-item strong {
    display: block;
    font-size: 0.95rem;
    color: var(--rb-secondary);
    margin-top: 0.1rem;
}

.rb-stat-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #9aa5b4;
    letter-spacing: 0.3px;
}

.rb-stat-recette { border-left-color: #2d6a4f; }
.rb-stat-depot { border-left-color: #1a3a5c; }
.rb-stat-versement { border-left-color: #e85d04; }
.rb-stat-depense { border-left-color: #c1121f; }
.rb-stat-colis { border-left-color: #2d6a4f; text-align: center; }

.rb-solde-total {
    margin-top: 0.65rem;
    padding: 0.65rem 0.75rem;
    background: linear-gradient(135deg, var(--rb-secondary), var(--rb-secondary-light));
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}

.rb-solde-total strong {
    font-size: 1rem;
}

.rb-solde-courrier {
    background: linear-gradient(135deg, #2d6a4f, #40916c);
}

.rb-courrier-stats {
    margin-bottom: 1rem;
}

.rb-agence-btn {
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.55rem 1rem;
}

.rb-agence-btn i {
    margin-right: 0.35rem;
}

.rb-empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--rb-bg);
    border-radius: var(--rb-radius);
    color: #6b7c93;
}

.rb-empty-state i {
    font-size: 2rem;
    color: var(--rb-primary);
    margin-bottom: 0.75rem;
    display: block;
}

.rb-header-action {
    font-weight: 600;
    border-radius: 8px;
}

/* ══════════════════════════════════════════════════════════════
   RAKIETABUS — Thème global application (tous modules)
   S'applique automatiquement aux vues Beagle existantes
   ══════════════════════════════════════════════════════════════ */

.rb-app {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--rb-bg);
}

.rb-app .be-content {
    background: var(--rb-bg);
}

.rb-app .main-content {
    padding-top: 1.25rem;
    padding-bottom: 2rem;
}

/* ── En-tête de page ── */
.rb-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    background: linear-gradient(135deg, var(--rb-secondary), var(--rb-secondary-light));
    color: #fff;
    border-radius: var(--rb-radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--rb-card-shadow);
}

.rb-page-header h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
}

.rb-page-header p {
    margin: 0.25rem 0 0;
    opacity: 0.85;
    font-size: 0.875rem;
}

.rb-page-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

/* ── Barre d'actions (boutons en haut de page) ── */
.rb-action-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border-radius: var(--rb-radius);
    box-shadow: 0 2px 12px rgba(26, 58, 92, 0.08);
    margin-bottom: 1.25rem;
    border: 1px solid #e8edf2;
}

.rb-action-toolbar--inline {
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0 0 1rem;
}

/* ── Boutons — remplace le style plat Beagle partout ── */
.rb-app .btn,
.rb-app .rb-btn {
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8125rem;
    letter-spacing: 0.2px;
    padding: 0.5rem 1rem;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.rb-app .btn i,
.rb-app .rb-btn i {
    font-size: 0.9em;
}

.rb-app .btn:hover {
    transform: translateY(-1px);
}

.rb-app .btn-space {
    margin-right: 0.35rem;
    margin-bottom: 0.35rem;
}

.rb-app .btn-secondary,
.rb-app .btn-secondary.btn-space {
    background: #fff;
    color: var(--rb-secondary);
    border: 1.5px solid #dde3ea;
    box-shadow: 0 1px 4px rgba(26, 58, 92, 0.06);
}

.rb-app .btn-secondary:hover {
    background: var(--rb-bg);
    color: var(--rb-secondary);
    border-color: var(--rb-secondary-light);
    box-shadow: 0 4px 12px rgba(26, 58, 92, 0.12);
}

.rb-app .btn-primary,
.rb-app .btn-info {
    background: linear-gradient(135deg, var(--rb-secondary), var(--rb-secondary-light));
    color: #fff;
}

.rb-app .btn-primary:hover,
.rb-app .btn-info:hover {
    background: linear-gradient(135deg, var(--rb-secondary-light), var(--rb-secondary));
    color: #fff;
    box-shadow: 0 4px 16px rgba(26, 58, 92, 0.25);
}

.rb-app .btn-success {
    background: linear-gradient(135deg, #2d6a4f, #40916c);
    color: #fff;
}

.rb-app .btn-success:hover {
    background: linear-gradient(135deg, #40916c, #52b788);
    color: #fff;
    box-shadow: 0 4px 16px rgba(45, 106, 79, 0.3);
}

.rb-app .btn-warning {
    background: linear-gradient(135deg, var(--rb-primary), var(--rb-accent));
    color: #fff;
}

.rb-app .btn-warning:hover {
    color: #fff;
    box-shadow: 0 4px 16px rgba(232, 93, 4, 0.35);
}

.rb-app .btn-danger {
    background: linear-gradient(135deg, #c1121f, #e5383b);
    color: #fff;
}

.rb-app .btn-danger:hover {
    color: #fff;
    box-shadow: 0 4px 16px rgba(193, 18, 31, 0.3);
}

.rb-app .btn-light,
.rb-app .btn-rounded.text-dark.bg-white,
.rb-app .btn-block.btn-rounded.text-dark.bg-white {
    background: #fff !important;
    color: var(--rb-secondary) !important;
    border: 1.5px solid #dde3ea;
    border-radius: 8px !important;
    font-weight: 600;
}

.rb-app .btn-light:hover,
.rb-app .btn-rounded.text-dark.bg-white:hover {
    background: var(--rb-bg) !important;
    border-color: var(--rb-primary);
    color: var(--rb-primary) !important;
}

.rb-app .btn-outline-success {
    border: 1.5px solid #40916c;
    color: #2d6a4f;
    background: transparent;
}

.rb-app .btn-outline-success:hover {
    background: #2d6a4f;
    color: #fff;
}

.rb-app .btn-block {
    width: 100%;
}

.rb-app .btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
}

.rb-app .btn-lg {
    padding: 0.65rem 1.35rem;
    font-size: 0.9rem;
}

/* ── Cartes ── */
.rb-app .card,
.rb-app .rb-card {
    border: none;
    border-radius: var(--rb-radius);
    box-shadow: var(--rb-card-shadow);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.rb-app .card-border {
    border: none;
}

.rb-app .card-header,
.rb-app .rb-card-header {
    background: linear-gradient(135deg, var(--rb-secondary), var(--rb-secondary-light));
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    padding: 0.85rem 1.15rem;
}

.rb-app .card-header-divider {
    border: none;
    background: transparent;
    color: inherit;
    padding: 0;
}

.rb-app .card-body,
.rb-app .rb-card-body {
    padding: 1.15rem;
}

.rb-app .card-full {
    height: auto;
}

/* ── Formulaires ── */
.rb-app .form-control,
.rb-app .custom-select {
    border-radius: 8px;
    border: 1.5px solid #dde3ea;
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.rb-app .form-control:focus,
.rb-app .custom-select:focus {
    border-color: var(--rb-primary);
    box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.12);
}

.rb-app label,
.rb-app .form-group label,
.rb-app .control-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--rb-secondary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 0.35rem;
}

.rb-app .form-group {
    margin-bottom: 1rem;
}

/* ── Tableaux DataTables ── */
.rb-app table.dataTable {
    border-collapse: separate !important;
    border-spacing: 0;
    border-radius: var(--rb-radius);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(26, 58, 92, 0.08);
}

.rb-app table.dataTable thead th {
    background: var(--rb-secondary);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border: none !important;
    padding: 0.75rem 1rem !important;
}

.rb-app table.dataTable tbody td {
    padding: 0.65rem 1rem !important;
    font-size: 0.875rem;
    vertical-align: middle;
    border-color: #eef1f5 !important;
}

.rb-app table.dataTable tbody tr:hover {
    background: rgba(232, 93, 4, 0.04) !important;
}

.rb-app .table-striped tbody tr:nth-of-type(odd) {
    background: rgba(240, 244, 248, 0.6);
}

/* ── Modales ── */
.rb-app .modal-content {
    border: none;
    border-radius: var(--rb-radius);
    box-shadow: 0 20px 60px rgba(26, 58, 92, 0.2);
    overflow: hidden;
}

.rb-app .modal-header {
    background: linear-gradient(135deg, var(--rb-secondary), var(--rb-secondary-light));
    color: #fff;
    border: none;
    padding: 1rem 1.25rem;
}

.rb-app .modal-header .close {
    color: #fff;
    opacity: 0.85;
    text-shadow: none;
}

.rb-app .modal-title {
    font-weight: 700;
    font-size: 1rem;
}

.rb-app .modal-body {
    padding: 1.25rem;
}

.rb-app .modal-footer {
    background: var(--rb-bg);
    border-top: 1px solid #e8edf2;
    padding: 0.85rem 1.25rem;
}

/* ── Navbar & sidebar ── */
.rb-app .be-top-header {
    box-shadow: 0 2px 16px rgba(26, 58, 92, 0.12);
}

.rb-app .be-left-sidebar {
    box-shadow: 2px 0 16px rgba(26, 58, 92, 0.08);
}

.rb-app .sidebar-elements > li > a {
    border-radius: 0 20px 20px 0;
    margin-right: 0.5rem;
    transition: background 0.15s;
}

.rb-app .sidebar-elements > li.active > a,
.rb-app .sidebar-elements > li > a:hover {
    background: rgba(232, 93, 4, 0.15) !important;
}

.rb-app .page-title span {
    font-weight: 600;
    color: var(--rb-secondary);
}

/* ── Alertes & badges ── */
.rb-app .alert {
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
}

.rb-app .badge {
    border-radius: 6px;
    font-weight: 600;
    padding: 0.35em 0.65em;
}

/* ── Zone text-center avec boutons (pages vente etc.) ── */
.rb-app .text-center .btn,
.rb-app .text-center a.btn {
    margin: 0.2rem;
}

/* ── Pagination ── */
.rb-app .pagination .page-link {
    border-radius: 6px;
    margin: 0 2px;
    color: var(--rb-secondary);
    border-color: #dde3ea;
}

.rb-app .pagination .page-item.active .page-link {
    background: var(--rb-primary);
    border-color: var(--rb-primary);
}

/* ── Page 403 permissions ── */
.rb-app .rb-denied-page {
    text-align: center;
    padding: 4rem 2rem;
}

.rb-app .rb-denied-page i {
    font-size: 3rem;
    color: var(--rb-primary);
    margin-bottom: 1rem;
}

.rb-page-header h1 i {
    margin-right: 0.5rem;
    opacity: 0.9;
}

.rb-breadcrumb {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 0.35rem;
}

.rb-breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.rb-breadcrumb a:hover {
    text-decoration: underline;
}

.rb-breadcrumb-sep {
    margin: 0 0.35rem;
    opacity: 0.6;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .rb-page-header {
        padding: 1rem;
    }

    .rb-action-toolbar {
        flex-direction: column;
    }

    .rb-action-toolbar .btn {
        width: 100%;
    }

    .rb-module-grid {
        grid-template-columns: 1fr;
    }
}
