/* TaskForce Admin Dashboard 2026 - Modern Style */

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --sidebar-width: 260px;
    --header-height: 64px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 8px;
    --radius-sm: 6px;
    --radius-lg: 12px;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--light-bg);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Layout */
.d-flex {
    display: flex;
}

.flex-grow-1 {
    flex-grow: 1;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--white);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: var(--white);
}

.sidebar-header h5 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.sidebar .nav {
    padding: 1rem 0;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.875rem;
    border-left: 3px solid transparent;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    margin-right: 0.5rem;
}

.sidebar .nav-link .me-2 {
    margin-right: 0.5rem;
}

/* Font Awesome star ratings */
.fa-star.text-warning {
    color: #f59e0b;
}

.fa-star.text-muted {
    color: #cbd5e1;
}

.sidebar .nav-link:hover {
    background-color: #f1f5f9;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.sidebar .nav-link.active {
    background-color: #eff6ff;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

/* Main Content */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.navbar {
    height: var(--header-height);
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 999;
}

.navbar-text {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
}

.main-content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Typography */
h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
    letter-spacing: -0.025em;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.75rem 0;
}

h4, h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

/* Cards */
.card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

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

.card-header {
    padding: 1.25rem 1.5rem;
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.5;
}

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

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

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: #475569;
}

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

.btn-success:hover {
    background: #059669;
}

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

.btn-danger:hover {
    background: #dc2626;
}

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

.btn-warning:hover {
    background: #d97706;
}

.btn-info {
    background: var(--info-color);
    color: var(--white);
}

.btn-info:hover {
    background: #0891b2;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-outline-secondary {
    background: transparent;
    color: var(--secondary-color);
    border: 1px solid var(--border-color);
}

.btn-outline-secondary:hover {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-outline-danger {
    background: transparent;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.btn-outline-danger:hover {
    background: var(--danger-color);
    color: var(--white);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-group {
    display: inline-flex;
    gap: 0.5rem;
}

.btn-group-sm .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge.bg-success {
    background: #d1fae5;
    color: #065f46;
}

.badge.bg-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge.bg-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge.bg-info {
    background: #cffafe;
    color: #164e63;
}

.badge.bg-secondary {
    background: #f1f5f9;
    color: #475569;
}

.badge.bg-light {
    background: #f8fafc;
    color: var(--text-secondary);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}

.table thead {
    background: #f8fafc;
}

.table thead th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    background: #f8fafc;
    z-index: 10;
}

.table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.15s ease;
}

.table tbody tr:hover {
    background-color: #f8fafc;
}

.table tbody td {
    padding: 1rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    vertical-align: middle;
}

.table tbody tr:last-child {
    border-bottom: none;
}

/* Forms */
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.form-control,
.form-select {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--danger-color);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: var(--danger-color);
}

.form-check {
    display: block;
    min-height: 1.5rem;
    padding-left: 1.75rem;
    margin-bottom: 0.5rem;
}

.form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.125rem;
    margin-left: -1.75rem;
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    font-size: 0.875rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.alert-success {
    background-color: #d1fae5;
    border-color: #a7f3d0;
    color: #065f46;
}

.alert-danger {
    background-color: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

.alert-dismissible {
    position: relative;
    padding-right: 3rem;
}

.btn-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.5;
}

.btn-close:hover {
    opacity: 1;
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

/* Code */
code {
    background: #f1f5f9;
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--primary-color);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* Pagination */
.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0 0;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.pagination > li {
    display: inline-block;
    margin: 0;
}

.pagination > li > a,
.pagination > li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    background: var(--white);
    font-size: 0.875rem;
    font-weight: 500;
}

.pagination > li > a:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.pagination > li > span {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    cursor: default;
}

.pagination > li.disabled > span,
.pagination > li.disabled > a {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: #f1f5f9;
    color: var(--text-muted);
    border-color: var(--border-color);
}

.pagination > li.disabled > span:hover,
.pagination > li.disabled > a:hover {
    background: #f1f5f9;
    color: var(--text-muted);
    border-color: var(--border-color);
    transform: none;
    box-shadow: none;
}

/* Bootstrap pagination compatibility */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.pagination-wrapper .pagination {
    margin: 0;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 1rem;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Responsive */
@media (max-width: 991.98px) {
    .mobile-menu-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0;
    }

    .navbar {
        padding: 0 1rem;
    }

    .main-content {
        padding: 1rem;
    }

    /* Filter forms responsive */
    .card-body .row.g-3 > [class*="col-"] {
        margin-bottom: 0.75rem;
    }

    /* KPI cards responsive */
    .kpi-card h2 {
        font-size: 1.5rem;
    }

    .kpi-card .card-title {
        font-size: 0.75rem;
    }

    /* Table responsive - show as cards on mobile */
    .table-responsive {
        overflow-x: visible;
    }

    .table-mobile-card .card {
        margin-bottom: 1rem;
    }

    .table-mobile-card .card-body {
        padding: 1rem;
    }

    .table-mobile-card .card-title {
        font-size: 0.875rem;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 0.5rem;
    }

    .table-mobile-card .card-text {
        font-size: 0.875rem;
        color: var(--text-primary);
        margin-bottom: 0.5rem;
    }

    .table-mobile-card .card-text:last-child {
        margin-bottom: 0;
    }

    /* Buttons full width on mobile */
    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-group .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .btn-group .btn:last-child {
        margin-bottom: 0;
    }

    /* Form buttons stack */
    .card-body .row.g-3 .col-md-6 .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .card-body .row.g-3 .col-md-6 .btn:last-child {
        margin-bottom: 0;
    }

    /* Utility classes for mobile */
    .w-md-auto {
        width: auto !important;
    }

    .mt-md-0 {
        margin-top: 0 !important;
    }

    .ms-md-2 {
        margin-left: 0.5rem !important;
    }
}

/* Desktop only - hide mobile card view */
@media (min-width: 768px) {
    .table-mobile-card {
        display: none !important;
    }
}

@media (max-width: 575.98px) {
    h1 {
        font-size: 1.5rem;
    }

    .main-content {
        padding: 0.75rem;
    }

    .card-body {
        padding: 1rem;
    }

    .navbar {
        padding: 0 0.75rem;
        flex-wrap: wrap;
    }

    .navbar-text {
        font-size: 0.8125rem;
        margin-bottom: 0.5rem;
    }

    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Login Page */
body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    max-width: 420px;
    width: 100%;
    padding: 2rem;
}

.login-card .card {
    border: none;
    box-shadow: var(--shadow-lg);
}

.login-card h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

/* Dashboard KPI Cards */
.kpi-card {
    background: linear-gradient(135deg, var(--white) 0%, #f8fafc 100%);
    border-left: 4px solid var(--primary-color);
}

.kpi-card h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

