/* Portal BIG — layout y componentes específicos */

.big-body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg-light);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
}

.big-layout {
    display: flex;
    min-height: 100vh;
}

.big-sidebar {
    width: var(--sidebar-w, 268px);
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--nav-blue-1, #365a68) 0%, var(--nav-blue-3, #263f48) 100%);
    color: rgba(255, 255, 255, 0.92);
    display: flex;
    flex-direction: column;
    padding: 1.25rem 0;
    box-shadow: 4px 0 24px rgba(43, 74, 85, 0.12);
}

.big-sidebar__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 1rem 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    text-decoration: none;
}

.big-sidebar__logo {
    max-width: 100%;
    height: auto;
    max-height: 48px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.big-sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 0.75rem;
    flex: 1;
}

.big-nav-link {
    display: block;
    padding: 0.65rem 1rem;
    border-radius: var(--radius, 12px);
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.big-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.big-nav-link.is-active {
    background: rgba(143, 211, 227, 0.22);
    color: #fff;
}

.big-sidebar__foot {
    padding: 1rem 1.25rem 0;
    font-size: 0.8rem;
    opacity: 0.75;
}

.big-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.big-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--panel-bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.big-topbar__left {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    flex: 1;
}

.big-topbar__logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    line-height: 0;
}

.big-topbar__logo img {
    max-height: 36px;
    width: auto;
    object-fit: contain;
}

.big-topbar__title {
    margin: 0;
    font-size: clamp(1.05rem, 2.5vw, 1.25rem);
    font-weight: 700;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.big-topbar__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.big-topbar__time {
    font-variant-numeric: tabular-nums;
}

.big-flashes {
    padding: 0 1.5rem;
    margin-top: 0.75rem;
}

.big-content {
    padding: 1.25rem 1.5rem 2rem;
    flex: 1;
}

.big-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.big-search-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.big-search-form input[type='search'] {
    min-width: 200px;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-bg);
    color: var(--text);
}

.big-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.big-co-card {
    background: var(--panel-bg);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.15s, box-shadow 0.15s;
}

.big-co-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(43, 74, 85, 0.14);
}

.big-co-card__bar {
    height: 6px;
    width: 100%;
}

.big-co-card__body {
    padding: 1rem 1.15rem 1.25rem;
}

.big-co-card__name {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.big-co-card__meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.big-co-card__status {
    margin-top: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.big-co-card__status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.big-co-card__status.st-ok {
    color: #15803d;
}

.big-co-card__status.st-bad {
    color: #b91c1c;
}

.big-co-card__status.st-warn {
    color: #b45309;
}

.big-co-card__status.st-pending {
    color: var(--text-muted);
}

.big-hub-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.big-hub-tile {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.25rem 1.35rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel-bg);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.big-hub-tile:hover {
    border-color: var(--accent, #8fd3e3);
    box-shadow: 0 10px 32px rgba(54, 90, 104, 0.12);
}

.big-hub-tile__title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--primary, #365a68);
}

.big-hub-tile__desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.big-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
}

.big-table.table-pro {
    width: 100%;
}

.module-back {
    margin: 0 0 1rem;
}

.big-table-slug {
    margin-top: 0.2rem;
    word-break: break-all;
}

.big-hub-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.big-edit-stack {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 920px;
}

.big-form-section {
    padding: 1.35rem 1.5rem 1.5rem;
    border-radius: var(--radius);
}

.big-form-section__title {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary, #365a68);
}

.big-form-section__lead {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.big-muted-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.big-copy-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.big-copy-input {
    flex: 1;
    min-width: 200px;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg-light);
    color: var(--text);
    font-size: 0.875rem;
}

.big-instructions {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.875rem;
    color: var(--text);
    line-height: 1.6;
}

.big-instructions li {
    margin-bottom: 0.35rem;
}

.big-company-form {
    margin-top: 0.5rem;
}

.big-form-subtitle {
    margin: 1.5rem 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.35rem;
}

.big-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}

.big-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text-muted);
}

.big-field input,
.big-field select {
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-bg);
    color: var(--text);
    font-size: 0.9rem;
}

.big-field--span2 {
    grid-column: span 2;
}

.big-field--checks {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.big-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}

.big-form-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

@media (max-width: 640px) {
    .big-form-grid {
        grid-template-columns: 1fr;
    }

    .big-field--span2 {
        grid-column: span 1;
    }
}

html[data-theme='dark'] .big-co-card {
    border-color: var(--line);
}

html[data-theme='dark'] .big-hub-tile:hover {
    border-color: rgba(143, 211, 227, 0.35);
}

html[data-theme='dark'] .big-hub-tile__title {
    color: var(--accent);
}

html[data-theme='dark'] .big-sidebar__logo {
    filter: brightness(0) invert(1);
    opacity: 0.92;
}

html[data-theme='dark'] .big-copy-input {
    background: rgba(2, 6, 23, 0.35);
    border-color: var(--line);
}

@media (max-width: 768px) {
    .big-layout {
        flex-direction: column;
    }

    .big-sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        padding: 0.75rem 1rem;
    }

    .big-sidebar__brand {
        padding: 0;
        border: 0;
        justify-content: flex-start;
    }

    .big-sidebar__logo {
        max-height: 40px;
    }

    .big-sidebar__nav {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0;
    }

    .big-sidebar__foot {
        width: 100%;
        padding: 0.5rem 0 0;
    }

    .big-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .big-topbar__left {
        flex-wrap: wrap;
    }

    .big-topbar__title {
        white-space: normal;
    }

    .big-topbar__meta {
        width: 100%;
        justify-content: flex-start;
    }
}
