/* ============================================================
   Module 4 — Master Stylesheet
   ============================================================ */

/* ---- Base ---- */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: #f0f2f5;
    margin: 0;
}

/* ============================================================
   AUTH PAGES
   ============================================================ */
body.auth-page {
    background: #0f0f1a;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    background: #fff;
    border-radius: 14px;
    padding: 45px 40px;
    width: 100%;
    max-width: 430px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
}

.toggle-password {
    border-color: #dee2e6 !important;
}

.toggle-password>i {
    color: #0f0f1a !important;
}


.toggle-password:hover {
    background-color: #0f0f1a !important;
}

.toggle-password:hover i {
    color: #fff !important;
}

.auth-card form input {
    box-shadow: none !important;
}

input[type="checkbox"] {
    box-shadow: none !important;
}

input[type="checkbox"]:focus {
    border-color: #0f0f1a !important;
}

input[type="checkbox"]:checked {
    background-color: #0f0f1a !important;
    border-color: #0f0f1a !important;
}

.auth-card form .btn.btn-auth {
    color: #fff !important;
    background-color: #0f0f1a !important;
}


.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo img {
    filter: invert(1);
    /* height: 52px; */
    margin-bottom: 14px;
}

.auth-logo p {
    color: #777;
    font-size: 0.88rem;
    margin: 0;
}

.auth-card .form-control:focus {
    border-color: #0f0f1a;
    box-shadow: 0 0 0 0.2rem rgba(15, 15, 26, 0.12);
}

.btn-auth {
    background: #0f0f1a;
    color: #fff;
    border: none;
    padding: 12px;
    font-size: 1rem;
    border-radius: 8px;
    width: 100%;
    transition: background 0.2s;
}

.btn-auth:hover {
    background: #1e1e35;
    color: #fff;
}

/* ============================================================
   LAYOUT — SIDEBAR + MAIN
   ============================================================ */
.sidebar {
    width: 240px;
    min-height: 100vh;
    background: #0f0f1a;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand img {
    height: auto;
    height: 38px;
    width: auto;
}

.sidebar-nav {
    flex: 1;
    padding: 10px 0;
    overflow-y: auto;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.18s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-nav a i {
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav .nav-badge {
    margin-left: auto;
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 10px;
}

.sidebar-nav hr {
    border-color: rgba(255, 255, 255, 0.08);
    margin: 8px 20px;
}

.sidebar-nav a.nav-logout {
    color: rgba(220, 53, 69, 0.8);
}

.sidebar-nav a.nav-logout:hover {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.08);
}

.main-content {
    margin-left: 240px;
    padding: 28px 30px;
    min-height: 100vh;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
    background: #fff;
    border-radius: 10px;
    padding: 14px 22px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.topbar h5 {
    margin: 0;
    font-weight: 700;
    font-size: 1.05rem;
}

.topbar small {
    color: #888;
    font-size: 0.78rem;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
}

/* ============================================================
   METRIC CARDS
   ============================================================ */
.metric-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px 18px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #dee2e6;
    position: relative;
    transition: transform 0.18s;
    overflow: hidden;
}

.metric-card:hover {
    transform: translateY(-2px);
}

.metric-card .mc-icon {
    font-size: 2.2rem;
    opacity: 0.40;
    position: absolute;
    right: 16px;
    top: 16px;
}

.metric-card .mc-number {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    word-break: break-word;
    padding-right: 30px;
}

.metric-card .mc-label {
    font-size: 0.72rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-top: 6px;
}

.mc-total {
    border-left-color: #0d6efd;
}

.mc-pending {
    border-left-color: #ffc107;
}

.mc-published {
    border-left-color: #198754;
}

.mc-rejected {
    border-left-color: #dc3545;
}

.mc-admin {
    border-left-color: #6c757d;
}

.mc-duplicate {
    border-left-color: #fd7e14;
}

.mc-failed {
    border-left-color: #212529;
}

.mc-missing {
    border-left-color: #0dcaf0;
}

.mc-sheet {
    border-left-color: #6f42c1;
}

.mc-ready {
    border-left-color: #198754;
}

.mc-ready .mc-number {
    color: #198754;
}

/* ============================================================
   CARDS (generic)
   ============================================================ */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #f0f2f5;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 14px 22px;
    color: #0f0f1a;
    border-radius: 10px !important;
}

.card-body {
    padding: 0;
}

/* ============================================================
   TABLES
   ============================================================ */
.table th {
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    font-weight: 600;
    background: #fafafa;
}

.table td {
    font-size: 0.875rem;
    vertical-align: middle;
}

/* .table-hover tbody tr:hover { background: #f8f9ff; } */

/* ============================================================
   BADGES / STATUS
   ============================================================ */
.status-badge {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    text-align: center;
    min-width: 110px;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-approved {
    background: #cff4fc;
    color: #055160;
}

.status-sent_to_admin {
    background: #e2e3e5;
    color: #383d41;
}

.status-possible_duplicate {
    background: #ffe5d0;
    color: #7d3500;
}

.status-published {
    background: #d1e7dd;
    color: #0a3622;
}

.status-rejected {
    background: #f8d7da;
    color: #58151c;
}

.status-failed {
    background: #212529;
    color: #fff;
}

.status-sheet_updated {
    background: #e0cffc;
    color: #3d0a91;
}

/* ============================================================
   FORMS / IMPORT
   ============================================================ */

.right-side-box {
    position: sticky;
    top: 30px;
}

.event-action-bar>a,
.save-button-box>a {
    color: #333;
}

.event-action-bar>a:hover,
.save-button-box>a:hover {
    color: #fff;
}

.event-action-bar>a {
    border-color: #0f0f1a;
}

.event-action-bar>a.btn-outline-primary:hover {
    background: #0f0f1a;
    border-color: #0f0f1a;
}

.form-section {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

.form-section-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #0f0f1a;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f2f5;
}

/* .input-search-field-box {
    flex: 1;
} */

.action-btn a,
.action-btn button,
.event-send-button-box a {
    color: #0f0f1a !important;
    border-color: #0f0f1a !important;
}

.action-btn a:hover,
.action-btn button:hover,
.event-send-button-box a:hover {
    background: #0f0f1a !important;
    color: #fff !important;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f0f1a;
}

.form-control,
.form-select {
    font-size: 0.875rem;
    border-radius: 7px;
}

.form-control:focus,
.form-select:focus {
    border-color: #0f0f1a;
    box-shadow: 0 0 0 0.2rem rgba(15, 15, 26, 0.1);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    font-size: 0.85rem;
    border-radius: 7px;
}

.btn-primary {
    box-shadow: none !important;
    background: #0f0f1a;
    border-color: #0f0f1a;
}

.btn-primary:hover,
.btn-primary:focus {
    background: #1e1e35 !important;
    border-color: #1e1e35 !important;
}

/* ============================================================
   EVENT DETAIL / REVIEW
   ============================================================ */
.event-review-card {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.event-field-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.event-field-value {
    font-size: 0.9rem;
    color: #222;
    font-weight: 500;
    word-wrap: break-word;
}

.event-field-value a {
    color: #0f0f1a !important;
}

.event-field-value a:hover {
    color: #333 !important;
}

.event-action-bar {
    background: #fff;
    border-radius: 10px;
    padding: 18px 24px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* ============================================================
   ALERTS / FLASH
   ============================================================ */
.flash-message {
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 20px;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #aaa;
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

.empty-state p {
    font-size: 0.9rem;
    margin: 0;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    font-size: 0.85rem;
    gap: 8px;
}

.page-link {
    border-radius: 6px !important;
    margin: 0 2px;
    color: #0f0f1a;
    box-shadow: none;
    outline: none;
}

.page-item.active .page-link {
    background: #0f0f1a;
    border-color: #0f0f1a;
}

.page-link:hover,
.page-link:focus {
    box-shadow: none;
    background: #0f0f1a;
    border-color: #0f0f1a;
    color: #fff;
}

/* Override sidebar logo size */
.sidebar-brand img {
    height: auto !important;
    width: 80%;
    max-width: 160px;
}

/* ---- Metric card color fixes ---- */
.mc-total {
    border-left-color: #0d6efd;
}

.mc-total .mc-number {
    color: #0d6efd;
}

.mc-pending {
    border-left-color: #ffc107;
}

.mc-pending .mc-number {
    color: #ffc107;
}

.mc-published {
    border-left-color: #198754;
}

.mc-published .mc-number {
    color: #198754;
}

.mc-rejected {
    border-left-color: #dc3545;
}

.mc-rejected .mc-number {
    color: #dc3545;
}

.mc-admin {
    border-left-color: #6c757d;
}

.mc-admin .mc-number {
    color: #6c757d;
}

.mc-duplicate {
    border-left-color: #fd7e14;
}

.mc-duplicate .mc-number {
    color: #fd7e14;
}

.mc-failed {
    border-left-color: #212529;
}

.mc-failed .mc-number {
    color: #212529;
}

.mc-missing {
    border-left-color: #0dcaf0;
}

.mc-missing .mc-number {
    color: #0dcaf0;
}

.mc-sheet {
    border-left-color: #6f42c1;
}

.mc-sheet .mc-number {
    color: #6f42c1;
}


.google-sheet-box .form-text {
    font-size: 12px;
    right: 10px;
    position: absolute;
    top: 0;
}

/* Force bold table headers */
.table thead th {
    font-weight: 700 !important;
}

/* Table header color */
.table thead th {
    color: #333 !important;
}



/* Global Table Design */
.table {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 0;
}

/* Header */
.table thead th {
    background: #4f4f4f;
    color: #fff !important;
    font-weight: 600 !important;
    border: none !important;
    padding: 10px 14px;
    font-size: 12px;
    letter-spacing: .3px;
    vertical-align: middle;
}

/* Body */
.table tbody td {
    padding: 12px 16px;
    color: #333;
    border-color: #f1f3f5;
    vertical-align: middle;
    font-size: 0.8rem;
}

/* Zebra Rows */
.table tbody tr:nth-child(even) {
    background: #fafafa;
}

/* Hover Effect */
.table-hover tbody tr:hover {
    background: none !important;
}



/* Smooth Transition */
.table tbody tr td {
    border-bottom: 1px solid #d1d1d1 !important;
    transition: all .25s ease;
}

/* .table tbody tr:last-child td{
    border-bottom:0 !important;
}

 */
/* Badge */
.table .badge {
    border-radius: 30px;
    padding: 8px 12px !important;
    font-weight: 500;
    min-width: 70px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Hamburger button */
.sidebar-toggle {
    display: none;
    width: 100%;
}

.sidebar-toggle button.bars-icon {
    position: fixed;
    top: 12px;
    left: 15px;
    z-index: 5;
}

.sidebar-toggle button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f0f1a;
    color: #fff;
    border: none;
    border-radius: 7px;
    width: 38px;
    height: 38px;
    font-size: 1rem;
    cursor: pointer;
}

.sidebar-toggle button.close-icon {
    display: none;
    position: fixed;
    top: 12px;
    right: 15px;
    z-index: 999;
}

.sidebar-toggle.active button.close-icon {
    display: block;
}

.sidebar-toggle.active button.bars-icon {
    display: none;
}

/* .sidebar-toggle .fa-times{
    display:none;
}

.sidebar-toggle.active .fa-bars{
    display:none;
}

.sidebar-toggle.active .fa-times{
    display:inline-block;
} */

/* Sidebar overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

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

@media (max-width: 991px) {

    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

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

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

    .main-content {
        margin-left: 0;
        padding: 20px 15px;
        padding-top: 60px;
    }

    .topbar {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 15px;
    }

    .metric-card {
        padding: 15px 12px;
    }

    .metric-card .mc-number {
        font-size: 1.5rem;
    }

    .table-responsive {
        overflow-x: auto;
    }

    .form-section {
        padding: 16px;
    }

    .event-action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .event-action-bar .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .topbar h5 {
        font-size: 0.95rem;
    }

    .metric-card .mc-label {
        font-size: 0.65rem;
    }
}

/* Hide less important table columns on mobile */
@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Sidebar toggle close state */
.sidebar.open~.main-content .sidebar-toggle i,
#sidebarToggle.open i {
    content: '\f00d';
}

/* ============================================================
   DATA-LABEL RESPONSIVE TABLE (mobile card layout)
   ============================================================ */

@media (min-width:1200px) and (max-width:1299.98px) {

    .table thead th,
    .table tbody td {
        padding: 7px 10px;
        font-size: 10px;
    }
}


@media (min-width:768px) and (max-width:1199.98px) {
    /* ==========================
   Responsive Table
========================== */

    table .hide-mobile {
        display: block !important;
    }

    .card {
        background-color: #fff;
    }

    table .action-btn,
    .event-send-button-box {
        justify-content: flex-end;
    }

    .table thead {
        display: none;
    }

    .table,
    .table tbody,
    .table tr,
    .table td {
        display: block;
        width: 100%;
    }

    .table td {
        position: relative;
        text-align: right;
        border: none;
        min-height: 45px;
    }

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

    .table td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        font-weight: 600;
        color: #333 !important;
    }

}

@media (min-width:768px) and (max-width:991.98px) {
    .google-sheet-box .form-text {
        font-size: 11px;
    }
}

@media (max-width: 767px) {


    /* ==========================
   Responsive Table
========================== */

    table .hide-mobile {
        display: block !important;
    }

    .card {
        background-color: #fff;
    }

    table .action-btn,
    .event-send-button-box {
        justify-content: flex-end;
    }

    .table thead {
        display: none;
    }

    .table,
    .table tbody,
    .table tr,
    .table td {
        display: block;
        width: 100%;
    }

    .table td {
        position: relative;
        text-align: right;
        border: none;
        min-height: 45px;
    }

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

    .table td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        font-weight: 600;
        color: #333 !important;
    }

    .workflow-section-box .workflow-inner-box {
        flex-direction: column;
    }

    .workflow-section-box .workflow-inner-box .arrow-icon {
        justify-content: center;
        align-items: center;
        transform: rotate(90deg);
    }

    .google-sheet-box .form-text {
        position: unset;
    }

    .auth-card {
        margin: auto 15px;
        padding: 30px;
    }

    .empty-state i {
        font-size: 1.7rem;
    }

    .button-box {
        width: 100%;
    }

    .button-box button {
        flex: 1;
    }

    .pagination-main-box {
        flex-wrap: wrap;
        justify-content: center !important;
        gap: 15px;
    }
}


/* Users action column */
.table .action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: nowrap;
    align-items: center;
}

/* Dashboard tables */
.dashboard-table td,
.dashboard-table th {
    white-space: nowrap;
}

.matched-fields-box {
    display: flex;
    flex-wrap: wrap;
    align-items: start;
    justify-content: start;
    width: fit-content;
    gap: 10px;
}

#mappingSection select.form-select {
    padding: 8px 12px;
    box-shadow: none;
}

.form-control:focus,
.form-select:focus {
    box-shadow: none;
}

.ready-upload-cards .profile-box {
    font-weight: 600;
    font-size: 0.9rem;
    color: #0f0f1a;
    border-bottom: 1px solid #f0f2f5;
    border-radius: 10px 10px 0 0;
}

.ready-upload-cards .card-view-btn {
    border-radius: 0 0 10px 10px;
}

.ready-upload-cards .profile-icon {
    color: #888;
    font-size: 0.78rem;
}

.ready-upload-cards .card-content-box div {
    font-weight: 400;
    font-size: 0.9rem;
    color: #0f0f1a;
}

.ready-upload-cards .card-content-box div a {
    color: inherit;
    font-weight: 500;
}

.ready-modal-popup .modal-header {
    background: #0f0f1a;
    color: #fff;
}

.ready-modal-popup .alert-info {
    color: #0f0f1a !important;
    background-color: var(--bs-secondary-bg) !important;
    border-color: #0f0f1a !important;
}

.ready-modal-popup .batch-data-info .content-info h6{
    font-weight: 600;
    font-size: 0.9rem;
    color: #0f0f1a;
}

.ready-modal-popup .batch-data-info .content-info small{
    color: #888;
    font-size: 0.78rem;
}

@media (min-width:1200px) and (max-width:1359.98px) {

    .search-filter-box .field-boxes a,
    .search-filter-box .field-boxes button {
        font-size: 10px;
    }
}

/* ========== Global CSS =============== */

.select2-container--default .select2-selection--multiple {
    border: var(--bs-border-width) solid var(--bs-border-color) !important;
    font-weight: 400 !important; 
    line-height: 1.5 !important;
    color: var(--bs-body-color) !important;
    background-color: var(--bs-body-bg) !important;
    font-size: 0.875rem !important;
    border-radius: 7px !important;
    padding-bottom: 0 !important;
    padding-left: 5px !important;
}

/* Selected tag */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    display: inline-flex !important;
    align-items: center !important;
    border: none !important;
        background: #0f0f1a !important;
    color: #fff !important;
    outline: none !important;
    border-radius: 5px !important;
    padding: 0 !important;
    margin: 5px 4px 5px 0 !important;
}

/* Cross */
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    position: static !important;
       color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 24px !important;
    width: 24px !important;
    height: 30px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-right: 1px solid rgba(255,255,255,0.25) !important;
    background: transparent !important;
    font-size: 16px !important;
    line-height: 1 !important;
    cursor: pointer !important;
}

/* Text */
.select2-container--default .select2-selection--multiple .select2-selection__choice__display {
    display: block !important;
    padding: 5px 8px !important;
    white-space: nowrap;
       color: #fff !important;
}

/* Cross hover */
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    background: transparent !important;
       color: #fff !important;
}

.select2-container--default .select2-results__options {
    background: #fff;
    padding: 4px 0 !important;
    max-height: 250px !important;
}

/* Dropdown option */
.select2-container--default .select2-results__option {
    padding: 9px 10px !important;
    font-size: 16px;
    line-height: 1.4;
    color: #252525;
    background: #fff;
    cursor: pointer;
}

/* Hover / highlighted */
.select2-container--default .select2-results__option--highlighted {
    background: #0f0f1a !important;
    color: #fff !important;
}

/* Selected option */
.select2-container--default .select2-results__option--selected {
    background: #f1f1f1;
    color: #252525;
}

/* Selected + highlighted */
.select2-container--default .select2-results__option--selected.select2-results__option--highlighted {
    background: #0f0f1a !important;
    color: #fff !important;
}

/* Dropdown box */
.select2-container--default .select2-dropdown {
    border: 1px solid #d9d9d9 !important;
    border-radius: 0 0 7px 7px !important;
    overflow: hidden;
}

/* Scrollbar */
.select2-container--default .select2-results__options::-webkit-scrollbar {
    width: 8px;
}

.select2-container--default .select2-results__options::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.select2-container--default .select2-results__options::-webkit-scrollbar-thumb {
    background: #999;
    border-radius: 10px;
}

.select2-container--default .select2-results__options::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* ========== Global CSS =============== */