/* Flexr Admin Panel - Dark Mode Theme */

/* ═══════════════════════════════════ */
/* DARK MODE OVERRIDES                */
/* ═══════════════════════════════════ */

/* Body & Content */
.dark-mode .content-wrapper {
    background-color: #1a1d21;
}
.dark-mode .main-header {
    background-color: #1e2227;
    border-bottom: 1px solid #2c3038;
}
.dark-mode .main-footer {
    background-color: #1e2227;
    border-top: 1px solid #2c3038;
    color: #6c757d;
}

/* Cards */
.dark-mode .card {
    background-color: #212529;
    border-color: #2c3038;
}
.dark-mode .card-header {
    border-bottom-color: #2c3038;
}
.dark-mode .card-outline {
    border-top-width: 3px;
}
.dark-mode .bg-light {
    background-color: #2c3038 !important;
    color: #e0e0e0;
}

/* Tables */
.dark-mode .table {
    color: #c4c9ce;
}
.dark-mode .table-hover tbody tr:hover {
    background-color: rgba(255,255,255,0.05);
}
.dark-mode .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255,255,255,0.03);
}
.dark-mode .table th {
    border-top-color: #2c3038;
    border-bottom-color: #2c3038;
    color: #8b929a;
}
.dark-mode .table td {
    border-top-color: #2c3038;
}

/* Tabs */
.dark-mode .nav-tabs {
    border-bottom-color: #2c3038;
}
.dark-mode .nav-tabs .nav-link {
    color: #8b929a;
}
.dark-mode .nav-tabs .nav-link:hover {
    border-color: #2c3038;
    color: #e0e0e0;
}
.dark-mode .nav-tabs .nav-link.active {
    background-color: #212529;
    border-color: #2c3038 #2c3038 #212529;
    color: #fff;
}

/* Forms */
.dark-mode .form-control {
    background-color: #2c3038;
    border-color: #3a3f47;
    color: #e0e0e0;
}
.dark-mode .form-control:focus {
    background-color: #343a40;
    border-color: #007bff;
    color: #fff;
}
.dark-mode .form-control::placeholder {
    color: #6c757d;
}
.dark-mode .input-group-text {
    background-color: #2c3038;
    border-color: #3a3f47;
    color: #adb5bd;
}

/* Pagination */
.dark-mode .page-link {
    background-color: #2c3038;
    border-color: #3a3f47;
    color: #8b929a;
}
.dark-mode .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}
.dark-mode .page-item.disabled .page-link {
    background-color: #1e2227;
    border-color: #2c3038;
    color: #4a4f57;
}

/* Breadcrumbs */
.dark-mode .breadcrumb {
    background-color: transparent;
}
.dark-mode .breadcrumb-item a {
    color: #8b929a;
}
.dark-mode .breadcrumb-item.active {
    color: #e0e0e0;
}

/* Alerts */
.dark-mode .alert-success {
    background-color: rgba(40, 167, 69, 0.15);
    border-color: rgba(40, 167, 69, 0.3);
    color: #75d89a;
}
.dark-mode .alert-danger {
    background-color: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.3);
    color: #e88a93;
}
.dark-mode .alert-warning {
    background-color: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.3);
    color: #f0d262;
}

/* ═══════════════════════════════════ */
/* SIDEBAR                            */
/* ═══════════════════════════════════ */

.brand-link {
    border-bottom: 1px solid #4b545c;
}
.brand-link .brand-text {
    font-weight: 600;
}

/* ═══════════════════════════════════ */
/* DASHBOARD STAT CARDS               */
/* ═══════════════════════════════════ */

.small-box .inner h3 {
    font-size: 2.2rem;
    font-weight: 700;
}
.small-box .inner p {
    font-size: 1rem;
}
.small-box:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
    box-shadow: 0 4px 25px rgba(0,0,0,0.4);
}

/* ═══════════════════════════════════ */
/* TABLE IMPROVEMENTS                 */
/* ═══════════════════════════════════ */

.table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ═══════════════════════════════════ */
/* STATUS BADGES                      */
/* ═══════════════════════════════════ */

.badge-open { background-color: #007bff; color: #fff; }
.badge-active { background-color: #17a2b8; color: #fff; }
.badge-ongoing { background-color: #ffc107; color: #1a1d21; }
.badge-completed { background-color: #28a745; color: #fff; }
.badge-cancelled { background-color: #dc3545; color: #fff; }
.badge-disputed { background-color: #e83e8c; color: #fff; }
.badge-approved { background-color: #20c997; color: #fff; }
.badge-pending { background-color: #fd7e14; color: #fff; }
.badge-fixed-price { background-color: #6f42c1; color: #fff; }
.badge-estimate { background-color: #17a2b8; color: #fff; }

/* ═══════════════════════════════════ */
/* CHAT STYLES                        */
/* ═══════════════════════════════════ */

.chat-messages {
    max-height: 600px;
    overflow-y: auto;
    padding: 20px;
    background-color: #1a1d21;
    border-radius: 8px;
}
.chat-message {
    margin-bottom: 12px;
    padding: 10px 15px;
    border-radius: 16px;
    max-width: 70%;
    position: relative;
}
.chat-message.sent {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}
.chat-message.received {
    background-color: #2c3038;
    color: #e0e0e0;
    border-bottom-left-radius: 4px;
}
.chat-message.admin-msg {
    background: linear-gradient(135deg, #6f42c1, #5a2d91);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}
.chat-message .sender {
    font-weight: 600;
    font-size: 0.75rem;
    margin-bottom: 4px;
    opacity: 0.8;
}
.chat-message .timestamp {
    font-size: 0.7rem;
    opacity: 0.6;
    margin-top: 4px;
}
.chat-input-area {
    border-top: 1px solid #2c3038;
    padding: 15px;
    background-color: #212529;
}

/* ═══════════════════════════════════ */
/* PRICING DISPLAY                    */
/* ═══════════════════════════════════ */

.price-fixed {
    color: #b07dff;
    font-weight: 700;
}
.price-estimate {
    color: #5bc0de;
    font-weight: 700;
}

/* ═══════════════════════════════════ */
/* JOB DETAIL CARDS                   */
/* ═══════════════════════════════════ */

.info-card {
    border-left: 4px solid #007bff;
}
.info-card.client { border-left-color: #28a745; }
.info-card.pro { border-left-color: #6f42c1; }
.info-card.pricing { border-left-color: #ffc107; }

/* ═══════════════════════════════════ */
/* VERIFICATION BADGES                */
/* ═══════════════════════════════════ */

.verification-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin: 2px;
    font-weight: 500;
}
.verification-badge.approved {
    background-color: rgba(40, 167, 69, 0.2);
    color: #75d89a;
    border: 1px solid rgba(40, 167, 69, 0.3);
}
.verification-badge.pending {
    background-color: rgba(255, 193, 7, 0.15);
    color: #f0d262;
    border: 1px solid rgba(255, 193, 7, 0.3);
}
.verification-badge.rejected {
    background-color: rgba(220, 53, 69, 0.15);
    color: #e88a93;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* ═══════════════════════════════════ */
/* LOGIN PAGE                         */
/* ═══════════════════════════════════ */

.login-page {
    background: linear-gradient(135deg, #1a1d21 0%, #2c3038 50%, #1a1d21 100%);
}
.login-box {
    width: 420px;
}
.login-card-body {
    border-radius: 12px;
    padding: 35px;
    background-color: #212529;
    border: 1px solid #2c3038;
}
.dark-mode .login-card-body .form-control {
    background-color: #2c3038;
    border-color: #3a3f47;
    color: #e0e0e0;
}
.login-page .card {
    border: 1px solid #2c3038;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

/* ═══════════════════════════════════ */
/* ADMIN INFORMATION SYSTEM           */
/* ═══════════════════════════════════ */

:root {
    --admin-bg: #0d1117;
    --admin-surface: #151b23;
    --admin-surface-2: #1b2430;
    --admin-border: rgba(255,255,255,.075);
    --admin-text: #eef3f8;
    --admin-muted: #91a0af;
    --admin-blue: #38bdf8;
    --admin-green: #22c55e;
    --admin-amber: #f59e0b;
    --admin-red: #ef4444;
}

body {
    font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--admin-text);
}

.dark-mode .content-wrapper {
    background:
        radial-gradient(circle at 82% -10%, rgba(56,189,248,.07), transparent 28rem),
        var(--admin-bg);
}

.content-header {
    padding: 1.25rem 1rem .75rem;
}

.content-header h1 {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -.025em;
}

.dark-mode .card {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,.16);
    overflow: hidden;
}

.dark-mode .card-header {
    background: rgba(255,255,255,.012);
    padding: .9rem 1rem;
}

.card-title {
    font-weight: 650;
    letter-spacing: -.01em;
}

.dark-mode .table thead th {
    background: rgba(255,255,255,.018);
    border-bottom: 1px solid var(--admin-border);
}

.dark-mode .table td {
    vertical-align: middle;
}

.btn {
    border-radius: 7px;
    font-weight: 600;
}

.form-control {
    border-radius: 7px;
}

.main-sidebar {
    background: #10161e;
}

.brand-link {
    height: 58px;
    display: flex;
    align-items: center;
    background: rgba(0,0,0,.14);
    border-color: var(--admin-border) !important;
}

.brand-link .brand-text {
    letter-spacing: -.02em;
}

.nav-sidebar .nav-header {
    padding: 1.2rem 1rem .35rem;
    color: #657586;
    font-size: .67rem;
    font-weight: 800;
    letter-spacing: .13em;
}

.nav-sidebar .nav-link {
    margin: 2px 8px;
    width: auto;
    border-radius: 8px;
    color: #aeb9c5;
}

.nav-sidebar .nav-link p {
    font-weight: 550;
}

.nav-sidebar .nav-link.active {
    color: #fff !important;
    background: linear-gradient(135deg, #0f6f9c, #135d82) !important;
    box-shadow: 0 7px 18px rgba(2,132,199,.2) !important;
}

.nav-treeview .nav-link {
    font-size: .93rem;
}

.main-header {
    min-height: 58px;
}

.admin-page-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.35rem 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(56,189,248,.16);
    border-radius: 14px;
    background:
        linear-gradient(110deg, rgba(56,189,248,.10), rgba(34,197,94,.035)),
        var(--admin-surface);
}

.admin-page-intro h2 {
    margin: .15rem 0 .2rem;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -.025em;
}

.admin-page-intro p {
    max-width: 850px;
    margin: 0;
    color: var(--admin-muted);
    line-height: 1.45;
}

.eyebrow {
    color: var(--admin-blue);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .14em;
}

.metric-card {
    min-height: 132px;
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--admin-border);
    border-left: 4px solid #64748b;
    border-radius: 11px;
    background: var(--admin-surface);
    box-shadow: 0 10px 24px rgba(0,0,0,.14);
}

.metric-card-success { border-left-color: var(--admin-green); }
.metric-card-warning { border-left-color: var(--admin-amber); }
.metric-card-primary { border-left-color: var(--admin-blue); }
.metric-card-danger { border-left-color: var(--admin-red); }
.metric-card-muted { border-left-color: #64748b; }

.metric-label {
    color: var(--admin-muted);
    font-size: .76rem;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.metric-value {
    margin: .25rem 0 .05rem;
    font-size: 2rem;
    font-weight: 750;
    letter-spacing: -.04em;
}

.metric-note {
    color: var(--admin-muted);
    font-size: .82rem;
}

.truth-stat {
    padding: .7rem 1rem;
    border-right: 1px solid var(--admin-border);
}

.truth-stat:last-child {
    border-right: 0;
}

.truth-stat span,
.truth-stat strong {
    display: block;
}

.truth-stat span {
    color: var(--admin-muted);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.truth-stat strong {
    margin-top: .15rem;
    font-size: 1.25rem;
}

.data-confidence {
    padding: .65rem .8rem;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    color: var(--admin-muted);
    background: rgba(255,255,255,.018);
}

.data-confidence.is-good {
    color: #86efac;
    border-color: rgba(34,197,94,.24);
    background: rgba(34,197,94,.06);
}

.data-confidence.is-warning {
    color: #fcd34d;
    border-color: rgba(245,158,11,.25);
    background: rgba(245,158,11,.06);
}

.global-search-heading {
    padding: 8px 11px 5px;
    color: #718096;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .12em;
    background: #161d26;
}

.global-search-result {
    display: flex;
    align-items: center;
    padding: 9px 11px;
    border-bottom: 1px solid var(--admin-border);
    color: #e8edf2;
    text-decoration: none;
}

.global-search-result:hover {
    color: #fff;
    text-decoration: none;
    background: #303a46;
}

.global-search-result > span:last-child {
    min-width: 0;
}

.global-search-result strong,
.global-search-result small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-search-result small {
    color: #8e9aa7;
}

.global-search-icon {
    width: 36px;
    margin-right: 10px;
    color: var(--admin-blue);
    text-align: center;
}

@media (max-width: 767px) {
    .admin-page-intro {
        align-items: flex-start;
        flex-direction: column;
        padding: 1rem;
    }
    .truth-stat {
        border-right: 0;
        border-bottom: 1px solid var(--admin-border);
    }
    .content-header h1 {
        font-size: 1.3rem;
    }
}

/* ═══════════════════════════════════ */
/* TAB NAV                            */
/* ═══════════════════════════════════ */

.nav-tabs .nav-link.active {
    font-weight: 600;
}
.tab-count {
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 1px 6px;
    font-size: 0.7rem;
    margin-left: 5px;
}

/* ═══════════════════════════════════ */
/* TIMELINE                           */
/* ═══════════════════════════════════ */

.timeline-item {
    border-left: 2px solid #2c3038;
    padding: 10px 20px;
    position: relative;
}
.timeline-item::before {
    content: '';
    width: 12px;
    height: 12px;
    background: #007bff;
    border-radius: 50%;
    position: absolute;
    left: -7px;
    top: 15px;
}

/* ═══════════════════════════════════ */
/* BUTTONS                            */
/* ═══════════════════════════════════ */

.btn-action {
    margin: 2px;
}
.btn-outline-primary:hover,
.btn-outline-info:hover,
.btn-outline-success:hover {
    color: #fff;
}

/* ═══════════════════════════════════ */
/* RESPONSIVE                         */
/* ═══════════════════════════════════ */

@media (max-width: 768px) {
    .small-box .inner h3 {
        font-size: 1.5rem;
    }
}
