/* Staff Management System Custom CSS - Modern Blue Theme */

:root {
    /* Modern Blue Color Palette */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --success-color: #059669;
    --info-color: #0ea5e9;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    
    /* Layout Variables */
    --sidebar-width: 280px;
    --navbar-height: 60px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --box-shadow: 0 4px 15px rgba(37, 99, 235, 0.08);
    --box-shadow-hover: 0 8px 25px rgba(37, 99, 235, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Modern Blue Gradients */
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --gradient-secondary: linear-gradient(135deg, #64748b 0%, #475569 100%);
    --gradient-background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* Body and Layout */
body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gradient-background);
    padding-top: var(--navbar-height);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 14px;
    line-height: 1.6;
    color: var(--dark-color);
}

.main-content {
    flex: 1;
    padding: 1.5rem 0;
}

/* Modern Blue Navigation */
.navbar {
    height: var(--navbar-height);
    box-shadow: var(--box-shadow);
    padding: 0.75rem 0;
    background: var(--gradient-primary) !important;
    border-bottom: 3px solid var(--primary-dark);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: white !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    margin: 0 4px;
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255,255,255,0.9) !important;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255,255,255,0.15);
    color: white !important;
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    background-color: rgba(255,255,255,0.25);
    color: white !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--box-shadow-hover);
    border-radius: var(--border-radius);
    padding: 0.75rem 0;
    font-size: 0.875rem;
    backdrop-filter: blur(10px);
    background-color: rgba(255,255,255,0.95);
}

.dropdown-item {
    padding: 0.6rem 1.25rem;
    transition: var(--transition);
    font-weight: 500;
}

.dropdown-item:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateX(4px);
}

/* Modern Page Header */
.page-header {
    margin-bottom: 2rem;
    padding: 1.5rem 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.6) 100%);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    backdrop-filter: blur(10px);
    box-shadow: var(--box-shadow);
}

.page-title {
    font-size: 0.75rem !important;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.page-title i {
    font-size: 0.7rem !important;
    color: var(--primary-color);
    opacity: 0.7;
}

.page-description {
    color: var(--secondary-color);
    margin-bottom: 0;
    font-size: 0.9rem;
    font-weight: 400;
}

/* Mini Title - New Custom Small Titles */
.mini-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    margin-bottom: 1rem;
    padding: 0.25rem 0;
}

.mini-title i {
    font-size: 0.7rem;
    opacity: 0.7;
}

/* Modern Blue Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.8) 100%);
    backdrop-filter: blur(10px);
    border-left: 3px solid var(--primary-color);
}

.card:hover {
    box-shadow: var(--box-shadow-hover);
    transform: translateY(-2px);
    border-left-color: var(--primary-dark);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-bottom: none;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    color: white;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.card-body {
    padding: 1.5rem;
    background: rgba(255,255,255,0.95);
}

/* Modern Blue Buttons */
.btn {
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    transition: var(--transition);
    border: none;
    font-size: 0.875rem;
    text-transform: none;
    letter-spacing: 0.025em;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #10b981);
    color: white;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #047857, var(--success-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #f59e0b);
    color: white;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #b45309, var(--warning-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.4);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #ef4444);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #b91c1c, var(--danger-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    border-color: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.375rem 1rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Tables */
.table {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background: white;
    font-size: 0.875rem;
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    font-weight: 600;
    padding: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
}

.table tbody tr:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.02) 0%, rgba(37, 99, 235, 0.05) 100%);
    transform: scale(1.01);
}

.table tbody td {
    padding: 16px;
    border: none;
    vertical-align: middle;
    border-color: rgba(37, 99, 235, 0.1);
}

/* Forms */
.form-control {
    border: 2px solid var(--modern-blue-light);
    border-radius: 10px;
    padding: 12px 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.15);
    background: white;
}

.form-select {
    border: 2px solid var(--modern-blue-light);
    border-radius: 10px;
    padding: 12px 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.15);
    background: white;
}

.form-label {
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.875rem;
}

/* Badges */
.badge {
    border-radius: 8px;
    padding: 6px 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
}

.badge.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

/* Status Badges */
.status-pending {
    background-color: #ffc107;
    color: #000;
}

.status-in-progress {
    background-color: #0dcaf0;
    color: #000;
}

.status-completed {
    background-color: #198754;
    color: #fff;
}

.status-cancelled {
    background-color: #dc3545;
    color: #fff;
}

.status-review {
    background-color: #6f42c1;
    color: #fff;
}

.status-todo {
    background-color: #6c757d;
    color: #fff;
}

/* Priority Badges */
.priority-low {
    background-color: #198754;
    color: #fff;
}

.priority-medium {
    background-color: #ffc107;
    color: #000;
}

.priority-high {
    background-color: #fd7e14;
    color: #fff;
}

.priority-urgent {
    background-color: #dc3545;
    color: #fff;
}

/* Category Badges */
.category-sales {
    background-color: #0d6efd;
    color: #fff;
}

.category-content {
    background-color: #6f42c1;
    color: #fff;
}

.category-post {
    background-color: #20c997;
    color: #fff;
}

/* Modern Blue Statistics Cards */
.stat-card {
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--border-radius);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--box-shadow-hover);
    border: none;
    transition: var(--transition);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
    border-radius: 50%;
    transform: translate(30px, -30px);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.3);
}

.stat-card .stat-icon {
    font-size: 2.25rem;
    opacity: 0.9;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.stat-card .stat-number {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.stat-card .stat-label {
    font-size: 0.95rem;
    opacity: 0.95;
    line-height: 1.3;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.stat-card.stat-primary {
    background: var(--gradient-primary);
}

.stat-card.stat-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #10b981 100%);
}

.stat-card.stat-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #f59e0b 100%);
}

.stat-card.stat-info {
    background: linear-gradient(135deg, var(--info-color) 0%, #06b6d4 100%);
}

.stat-card.stat-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #ef4444 100%);
}

/* Progress Bars */
.progress {
    height: 10px;
    border-radius: 5px;
    background-color: #f1f3f4;
}

.progress-bar {
    border-radius: 5px;
    transition: width 0.6s ease;
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
    font-size: 0.875rem;
}

.alert-success {
    background-color: #d1e7dd;
    border-left-color: #198754;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-left-color: #ffc107;
    color: #664d03;
}

.alert-info {
    background-color: #d1ecf1;
    border-left-color: #0dcaf0;
    color: #055160;
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--secondary-color);
}

/* Footer */
.footer {
    background-color: #fff;
    border-top: 1px solid #dee2e6;
    margin-top: auto;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        padding: 0.75rem 0;
    }
    
    .stat-card .stat-number {
        font-size: 1.75rem;
    }
    
    .stat-card .stat-icon {
        font-size: 2rem;
    }
}

@media (max-width: 992px) {
    .page-title {
        font-size: 0.7rem !important;
    }
    
    .page-description {
        font-size: 0.9rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
    
    .dropdown-menu {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 0.5rem 0;
    }
    
    .page-title {
        font-size: 0.65rem !important;
    }
    
    .card-body {
        padding: 0.875rem;
    }
    
    .table-responsive {
        border-radius: var(--border-radius);
        font-size: 0.8rem;
    }
    
    .btn-group-sm .btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .stat-card .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-card .stat-icon {
        font-size: 1.75rem;
    }
    
    .stat-card .stat-label {
        font-size: 0.8rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .page-header {
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
    }
    
    .page-header .row {
        text-align: center;
    }
    
    .page-header .col-auto {
        margin-top: 0.75rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .stat-card {
        text-align: center;
        padding: 0.875rem;
    }
    
    .stat-card .stat-number {
        font-size: 1.4rem;
    }
    
    .stat-card .stat-icon {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .card-header {
        padding: 0.875rem 1rem;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .table thead th {
        padding: 0.5rem 0.4rem;
        font-size: 0.75rem;
    }
    
    .table tbody td {
        padding: 0.5rem 0.4rem;
        font-size: 0.8rem;
    }
    
    .btn {
        padding: 0.375rem 0.65rem;
        font-size: 0.8rem;
    }
    
    .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
    
    .form-control, .form-select {
        padding: 0.45rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .form-label {
        font-size: 0.8rem;
    }
    
    .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.45rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .dropdown-item {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .alert {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Utility Classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cursor-pointer {
    cursor: pointer;
}

.border-start-primary {
    border-left: 4px solid var(--primary-color) !important;
}

.border-start-success {
    border-left: 4px solid var(--success-color) !important;
}

.border-start-warning {
    border-left: 4px solid var(--warning-color) !important;
}

.border-start-danger {
    border-left: 4px solid var(--danger-color) !important;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Mobile Table Optimization */
@media (max-width: 576px) {
    .table-responsive {
        border: none;
        box-shadow: none;
    }
    
    .table {
        font-size: 0.75rem;
        box-shadow: none;
    }
    
    .table thead {
        display: none;
    }
    
    .table tbody tr {
        display: block;
        border: 1px solid #dee2e6;
        border-radius: var(--border-radius);
        margin-bottom: 0.75rem;
        padding: 0.75rem;
        background: white;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    
    .table tbody td {
        display: block;
        text-align: right;
        border: none;
        padding: 0.25rem 0;
        border-bottom: 1px solid #f1f3f4;
    }
    
    .table tbody td:last-child {
        border-bottom: none;
    }
    
    .table tbody td:before {
        content: attr(data-label) ": ";
        float: left;
        font-weight: 600;
        color: var(--dark-color);
    }
    
    .table tbody td .btn-group {
        justify-content: flex-end;
        width: 100%;
    }
}

/* Compact Components */
.compact-card {
    margin-bottom: 0.75rem;
}

.compact-card .card-body {
    padding: 0.75rem;
}

.compact-form .form-control,
.compact-form .form-select {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
}

.compact-form .form-label {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

/* Action Buttons */
.action-buttons {
    white-space: nowrap;
}

.action-buttons .btn {
    margin-right: 0.25rem;
}

.action-buttons .btn:last-child {
    margin-right: 0;
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-indicator.status-active {
    background-color: var(--success-color);
}

.status-indicator.status-inactive {
    background-color: var(--secondary-color);
}

.status-indicator.status-pending {
    background-color: var(--warning-color);
}

/* Quick Actions */
.quick-actions {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1050;
}

.quick-actions .btn {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .quick-actions {
        bottom: 1rem;
        right: 1rem;
    }
    
    .quick-actions .btn {
        width: 45px;
        height: 45px;
    }
}
