﻿/* ============================================
   DASHBOARD PRODUCTIVIDAD TÉCNICOS
   Utrerana de Cerrajería - Sistema de Diseño
   ============================================ */

/* ==================== TIPOGRAFÍA ==================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Montserrat:wght@600;700;800&display=swap');

:root {
    /* ==================== COLORES PRINCIPALES ==================== */
    --color-steel-blue: #1a2332;
    --color-industrial-blue: #2d4a6e;
    --color-deep-navy: #1A252F;

    /* ==================== COLORES SECUNDARIOS ==================== */
    --color-brushed-steel: #7F8C8D;
    --color-silver-gray: #BDC3C7;
    --color-light-steel: #ECF0F1;

    /* ==================== COLORES DE ESTADO ==================== */
    --color-success: #27AE60;
    --color-warning: #F39C12;
    --color-danger: #E74C3C;
    --color-info: #16A085;

    /* ==================== GRADIENTES ==================== */
    /* Colores corporativos Utrerana de Cerrajería */
    --gradient-header: linear-gradient(135deg, #1a2332 0%, #2d4a6e 100%);
    --gradient-card: linear-gradient(145deg, #ECF0F1 0%, #FFFFFF 100%);
    --gradient-steel: linear-gradient(90deg, #2d4a6e 0%, #1a2332 50%, #2d4a6e 100%);

    /* Dorado corporativo del logo */
    --color-corporate-gold: #d4a259;
    --color-corporate-light-gold: #e6b976;
    --gradient-gold-accent: linear-gradient(135deg, #d4a259 0%, #e6b976 100%);

    /* ==================== TIPOGRAFÍA ==================== */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-secondary: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Tamaños Tipográficos */
    --font-size-h1: 32px;
    --font-size-h2: 24px;
    --font-size-h3: 20px;
    --font-size-body-large: 16px;
    --font-size-body: 14px;
    --font-size-body-small: 12px;
    --font-size-metric-xl: 48px;
    --font-size-metric-l: 32px;
    --font-size-metric-m: 24px;

    /* Pesos Tipográficos */
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    /* ==================== ESPACIADO ==================== */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* ==================== BORDES Y ESQUINAS ==================== */
    --radius-primary: 12px;
    --radius-secondary: 8px;
    --radius-subtle: 6px;
    --radius-none: 0px;

    /* ==================== SOMBRAS (ELEVACIÓN) ==================== */
    --shadow-level-1: 0 2px 8px rgba(44, 62, 80, 0.08);
    --shadow-level-2: 0 4px 12px rgba(44, 62, 80, 0.12);
    --shadow-level-3: 0 8px 24px rgba(44, 62, 80, 0.16);
    --shadow-level-4: 0 12px 40px rgba(44, 62, 80, 0.20);

    /* ==================== LAYOUT ==================== */
    --header-height: 64px;
    --sidebar-width: 240px;
    --content-max-width: 1440px;

    /* ==================== ICONOS ==================== */
    --icon-size-small: 16px;
    --icon-size-medium: 20px;
    --icon-size-large: 24px;
    --icon-size-hero: 32px;
    --icon-stroke-width: 2px;
}

/* ==================== RESET Y BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-body);
    color: var(--color-deep-navy);
    background-color: var(--color-light-steel);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==================== TIPOGRAFÍA ==================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-secondary);
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    color: var(--color-steel-blue);
    margin-bottom: var(--space-md);
}

h1 {
    font-size: var(--font-size-h1);
}

h2 {
    font-size: var(--font-size-h2);
    font-weight: var(--font-weight-semibold);
}

h3 {
    font-size: var(--font-size-h3);
    font-weight: var(--font-weight-semibold);
}

p {
    margin-bottom: var(--space-md);
}

/* ==================== LAYOUT PRINCIPAL ==================== */
.app-container {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

/* ==================== HEADER ==================== */
.header {
    height: 85px;
    background: linear-gradient(145deg, #0f1419 0%, #1a2332 50%, #243447 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 3rem;
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.3), 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid rgba(255, 215, 0, 0.15);
    backdrop-filter: blur(20px) saturate(180%);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-logo {
    width: 70px;
    height: 70px;
    border: 2.5px solid rgba(255, 215, 0, 0.25);
    border-radius: 14px;
    object-fit: contain;
    padding: 10px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 215, 0, 0.08), rgba(255, 255, 255, 0.03));
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 215, 0, 0.1);
    position: relative;
}

.header-logo::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 14px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.header-logo:hover {
    transform: translateY(-2px) scale(1.05);
    border-color: rgba(255, 215, 0, 0.5);
    background: radial-gradient(circle at 30% 30%, rgba(255, 215, 0, 0.15), rgba(255, 255, 255, 0.05));
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 215, 0, 0.3);
}

.header-logo:hover::after {
    opacity: 1;
}

.header-title-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.header-company {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 0%, #ffd700 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.2);
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.15));
}

.header-title {
    font-family: var(--font-secondary);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.5px;
    text-transform: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-icon-btn {
    width: 44px;
    height: 44px;
    border: 1.5px solid rgba(255, 215, 0, 0.15);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 17px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.header-icon-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 215, 0, 0.15), transparent);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.header-icon-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 215, 0, 0.2);
    color: #ffd700;
}

.header-icon-btn:hover::before {
    opacity: 1;
}

.header-icon-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}

.header-user {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-secondary);
    cursor: pointer;
    transition: background 0.2s ease;
}

.header-user:hover {
    background: rgba(255, 255, 255, 0.15);
}

.header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: var(--color-light-steel);
}

.header-username {
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-medium);
}

/* ==================== MAIN CONTAINER ==================== */
.main-container {
    display: flex;
    flex: 1;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.04);
}

.sidebar-nav {
    flex: 1;
    padding: 24px 0;
}

.sidebar-section {
    margin-bottom: var(--space-lg);
}

.sidebar-section-title {
    padding: 0 var(--space-md);
    margin-bottom: var(--space-sm);
    font-size: var(--font-size-body-small);
    font-weight: var(--font-weight-semibold);
    color: var(--color-brushed-steel);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    margin: 4px 12px;
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    position: relative;
}

.nav-item:hover {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #1f2937;
    transform: translateX(4px);
}

.nav-item.active {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.nav-item.active:hover {
    transform: translateX(4px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

.nav-item-icon {
    width: 20px;
    height: 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.nav-item.active .nav-item-icon {
    transform: scale(1.1);
}

/* ==================== CONTENT AREA ==================== */
.content-area {
    flex: 1;
    padding: var(--space-lg);
    overflow-y: auto;
    max-width: var(--content-max-width);
    margin: 0 auto;
    width: 100%;
}

/* ==================== CARDS ==================== */
.card {
    background: white;
    border: 1px solid var(--color-light-steel);
    border-radius: var(--radius-primary);
    padding: var(--space-lg);
    box-shadow: var(--shadow-level-1);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-level-2);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.card-title {
    font-size: var(--font-size-h3);
    font-family: var(--font-secondary);
    font-weight: var(--font-weight-semibold);
    color: var(--color-steel-blue);
    margin: 0;
}

/* ==================== STATS CARDS ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.stat-card {
    background: white;
    border: 1px solid var(--color-light-steel);
    border-radius: var(--radius-primary);
    padding: var(--space-lg);
    box-shadow: var(--shadow-level-1);
    transition: all 0.2s ease;
}

.stat-card:hover {
    box-shadow: var(--shadow-level-2);
    transform: translateY(-2px);
}

.stat-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-secondary);
    background: rgba(52, 152, 219, 0.1);
    color: var(--color-industrial-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--icon-size-hero);
}

.stat-label {
    font-size: var(--font-size-body-small);
    font-weight: var(--font-weight-semibold);
    color: var(--color-brushed-steel);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-family: var(--font-secondary);
    font-size: var(--font-size-metric-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-steel-blue);
    line-height: 1;
    margin-bottom: var(--space-sm);
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-medium);
}

.stat-trend.positive {
    color: var(--color-success);
}

.stat-trend.negative {
    color: var(--color-danger);
}

/* ==================== BOTONES ==================== */
.btn {
    padding: 10px 20px;
    border-radius: var(--radius-secondary);
    font-family: var(--font-primary);
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.btn-primary {
    background: var(--gradient-header);
    color: white;
}

.btn-primary:hover {
    box-shadow: var(--shadow-level-2);
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: var(--color-steel-blue);
    border: 1px solid var(--color-silver-gray);
}

.btn-secondary:hover {
    background: var(--color-light-steel);
}

/* ==================== TABLAS ==================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-primary);
    overflow: hidden;
    box-shadow: var(--shadow-level-1);
}

.data-table thead {
    background: #F8F9FA;
}

.data-table th {
    padding: var(--space-md);
    text-align: left;
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-semibold);
    color: var(--color-steel-blue);
    border-bottom: 1px solid var(--color-light-steel);
    height: 48px;
}

.data-table tbody tr {
    height: 56px;
    border-bottom: 1px solid var(--color-light-steel);
    transition: background 0.2s ease;
}

.data-table tbody tr:hover {
    background: rgba(52, 152, 219, 0.04);
}

.data-table td {
    padding: var(--space-md);
}

/* ==================== BADGES ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: var(--font-size-body-small);
    font-weight: var(--font-weight-semibold);
}

.badge-success {
    background: var(--color-success);
    color: white;
}

.badge-warning {
    background: var(--color-warning);
    color: white;
}

.badge-danger {
    background: var(--color-danger);
    color: white;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .sidebar {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -240px;
        top: var(--header-height);
        height: calc(100vh - var(--header-height));
        z-index: 999;
        transition: left 0.3s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== UTILIDADES ==================== */
.mb-sm {
    margin-bottom: var(--space-sm);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.mb-xl {
    margin-bottom: var(--space-xl);
}

.mt-sm {
    margin-top: var(--space-sm);
}

.mt-md {
    margin-top: var(--space-md);
}

.mt-lg {
    margin-top: var(--space-lg);
}

.mt-xl {
    margin-top: var(--space-xl);
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.flex-center {
    align-items: center;
    justify-content: center;
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

