/* ===== MODERN PAYROLL SYSTEM STYLES ===== */

:root {
    /* Brand Colors */
    --primary-color: #0dbdfe;
    --primary-dark: #0aa8e0;
    --secondary-color: #60b8c3;
    --accent-red: #dc3545;
    --accent-green: #28a745;
    --accent-orange: #fd7e14;
    --accent-purple: #6f42c1;
    --text-dark: #2c3e50;
    --text-muted: #6c757d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-light: #e9ecef;
    --shadow-light: rgba(13, 189, 254, 0.1);
    --shadow-medium: rgba(13, 189, 254, 0.2);
    --shadow-dark: rgba(13, 189, 254, 0.3);
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== LAYOUT STRUCTURE ===== */
.wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* ===== SIDEBAR STYLES ===== */
.sidebar {
    width: 280px;
    background: var(--bg-white);
    box-shadow: 4px 0 20px var(--shadow-light);
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-logo img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.sidebar-logo h4 {
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
}

.sidebar-logo small {
    opacity: 0.8;
    font-size: 0.8rem;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-title {
    padding: 0.5rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.nav-item {
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-weight: 500;
}

.nav-link:hover {
    background: linear-gradient(90deg, var(--primary-color) 0%, transparent 100%);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    transform: translateX(5px);
}

.nav-link.active {
    background: linear-gradient(90deg, var(--primary-color) 0%, rgba(13, 189, 254, 0.1) 100%);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.nav-link i {
    width: 20px;
    margin-right: 0.75rem;
    font-size: 1rem;
}

.nav-link .nav-text {
    flex: 1;
}

.nav-link .badge {
    background: var(--accent-red);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
}

/* ===== MAIN CONTENT AREA ===== */
.main-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* ===== HEADER BAR ===== */
.header-bar {
    background: var(--bg-white);
    box-shadow: 0 2px 20px var(--shadow-light);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 999;
    border-bottom: 1px solid var(--border-light);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: none;
}

.sidebar-toggle:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-menu:hover {
    background: var(--primary-color);
    color: white;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== CONTENT AREA ===== */
.content-area {
    padding: 2rem;
    background: var(--bg-light);
    min-height: calc(100vh - 80px);
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-white);
    border-radius: 15px;
    box-shadow: 0 4px 20px var(--shadow-light);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--shadow-medium);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.card-header h5 {
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-light);
}

/* ===== STATISTICS CARDS ===== */
.stat-card {
    background: var(--bg-white);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px var(--shadow-light);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px var(--shadow-medium);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
}

/* ===== BUTTONS ===== */
.btn {
    border-radius: 10px;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-medium);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-green) 0%, #20c997 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-red) 0%, #c82333 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, var(--accent-orange) 100%);
    color: white;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* ===== TABLES ===== */
.table-container {
    background: var(--bg-white);
    border-radius: 15px;
    box-shadow: 0 4px 20px var(--shadow-light);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.table {
    margin: 0;
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border: none;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: var(--bg-light);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ===== FORMS ===== */
.form-control {
    border: 2px solid var(--border-light);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: var(--bg-white);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem var(--shadow-light);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-select {
    border: 2px solid var(--border-light);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    background: var(--bg-white);
    transition: all 0.3s ease;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem var(--shadow-light);
    outline: none;
}

/* ===== MODALS ===== */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 40px var(--shadow-medium);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    border-bottom: none;
    padding: 1.5rem;
}

.modal-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-light);
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    border-radius: 0 0 15px 15px;
}

/* ===== ALERTS ===== */
.alert {
    border-radius: 10px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, var(--accent-green) 0%, #20c997 100%);
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, var(--accent-red) 0%, #c82333 100%);
    color: white;
}

.alert-warning {
    background: linear-gradient(135deg, #ffc107 0%, var(--accent-orange) 100%);
    color: white;
}

.alert-info {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

/* ===== BADGES ===== */
.badge {
    border-radius: 20px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.badge-primary {
    background: var(--primary-color);
    color: white;
}

.badge-success {
    background: var(--accent-green);
    color: white;
}

.badge-danger {
    background: var(--accent-red);
    color: white;
}

.badge-warning {
    background: #ffc107;
    color: var(--text-dark);
}

/* ===== UTILITIES ===== */
.text-primary {
    color: var(--primary-color) !important;
}

.text-success {
    color: var(--accent-green) !important;
}

.text-danger {
    color: var(--accent-red) !important;
}

.text-warning {
    color: var(--accent-orange) !important;
}

.bg-primary {
    background: var(--primary-color) !important;
}

.bg-success {
    background: var(--accent-green) !important;
}

.bg-danger {
    background: var(--accent-red) !important;
}

.bg-warning {
    background: var(--accent-orange) !important;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large screens (1200px and up) */
@media (min-width: 1200px) {
    .sidebar {
        width: 300px;
    }
    
    .main-content {
        margin-left: 300px;
    }
    
    .content-area {
        padding: 2.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

/* Medium screens (768px to 1199px) */
@media (max-width: 1199px) {
    .sidebar {
        width: 260px;
    }
    
    .main-content {
        margin-left: 260px;
    }
    
    .content-area {
        padding: 1.5rem;
    }
}

/* Small screens (768px and down) */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .content-area {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .table-responsive {
        border-radius: 10px;
        overflow: hidden;
    }
    
    .table th,
    .table td {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
    
    .modal-content {
        border-radius: 10px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
}

/* Extra small screens (576px and down) */
@media (max-width: 576px) {
    .sidebar {
        width: 100%;
    }
    
    .header-bar {
        padding: 1rem;
    }
    
    .content-area {
        padding: 0.75rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        margin-bottom: 0.5rem;
    }
    
    .user-menu {
        flex-direction: column;
        text-align: center;
        padding: 0.75rem;
    }
    
    .user-info {
        align-items: center;
    }
    
    .nav-link {
        padding: 1rem 1.5rem;
    }
    
    .card-header,
    .card-body,
    .card-footer {
        padding: 1rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .sidebar,
    .header-bar,
    .btn,
    .modal {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .content-area {
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-light: #1a1a1a;
        --bg-white: #2d2d2d;
        --text-dark: #ffffff;
        --text-muted: #b0b0b0;
        --border-light: #404040;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--text-dark);
    }
    
    .btn {
        border: 2px solid currentColor;
    }
} 