/* ============================================================
   DG Teams — Tema del panel
   ------------------------------------------------------------
   Todo el aspecto visual se controla desde estas variables.
   Cambia la marca aquí y se propaga a todo el panel.
   Se carga DESPUÉS de bootstrap.min.css.
   ============================================================ */

:root {
    /* Marca */
    --bc-primary:        #D97803;
    --bc-primary-dark:   #b5640a;
    --bc-primary-light:  #fbedda;
    --bc-accent:         #1f2937;

    /* Superficies */
    --bc-bg:             #f5f6f8;
    --bc-surface:        #ffffff;
    --bc-border:         #e6e8ec;

    /* Texto */
    --bc-text:           #1f2430;
    --bc-text-muted:     #6b7280;
    --bc-text-invert:    #ffffff;

    /* Sidebar */
    --bc-sidebar-bg:     #16181d;
    --bc-sidebar-text:   #c7cbd3;
    --bc-sidebar-hover:  #23262e;
    --bc-sidebar-active: var(--bc-primary);
    --bc-sidebar-width:  264px;

    /* Topbar */
    --bc-topbar-h:       60px;

    /* Forma */
    --bc-radius:         12px;
    --bc-radius-sm:      8px;
    --bc-shadow:         0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04);
    --bc-shadow-lg:      0 10px 30px rgba(16,24,40,.10);

    /* Sobrescribe variables de Bootstrap para coherencia */
    --bs-primary:        var(--bc-primary);
    --bs-link-color:     var(--bc-primary);
    --bs-link-hover-color: var(--bc-primary-dark);
    --bs-body-color:     var(--bc-text);
    --bs-body-bg:        var(--bc-bg);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bc-bg);
    color: var(--bc-text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Layout shell ---------- */
.bc-shell { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.bc-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--bc-sidebar-width);
    background: var(--bc-sidebar-bg);
    color: var(--bc-sidebar-text);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: transform .25s ease;
}
.bc-sidebar__brand {
    height: var(--bc-topbar-h);
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: 0 1.25rem;
    color: #fff;
    font-weight: 700;
    letter-spacing: .02em;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.bc-sidebar__brand .bc-logo {
    width: 30px; height: 30px;
    border-radius: 8px;
    background: var(--bc-primary);
    display: grid; place-items: center;
    color: #fff; font-weight: 800;
}
.bc-sidebar__brand .bc-logo-img {
    height: 30px;
    max-width: 120px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
}
.bc-sidebar__nav {
    padding: .75rem .5rem;
    overflow-y: auto;
    flex: 1;
}
.bc-nav-section {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6b7280;
    padding: 1rem .85rem .35rem;
}
.bc-nav-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem .85rem;
    margin: .1rem .25rem;
    border-radius: var(--bc-radius-sm);
    color: var(--bc-sidebar-text);
    text-decoration: none;
    font-size: .92rem;
    transition: background .15s, color .15s;
}
.bc-nav-link i { font-size: 1.05rem; width: 20px; text-align: center; }
.bc-nav-link:hover { background: var(--bc-sidebar-hover); color: #fff; }
.bc-nav-link.is-active {
    background: var(--bc-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(217,120,3,.35);
}

/* ---------- Main column ---------- */
.bc-main {
    flex: 1;
    margin-left: var(--bc-sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ---------- Topbar ---------- */
.bc-topbar {
    height: var(--bc-topbar-h);
    background: var(--bc-surface);
    border-bottom: 1px solid var(--bc-border);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.25rem;
    position: sticky;
    top: 0;
    z-index: 1030;
}
.bc-topbar__title { font-weight: 600; font-size: 1.02rem; }
.bc-topbar__spacer { flex: 1; }
.bc-burger {
    display: none;
    background: none; border: 0;
    font-size: 1.4rem; color: var(--bc-text);
    cursor: pointer;
}
.bc-user {
    display: flex; align-items: center; gap: .6rem;
    text-decoration: none; color: var(--bc-text);
}
.bc-user__avatar {
    width: 34px; height: 34px; border-radius: 50%;
    object-fit: cover; background: var(--bc-primary-light);
}

/* ---------- Notice ticker ---------- */
.bc-notice-ticker {
    position: sticky;
    top: var(--bc-topbar-h);
    z-index: 1020;
    height: 40px;
    display: flex;
    align-items: stretch;
    background: linear-gradient(90deg, var(--bc-ticker-from, var(--bc-primary-dark)), var(--bc-ticker-to, var(--bc-primary)));
    box-shadow: 0 2px 6px rgba(16, 24, 40, .15);
    overflow: hidden;
}
.bc-notice-ticker__label {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: 0 1rem;
    background: var(--bc-ticker-label, rgba(0, 0, 0, .18));
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
    border-right: 2px solid rgba(255, 255, 255, .35);
}
.bc-notice-ticker__label i { font-size: .95rem; }
.bc-notice-ticker__viewport {
    position: relative;
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}
.bc-notice-ticker__track {
    position: absolute;
    top: 0;
    left: 0;
    display: inline-flex;
    align-items: center;
    height: 100%;
    color: #fff;
    text-decoration: none;
    animation-name: bc-ticker-scroll;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}
.bc-notice-ticker__viewport:hover .bc-notice-ticker__track { animation-play-state: paused; }
.bc-notice-ticker__item {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: 0 2.5rem;
    font-size: .85rem;
    font-weight: 500;
}
.bc-notice-ticker__item + .bc-notice-ticker__item { border-left: 1px solid rgba(255, 255, 255, .3); }
@keyframes bc-ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ---------- Content ---------- */
.bc-content { padding: 1.5rem; flex: 1; }
.bc-content__inner { max-width: 1200px; margin: 0 auto; }

/* ---------- Cards / superficies ---------- */
.bc-card {
    background: var(--bc-surface);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius);
    box-shadow: var(--bc-shadow);
}
.bc-stat {
    display: flex; align-items: center; gap: 1rem;
    padding: 1.25rem;
}
.bc-stat__icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: grid; place-items: center;
    font-size: 1.4rem;
    background: var(--bc-primary-light);
    color: var(--bc-primary);
}
.bc-stat__value { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.bc-stat__label { color: var(--bc-text-muted); font-size: .85rem; }

/* ---------- Botones de marca ---------- */
.btn-primary {
    --bs-btn-bg: var(--bc-primary);
    --bs-btn-border-color: var(--bc-primary);
    --bs-btn-hover-bg: var(--bc-primary-dark);
    --bs-btn-hover-border-color: var(--bc-primary-dark);
    --bs-btn-active-bg: var(--bc-primary-dark);
    --bs-btn-disabled-bg: var(--bc-primary);
}
.btn-outline-primary {
    --bs-btn-color: var(--bc-primary);
    --bs-btn-border-color: var(--bc-primary);
    --bs-btn-hover-bg: var(--bc-primary);
    --bs-btn-hover-border-color: var(--bc-primary);
}

/* ---------- Alertas flash ---------- */
.bc-flash { position: fixed; top: 1rem; right: 1rem; z-index: 1080; max-width: 360px; }

/* ---------- Auth (login / registro) ---------- */
.bc-auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.bc-auth__visual {
    background: linear-gradient(135deg, var(--bc-primary) 0%, var(--bc-primary-dark) 100%);
    color: #fff;
    display: flex; flex-direction: column; justify-content: center;
    padding: 3rem;
}
.bc-auth__form {
    display: flex; align-items: center; justify-content: center;
    padding: 2rem;
}
.bc-auth__card { width: 100%; max-width: 400px; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .bc-sidebar { transform: translateX(-100%); }
    .bc-sidebar.is-open { transform: translateX(0); }
    .bc-main { margin-left: 0; }
    .bc-burger { display: block; }
    .bc-auth { grid-template-columns: 1fr; }
    .bc-auth__visual { display: none; }
    .bc-sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .45);
        z-index: 1039;
        opacity: 0;
        visibility: hidden;
        transition: opacity .25s ease;
    }
    .bc-sidebar-backdrop.is-visible {
        opacity: 1;
        visibility: visible;
    }
}
