/* ============================================================
   SALONGO - LAYOUT STRUCTURE
   Sidebar, Navbar, Mobile Drawer, App Main, Content, Footer
   ============================================================ */

.app-wrapper {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Sidebar Escritorio */
.app-sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    color: #E2E8F0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1045;
    transition: transform var(--transition-base), width var(--transition-base);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.12);
}

.sidebar-header {
    padding: 18px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #FFFFFF;
    width: 100%;
    overflow: hidden;
}

.brand-logo-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: #FFFFFF;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #FFF;
    box-shadow: var(--shadow-primary, 0 4px 12px rgba(140, 123, 104, 0.3));
    flex-shrink: 0;
}

.brand-info-wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.brand-text {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #FFFFFF;
    background: linear-gradient(135deg, #FFFFFF 70%, var(--accent-gold, #EAD6CD) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.25;
}

.brand-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #A0AEC0;
    font-weight: 600;
    margin-top: 2px;
}

.sidebar-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.sidebar-heading {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #64748B;
    font-weight: 700;
    padding: 8px 16px;
    margin-bottom: 6px;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    color: #94A3B8;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link-custom i {
    font-size: 1.15rem;
    color: #64748B;
    transition: all var(--transition-fast);
}

.nav-link-custom:hover {
    color: #FFFFFF;
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-link-custom:hover i {
    color: var(--primary);
}

.nav-link-custom.active {
    color: #FFFFFF;
    background: var(--primary-gradient);
    font-weight: 600;
    box-shadow: var(--shadow-primary, 0 4px 14px rgba(140, 123, 104, 0.3));
}

.nav-link-custom.active i {
    color: #FFFFFF;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background-color: rgba(0, 0, 0, 0.15);
}

.user-badge-sidebar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.user-info-sidebar .user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.user-info-sidebar .user-role {
    font-size: 0.7rem;
    color: #94A3B8;
}

/* Área Principal */
.app-main {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    transition: margin-left var(--transition-base);
}

/* Navbar */
.app-navbar {
    height: 68px;
    background-color: #FFFFFF;
    border-bottom: 1px solid var(--border-color);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.navbar-salon-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background-color: var(--primary-light, #F0E6D8);
    color: var(--primary, #8C7B68);
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.825rem;
    border: 1px solid var(--border-color, rgba(140, 123, 104, 0.2));
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Contenido Principal */
.app-content {
    flex-grow: 1;
    padding: 28px;
    max-width: 100%;
}

/* Footer */
.app-footer {
    padding: 18px 28px;
    border-top: 1px solid var(--border-color);
    background-color: #FFFFFF;
    color: var(--text-muted);
    font-size: 0.825rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Overlay para Móvil */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(3px);
    z-index: 1040;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* ============================================================
   TOAST NOTIFICATIONS FLOTANTES (GC STUDIO)
   ============================================================ */
.toast-floating-container {
    position: fixed;
    top: 75px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: calc(100vw - 40px);
}

.auth-bg .toast-floating-container {
    top: 20px;
    right: 20px;
}

.toast-card {
    pointer-events: auto;
    width: 350px;
    max-width: 100%;
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-left: 5px solid #CBD5E1;
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    box-sizing: border-box;
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: opacity 0.3s ease, transform 0.3s ease, margin 0.3s ease, max-height 0.3s ease;
}

.toast-card.toast-hiding {
    opacity: 0;
    transform: translateX(110%);
    pointer-events: none;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(110%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Tipos de Toast */
.toast-card.toast-success {
    border-left-color: #10B981;
}
.toast-card.toast-success .toast-icon-badge {
    background-color: #10B981;
    color: #FFFFFF;
}

.toast-card.toast-info {
    border-left-color: #3B82F6;
}
.toast-card.toast-info .toast-icon-badge {
    background-color: #3B82F6;
    color: #FFFFFF;
}

.toast-card.toast-warning {
    border-left-color: #F59E0B;
}
.toast-card.toast-warning .toast-icon-badge {
    background-color: #F59E0B;
    color: #FFFFFF;
}

.toast-card.toast-error,
.toast-card.toast-danger {
    border-left-color: #EF4444;
}
.toast-card.toast-error .toast-icon-badge,
.toast-card.toast-danger .toast-icon-badge {
    background-color: #EF4444;
    color: #FFFFFF;
}

.toast-icon-badge {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.toast-content {
    flex-grow: 1;
    min-width: 0;
    padding-right: 18px;
}

.toast-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #1E293B;
    margin-bottom: 2px;
    line-height: 1.25;
}

.toast-message {
    font-size: 0.78rem;
    color: #475569;
    line-height: 1.35;
    word-break: break-word;
}

.toast-btn-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.toast-btn-close:hover {
    color: #1E293B;
    background-color: #F1F5F9;
}

/* Responsivo Móvil */
@media (max-width: 767.98px) {
    .toast-floating-container {
        top: 70px;
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
    }
    .auth-bg .toast-floating-container {
        top: 15px;
        left: 15px;
        right: 15px;
    }
    .toast-card {
        width: 100%;
    }
}

