/**
 * NextDesk - Layout Admin CSS
 * Estilos específicos para o painel administrativo
 */

/* ============================================
   VARIÁVEIS DO LAYOUT
   ============================================ */
:root {
    --sidebar-width: 260px;
    --header-height: 60px;
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --sidebar-bg: #1e1e2d;
    --sidebar-text: #9899ac;
    --sidebar-active: #ffffff;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-logo {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo h4 {
    color: #fff;
    margin: 0;
    font-weight: 700;
}

.sidebar-logo span {
    color: var(--primary-color);
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar-menu-title {
    padding: 0.75rem 1.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #565674;
    font-weight: 600;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav-item {
    margin: 0.25rem 0.75rem;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

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

.sidebar-nav-link.active {
    background: var(--primary-color);
    color: #fff;
}

.sidebar-nav-link i {
    font-size: 1.25rem;
    margin-right: 0.75rem;
    width: 1.5rem;
    text-align: center;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* ============================================
   HEADER
   ============================================ */
.main-header {
    height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid #e4e6ef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-header .breadcrumb {
    margin: 0;
}

.main-header .user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.main-header .user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 0.5rem;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* ============================================
   CONTENT WRAPPER
   ============================================ */
.content-wrapper {
    padding: 1.5rem;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #f1f3f5;
    padding: 1.25rem;
}

.card-title {
    margin: 0;
    font-weight: 600;
    font-size: 1rem;
}

/* ============================================
   STAT CARDS
   ============================================ */
.stat-card {
    padding: 1.5rem;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card .stat-icon.primary { background: rgba(79,70,229,0.1); color: #4f46e5; }
.stat-card .stat-icon.success { background: rgba(16,185,129,0.1); color: #10b981; }
.stat-card .stat-icon.warning { background: rgba(245,158,11,0.1); color: #f59e0b; }
.stat-card .stat-icon.danger { background: rgba(239,68,68,0.1); color: #ef4444; }
.stat-card .stat-icon.info { background: rgba(6,182,212,0.1); color: #06b6d4; }

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #181c32;
}

.stat-card .stat-label {
    color: #a1a5b7;
    font-size: 0.875rem;
}

/* ============================================
   TABLES
   ============================================ */
.table th {
    font-weight: 600;
    color: #7e8299;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    vertical-align: middle;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* ============================================
   BADGES
   ============================================ */
.badge-success { background: rgba(16,185,129,0.1); color: #10b981; }
.badge-danger { background: rgba(239,68,68,0.1); color: #ef4444; }
.badge-warning { background: rgba(245,158,11,0.1); color: #f59e0b; }
.badge-info { background: rgba(6,182,212,0.1); color: #06b6d4; }

/* ============================================
   PAGE TITLE
   ============================================ */
.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #181c32;
    margin-bottom: 0.5rem;
}

.page-description {
    color: #a1a5b7;
    margin-bottom: 1.5rem;
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
}
