@charset "UTF-8";

/* ─── Variables ─────────────────────────────────────────── */
:root {
    --azul1:  #297CCE;
    --azul2:  #5D71CD;
    --bordo1: #8363C4;
    --bordo2: #A352B3;
    --bordo3: #BC3D9B;
    --rojo1:  #CC237D;
    --rojo2:  #D4065C;

    --sidebar-bg:    #f8f9fa;
    --sidebar-hover: rgba(255,255,255,0.08);
    --sidebar-active:#297CCE;
    --sidebar-width: 220px;
    --header-height: 56px;
}

/* ─── Base ──────────────────────────────────────────────── */
body {
    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;
    background: #f4f6f9;
    color: #333;
}

/* ─── Degradado principal ───────────────────────────────── */
.gradient-custom-2 {
    background: linear-gradient(to right,
        var(--azul1), var(--azul2), var(--bordo1),
        var(--bordo2), var(--bordo3), var(--rojo1), var(--rojo2));
}

/* ─── Header / Navbar ───────────────────────────────────── */
.app-header {
    height: var(--header-height);
    background: #d4065c;
    border-bottom: none;
    box-shadow: 0 2px 8px rgba(212,6,92,0.3);
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    gap: 1rem;
}

.app-header .brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    white-space: nowrap;
}

.app-header .brand:hover { color: rgba(255,255,255,0.85); }

.app-header .sidebar-toggle {
    background: none;
    border: none;
    color: rgba(255,255,255,0.9);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    transition: background 0.15s;
}

.app-header .sidebar-toggle:hover {
    background: rgba(255,255,255,0.15);
    color: white;
}

.app-header .user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.9);
}

.app-header .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.4);
}

/* ─── Sidebar ───────────────────────────────────────────── */
.app-sidebar {
    width: var(--sidebar-width);
    min-height: calc(100vh - var(--header-height));
    background: var(--sidebar-bg);
    flex-shrink: 0;
    transition: width 0.25s ease;
    overflow: hidden;
}

.app-sidebar.collapsed { width: 52px; }
.app-sidebar.collapsed .nav-link span { display: none; }
.app-sidebar.collapsed .nav-link { padding: 0.65rem 0; justify-content: center; }
.app-sidebar.collapsed .sidebar-submenu { display: none; }
.app-sidebar.collapsed .sidebar-divider { margin: 0.5rem 0.5rem; }
.app-sidebar.collapsed .nav-link.dropdown-toggle::after { display: none; }

.sidebar-nav {
    list-style: none;
    padding: 0.75rem 0;
    margin: 0;
}

.sidebar-nav .nav-item { position: relative; }

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 1.1rem;
    color: #333;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    border-left: 3px solid transparent;
    transition: all 0.15s;
    white-space: nowrap;
}

.sidebar-nav .nav-link i {
    font-size: 1rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    color: var(--azul1);
}

.sidebar-nav .nav-link:hover {
    background: rgba(41,124,206,0.08);
    color: var(--azul1);
    border-left-color: var(--azul1);
}

.sidebar-nav .nav-link.active {
    background: rgba(220,53,69,0.08);
    color: #dc3545;
    border-left-color: #dc3545;
    font-weight: 600;
}

.sidebar-nav .nav-link.dropdown-toggle::after { margin-left: auto; }

/* Submenu */
.sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(41,124,206,0.04);
}

.sidebar-submenu .nav-link {
    padding: 0.5rem 1.1rem 0.5rem 2.5rem;
    font-size: 0.825rem;
}

.sidebar-divider {
    border-top: 1px solid #e0e0e0;
    margin: 0.5rem 0;
}

/* ─── Contenido principal ───────────────────────────────── */
.app-content {
    flex: 1;
    min-width: 0;
    padding: 1.5rem;
}

.page-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--rojo2);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-title i { color: var(--azul1); }

/* ─── Botones ───────────────────────────────────────────── */
.btn-primary,
.btn-block.gradient-custom-2 {
    background: linear-gradient(135deg, var(--azul1), var(--bordo1));
    border: none;
    color: white;
    font-weight: 500;
}

.btn-primary:hover,
.btn-block.gradient-custom-2:hover {
    background: linear-gradient(135deg, var(--bordo1), var(--rojo1));
    border: none;
    color: white;
}

.button-shift  { color: white; background: var(--bordo1); }
.button-address{ color: white; background: var(--bordo1); }
.button-edit   { color: white; background: var(--azul1);  }
.button-delete { color: white; background: var(--rojo1);  }

.button-shift:hover, .button-address:hover { background: var(--bordo2); color: white; }
.button-edit:hover   { background: var(--azul2);  color: white; }
.button-delete:hover { background: var(--rojo2);  color: white; }

/* ─── Labels ────────────────────────────────────────────── */
.label-title {
    color: var(--rojo2);
    font-weight: 600;
}

.label-input {
    color: #000;
    background: #f0f0f0;
    border-radius: 20px;
    text-align: center;
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
}

.form-control, .form-select, .form-check-input {
    border-color: #adb5bd !important;
}

/* ─── Tablas ────────────────────────────────────────────── */
.table {
    background: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.table thead th {
    background: var(--azul1);
    color: white;
    font-weight: 500;
    font-size: 0.85rem;
    border: none;
    padding: 0.75rem 1rem;
}

.table tbody td {
    vertical-align: middle;
    font-size: 0.875rem;
    padding: 0.65rem 1rem;
    border-color: #f0f2f5;
}

.table-hover tbody tr:hover td {
    background: rgba(41,124,206,0.07);
    color: inherit;
}

/* ─── Paginacion ────────────────────────────────────────── */
.page-item:hover .page-link  { color: var(--rojo1) !important; }
.page-item.active .page-link { background: var(--azul1) !important; border-color: var(--azul1) !important; }

/* ─── Alertas / Errores ─────────────────────────────────── */
.error_color {
    color: white;
    background: var(--rojo1);
    border-radius: 0.375rem;
}

/* ─── Links ─────────────────────────────────────────────── */
a:link, a:visited { color: var(#FFF); }
a:hover           { color: var(--rojo1); }

h1, h2, h3 { color: var(--rojo2); }

/* ─── Dropdown ──────────────────────────────────────────── */
.dropdown-item:hover {
    color: white;
    background: var(--bordo3);
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
    .app-sidebar { width: 0; }
    .app-sidebar.mobile-open { width: var(--sidebar-width); position: fixed; z-index: 1040; height: 100vh; }
    .app-content { padding: 1rem; }
}
