﻿/* =========================
   GLOBAL UI / ERP THEME
========================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@400;500;600&display=swap');

:root {
    --primary: #3c8dbc;
    --primary-dark: #2f6f95;
    --primary-light: #eaf5fb;
    --success: #00a65a;
    --danger: #dd4b39;
    --warning: #f39c12;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #dce4ec;
    --bg: #f7f9fc;
    --white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.12);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --transition: all .25s ease;
}

/* =========================
   BASE
========================= */
html, body {
    font-family: 'Inter', 'Poppins', sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

/* =========================
   FORM CARDS & SECTIONS (New)
========================= */
.form-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid var(--border);
}

.section-header {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* =========================
   INPUTS (Enhanced)
========================= */
.form-control,
input,
select,
textarea {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    transition: var(--transition);
    box-shadow: none;
}

.form-control {
    height: 34px;
    padding: 6px 12px;
    line-height: 1.4 !important;
}

textarea,
.textarea {
    min-height: 70px;
    resize: vertical;
}

    input:focus,
    select:focus,
    textarea:focus,
    .form-control:focus {
        border-color: var(--primary);
        background: #fff;
        outline: none;
        box-shadow: 0 0 0 4px rgba(60, 141, 188, 0.15);
    }

/* =========================
   LABELS
========================= */
label.control-label {
    font-weight: 500;
    color: #374151;
}

/* =========================
   TABLES, BUTTONS, SCROLLBAR, ALERTS, etc. (Your original styles)
========================= */
.hidden {
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.visible {
    opacity: 1;
    visibility: visible;
    transition: var(--transition);
}

/* Scrollbar */
body::-webkit-scrollbar,
div::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

body::-webkit-scrollbar-track,
div::-webkit-scrollbar-track {
    background: #edf2f7;
    border-radius: 10px;
}

body::-webkit-scrollbar-thumb,
div::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
}

    body::-webkit-scrollbar-thumb:hover,
    div::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(180deg, var(--primary-dark), #245672);
    }

/* Buttons */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition);
}

    .btn:hover {
        transform: translateY(-1px);
        box-shadow: var(--shadow-sm);
    }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff !important;
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff !important;
}

/* Cards / Panels */
.panel,
.info-box,
.account-wall,
.modalPopup {
    background: var(--white);
    border: 1px solid rgba(220, 228, 236, 0.8);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

/* Tables */
.table > thead > tr > th {
    background: #f3f6fa;
    font-weight: 600;
}

/* Other styles remain the same... */
.name-table td {
    padding: 0 5px;
}

.hidden-controls {
    display: none !important;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
    .form-card {
        padding: 18px;
        margin-bottom: 18px;
    }

    .form-control {
        width: 100%;
    }

    .btn {
        width: 100%;
        margin-bottom: 8px;
    }
}


/*
    search

*/
/* Search Header - Centered Buttons */
.search-header {
    display: flex;
    align-items: center;
    justify-content: center; /* Changed to center */
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding: 10px 0;
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center; /* Extra safety for centering */
}

/* Record count on right side (optional) */
.record-count {
    position: absolute;
    right: 20px;
    top: 20px;
    font-weight: 600;
    color: #1e3a8a;
    background: #f0f9ff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
}

/* If you want record count below buttons on mobile */
@media (max-width: 768px) {
    .record-count {
        position: static;
        margin-top: 8px;
    }
}


/*Table*/
/* ====================== TABLE STYLES ====================== */
.table {
    background: #fff;
    margin-bottom: 0;
}

    /* ==================== HEADER ==================== */
    .table tbody tr th {
        background-color: #6b7280 !important; /* ← change this */
        color: #ffffff !important;
        font-weight: 600;
        padding: 12px !important;
        font-size: 13px;
    }
    .table tbody th a {
        color: #ffffff   !important;
    }

    /* ==================== ROWS ==================== */
    .table tbody tr:nth-child(even) {
        background: #f8fafc;
    }

    .table tbody tr:hover {
        background: #e8f4fb !important;
    }

    .table td {
        padding: 10px;
        vertical-align: middle;
        border-top: 1px solid #f1f5f9;
    }

    /* ==================== ACTION LINKS ==================== */
    .table .btn-link {
        color: #3c8dbc;
        font-weight: 500;
        text-decoration: none;
    }

        .table .btn-link:hover {
            color: #286090 !important;
            text-decoration: underline;
        }

#gv td a.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}


/* ====================== CLEAN RDLC REPORT - HEADER + FONTS ONLY ====================== */

table[aria-labelledby],
.ReportViewer table,
div[id*="ReportViewer"] table {
    border-collapse: collapse !important;
    width: 100% !important;
    background: #fff;
}

    /* === Header Row - Your Main Color #3c8dbc === */
    table[aria-labelledby] thead tr th,
    .ReportViewer table thead tr th,
    div[id*="ReportViewer"] table thead tr th {
        background: linear-gradient(to bottom, #3c8dbc, #2a6e96) !important;
        color: #ffffff !important;
        font-weight: 700 !important;
        padding: 12px 10px !important;
        text-align: center !important;
        font-size: 14px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }

    /* === Good Readable Fonts for Whole Report === */
    table[aria-labelledby],
    .ReportViewer table,
    div[id*="ReportViewer"] table,
    table[aria-labelledby] td,
    table[aria-labelledby] th,
    .ReportViewer table td,
    .ReportViewer table th {
        font-family: 'Segoe UI', Arial, Helvetica, sans-serif !important;
        font-size: 13.5px;
        line-height: 1.5;
    }

        /* Right align amount columns */
        table[aria-labelledby] td:last-child,
        .ReportViewer table td:last-child {
            text-align: right !important;
            font-weight: 500;
        }

        /* Optional: Make Total Rows Stand Out */
        table[aria-labelledby] tr:last-child td,
        .ReportViewer table tr:last-child td {
            font-weight: 700 !important;
            background: #f8fafc !important;
        }


/* ===== AutoComplete Dropdown Fix ===== */
.completionList {
    position: absolute !important;
    z-index: 9999 !important;
    background-color: #ffffff;
    border: 1px solid #3c8dbc;
    border-top: 2px solid #3c8dbc;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    max-height: 220px;
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 280px;
    max-width: 480px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.listItem {
    display: block;
    padding: 6px 10px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .listItem:last-child {
        border-bottom: none;
    }

.itemHighlighted {
    background-color: #3c8dbc !important;
    color: #ffffff !important;
}




/* ==================== REPORT VIEWER - MAIN HEADER (2nd Row) ==================== */

/* Main report table */

/* ==================== MAIN HEADER (Second Child Row) ==================== */
table[class*="r10"] tbody tr:nth-child(2) td,
table[id*="10iT0"] tbody tr:nth-child(2) td,
table[id*="10iT0"] tr[id*="tr0"] td { /* Most reliable for your header row */

    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 12px 8px !important;
    font-size: 13px !important;
    text-align: center !important;
    vertical-align: middle !important;
}


/* ==================== DATA ROWS ==================== */
table[class*="r10"] tbody tr:not(:nth-child(2)) td,
table[id*="10iT0"] tbody tr:not(:nth-child(2)) td {
    padding: 10px 8px !important;
    font-size: 13px !important;
    vertical-align: top !important;

}

/*table[id*="10iT0"] tbody tr:nth-child(2) td {
    padding: 10px 8px !important;
    font-size: 13px !important;
    vertical-align: top !important;
    background-color: #6b7280 !important;
    color:white!important;
}
*/
/* Report Title (Product Report) - Optional */
table[role="navigation"] > tbody tr:nth-child(2) td {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    padding: 8px 0;
}

/********WRAPPER******/
body.fixed .wrapper-top {
    margin-top: 50px!important;
}