﻿/* ============================================
   FUNCIONARIO.CSS - Base Styles & Variables
   Mobile-First Design System
   ============================================ */

:root {
    /* Colors */
    --primary: #1e3a8a;
    --primary-light: #3b82f6;
    --primary-lighter: #60a5fa;
    --primary-dark: #1e40af;

    --secondary: #475569;
    --secondary-light: #64748b;

    --background: #f1f5f9;
    --background-light: #f8fafc;
    --card-bg: #ffffff;

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;

    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 200ms ease-in-out;
    --transition-slow: 300ms ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

.funcionario-page {
    min-height: 100vh;
    padding-bottom: 80px;
}

/* ============================================
   HEADER STYLES
   ============================================ */

.main-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 2rem 1.5rem;
    color: white;
    border-radius: 0 0 2rem 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.main-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

.user-info {
    position: relative;
    z-index: 1;
}

.welcome-text {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 400;
    display: block;
    margin-bottom: 0.25rem;
}

.user-name {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

/* ============================================
   CONTENT AREA
   ============================================ */

.content {
    padding: 1.5rem;
    max-width: 100%;
}

/* ============================================
   CARD STYLES
   ============================================ */

.holerite-card,
.search-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.holerite-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.upload-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--background-light);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
}

/* ============================================
   DETAIL ITEMS
   ============================================ */

.holerite-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.detail-item .icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-lighter) 0%, var(--primary-light) 100%);
    color: white;
    border-radius: var(--radius-md);
    font-size: 1.125rem;
    flex-shrink: 0;
}

.detail-item > div {
    flex: 1;
}

.detail-item span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item strong {
    display: block;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-top: 0.125rem;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4);
}

.btn-secondary {
    background: var(--background-light);
    color: var(--text-primary);
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: white;
    border-color: var(--primary-light);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-block {
    width: 100%;
}

.holerite-actions {
    display: flex;
    gap: 0.75rem;
}

.holerite-actions .btn {
    flex: 1;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.holerite-card.empty,
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-secondary);
}

.holerite-card.empty i,
.empty-state i {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    display: block;
}

.empty-state h3 {
    color: var(--text-primary);
    margin: 1rem 0 0.5rem;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    background: white;
    transition: all var(--transition-base);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ============================================
   BOTTOM NAVIGATION
   ============================================ */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    flex-grow: 1;
    transition: color var(--transition-fast);
}

.nav-link i {
    font-size: 1.25rem;
}

.nav-link span {
    font-size: 0.75rem;
}

.nav-link.active,
.nav-link:hover {
    color: var(--primary);
}

/* ============================================
   DESKTOP OPTIMIZATIONS
   ============================================ */

@media (min-width: 768px) {
    .funcionario-page {
        padding-bottom: 0;
    }

    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        border-top: none;
        border-radius: 0;
        padding: 1rem;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    }

    .nav-link {
        color: rgba(255, 255, 255, 0.8);
        padding: 0.75rem 1.5rem;
        border-radius: var(--radius-md);
    }

    .nav-link:hover,
    .nav-link.active {
        color: white;
        background: rgba(255, 255, 255, 0.1);
    }

    .content {
        max-width: 1400px;
        margin: 0 auto;
        padding: 2rem;
        padding-bottom: 6rem;
    }

    .main-header {
        max-width: 1400px;
        margin: 0 auto;
    }
}

@media (min-width: 1024px) {
    .content {
        padding: 3rem 2rem;
    }
}