﻿* {
    box-sizing: border-box;
}
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

.gs-shell {
    display: flex;
    margin-left: 200px;
    min-height: 100vh;
    background: #f0f2f5;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}


/*Forms Styles*/

/* Inputs e Selects */
.gs-input, .gs-select {
    width: 100%;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: .5rem .75rem;
    font-size: .8rem;
    color: #111;
    transition: border-color .15s, box-shadow .15s;
}

    .gs-input:focus, .gs-select:focus {
        border-color: #1c1c2e;
        box-shadow: 0 0 0 3px rgba(28, 28, 46, .08);
        outline: none;
    }

    .gs-input::placeholder {
        color: #9ca3af;
    }

    .gs-input:disabled {
        background-color: #f3f4f6;
        color: #9ca3af;
        cursor: not-allowed;
        opacity: 0.7;
        border-color: #d1d5db;
    }

.gs-select {
    appearance: none;
}

.gs-select-wrap {
    position: relative;
}

    .gs-select-wrap i {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 14px;
        color: #9ca3af;
        pointer-events: none;
    }

/* Labels */
.gs-label {
    display: block;
    font-size: .7rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: .3rem;
}

/* Divisor */
.gs-divider {
    border: none;
    border-top: 1px solid #f3f4f6;
    margin: 1.25rem 0;
}

/* Toggle */
.gs-toggle-wrap {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .3rem;
}

.gs-toggle {
    position: relative;
    width: 36px;
    height: 20px;
    display: inline-block;
    flex-shrink: 0;
}

    .gs-toggle input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.gs-toggle-slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 99px;
    cursor: pointer;
    transition: background .2s;
}

    .gs-toggle-slider:before {
        content: '';
        position: absolute;
        width: 14px;
        height: 14px;
        background: #fff;
        border-radius: 50%;
        top: 3px;
        left: 3px;
        transition: transform .2s;
    }

.gs-toggle input:checked + .gs-toggle-slider {
    background: #1c1c2e;
}

    .gs-toggle input:checked + .gs-toggle-slider:before {
        transform: translateX(16px);
    }

.gs-toggle-label {
    font-size: .75rem;
    color: #374151;
    font-weight: 500;
}

/* Botões */
.gs-btn-primary {
    background: #1c1c2e;
    color: #fff;
    border: none;
    padding: .55rem 1.25rem;
    border-radius: 6px;
    font-size: .75rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    transition: background .15s;
    text-decoration: none;
}

    .gs-btn-primary:hover {
        background: #111;
        color: #fff;
    }

.gs-btn-secondary {
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: .55rem 1.25rem;
    border-radius: 6px;
    font-size: .75rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    transition: background .15s;
    text-decoration: none;
}

    .gs-btn-secondary:hover {
        background: #f9fafb;
        color: #374151;
    }

.gs-btn-edit {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-size: .7rem;
    font-weight: 600;
    line-height: 1.6;
    color: #6b7280;
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: color .15s, border-color .15s, background .15s;
}

    .gs-btn-edit:hover {
        color: #1c1c2e;
        border-color: #d1d5db;
        background: #f9fafb;
    }

    .gs-btn-edit i {
        font-size: 12px;
    }

/* Variante compacta dos botões primário/secundário/edição */
.gs-btn-sm {
    padding: 3px 10px !important;
    font-size: .7rem !important;
    font-weight: 600 !important;
    line-height: 1.6 !important;
    gap: 4px !important;
}

    .gs-btn-sm i {
        font-size: 12px !important;
    }

.gs-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: 1.5rem;
}

.gs-actions-hint {
    font-size: .7rem;
    color: #9ca3af;
    margin-left: auto;
}

/* Validação */
.gs-input.is-invalid, .gs-select.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .08);
}

.gs-input.is-valid, .gs-select.is-valid {
    border-color: #22c55e;
}

.gs-field-error {
    font-size: .68rem;
    color: #ef4444;
    margin-top: .25rem;
    display: none;
}

    .gs-field-error.visible {
        display: block;
    }

.gs-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.gs-topbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: .75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.gs-topbar-left {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .8rem;
    color: #9ca3af;
}

    .gs-topbar-left a {
        color: #9ca3af;
        text-decoration: none;
    }

        .gs-topbar-left a:hover {
            color: #1c1c2e;
        }

    .gs-topbar-left i {
        font-size: 14px;
    }

.gs-topbar-current {
    color: #1c1c2e;
    font-weight: 600;
}

.gs-topbar-link {
    font-size: .8rem;
    color: #9ca3af;
    text-decoration: none;
    transition: color .15s;
}

    .gs-topbar-link:hover {
        color: #1c1c2e;
    }

.gs-topbar-right {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.gs-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #1c1c2e;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
    font-weight: 700;
}

.gs-tb-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: #f4f5f7;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s;
}

    .gs-tb-icon:hover {
        background: #e5e7eb;
    }

.gs-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.gs-page-header {
    margin-bottom: 1.25rem;
}

.gs-page-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
}

.gs-page-sub {
    font-size: .75rem;
    color: #9ca3af;
    margin-top: 2px;
}

.gs-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.gs-card-header {
    padding: .875rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.gs-card-header-title {
    font-size: .8rem;
    font-weight: 700;
    color: #111;
}

.gs-card-header-badge {
    font-size: .6rem;
    background: #f0f2f5;
    color: #6b7280;
    padding: 2px 8px;
    border-radius: 99px;
    font-weight: 600;
}

.gs-card-body {
    padding: 1.25rem;
}

/*Status Active / Unactive*/
.gs-unit-badge {
    font-size: .6rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
    letter-spacing: .5px;
}

    .gs-unit-badge.active {
        background: #dcfce7;
        color: #16a34a;
    }

    .gs-unit-badge.inactive {
        background: #f3f4f6;
        color: #6b7280;
    }

@media (max-width: 767px) {
    .gs-sidebar {
        display: none;
    }

    .gs-content {
        padding: 1rem;
    }
}

/* ─── Units header (contadores de listagem) ─────────────────── */
.gs-units-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.gs-units-count {
    font-size: .75rem;
    color: #6b7280;
    font-weight: 500;
}

/* ─── Detail Hero ────────────────────────────────────────── */
.gs-detail-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.gs-detail-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #1c1c2e;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}

    .gs-detail-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.gs-detail-hero-info {
    flex: 1;
}

.gs-detail-hero-name {
    font-size: 1rem;
    font-weight: 700;
    color: #111;
}

.gs-detail-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    margin-top: .3rem;
    font-size: .72rem;
    color: #6b7280;
}

    .gs-detail-hero-meta i {
        font-size: 12px;
        vertical-align: -1px;
    }

/* ─── Tabs Navigation ────────────────────────────────────── */
.gs-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
}

    .gs-tabs::-webkit-scrollbar {
        display: none;
    }

.gs-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: .7rem 1.15rem;
    font-size: .74rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    transition: color .15s, border-color .15s;
    user-select: none;
}

    .gs-tab:hover {
        color: #1c1c2e;
    }

    .gs-tab.active {
        color: #1c1c2e;
        border-bottom-color: #1c1c2e;
    }

.gs-tab-panel {
    display: none;
}

    .gs-tab-panel.active {
        display: block;
    }

/* ─── Detail Grid (pares label/valor) ───────────────────────── */
.gs-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gs-detail-label {
    font-size: .68rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .2rem;
}

.gs-detail-value {
    font-size: .8rem;
    color: #111;
    font-weight: 500;
}

/* ─── Toast ──────────────────────────────────────────────── */

.gs-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .75rem 1rem;
    min-width: 260px;
    max-width: 400px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left-width: 4px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    font-size: .78rem;
    font-weight: 500;
    color: #111;
    animation: gs-toast-in .2s ease;
}

.gs-toast--success {
    border-left-color: #22c55e;
}

    .gs-toast--success i:first-child {
        color: #22c55e;
        font-size: 16px;
    }

.gs-toast--error {
    border-left-color: #ef4444;
}

    .gs-toast--error i:first-child {
        color: #ef4444;
        font-size: 16px;
    }

.gs-toast span {
    flex: 1;
}

.gs-toast-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 0;
    transition: color .15s;
}

    .gs-toast-close:hover {
        color: #374151;
    }

    .gs-toast-close i {
        font-size: 14px;
    }

@keyframes gs-toast-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
