/* css/global.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

body {
    display: flex;
    height: 100vh;
    width: 100vw;
    background-color: #f8fafc;
    color: #0f172a;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: #0f172a;
    color: white;
    display: flex;
    flex-direction: column;
    z-index: 10;
    border-right: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}

.brand {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand i { font-size: 1.8em; color: #38bdf8; }
.brand-text h2 { color: #f8fafc; font-size: 1.2em; font-weight: 700; margin-bottom: 2px; letter-spacing: -0.5px; }
.brand-text p  { font-size: 0.75em; color: #94a3b8; font-weight: 500; }

.nav-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px 10px;
    gap: 4px;
    overflow-y: auto;
}
.nav-section-title {
    color: #64748b;
    font-size: 0.7em;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 15px 15px 5px 15px;
    margin-top: 5px;
    text-transform: uppercase;
}
.nav-btn {
    background: transparent;
    color: #cbd5e1;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    text-align: left;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}
.nav-btn i { font-size: 1.2em; opacity: 0.7; transition: 0.2s; }
.nav-btn:hover { background: #1e293b; color: white; }
.nav-btn:hover i { opacity: 1; }
.nav-btn.active { background: rgba(56,189,248,0.1); color: #38bdf8; font-weight: 600; }
.nav-btn.active i { opacity: 1; color: #38bdf8; }

.user-info-sidebar {
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.05);
}
.user-info-sidebar p { margin: 0; font-size: 0.75em; color: #94a3b8; text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; }
.user-info-sidebar strong { color: #f8fafc; display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 0.95em; font-weight: 500; }

.btn-logout {
    margin-top: 15px;
    background: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.85em;
    cursor: pointer;
    transition: 0.2s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
}
.btn-logout:hover { background: #ef4444; color: white; }
.menu-icon { stroke-width: 1.5; }

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.topbar {
    background-color: white;
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    z-index: 5;
}

.content-view {
    padding: 20px;
    flex: 1;
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

/* Botones Universales */
button { display: flex; align-items: center; gap: 6px; padding: 7px 12px; font-size: 0.8rem; font-weight: 500; border: none; border-radius: 6px; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.btn-primary { background: #2563eb; color: white; }
.btn-primary:hover { background: #1d4ed8; }
.btn-secondary { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.btn-secondary:hover { background: #e2e8f0; }
.btn-warning { background: #ea580c; color: white; }
.btn-warning:hover { background: #c2410c; }
.btn-success { background: #10b981; color: white; }
.btn-success:hover { background: #059669; }
.btn-haulmer { background: #7c3aed; color: white; }
.btn-haulmer:hover { background: #6d28d9; }

/* Loader Universal */
.inline-loader { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: #64748b; background: transparent; padding: 4px 6px; border-radius: 12px; white-space: nowrap; }
.inline-loader.hidden { display: none; }
.spinner { animation: rotate 2s linear infinite; width: 16px; height: 16px; }
.spinner .path { stroke: #10b981; stroke-linecap: round; animation: dash 1.5s ease-in-out infinite; }
@keyframes rotate { 100% { transform: rotate(360deg); } }
@keyframes dash { 0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; } 50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; } 100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; } }

/* Mensajes Universales */
.empty-state { padding: 40px 20px; text-align: center; color: #94a3b8; display: flex; flex-direction: column; align-items: center; gap: 10px;}
.error-msg { color: #e53e3e; background: #fff5f5; padding: 12px 15px; border-radius: 6px; display: flex; align-items: center; gap: 10px; font-size: 0.85rem; font-weight: 500; border: 1px solid #feb2b2;}
