/* =============================================
   MAMACARS — Custom Theme (palairva.cl style)
   ============================================= */

/* ---- Google Font ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --mam-blue-dark: #1d4ed8;
    --mam-blue: #2563eb;
    --mam-blue-light: #3b82f6;
    --mam-yellow: #f59e0b;
    --mam-yellow-h: #d97706;
    --mam-gray-900: #111827;
    --mam-gray-800: #1f2937;
    --mam-gray-700: #374151;
    --mam-gray-400: #9ca3af;
    --mam-gray-300: #d1d5db;
    --mam-white: #ffffff;
    --mam-navbar-h: 68px;
    --mam-transition: all 0.25s ease;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: #f8fafc;
}

/* =============================================
   NAVBAR
   ============================================= */
.mam-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(to right, var(--mam-blue-dark), var(--mam-blue));
    box-shadow: 0 2px 12px rgba(0, 0, 0, .25);
    height: var(--mam-navbar-h);
}

.mam-navbar-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Brand */
.mam-brand {
    display: flex;
    align-items: center;
    gap: .55rem;
    text-decoration: none;
    flex-shrink: 0;
}

.mam-brand-icon {
    color: var(--mam-yellow);
    font-size: 1.35rem;
}

.mam-brand-name {
    color: var(--mam-white);
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: -.01em;
}

/* Nav list */
.mam-menu {
    flex: 1;
}

.mam-nav-list {
    display: flex;
    align-items: center;
    gap: .15rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mam-nav-item {
    position: relative;
}

.mam-nav-link {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .7rem;
    color: rgba(255, 255, 255, .90);
    font-size: .85rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    background: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--mam-transition);
    line-height: 1;
}

.mam-nav-link:hover,
.mam-dropdown-open>.mam-nav-link {
    color: var(--mam-yellow);
    background: rgba(255, 255, 255, .10);
}

.mam-arrow {
    flex-shrink: 0;
    opacity: .7;
}

/* Right side */
.mam-navbar-right {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-shrink: 0;
    margin-left: auto;
}

.mam-nav-user {
    color: rgba(255, 255, 255, .80);
    font-size: .8rem;
    font-weight: 500;
}

/* Buttons */
.mam-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .4rem 1rem;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: var(--mam-transition);
    white-space: nowrap;
}

.mam-btn-login {
    background: var(--mam-yellow);
    color: var(--mam-gray-900);
}

.mam-btn-login:hover {
    background: var(--mam-yellow-h);
    color: var(--mam-gray-900);
    text-decoration: none;
    transform: scale(1.04);
}

.mam-btn-logout {
    background: rgba(255, 255, 255, .15);
    color: var(--mam-white);
}

.mam-btn-logout:hover {
    background: rgba(255, 255, 255, .25);
    color: var(--mam-white);
    transform: scale(1.04);
}

/* Admin button in nav */
.mam-btn-admin-nav {
    color: var(--mam-yellow) !important;
}

/* Hamburger */
.mam-hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--mam-white);
    padding: .4rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--mam-transition);
}

.mam-hamburger:hover {
    background: rgba(255, 255, 255, .15);
}

/* ---- Dropdown ---- */
.mam-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: var(--mam-white);
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    padding: .5rem 0;
    z-index: 2000;
}

.mam-dropdown-open .mam-dropdown-menu {
    display: block;
}

.mam-dropdown-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem 1rem;
    font-size: .84rem;
    color: #374151;
    text-decoration: none;
    transition: var(--mam-transition);
}

.mam-dropdown-item i {
    color: var(--mam-blue-light);
    width: 16px;
    text-align: center;
}

.mam-dropdown-item:hover {
    background: #f0f4ff;
    color: var(--mam-blue-dark);
    text-decoration: none;
}

.mam-dropdown-item:hover i {
    color: var(--mam-yellow-h);
}

/* =============================================
   MAIN CONTENT
   ============================================= */
/* Breadcrumb bar — full-width, sits right below navbar */
.mam-breadcrumb-bar {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: .55rem 1.5rem;
}

.mam-breadcrumb-bar .breadcrumb {
    margin: 0;
    font-size: .85rem;
}

/* Inner-page page body — for views that don't manage their own padding */
.mam-page-body {
    padding: 2rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* =============================================
   FOOTER
   ============================================= */
.mam-footer {
    background: linear-gradient(135deg, var(--mam-gray-900) 0%, #1e3a6e 50%, var(--mam-gray-900) 100%);
    color: var(--mam-white);
}

.mam-footer-body {
    max-width: 1440px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem 2.5rem;
}

.mam-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 2.5rem;
}

/* Brand col */
.mam-footer-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: 1rem;
}

.mam-footer-icon {
    color: var(--mam-yellow);
    font-size: 1.5rem;
}

.mam-footer-brand-name {
    font-size: 1.15rem;
    font-weight: 700;
}

.mam-footer-desc {
    color: var(--mam-gray-400);
    font-size: .875rem;
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

/* Social icons */
.mam-footer-socials {
    display: flex;
    gap: .6rem;
}

.mam-social-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--mam-white);
    text-decoration: none;
    transition: var(--mam-transition);
}

.mam-social-btn:hover {
    transform: scale(1.12);
    color: var(--mam-white);
    text-decoration: none;
}

.mam-social-x {
    background: #000;
}

.mam-social-x:hover {
    background: #333;
}

.mam-social-ig {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.mam-social-fb {
    background: #1877f2;
}

.mam-social-fb:hover {
    background: #1467d2;
}

/* Footer cols */
.mam-footer-heading {
    font-size: .95rem;
    font-weight: 600;
    color: var(--mam-yellow);
    margin-bottom: 1.1rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.mam-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.mam-footer-links a {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--mam-gray-400);
    font-size: .875rem;
    text-decoration: none;
    transition: var(--mam-transition);
}

.mam-footer-links a i {
    color: var(--mam-yellow);
    font-size: .65rem;
}

.mam-footer-links a:hover {
    color: var(--mam-yellow);
    text-decoration: none;
}

/* Language select */
.mam-footer-lang {
    margin-bottom: 1rem;
}

.mam-lang-select {
    background: var(--mam-gray-800);
    color: var(--mam-white);
    border: 1px solid var(--mam-gray-700);
    border-radius: 8px;
    padding: .4rem .75rem;
    font-size: .85rem;
    cursor: pointer;
    width: 100%;
    transition: var(--mam-transition);
}

.mam-lang-select:hover,
.mam-lang-select:focus {
    border-color: var(--mam-blue-light);
    outline: none;
}

.mam-footer-powered {
    font-size: .78rem;
    color: var(--mam-gray-400);
}

.mam-footer-powered a {
    color: var(--mam-blue-light);
    text-decoration: none;
}

.mam-footer-powered a:hover {
    color: var(--mam-yellow);
}

/* Bottom bar */
.mam-footer-bottom {
    border-top: 1px solid var(--mam-gray-700);
    background: rgba(0, 0, 0, .3);
}

.mam-footer-bottom-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 1.1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    font-size: .8rem;
    color: var(--mam-gray-400);
}

.mam-footer-heart {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.mam-pulse {
    color: #ef4444;
    animation: mamPulse 2s cubic-bezier(.4, 0, .6, 1) infinite;
}

@keyframes mamPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .4;
    }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1100px) {
    .mam-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .mam-hamburger {
        display: flex;
    }

    .mam-menu {
        display: none;
        position: absolute;
        top: var(--mam-navbar-h);
        left: 0;
        right: 0;
        background: linear-gradient(to bottom, var(--mam-blue-dark), var(--mam-blue));
        padding: .75rem 1rem;
        box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
        z-index: 999;
    }

    .mam-menu.mam-menu-open {
        display: block;
    }

    .mam-nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: .1rem;
    }

    .mam-nav-link {
        width: 100%;
    }

    .mam-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        background: rgba(255, 255, 255, .08);
        border-radius: 8px;
        margin: .25rem 0 .25rem 1rem;
        padding: .25rem 0;
    }

    .mam-dropdown-item {
        color: rgba(255, 255, 255, .85);
    }

    .mam-dropdown-item i {
        color: var(--mam-yellow);
    }

    .mam-dropdown-item:hover {
        background: rgba(255, 255, 255, .10);
        color: var(--mam-yellow);
    }

    .mam-nav-user {
        display: none;
    }

    .mam-footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .mam-footer-bottom-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* =============================================
   YII2 UTILITY OVERRIDES (sin tocar funcional)
   ============================================= */
.not-set {
    color: #c55;
    font-style: italic;
}

a.asc:after,
a.desc:after {
    content: '';
    left: 3px;
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 5px transparent;
    margin: 4px 4px 2px 4px;
    background: transparent;
}

a.asc:after {
    border-bottom: solid 7px #212529;
    border-top-width: 0;
}

a.desc:after {
    border-top: solid 7px #212529;
    border-bottom-width: 0;
}

.grid-view th {
    white-space: nowrap;
}

.hint-block {
    display: block;
    margin-top: 5px;
    color: #999;
}

.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

.form-group {
    margin-bottom: 1rem;
}