/* ==========================================================================
   1. CORE ARCHITECTURAL SYSTEM DESIGN & VARIABLES
   ========================================================================== */
:root {
    --primary: #e94b35;          /* Signature Crimson Red */
    --primary-hover: #cf3d29;
    --primary-bg: #fdf1ef;
    
    /* Pristine White Sidebar Variable Config */
    --sidebar-bg: #ffffff;
    --sidebar-border: #f2f4f7;
    --sidebar-text: #475467;
    --sidebar-text-active: #101828;
    --sidebar-hover-bg: #f9fafb;
    
    /* Core Canvas Layout Parameters */
    --white: #ffffff;
    --light-bg: #fcfcfd;
    --border: #eaecf0;
    --text-dark: #101828;
    --text-muted: #667085;
    --card-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    
    /* Functional Layout Variables */
    --success: #28a745;
    --success-bg: #ecfdf3;
    --danger: #dc3545;
    --danger-bg: #fef3f2;
    --warning: #dc6803;
    --warning-bg: #fffaeb;
    
    --font-stack: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ==========================================================================
   2. GLOBAL INTERFACE INITIALIZATION
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-stack);
}

body {
    background-color: var(--light-bg);
    color: var(--text-dark);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    margin: 20px;
}

.w-auto {
    width: auto;
}
.h-10 {
    height: 2.5rem;
}

/* ==========================================================================
   3. SIDEBAR COMPONENT (PRECISE MATCH TO SCREENSHOT)
   ========================================================================== */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    border-right: 1px solid var(--sidebar-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
    padding: 30px 24px;
    border-bottom: 1px solid var(--sidebar-border);
}

.brand-logo {
    color: var(--text-dark);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.brand-subtext {
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.brand-version {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    margin-top: 8px;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 12px;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-menu li {
    margin-bottom: 4px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.sidebar-menu li a i:first-child {
    margin-right: 14px;
    font-size: 16px;
    width: 20px;
    color: var(--text-muted);
}

.sidebar-menu li a .arrow-indicator {
    margin-left: auto;
    font-size: 10px;
    color: #98a2b3;
    transition: transform 0.2s ease;
}

/* Sidebar Dashboard Active Item Look */
.sidebar-menu li.active a {
    background-color: #101828;
    color: var(--white);
    font-weight: 600;
}

.sidebar-menu li.active a i:first-child {
    color: var(--white);
}

.sidebar-menu li.active a .arrow-indicator {
    color: var(--white);
}

/* Secondary Item Hover Actions */
.sidebar-menu li:not(.active) a:hover {
    background-color: var(--sidebar-hover-bg);
    color: var(--sidebar-text-active);
}

/* Profile Metadata Widget Footer */
.sidebar-user-footer {
    padding: 20px 16px;
    border-top: 1px solid var(--sidebar-border);
    background-color: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-profile-summary {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-badge {
    width: 36px;
    height: 36px;
    background-color: var(--primary);
    color: var(--white);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
}

.user-metadata {
    flex-grow: 1;
    overflow: hidden;
}

.user-display-name {
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 600;
}

.user-display-email {
    color: var(--text-muted);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-logout-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 8px;
    transition: color 0.2s;
}

.sidebar-logout-trigger:hover {
    color: var(--primary);
}

/* ==========================================================================
   4. SYSTEM CANVAS STRUCTURE & HEADER BAR
   ========================================================================== */
.main-content {
    margin-left: 260px;
    flex-grow: 1;
    padding: 40px;
    min-height: 100vh;
    width: calc(100% - 260px);
    transition: all 0.3s ease;
}

.topbar {
    height: 70px;
    background-color: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    margin: -40px -40px 40px -40px; /* Aligns seamless layout boundaries */
}

.content-body {
    width: 100%;
}

.workspace-breadcrumbs {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.dashboard-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 15px;
}

.dashboard-title-row h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.dashboard-title-row p {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

.action-btn-group {
    display: flex;
    gap: 12px;
}

/* ==========================================================================
   5. DASHBOARD STATISTICAL CORE GRID MODALITY
   ========================================================================== */
.analytics-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.metric-card-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.metric-label-heading {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-numerical-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 14px;
    letter-spacing: -0.5px;
}

.metric-subtext-detail {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.metric-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background-color: #f9fafb;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* Active Highlight Color Styling mapping screenshot */
.metric-card-box:nth-child(1) .metric-icon-box { background-color: #fce9e6; color: var(--primary); }
.metric-card-box:nth-child(2) .metric-icon-box { background-color: #f2f4f7; color: #475467; }
.metric-card-box:nth-child(3) .metric-icon-box { background-color: #f2f4f7; color: #475467; }
.metric-card-box:nth-child(4) .metric-icon-box { background-color: #f2f4f7; color: #475467; }

/* ==========================================================================
   6. SPLIT DISPLAY MODULES (CHARTS & FEED LOGS)
   ========================================================================== */
.workspace-split-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

/* Professional White Layout Framework Card Units */
.content-card-panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    box-shadow: var(--card-shadow);
}

.card-panel-header {
    margin-bottom: 24px;
}

.card-panel-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-panel-heading {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 4px;
}

/* Chart Distribution Container Layouts */
.chart-placeholder-container {
    height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.donut-chart-mock {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: conic-gradient(var(--primary) 0% 60%, #101828 60% 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donut-chart-mock::before {
    content: '';
    position: absolute;
    width: 105px;
    height: 105px;
    background-color: var(--white);
    border-radius: 50%;
}

.chart-legend-box {
    display: flex;
    gap: 16px;
    margin-top: 30px;
    font-size: 13px;
    font-weight: 500;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}
.dot-construction { background-color: #101828; }
.dot-planning { background-color: var(--primary); }

/* System Action Log Activity Feed */
.activity-logs-container {
    max-height: 270px;
    overflow-y: auto;
    padding-right: 4px;
}

.activity-logs-feed {
    list-style: none;
}

.feed-item-row {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.feed-item-row:last-child {
    border-bottom: none;
}

.status-dot-indicator {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.feed-item-content {
    flex: 1;
}

.feed-item-text {
    font-size: 13px;
    color: #344054;
    line-height: 1.4;
}

.feed-item-text span {
    font-weight: 600;
    color: var(--text-dark);
}

.feed-item-timestamp {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ==========================================================================
   7. FOOTER QUICK NAV SECTIONS 
   ========================================================================== */
.quick-navigation-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.nav-matrix-anchor {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    text-decoration: none;
    color: var(--text-dark);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    box-shadow: var(--card-shadow);
    transition: all 0.2s ease;
}

.nav-matrix-anchor:hover {
    border-color: #cbd5e1;
    background-color: var(--sidebar-hover-bg);
}

.matrix-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.matrix-counter {
    font-size: 24px;
    font-weight: 700;
    margin-top: 8px;
    color: var(--text-dark);
}

.matrix-arrow-icon {
    font-size: 12px;
    color: #98a2b3;
    margin-bottom: 6px;
}

/* ==========================================================================
   8. SECONDARY MANAGING WORKSPACES STYLING (PRESERVED & CORRECTED)
   ========================================================================== */
.card {
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
    overflow: hidden;
}

.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    color: var(--text-dark);
    font-size: 16px;
    font-weight: 700;
    background: var(--white);
}

.card-body { 
    padding: 24px; 
}



.padding-24 { 
    padding: 24px; 
}



/* Data Table Presentation Engine */
.table-responsive { 
    width: 100%; 
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch;
}

table { 
    width: 100%; 
    border-collapse: collapse; 
}

th { 
    background-color: #f9fafb; 
    color: var(--text-muted); 
    font-weight: 700; 
    text-align: left; 
    padding: 14px 20px; 
    font-size: 12px; 
    text-transform: uppercase;
    border-bottom: 2px solid var(--border); 
}

td { 
    padding: 16px 20px; 
    border-bottom: 1px solid var(--border); 
    font-size: 14px; 
    color: #344054; 
    vertical-align: middle; 
}

tr:hover td { 
    background-color: var(--sidebar-hover-bg); 
}

/* Input Form Controls Layouts */
.form-row { 
    display: flex; 
    gap: 20px; 
    margin-bottom: 18px; 
    flex-wrap: wrap; 
}

.form-group { 
    flex: 1; 
    min-width: 200px; 
    display: flex; 
    flex-direction: column; 
    gap: 6px; 
}

.form-group label { 
    font-size: 12px; 
    font-weight: 700; 
    color: var(--text-muted); 
    text-transform: uppercase; 
}

.form-control {
    width: 100%;
    height: 42px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--white);
    font-size: 14px;
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.15s ease;
}

.form-control:focus { 
    border-color: var(--primary); 
}
#serviceGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.service-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
    background-color: var(--white);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.service-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.service-card.selected {
    border-color: var(--primary);
    background-color: var(--primary-bg);
    box-shadow: 0 0 0 1px var(--primary);
}

.service-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.service-card-header input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.service-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    flex-grow: 1;
}

.service-rate-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.service-rate-wrapper label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.rate-input-card {
    width: 100%;
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background-color: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.rate-input-card:focus {
    border-color: var(--primary);
}
.summary-box {
    width: 320px; 
    margin-left: auto; /* Aligns the box to the right side */
    padding: 20px;
    border-top: 2px solid #eaecf0;
    margin-top: 20px;
    background:#f8f9fa; 
    border-radius:6px;
    max-width:350px;
}

/* Individual rows for clean alignment */
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 16px; /* Slightly larger base font size */
    color: #475467;
}

/* Specific styling for the Total row to make it prominent */
.total-row {
    border-top: 1px solid #eaecf0;
    margin-top: 10px;
    padding-top: 15px;
    font-weight: 700; /* Bold */
    font-size: 20px;  /* Larger font size for the final total */
    color: #e94b35;   /* Primary brand color */
}

.total-row span {
    font-weight: 800;
}

.calculation-summary-block {
    background: #fcfcfd;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.summary-total-row {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eaecf0;
    font-size: 18px;
    font-weight: 700;
}

/* Unified Layout Control Buttons */
.btn { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px; 
    padding: 10px 20px; 
    border-radius: 6px; 
    font-weight: 600; 
    font-size: 13px; 
    cursor: pointer; 
    border: 1px solid transparent; 
    text-decoration: none; 
    transition: background-color 0.15s ease; 
}

.btn-primary { background-color: var(--primary); color: var(--white); }
.btn-primary:hover { background-color: var(--primary-hover); }
.btn-secondary { background-color: var(--white); color: var(--text-dark); border-color: var(--border); box-shadow: var(--card-shadow); }
.btn-secondary:hover { background-color: var(--sidebar-hover-bg); }
.btn-success { background-color: var(--success); color: var(--white); }
.btn-danger { background-color: var(--danger); color: var(--white); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 4px; }

.btn-info {
    color: #b82d18;            /* Dark primary tone for crisp legibility */
    background-color: #fcece9; /* Soft tint derived from #e94b35 */
    border-color: #f7ccc5;     /* Subtle matching border */
}

.btn-info:hover {
    color: #ffffff;            /* White text on hover */
    background-color: #e94b35; /* Your Primary Color */
    border-color: #e94b35;
    box-shadow: 0 4px 10px rgba(233, 75, 53, 0.3); /* Primary glow */
}

.btn-blueprint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.btn-blueprint-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-blueprint-primary:hover {
    background-color: #d13d28;
}

.btn-blueprint-outline {
    background-color: var(--white);
    color: var(--text-dark);
    border-color: var(--border);
    box-shadow: var(--card-shadow);
}

.btn-blueprint-outline:hover {
    background-color: var(--light-bg);
}

/* Feedback Status Alerts */
.alert { padding: 14px 20px; border-radius: 6px; margin-bottom: 24px; font-size: 14px; font-weight: 500; }
.alert-success { background: var(--success-bg); color: #039855; border: 1px solid #b4eed0; }
.alert-danger { background: var(--danger-bg); color: #d92d20; border: 1px solid #f8b4b4; }

/* Secure Gateway Session Auth Styling */
.login-view-wrapper {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-bg);
}

.login-structural-card {
    width: 420px;
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.login-branding-header {
    background: #111418;
    padding: 35px 30px;
    text-align: center;
    border-bottom: 4px solid var(--primary);
}

.login-branding-header i { font-size: 36px; color: var(--primary); margin-bottom: 12px; }
.login-branding-header h2 { color: var(--white); font-size: 18px; font-weight: 800; letter-spacing: 1px; }
.login-branding-header p { color: var(--text-muted); font-size: 12px; margin-top: 5px; }
.login-form-body { padding: 35px 30px; }
.login-form-body .form-group { margin-bottom: 20px; }

/* ==========================================================================
   9. MOBILE & TABLET DURABILITY BREAKPOINTS
   ========================================================================== */
.mobile-toggle-btn {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    background-color: var(--white);
    color: var(--text-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    z-index: 1100;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: var(--card-shadow);
}

@media (max-width: 1200px) {
    .analytics-metrics-grid,
    .quick-navigation-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
    }
}

@media (max-width: 600px) {
    .services-grid {
        grid-template-columns: 1fr; /* 1 column on mobile */
    }
}

@media (max-width: 992px) {
    .workspace-split-row {
        grid-template-columns: 1fr;
    }
   .sidebar {
        position: fixed;
        top: 0;
        left: -280px; /* Hidden off-screen by default */
        width: 280px;
        height: 100vh;
        z-index: 1000; /* High z-index ensures it sits completely over the toggle button */
        transition: transform 0.3s ease, left 0.3s ease;
        box-shadow: none;
    }

    /* 3. When the sidebar becomes active */
    .sidebar.active {
        left: 0;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    }
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 24px 16px;
        padding-top: 75px;
    }
    .topbar {
        margin: -24px -16px 24px -16px;
        padding: 0 16px 0 60px;
    }
    .mobile-toggle-btn {
        display: flex;
    }

    .mobile-toggle-btn {
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 99; /* Higher than main content, but lower than an active sidebar */
        background: #e94b35; /* Using your brand primary color */
        color: #fff;
        border: none;
        padding: 10px 14px;
        border-radius: 6px;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        transition: all 0.3s ease;
    }
}

@media (max-width: 576px) {
    .analytics-metrics-grid,
    .quick-navigation-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-title-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .action-btn-group {
        width: 100%;
        margin-top: 10px;
    }
    .action-btn-group .btn {
        flex-grow: 1;
    }
    .form-row {
        flex-direction: column;
        gap: 14px;
    }
    .form-group {
        width: 100%;
    }
}

/* ==========================================================================
   10. INDEX / DASHBOARD COMPONENT EXTENDED STYLES
   ========================================================================== */

/* Page Header Title Row */
.dashboard-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.dashboard-header-title {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
}

.dashboard-header-subtext {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: #64748b;
}

.dashboard-action-btns {
    display: flex;
    gap: 10px;
}

/* Button Custom Modifiers */
.btn-dash-primary {
    background-color: #e94b35;
    border-color: #e94b35;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-dash-secondary {
    background-color: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Extended Analytics Cards Grid */
.dashboard-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}

.dashboard-metric-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.dashboard-metric-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.dashboard-metric-value {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    margin: 6px 0 2px 0;
}

.dashboard-metric-subtext {
    font-size: 12px;
    color: #94a3b8;
}

.dashboard-metric-icon {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* Metric Icon Color Variants */
.icon-active-projects { background: #eff6ff; color: #2563eb; }
.icon-received { background: #f0fdf4; color: #16a34a; }
.icon-pending { background: #fef2f2; color: #dc2626; }
.icon-billed { background: #f8fafc; color: #475569; }

/* Dashboard Split Workspace */
.dashboard-split-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 35px;
}

.dashboard-panel-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 22px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.dashboard-panel-header {
    margin-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
}

.dashboard-panel-subheader {
    margin-top: 15px;
}

.dashboard-panel-label {
    font-size: 11px;
    font-weight: 700;
    color: #e94b35;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-panel-heading {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 2px;
}

/* Portfolio Analysis Component */
.portfolio-summary-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.progress-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #334155;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: #16a34a;
}

.portfolio-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: #f8fafc;
    border-radius: 6px;
}

.portfolio-stat-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.portfolio-stat-value {
    color: #0f172a;
    font-size: 14px;
}

/* Activity Audit Feed Component */
.audit-logs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.audit-log-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.audit-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.dot-invoice { background-color: var(--primary); }
.dot-quotation { background-color: var(--warning); }
.dot-project { background-color: var(--success); }
.dot-expense { background-color: var(--danger); }

.audit-log-text {
    font-size: 13px;
    color: #334155;
    font-weight: 500;
}

.audit-log-highlight {
    font-weight: 700;
    color: #0f172a;
}

.audit-log-timestamp {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

.audit-log-amount {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
}

.audit-log-empty {
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
    padding: 20px 0;
}

/* Quick Navigation Matrix */
.quick-nav-section-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.quick-nav-section-title {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin: 4px 0 15px 0;
}

.dashboard-quick-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.dashboard-nav-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 18px;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-nav-card:hover {
    border-color: #cbd5e1;
    background-color: var(--sidebar-hover-bg);
}

.dashboard-nav-label {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.dashboard-nav-counter {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin-top: 4px;
}

.dashboard-nav-subtext {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 8px;
}

.dashboard-nav-icon {
    color: #cbd5e1;
    font-size: 16px;
}

/* ==========================================================================
   11. ENHANCED DASHBOARD & ANALYTICS EXTENDED STYLES
   ========================================================================== */

/* Welcome Banner Component */
.dash-welcome-banner {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 12px;
    padding: 24px 28px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.dash-welcome-title {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.3px;
}

.dash-welcome-subtitle {
    margin: 6px 0 0 0;
    font-size: 14px;
    color: #94a3b8;
}

.dash-welcome-tag {
    display: inline-block;
    background: rgba(233, 75, 53, 0.15);
    color: #e94b35;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Metric Text Color Overrides */
.text-success { color: #16a34a !important; }
.text-danger { color: #dc2626 !important; }
.text-primary { color: #2563eb !important; }

/* Dashboard Recent Payments Component */
.recent-payments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.payment-item-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.payment-mode-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    background: #e2e8f0;
    color: #334155;
    text-transform: uppercase;
}

.payment-mode-upi { background: #e0e7ff; color: #3730a3; }
.payment-mode-cash { background: #dcfce7; color: #166534; }
.payment-mode-bank { background: #dbeafe; color: #1e40af; }
.payment-mode-cheque { background: #fef3c7; color: #92400e; }

.payment-client-name {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.payment-inv-code {
    font-size: 12px;
    color: #64748b;
}

.payment-amount-val {
    font-size: 14px;
    font-weight: 800;
    color: #16a34a;
    text-align: right;
}

.payment-date-subtext {
    font-size: 11px;
    color: #94a3b8;
    text-align: right;
}

/* Quick Nav Matrix Extra Columns */
.dashboard-quick-nav-grid-6 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

/* ==========================================================================
   12. MOBILE RESPONSIVENESS FOR INDEX / DASHBOARD
   ========================================================================== */

/* Tablet & Smaller Laptops (under 992px) */
@media (max-width: 992px) {
    /* Stack split panels into a single column */
    .dashboard-split-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Metric cards 2-column layout */
    .dashboard-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    /* Quick Nav 3-column layout */
    .dashboard-quick-nav-grid-6 {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

/* Mobile Devices (under 768px) */
@media (max-width: 768px) {
    /* Welcome Banner vertical alignment */
    .dash-welcome-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 20px;
    }

    .dash-welcome-title {
        font-size: 20px;
    }

    .dash-welcome-subtitle {
        font-size: 13px;
    }

    /* Action buttons stretch to full width */
    .dashboard-action-btns {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }

    .dashboard-action-btns .btn-dash-primary,
    .dashboard-action-btns .btn-dash-secondary {
        width: 100%;
        justify-content: center;
        text-align: center;
        padding: 12px 14px;
    }

    /* Quick Nav 2-column layout */
    .dashboard-quick-nav-grid-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small Mobile Screens (under 576px) */
@media (max-width: 576px) {
    /* Force metrics grid to single column on small phones */
    .dashboard-metrics-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dashboard-metric-card {
        padding: 16px;
    }

    .dashboard-metric-value {
        font-size: 22px;
    }

    .dashboard-panel-card {
        padding: 16px;
    }

    /* Stack payment item row on extra tight screens */
    .payment-item-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .payment-item-card > div:last-child {
        text-align: left;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-top: 1px dashed #e2e8f0;
        padding-top: 6px;
    }

    .payment-amount-val,
    .payment-date-subtext {
        text-align: left;
    }

    /* Quick Nav 1-column layout for small mobile */
    .dashboard-quick-nav-grid-6 {
        grid-template-columns: 1fr;
    }

    /* Audit logs text sizing */
    .audit-log-item {
        gap: 10px;
    }

    .audit-log-text {
        font-size: 12px;
    }

    .audit-log-amount {
        font-size: 11px;
    }
}

/* ==========================================================================
   13. CLIENT MANAGEMENT COMPONENT STYLES
   ========================================================================== */

/* Page Header & Action Bar */
.page-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title-text {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.3px;
}

.page-title-subtext {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: var(--text-muted);
}

.search-filter-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search-input-field {
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 280px;
    font-size: 14px;
    outline: none;
    background: var(--white);
    color: var(--text-dark);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

/* Alert Notification Banner */
.alert-banner-success {
    background-color: var(--success-bg);
    color: #0f5132;
    border: 1px solid #badbcc;
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Data Table Wrapper & Structural Design */
.data-table-container {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    margin-bottom: 25px;
}

.responsive-table-scroll {
    overflow-x: auto;
    width: 100%;
}

.clients-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.clients-table th {
    background-color: #f8fafc;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}

.clients-table td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-dark);
    vertical-align: middle;
}

.clients-table tr:last-child td {
    border-bottom: none;
}

.clients-table tr:hover {
    background-color: var(--sidebar-hover-bg);
}

/* Specific Table Cell Typography */
.client-name-bold {
    font-weight: 700;
    color: var(--text-dark);
}

.client-meta-subtext {
    font-size: 13px;
    color: var(--text-muted);
}

.invoice-count-badge {
    background-color: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.amount-paid-text {
    color: var(--success);
    font-weight: 700;
}

.amount-pending-text {
    color: var(--danger);
    font-weight: 700;
}

.amount-settled-text {
    color: var(--text-muted);
    font-weight: 600;
}

.table-empty-row {
    padding: 35px !important;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

.action-buttons-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Custom Action Buttons */
.btn-action-edit {
    background-color: #f0f9ff;
    color: #0284c7;
    border: 1px solid #bae6fd;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.btn-action-edit:hover {
    background-color: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

.btn-action-delete {
    background-color: var(--danger-bg);
    color: var(--danger);
    border: 1px solid #fecdd3;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.btn-action-delete:hover {
    background-color: var(--danger);
    color: #ffffff;
    border-color: var(--danger);
}

/* Pagination Bar Layout */
.pagination-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
}

.pagination-btn {
    padding: 8px 14px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.pagination-btn:hover {
    background-color: #f1f5f9;
}

.pagination-btn.active {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .page-header-container {
        flex-direction: column;
        align-items: stretch;
    }

    .search-filter-form {
        width: 100%;
    }

    .search-input-field {
        width: 100%;
    }
}

/* ==========================================================================
   14. INVOICE MANAGEMENT COMPONENT STYLES
   ========================================================================== */

/* Filter Bar Layout */
.invoice-filter-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 20px;
    box-shadow: var(--card-shadow);
    margin-bottom: 25px;
}

.invoice-filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 160px;
}

.filter-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-control {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-dark);
    background: var(--white);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

.filter-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.filter-action-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Invoice Status Badge Custom Colors */
.badge-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.badge-status-paid {
    background-color: var(--success-bg);
    color: #0f5132;
    border: 1px solid #badbcc;
}

.badge-status-partially {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.badge-status-unpaid {
    background-color: var(--danger-bg);
    color: var(--danger);
    border: 1px solid #fecdd3;
}

.badge-status-cancelled {
    background-color: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

.badge-status-draft {
    background-color: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* Table Typography Extensions */
.invoice-number-bold {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 14px;
}

.btn-action-pdf {
    background-color: #f8fafc;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.btn-action-pdf:hover {
    background-color: #475569;
    color: #ffffff;
    border-color: #475569;
}

/* Mobile Responsive Adjustments for Invoices Page */
@media (max-width: 768px) {
    .invoice-filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
        min-width: 100%;
    }

    .filter-action-btns {
        width: 100%;
        margin-top: 6px;
    }

    .filter-action-btns .btn-dash-primary,
    .filter-action-btns .btn-dash-secondary {
        flex: 1;
        justify-content: center;
    }
}

/* ==========================================================================
   15. QUOTATION MANAGEMENT COMPONENT STYLES
   ========================================================================== */

/* Quotation Status Badge Variants */
.badge-status-accepted {
    background-color: var(--success-bg);
    color: #0f5132;
    border: 1px solid #badbcc;
}

.badge-status-sent {
    background-color: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.badge-status-rejected {
    background-color: var(--danger-bg);
    color: var(--danger);
    border: 1px solid #fecdd3;
}

/* Action Button: Convert to Invoice */
.btn-action-convert {
    background-color: var(--success-bg);
    color: #0f5132;
    border: 1px solid #badbcc;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.btn-action-convert:hover {
    background-color: var(--success);
    color: #ffffff;
    border-color: var(--success);
}

/* Project Meta Subtext in Table */
.project-meta-details {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.project-meta-divider {
    color: #cbd5e1;
}

/* ==========================================================================
   16. PAYMENT & COLLECTION MANAGEMENT STYLES
   ========================================================================== */

/* Alert Notification Banner - Danger Variant */
.alert-banner-danger {
    background-color: var(--danger-bg);
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Card Container Components */
.payment-card {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
}

.payment-card-edit-accent {
    border-left: 4px solid var(--primary);
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.card-heading-title {
    /*margin: 0;*/
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

/* Form Layout System */
.form-row-grid {
    display: flex;
    gap: 15px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.form-group-col-1 {
    flex: 1;
    min-width: 160px;
}

.form-group-col-1-5 {
    flex: 1.5;
    min-width: 180px;
}

.form-group-col-2 {
    flex: 2;
    min-width: 250px;
}

.form-group-actions-align {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.form-input-readonly {
    background-color: #f1f5f9;
}

/* Custom Payment Badges */
.badge-mode {
    background-color: #e0e7ff;
    color: #3730a3;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.logs-summary-badge {
    background-color: #f1f5f9;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-dark);
}

.logs-summary-divider {
    margin: 0 8px;
    color: #cbd5e1;
}

.receipt-id-bold {
    font-weight: 700;
    color: var(--text-dark);
}

/* Align Right Utility for Action Cells */
.text-align-right {
    text-align: right;
}

/* ==========================================================================
   17. SERVICE & RATE CATALOG COMPONENT STYLES
   ========================================================================== */

/* Category Property Type Badges */
.badge-property-type {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
    letter-spacing: 0.3px;
}

.badge-type-residential {
    background-color: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.badge-type-commercial {
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.badge-type-industrial {
    background-color: #f3e8ff;
    color: #6b21a8;
    border: 1px solid #e9d5ff;
}

.badge-type-default {
    background-color: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* Rate Typography styling */
.rate-amount-text {
    color: #15803d;
    font-weight: 700;
    font-size: 14px;
}

.rate-unit-subtext {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
}

/* ==========================================================================
   18. USER ACCESS & ROLES COMPONENT STYLES
   ========================================================================== */

/* User Role Badges */
.badge-role-admin {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.badge-role-staff {
    background-color: #e0e7ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

/* User Form Subtext Helper */
.form-helper-text {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ==========================================================================
   19. COMPANY SETTINGS COMPONENT STYLES
   ========================================================================== */

/* Section Heading Cards */
.settings-section-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 25px;
    box-shadow: var(--card-shadow);
}

.settings-section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 18px;
}

/* Form Layout System for Settings */
.settings-form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.settings-col-1 {
    flex: 1;
    min-width: 240px;
}

.settings-col-2 {
    flex: 2;
    min-width: 300px;
}

/* Logo Upload Component Styles */
.logo-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-preview-box {
    width: 64px;
    height: 64px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.logo-preview-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-placeholder-icon {
    font-size: 24px;
    color: #94a3b8;
}

.logo-upload-input {
    display: none;
}

/* Settings Custom Textarea */
.settings-textarea {
    width: 100%;
    height: 200px;
    padding: 12px;
    font-size: 14px;
    line-height: 1.6;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    resize: vertical;
    font-family: inherit;
}

/* ==========================================================================
   21. ENHANCED PRINT & PDF RESPONSIVE TEMPLATE STYLES
   ========================================================================== */

/* Override global body display: flex to prevent side-by-side layout */
body.print-page-body {
    display: block !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 20px;
    color: #1e293b;
    background-color: #f8fafc;
    min-height: 100vh;
}

.print-control-bar {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 20px auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e242b;
    padding: 12px 20px;
    border-radius: 6px;
    color: #ffffff;
}

.print-btn {
    background: var(--primary, #e94b35);
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.print-btn:hover {
    background: #d03a25;
}

.document-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 45px 50px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.doc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 25px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.brand-block {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

/* Fixed Logo Size System - h-10 w-auto */
.h-10 {
    height: 40px !important;
}

.w-auto {
    width: auto !important;
}

.print-logo-img {
    object-fit: contain;
    display: block;
}

.logo-box {
    background: var(--primary, #e94b35);
    color: #ffffff;
    font-weight: 900;
    font-size: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    letter-spacing: 1px;
}

.company-info h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.company-info p {
    margin: 4px 0 0 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

.doc-title-box {
    text-align: right;
}

.doc-title-box .label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.doc-title-box .doc-no {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 2px 0;
}

.doc-title-box .doc-date {
    font-size: 12px;
    color: #64748b;
}

.meta-grid {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    gap: 24px;
    flex-wrap: wrap;
}

.meta-col {
    flex: 1;
    min-width: 240px;
}

.meta-label {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.client-name {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.meta-text {
    font-size: 13px;
    color: #475569;
    margin: 3px 0;
    line-height: 1.4;
}

/* Table Wrapper */
.print-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 30px;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
}

.items-table th {
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.items-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    color: #1e293b;
}

.th-sr-col { width: 35px; text-align: left; }
.th-service-col { text-align: left; }
.th-area-col { text-align: right; width: 110px; }
.th-rate-col { text-align: right; width: 110px; }
.th-amount-col { text-align: right; width: 120px; }

.td-service-name { font-weight: 500; }
.td-text-right { text-align: right; }
.td-amount-bold { text-align: right; font-weight: 600; }

.totals-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 35px;
}

.totals-table {
    width: 280px;
    border-collapse: collapse;
}

.totals-table td {
    padding: 6px 8px;
    font-size: 13px;
    color: #475569;
}

.totals-table .amount-col {
    text-align: right;
    font-weight: 600;
    color: #0f172a;
}

.totals-table tr.grand-total-row td {
    border-top: 1px solid #e2e8f0;
    padding-top: 10px;
    font-size: 16px;
    font-weight: 800;
}

.totals-table tr.grand-total-row .grand-amount {
    color: var(--primary, #e94b35);
}

.footer-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    gap: 20px;
    flex-wrap: wrap;
}

.terms-block {
    flex: 1;
    min-width: 260px;
    max-width: 440px;
}

.terms-block h4 {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 8px 0;
}

.terms-content-text {
    font-size: 12px;
    color: #64748b;
    line-height: 1.6;
    white-space: pre-line;
}

.signature-block {
    text-align: center;
    min-width: 180px;
}

.signature-line {
    width: 180px;
    border-bottom: 1px solid #cbd5e1;
    margin: 0 auto 8px auto;
}

.signature-label {
    font-size: 12px;
    color: #64748b;
}

/* Print Overrides */
@media print {
    body.print-page-body {
        padding: 0;
        background: #ffffff;
    }
    .print-control-bar {
        display: none !important;
    }
    .document-container {
        border: none;
        padding: 0;
        box-shadow: none;
        width: 100%;
        max-width: 100%;
    }
}

.print-btn-secondary {
    background: #334155 !important;
}

.print-btn-secondary:hover {
    background: #475569 !important;
}

.site-credit-footer {
    text-align: center;
    padding: 15px 20px;
    font-size: 15px;
    color: var(--text-muted, #64748b);
    border-top: 1px solid var(--border, #e2e8f0);
    margin-top: 30px;
}

.site-credit-footer a {
    color: var(--primary, #e94b35);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.site-credit-footer a:hover {
    color: var(--primary-hover, #cf3d29);
    text-decoration: underline;
}

/* ==========================================================================
   QUOTATION & INVOICE LAYOUT COMPONENTS
   ========================================================================== */
.quote-card-section {
    background: var(--white, #ffffff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    overflow: visible !important;
    position: relative;
}

.quote-section-header {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted, #64748b);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.quote-field-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.quote-field-wrapper:last-of-type {
    margin-bottom: 0;
}

.quote-form-group {
    flex: 1;
    min-width: 200px;
}

.quote-form-group.wide {
    min-width: 280px;
    position: relative;
    overflow: visible !important;
}

.quote-field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.quote-area-highlight {
    font-weight: 700;
    color: var(--primary, #e94b35);
}

.quote-number-readonly {
    background: #f8fafc !important;
}

/* Service Card Selection Grid Matrix */
#serviceGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.service-card {
    background: var(--white, #ffffff);
    border: 1px solid var(--border, #eaecf0);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.service-card:hover {
    border-color: var(--text-muted, #94a3b8);
    background: var(--sidebar-hover-bg, #f9fafb);
}

.service-card.selected {
    border-color: var(--primary, #e94b35);
    background-color: var(--primary-bg, #fdf1ef);
}

.service-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.service-card-header input[type="checkbox"] {
    accent-color: var(--primary, #e94b35);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.service-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark, #101828);
}

.service-rate-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.service-rate-wrapper label {
    font-size: 12px;
    color: var(--text-muted, #667085);
}

.rate-input-card {
    width: 90px;
    height: 32px;
    padding: 4px 8px;
    font-size: 13px;
    border: 1px solid var(--border, #eaecf0);
    border-radius: 4px;
    text-align: right;
}

/* Financial Invoice Summary Panels */
.summary-split-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.summary-table-pane {
    flex: 1.5;
    min-width: 300px;
}

.summary-calc-pane {
    flex: 1;
    min-width: 280px;
    background: #f8fafc;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid var(--border, #e2e8f0);
}

.summary-calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
}

.summary-calc-row.muted {
    font-size: 13px;
    color: var(--text-muted, #475569);
}

.summary-calc-row.danger {
    color: #dc2626;
}

.summary-calc-row.success {
    color: #059669;
}

.summary-grand-total {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary, #e94b35);
}

/* --------------------------------------------------------------------------
   DATABASE SEARCHABLE SELECT CUSTOM COMPONENT
   -------------------------------------------------------------------------- */
.searchable-select-container {
    position: relative;
    width: 100%;
}

.searchable-select-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23667085'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 16px !important;
    cursor: pointer;
}

.searchable-dropdown-menu {
    position: absolute;
    top: 102%;
    left: 0;
    width: 100%;
    background: var(--white, #ffffff);
    border: 1px solid var(--border, #eaecf0);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(16, 24, 40, 0.08);
    z-index: 999;
    max-height: 250px;
    overflow-y: auto;
    display: none;
}

.searchable-dropdown-search-box {
    position: sticky;
    top: 0;
    background: var(--white, #ffffff);
    padding: 8px;
    border-bottom: 1px solid var(--border, #eaecf0);
    z-index: 10;
}

.searchable-dropdown-search-box input {
    width: 100%;
    height: 36px;
    padding: 6px 12px;
    font-size: 13px;
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 4px;
    outline: none;
}

.searchable-dropdown-search-box input:focus {
    border-color: var(--primary, #e94b35);
}

.searchable-dropdown-option {
    padding: 10px 14px;
    font-size: 14px;
    color: var(--text-dark, #101828);
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.searchable-dropdown-option:hover {
    background-color: var(--sidebar-hover-bg, #f9fafb);
    color: var(--primary, #e94b35);
}

.searchable-dropdown-option.no-results {
    color: var(--text-muted, #667085);
    text-align: center;
    cursor: default;
    background: transparent !important;
}


/* ==========================================================================
   MOBILE-RESPONSIVE MILESTONE WORKSPACE & ADJUSTMENTS
   ========================================================================== */

/* Layout arrangement adjustments */
.invoice-card-section {
    margin-bottom: 25px;
}

.invoice-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.invoice-header-title h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.invoice-header-title p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

.invoice-section-heading {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.invoice-flex-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.invoice-flex-row.mb-20 {
    margin-bottom: 20px;
}

.invoice-col-large {
    position: relative;
    overflow: visible !important;
    flex: 1;
    min-width: 280px;
}

.invoice-col-small {
    flex: 1;
    min-width: 180px;
}

.invoice-field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.form-control-readonly {
    background: var(--light-bg) !important;
}

.form-control-highlight {
    font-weight: 700;
    color: var(--primary) !important;
}

.summary-split-row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.summary-table-side {
    flex: 1.5;
    min-width: 300px;
}

.summary-ledger-side {
    flex: 1;
    min-width: 280px;
    background: #f8fafc;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.summary-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.summary-items-table th {
    border-bottom: 2px solid var(--border);
    text-align: left;
    color: var(--text-muted);
    padding: 8px 0;
}

.summary-items-table td {
    padding: 10px;
    border-bottom: 1px solid #dee2e6;
}

.summary-items-table td.text-right {
    text-align: right;
}

.ledger-entry-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.ledger-entry-row.align-center {
    align-items: center;
}

.ledger-entry-row.discount-negative {
    font-size: 13px;
    color: var(--danger);
}

.ledger-entry-row.gst-positive {
    font-size: 13px;
    color: #059669;
}

.ledger-entry-row label {
    font-size: 13px;
    color: #475569;
}

.ledger-entry-row input {
    width: 90px;
    height: 32px;
    text-align: right;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 2px 6px;
}

.ledger-entry-row.grand-total {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
}

.ledger-divider {
    border: none;
    border-top: 1px solid #cbd5e1;
    margin: 12px 0;
}

.payment-collection-box {
    background: var(--white);
    border: 1px solid #cbd5e1;
    padding: 12px;
    border-radius: 6px;
}

.payment-collection-box input {
    width: 110px;
    height: 32px;
    text-align: right;
    border: 1px solid #16a34a;
    border-radius: 4px;
    padding: 2px 6px;
    font-weight: 700;
    color: #16a34a;
}

.payment-collection-box .balance-due-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    color: var(--danger);
}

.milestones-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.milestones-header-row .aggregate-metric {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.milestones-header-row .aggregate-metric span {
    color: var(--primary);
    font-weight: 700;
}

/* Base Desktop Table Structure */
.milestones-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 15px;
}

.milestones-data-table th {
    background: #f8fafc;
    border-bottom: 2px solid var(--border);
    text-align: left;
    color: #475569;
    padding: 12px 10px;
}

.milestones-data-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.milestones-input-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.milestones-data-table input.height-36,
.milestones-data-table select.height-36 {
    height: 36px;
}

.milestones-data-table input.ms-pct {
    text-align: right;
    max-width: 90px;
}

.milestones-data-table input.ms-amt {
    text-align: right;
    background: #f8fafc;
    font-weight: 600;
    max-width: 140px;
}

.invoice-form-actions {
    text-align: right;
    margin-bottom: 40px;
}

/* Fluid Mobile Adaptation Configuration */
@media (max-width: 768px) {
    /* Hide native descriptive headings */
    .milestones-data-table thead {
        display: none;
    }
    
    /* Force rows to render as unique stacked card elements */
    .milestones-data-table tbody tr {
        display: block;
        background: #f8fafc;
        border: 1px solid var(--border);
        border-radius: 8px;
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .milestones-data-table tbody td {
        display: flex;
        flex-direction: column;
        padding: 6px 0;
        border-bottom: none;
        width: 100% !important;
        text-align: left !important;
    }
    
    /* Inject interactive pseudo label fields */
    .milestones-data-table tbody td::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        margin-bottom: 4px;
        letter-spacing: 0.5px;
    }
    
    .milestones-data-table input.ms-pct,
    .milestones-data-table input.ms-amt {
        max-width: 100%;
        text-align: left;
    }
    
    .milestones-input-wrapper {
        width: 100%;
    }
    
    .milestones-input-wrapper input {
        flex: 1;
    }
    
    /* Reposition delete control button to pull flush right */
    .milestones-data-table tbody td.mobile-action-align {
        align-items: flex-end;
        margin-top: 4px;
        padding-top: 10px;
        border-top: 1px dashed var(--border);
    }
}

/* ==========================================================================
   SEARCHABLE CLIENT SELECT DROPDOWN COMPONENT
   ========================================================================== */
.custom-dropdown-container {
    position: relative;
    width: 100%;
}

/* Styled trigger area mimicking a form-control element */
.dropdown-trigger-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: var(--white);
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 14px;
    min-height: 40px;
    box-sizing: border-box;
}

.dropdown-trigger-box i {
    color: var(--text-muted);
    font-size: 12px;
    transition: transform 0.2s ease;
}

.custom-dropdown-container.dropdown-active .dropdown-trigger-box i {
    transform: rotate(180deg);
}

.custom-dropdown-container.dropdown-active {
    z-index: 1100;
}

/* Dropdown panel overlaying underlying forms perfectly */
.dropdown-search-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    margin-top: 4px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 1200;
    max-height: 280px;
    flex-direction: column;
}

.custom-dropdown-container.dropdown-active .dropdown-search-panel {
    display: flex;
}

.dropdown-search-wrapper {
    padding: 8px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.dropdown-search-field {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    outline: none;
    box-sizing: border-box;
}

.dropdown-search-field:focus {
    border-color: var(--primary);
}

.dropdown-options-list {
    overflow-y: auto;
    max-height: 200px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-option-item {
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-dark);
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid #f1f5f9;
}

.dropdown-option-item:last-child {
    border-bottom: none;
}

.dropdown-option-item:hover {
    background: var(--light-bg);
}

/* Signature brand high-visibility indicator highlight rules */
.dropdown-option-item.client-highlighted {
    background: var(--primary-bg) !important;
    color: var(--primary) !important;
    font-weight: 700;
    border-left: 3px solid var(--primary);
}

.dropdown-no-results {
    padding: 14px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

.invoice-card-section {
    overflow: visible !important;
    position: relative;
}

.custom-dropdown-container.dropdown-active {
    z-index: 1100;
}


/* ==========================================================================
   UPDATED CORE PROJECTS MODULE STYLES
   ========================================================================== */

/* Exact Header Layout Pattern Match */
.page-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 12px;
}
.page-title-heading h1 {
    font-size: 24px;
    font-weight: 700;
    color: #0c1e36;
    margin: 0 0 6px 0;
    font-family: system-ui, -apple-system, sans-serif;
}
.page-title-heading p {
    color: #64748b;
    font-size: 14px;
    margin: 0;
    font-family: system-ui, -apple-system, sans-serif;
}
.btn-add-action {
    background-color: #e94b35;
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    font-family: system-ui, -apple-system, sans-serif;
    transition: background-color 0.2s ease;
}
.btn-add-action:hover {
    background-color: #d13b27;
}

/* Custom Uniform Dropdown Select UI Architecture */
.custom-dropdown-container {
    position: relative;
    width: 100%;
}
.dropdown-trigger-box {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 14px;
    color: #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    min-height: 40px;
}
.dropdown-search-panel {
    display: none;
    position: absolute;
    top: 102%;
    left: 0;
    width: 100%;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 999;
}
.dropdown-active .dropdown-search-panel {
    display: block;
}
.dropdown-search-wrapper {
    padding: 8px;
    border-bottom: 1px solid #f1f5f9;
}
.dropdown-search-field {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
}
.dropdown-options-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
}
.dropdown-option-item {
    padding: 10px 14px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
}
.dropdown-option-item:hover, .client-highlighted {
    background: #f8fafc;
    color: #e94b35;
    font-weight: 600;
}

/* Stage Photo Element Layout Rules */
.monitor-photo-preview-box {
    width: 42px;
    height: 42px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    background-size: cover;
    background-position: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    overflow: hidden;
    position: relative;
}
.monitor-photo-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hidden-file-input {
    display: none !important;
}

/* Project Summary Dashboard Grids */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.project-summary-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.project-summary-card:hover {
    border-color: #e94b35;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}
.project-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.project-badge-stage {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}
.project-badge-type {
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.project-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
}
.project-card-client {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 16px;
}
.project-progress-track {
    background: #f1f5f9;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 14px;
    margin-top: 5px;
}
.project-progress-fill {
    background: #e94b35;
    height: 100%;
    transition: width 0.3s ease;
}

/* Document Repository List Elements */
.doc-history-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}
.doc-history-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    vertical-align: middle;
}
.doc-history-table tr:last-child td {
    border-bottom: none;
}



/* ==========================================================================
   Project Workspace & Pipeline Modules
   ========================================================================== */

/* Layout Containers & Workspace Canvas */
.project-container-fluid {
    padding: 24px;
}

.flex-gap-12 {
    display: flex;
    gap: 12px;
}

.flex-gap-24 {
    display: flex;
    gap: 24px;
}

.flex-align-center-gap-16 {
    display: flex;
    align-items: center;
    gap: 16px;
}

.flex-align-center-gap-12 {
    display: flex;
    align-items: center;
    gap: 12px;
}

.flex-1 {
    flex: 1;
}

.grid-col-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

/* Auditing & Message Notification Banners */
.audit-footprint-banner {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 10px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 12px;
    color: #64748b;
    display: flex;
    gap: 24px;
}

.alert-toast-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* Parameter Metrics Cards */
.metric-param-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 16px;
    border-radius: 6px;
}

.metric-param-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.metric-select-field,
.metric-input-field {
    margin-top: 6px;
    height: 38px;
}

.metric-progress-value {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 4px;
}

.metric-progress-track-wrapper {
    margin: 6px 0 0 0;
}

/* Master Form Component Sections */
.master-profile-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 24px;
    border-radius: 6px;
    margin-bottom: 24px;
}

.margin-bottom-16 {
    margin-bottom: 16px;
}

.quote-form-group.wide.overflow-visible {
    position: relative;
    overflow: visible !important;
}

/* Construction Milestone Matrix Checked Components */
.construction-matrix-heading {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 16px 0;
}

.monitor-stage-row {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.monitor-stage-title {
    font-weight: 700;
    color: #1e293b;
    font-size: 14px;
}

.monitor-status-badge {
    margin-left: 0;
    margin-top: 4px;
    display: inline-block;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 3px;
}

.stage-status-dropdown {
    width: 130px;
    height: 36px;
    padding: 4px 8px;
}

.stage-date-input {
    height: 36px;
    width: 140px;
}

.btn-upload-trigger {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    height: 36px;
    padding: 0 12px;
    border-radius: 4px;
    color: #475569;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Document Repository Vault Area */
.document-repository-vault {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 24px;
    border-radius: 6px;
    margin-bottom: 40px;
}

.document-upload-bar {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.document-input-row {
    display: flex;
    gap: 16px;
    align-items: center;
}

.document-text-field {
    height: 40px;
}

.document-file-field {
    padding: 6px;
    height: 40px;
}

.btn-commit-action {
    height: 40px;
    padding: 0 24px;
}

.doc-history-header-row {
    background: #f8fafc;
    font-weight: 700;
    color: #334155;
}

.doc-history-table td.width-80-center {
    width: 80px;
    text-align: center;
}

.doc-history-table td.width-120-center {
    width: 120px;
    text-align: center;
}

.doc-version-tag {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    color: #475569;
}

.doc-reference-title {
    color: #0f172a;
    font-size: 14px;
}

.doc-asset-link {
    color: #e94b35;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.doc-uploader-meta {
    color: #64748b;
    font-size: 12px;
}

.doc-status-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

/* Project Directory Grid Overrides */
.projects-grid-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
}

.projects-grid-empty-icon {
    font-size: 32px;
    margin-bottom: 12px;
    color: #cbd5e1;
}

.projects-grid-empty-text {
    margin: 0;
    font-size: 14px;
}

.project-card-metrics-row {
    margin-top: 14px;
}

.project-card-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
}

.project-card-progress-value-text {
    color: #0f172a;
}

.project-card-footer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
    font-size: 11px;
    color: #64748b;
    margin-top: 12px;
}

.project-card-footer-icon {
    margin-right: 4px;
}
/* ==========================================================================
   Full-Screen Image Preview Modal Component
   ========================================================================== */

/* Preview Hover & Trigger Overlay Context */
.monitor-photo-preview-box {
    position: relative;
    overflow: hidden;
}

.monitor-photo-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.preview-trigger-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    cursor: pointer;
    border-radius: inherit;
    z-index: 2;
}

.monitor-photo-preview-box:hover .preview-trigger-overlay {
    opacity: 1;
}

.btn-preview-view-action {
    background: #ffffff;
    color: #0f172a;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(4px);
    transition: transform 0.2s ease-in-out;
}

.monitor-photo-preview-box:hover .btn-preview-view-action {
    transform: translateY(0);
}

/* Modal Core Overlay Background Structure */
.preview-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.25s ease-in-out;
}

.preview-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Modal Content Wrapper & Responsive Bounds */
.preview-modal-wrapper {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-modal-viewport-img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.25s ease-in-out;
}

.preview-modal-overlay.active .preview-modal-viewport-img {
    transform: scale(1);
}

/* Absolute Close Button Architecture */
.btn-preview-modal-close {
    position: absolute;
    top: -45px;
    right: 0;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-preview-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Responsive Grid & Content Pipeline Adaptation */
@media screen and (max-width: 1024px) {
    .grid-col-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }
}

@media screen and (max-width: 768px) {
    .project-container-fluid {
        padding: 16px 12px !important;
    }

    .page-title-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 16px !important;
    }

    .page-title-row .flex-gap-12 {
        width: 100% !important;
        justify-content: flex-start !important;
    }

    .grid-col-4 {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .quote-field-wrapper {
        flex-direction: column !important;
        gap: 16px !important;
        margin-bottom: 16px !important;
    }

    .quote-form-group.wide {
        width: 100% !important;
    }

    /* Construction Matrix Rows Transformation */
    .monitor-stage-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 14px !important;
        padding: 16px !important;
        border-radius: 8px !important;
        position: relative !important;
    }

    .monitor-photo-preview-box {
        width: 100% !important;
        height: 160px !important;
        max-width: none !important;
    }

    .monitor-photo-preview-box img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .flex-align-center-gap-12 {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .stage-status-dropdown, 
    .stage-date-input, 
    .btn-upload-trigger {
        width: 100% !important;
        margin: 0 !important;
    }

    /* Document Repository Vault Adjustments */
    .document-input-row {
        flex-direction: column !important;
        gap: 12px !important;
    }

    .document-input-row .flex-1,
    .document-input-row button {
        width: 100% !important;
    }

    /* Table Component Scroll Engine Safe Wrapper */
    .document-repository-vault {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .doc-history-table {
        min-width: 600px !important;
    }
}

@media screen and (max-width: 480px) {
    .projects-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    .audit-footprint-banner {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }
}