/**
 * Unified Dashboard Theme
 * The Global Webs - Advanced ERP System
 * Lightweight, Clean, Modern Design for All Dashboard Types
 * 
 * This file unifies the design for:
 * - Main Admin Dashboard
 * - Perfex SAAS Client Dashboards
 * - Regular Client Dashboards
 */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&display=swap');

:root {
    --tgw-font-family: 'Cairo', 'Inter', 'Segoe UI', Tahoma, Arial, sans-serif;
}

body,
button,
input,
textarea,
select,
.btn,
.form-control,
.dropdown-menu,
.modal,
.popover,
.tooltip,
.table,
.dataTables_wrapper,
.panel,
.panel_s,
.widget {
    font-family: var(--tgw-font-family) !important;
}

/* ========================================
   ENHANCED PANELS & CARDS
   ======================================== */

#wrapper .content {
    background:
        linear-gradient(135deg, rgba(238, 248, 255, 0.92), rgba(255, 255, 255, 0.96) 44%, rgba(233, 251, 255, 0.9)),
        radial-gradient(circle at 18% 8%, rgba(65, 219, 242, 0.2), transparent 34%),
        radial-gradient(circle at 84% 12%, rgba(0, 101, 248, 0.14), transparent 30%);
    min-height: calc(100vh - 60px);
}

.tgw-dashboard-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    margin: 22px 0 18px;
    padding: 24px 26px;
    border: 1px solid rgba(65, 219, 242, 0.26);
    border-radius: 22px;
    background: linear-gradient(135deg, #18487e 0%, #0065f8 58%, #00caff 100%);
    box-shadow: 0 24px 60px rgba(24, 72, 126, 0.2);
    color: #fff;
}

.tgw-dashboard-hero:before {
    content: '';
    position: absolute;
    inset: auto -80px -120px auto;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
}

.tgw-dashboard-hero-copy,
.tgw-dashboard-services {
    position: relative;
    z-index: 1;
}

.tgw-dashboard-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #dffbff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.tgw-dashboard-hero h1 {
    margin: 0 0 8px;
    color: #fff;
    font-size: clamp(24px, 2.7vw, 38px);
    font-weight: 900;
    line-height: 1.2;
}

.tgw-dashboard-hero p {
    max-width: 780px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 15px;
    line-height: 1.8;
    font-weight: 700;
}

.tgw-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.tgw-hero-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 13px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-weight: 900;
    text-decoration: none !important;
    box-shadow: 0 10px 22px rgba(15, 33, 58, 0.12);
}

.tgw-hero-actions a:hover,
.tgw-hero-actions a:focus {
    background: rgba(255, 255, 255, 0.24);
    color: #fff;
}

.tgw-dashboard-services {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 10px;
    min-width: 280px;
}

.tgw-dashboard-services span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.tgw-dashboard-services i {
    color: #bff6ff;
}

.tgw-ops-center {
    position: relative;
    overflow: hidden;
    margin: 22px 0 18px;
    border: 1px solid rgba(210, 228, 246, 0.95);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 252, 255, 0.98) 52%, rgba(234, 248, 255, 0.98) 100%);
    box-shadow: 0 24px 62px rgba(24, 72, 126, 0.14);
}

.tgw-ops-center:before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 6px;
    background: linear-gradient(90deg, #18487e, #0065f8, #00caff, #39d98a);
}

.tgw-ops-topbar {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 24px 10px;
}

.tgw-ops-topbar h1 {
    margin: 4px 0 8px;
    color: #10223a;
    font-size: clamp(24px, 2.4vw, 34px);
    font-weight: 900;
    line-height: 1.2;
}

.tgw-ops-topbar p {
    max-width: 760px;
    margin: 0;
    color: #5f728c;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.8;
}

.tgw-ops-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    min-width: 240px;
}

.tgw-ops-status span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid rgba(220, 233, 246, 0.95);
    border-radius: 999px;
    background: #fff;
    color: #334761;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(15, 33, 58, 0.06);
}

.tgw-ops-status i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #f7b731;
    box-shadow: 0 0 0 5px rgba(247, 183, 49, 0.14);
}

.tgw-ops-status .is-ok i {
    background: #20bf6b;
    box-shadow: 0 0 0 5px rgba(32, 191, 107, 0.13);
}

.tgw-ops-body {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 18px;
    padding: 14px 24px 24px;
}

.tgw-quick-actions-panel,
.tgw-kpi-panel {
    border: 1px solid rgba(220, 233, 246, 0.92);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.tgw-quick-actions-panel {
    padding: 18px;
}

.tgw-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.tgw-section-title span {
    color: #00a5c8;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tgw-section-title strong {
    color: #18487e;
    font-size: 18px;
    font-weight: 900;
}

.tgw-action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 12px;
}

.tgw-action-card {
    position: relative;
    overflow: hidden;
    display: grid;
    min-height: 132px;
    padding: 16px;
    border: 1px solid rgba(220, 233, 246, 0.95);
    border-radius: 16px;
    background: #fff;
    color: #10223a;
    text-decoration: none !important;
    box-shadow: 0 14px 32px rgba(15, 33, 58, 0.07);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.tgw-action-card:before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--action-color, #0065f8);
}

.tgw-action-card:hover,
.tgw-action-card:focus {
    transform: translateY(-3px);
    border-color: rgba(0, 202, 255, 0.45);
    box-shadow: 0 22px 48px rgba(24, 72, 126, 0.14);
    color: #10223a;
}

.tgw-action-card span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 10px;
    border-radius: 14px;
    background: var(--action-soft, rgba(0, 101, 248, 0.1));
    color: var(--action-solid, #0065f8);
    font-size: 18px;
}

.tgw-action-card b,
.tgw-action-card small {
    display: block;
}

.tgw-action-card b {
    color: #10223a;
    font-size: 14px;
    font-weight: 900;
}

.tgw-action-card small {
    margin-top: 4px;
    color: #6a7f99;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.5;
}

.tgw-action-card--blue { --action-color: linear-gradient(90deg, #18487e, #0065f8); --action-solid: #0065f8; --action-soft: rgba(0, 101, 248, 0.1); }
.tgw-action-card--cyan { --action-color: linear-gradient(90deg, #00a5c8, #41dbf2); --action-solid: #00a5c8; --action-soft: rgba(0, 202, 255, 0.12); }
.tgw-action-card--green { --action-color: linear-gradient(90deg, #0f9f6e, #39d98a); --action-solid: #0f9f6e; --action-soft: rgba(57, 217, 138, 0.14); }
.tgw-action-card--orange { --action-color: linear-gradient(90deg, #f07c24, #f7b731); --action-solid: #f07c24; --action-soft: rgba(247, 183, 49, 0.14); }
.tgw-action-card--violet { --action-color: linear-gradient(90deg, #4b5bdc, #00caff); --action-solid: #4b5bdc; --action-soft: rgba(75, 91, 220, 0.12); }
.tgw-action-card--slate { --action-color: linear-gradient(90deg, #18487e, #536b86); --action-solid: #18487e; --action-soft: rgba(24, 72, 126, 0.11); }
.tgw-action-card--red { --action-color: linear-gradient(90deg, #e74c3c, #ff7a59); --action-solid: #e74c3c; --action-soft: rgba(231, 76, 60, 0.1); }
.tgw-action-card--dark { --action-color: linear-gradient(90deg, #10223a, #334761); --action-solid: #10223a; --action-soft: rgba(16, 34, 58, 0.1); }

.tgw-kpi-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
}

.tgw-kpi-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 78px;
    padding: 12px;
    border: 1px solid rgba(220, 233, 246, 0.9);
    border-radius: 14px;
    background: #fff;
}

.tgw-kpi-card > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: linear-gradient(135deg, #18487e, #00caff);
    color: #fff;
    font-size: 17px;
}

.tgw-kpi-card span,
.tgw-kpi-card strong,
.tgw-kpi-card small {
    display: block;
}

.tgw-kpi-card span {
    color: #5f728c;
    font-size: 11px;
    font-weight: 900;
}

.tgw-kpi-card strong {
    margin: 2px 0;
    color: #10223a;
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
}

.tgw-kpi-card small {
    color: #7d8fa5;
    font-size: 11px;
    font-weight: 800;
}

.tgw-dashboard-panel--flush {
    padding: 18px;
}

.tgw-legacy-dashboard-widgets {
    display: block;
    clear: both;
    margin-top: 2px;
}

.tgw-legacy-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 4px 0 14px;
    padding: 16px 18px;
    border: 1px solid rgba(220, 233, 246, 0.95);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 255, 0.98));
    box-shadow: 0 14px 34px rgba(15, 33, 58, 0.07);
}

.tgw-legacy-heading span,
.tgw-legacy-heading strong,
.tgw-legacy-heading small {
    display: block;
}

.tgw-legacy-heading span {
    color: #00a5c8;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tgw-legacy-heading strong {
    margin-top: 2px;
    color: #18487e;
    font-size: 18px;
    font-weight: 900;
}

.tgw-legacy-heading small {
    color: #6a7f99;
    font-size: 12px;
    font-weight: 800;
}

.tgw-legacy-dashboard-widgets [data-container] {
    margin-top: 0;
}

.tgw-legacy-dashboard-widgets .widget,
.tgw-legacy-dashboard-widgets .perfex-saas-surface,
.tgw-legacy-dashboard-widgets .panel_s,
.tgw-legacy-dashboard-widgets .panel {
    overflow: hidden;
    border: 1px solid rgba(220, 233, 246, 0.95) !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 16px 42px rgba(15, 33, 58, 0.08) !important;
}

.tgw-legacy-dashboard-widgets .widget {
    padding: 18px !important;
    margin-bottom: 18px !important;
}

.tgw-legacy-dashboard-widgets .widget.relative,
.tgw-legacy-dashboard-widgets .widget.in-view,
.tgw-legacy-dashboard-widgets .widget.mtop10,
.tgw-legacy-dashboard-widgets .widget.mbot10 {
    margin-top: 0 !important;
    margin-bottom: 18px !important;
}

.tgw-legacy-dashboard-widgets .widget:before,
.tgw-legacy-dashboard-widgets .widget:after {
    display: none !important;
}

.tgw-legacy-dashboard-widgets .widget-dragger {
    opacity: 0.35;
}

.tgw-legacy-dashboard-widgets .panel_s,
.tgw-legacy-dashboard-widgets .panel {
    padding: 0 !important;
}

.tgw-legacy-dashboard-widgets .panel-body {
    padding: 18px !important;
}

.tgw-legacy-dashboard-widgets .panel-heading,
.tgw-legacy-dashboard-widgets .panel-title,
.tgw-legacy-dashboard-widgets .panel_s > .panel-heading {
    border-bottom: 1px solid rgba(220, 233, 246, 0.95) !important;
    border-radius: 18px 18px 0 0 !important;
    background: linear-gradient(135deg, #f6fbff, #ffffff) !important;
    color: #18487e !important;
    font-weight: 900 !important;
}

.tgw-legacy-dashboard-widgets #widget-top_stats > .row,
.tgw-legacy-dashboard-widgets #widget-top_stats .row {
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 12px;
    margin: 0 !important;
}

.tgw-legacy-dashboard-widgets #widget-top_stats [class*="col-"] {
    width: auto !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.tgw-legacy-dashboard-widgets .top_stats_wrapper {
    min-height: 100px;
    padding: 15px !important;
    border: 1px solid rgba(220, 233, 246, 0.95);
    border-radius: 16px;
    background: #f6fbff;
}

.tgw-legacy-dashboard-widgets .top_stats_wrapper .progress {
    height: 7px;
    border-radius: 999px;
    background: #dbeaf7;
    box-shadow: none;
}

.tgw-legacy-dashboard-widgets .top_stats_wrapper .progress-bar {
    border-radius: 999px;
}

.tgw-legacy-dashboard-widgets .top_stats_wrapper svg,
.tgw-legacy-dashboard-widgets .top_stats_wrapper img {
    width: 28px;
    height: 28px;
    padding: 6px;
    border-radius: 10px;
    background: rgba(0, 101, 248, 0.1);
    color: #0065f8;
}

.tgw-legacy-dashboard-widgets .finance-summary .panel_s,
.tgw-legacy-dashboard-widgets .finance-summary .panel {
    box-shadow: none !important;
}

.tgw-legacy-dashboard-widgets .progress-finance-status,
.tgw-legacy-dashboard-widgets .text-stats-wrapper {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.tgw-legacy-dashboard-widgets .progress {
    overflow: hidden;
    height: 8px;
    border-radius: 999px;
    background: #eaf2fb;
    box-shadow: none;
}

.tgw-legacy-dashboard-widgets .progress-bar {
    border-radius: 999px;
    box-shadow: none;
}

.tgw-legacy-dashboard-widgets .grid-cards,
.tgw-legacy-dashboard-widgets .modern-grid .grid-cards {
    gap: 12px !important;
}

.tgw-legacy-dashboard-widgets .stat-card {
    border: 1px solid rgba(220, 233, 246, 0.95) !important;
    border-radius: 16px !important;
    background: #f6fbff !important;
    box-shadow: none !important;
}

.tgw-legacy-dashboard-widgets canvas.chart {
    max-width: 100%;
}

.tgw-legacy-dashboard-widgets .tgw-whatsbot-widget {
    position: relative;
    padding: 18px !important;
    border-color: rgba(205, 231, 218, 0.95) !important;
    border-radius: 20px !important;
    background: linear-gradient(135deg, #ffffff 0%, #f3fff8 100%) !important;
    box-shadow: 0 18px 44px rgba(15, 33, 58, 0.09) !important;
}

.tgw-legacy-dashboard-widgets .tgw-whatsbot-widget:before {
    content: "";
    position: absolute;
    display: block !important;
    inset: auto -80px -100px auto;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: rgba(37, 211, 102, 0.1);
    pointer-events: none;
}

.tgw-legacy-dashboard-widgets .tgw-whatsbot-widget .widget-dragger {
    display: none !important;
}

.tgw-legacy-dashboard-widgets .tgw-whatsbot-header,
.tgw-legacy-dashboard-widgets .tgw-whatsbot-grid {
    position: relative;
    z-index: 1;
}

.tgw-legacy-dashboard-widgets .tgw-whatsbot-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 12px;
}

.tgw-legacy-dashboard-widgets .tgw-whatsbot-card {
    border: 1px solid rgba(216, 233, 226, 0.95);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 24px rgba(15, 33, 58, 0.06);
}

.tgw-command-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.tgw-command-card {
    position: relative;
    overflow: hidden;
    min-height: 148px;
    padding: 18px;
    border: 1px solid rgba(220, 233, 246, 0.95);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(15, 33, 58, 0.08);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.tgw-command-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 202, 255, 0.38);
    box-shadow: 0 22px 50px rgba(24, 72, 126, 0.14);
}

.tgw-command-card:before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: var(--card-accent, #0065f8);
}

.tgw-command-card--blue { --card-accent: linear-gradient(90deg, #18487e, #0065f8); }
.tgw-command-card--cyan { --card-accent: linear-gradient(90deg, #00a5c8, #41dbf2); }
.tgw-command-card--green { --card-accent: linear-gradient(90deg, #0f9f6e, #39d98a); }
.tgw-command-card--orange { --card-accent: linear-gradient(90deg, #f07c24, #f7b731); }
.tgw-command-card--slate { --card-accent: linear-gradient(90deg, #18487e, #536b86); }
.tgw-command-card--violet { --card-accent: linear-gradient(90deg, #4b5bdc, #00caff); }

.tgw-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 14px;
    border-radius: 14px;
    background: rgba(0, 101, 248, 0.1);
    color: #0065f8;
    font-size: 18px;
}

.tgw-card-label,
.tgw-command-card small {
    display: block;
    color: #5f728c;
    font-size: 12px;
    font-weight: 800;
}

.tgw-command-card strong {
    display: block;
    margin: 5px 0;
    color: #10223a;
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
}

.tgw-dashboard-panel,
.tgw-leads-strip {
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid rgba(220, 233, 246, 0.95);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 42px rgba(15, 33, 58, 0.08);
}

body.admin_settings #wrapper .content .row,
body.settings #wrapper .content .row {
    display: flex;
    flex-wrap: wrap;
}

#wrapper .content .nav.navbar-pills.nav-stacked {
    padding: 10px;
    border: 1px solid rgba(220, 233, 246, 0.95);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 42px rgba(15, 33, 58, 0.08);
}

#wrapper .content .nav.navbar-pills.nav-stacked > li > a {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    border-radius: 12px;
    color: #334761;
    font-weight: 800;
}

#wrapper .content .nav.navbar-pills.nav-stacked > li.active > a,
#wrapper .content .nav.navbar-pills.nav-stacked > li > a:hover,
#wrapper .content .nav.navbar-pills.nav-stacked > li > a:focus {
    background: linear-gradient(135deg, #18487e, #0065f8) !important;
    color: #fff !important;
}

#wrapper .content .nav.navbar-pills.nav-stacked .menu-icon {
    width: 20px;
    color: inherit;
    text-align: center;
}

.tgw-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.tgw-panel-head span {
    display: block;
    color: #00a5c8;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tgw-panel-head h2 {
    margin: 2px 0 0;
    color: #18487e;
    font-size: 19px;
    font-weight: 900;
}

.tgw-panel-head i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #18487e, #00caff);
    color: #fff;
}

.tgw-page-table {
    display: grid;
    gap: 8px;
}

.tgw-page-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px 72px;
    gap: 12px;
    align-items: center;
    padding: 11px 12px;
    border-radius: 12px;
    background: #f6fbff;
    color: #334761;
    font-weight: 800;
}

.tgw-page-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tgw-page-row strong,
.tgw-page-row em {
    color: #18487e;
    font-style: normal;
    text-align: center;
}

.tgw-page-row--head {
    background: #eaf7ff;
    color: #18487e;
    font-size: 12px;
}

.tgw-health-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 14px;
    background: #f6fbff;
}

.tgw-health-item > span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(57, 217, 138, 0.12);
}

.tgw-health-item.is-ok > span { background: #20bf6b; }
.tgw-health-item.is-warning > span {
    background: #f7b731;
    box-shadow: 0 0 0 6px rgba(247, 183, 49, 0.16);
}

.tgw-health-item strong,
.tgw-health-item small {
    display: block;
}

.tgw-health-item strong {
    color: #18487e;
    font-weight: 900;
}

.tgw-health-item small,
.tgw-cron-note,
.tgw-empty-state {
    color: #5f728c;
    font-weight: 700;
}

.tgw-cron-note code {
    display: block;
    margin-top: 8px;
    padding: 8px;
    border-radius: 10px;
    background: #10223a;
    color: #dffbff;
    direction: ltr;
    white-space: normal;
    word-break: break-all;
}

.tgw-leads-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    gap: 12px;
}

.tgw-lead-status {
    padding: 14px;
    border-right: 5px solid var(--status-color);
    border-radius: 14px;
    background: #f6fbff;
}

.tgw-lead-status span,
.tgw-lead-status strong {
    display: block;
}

.tgw-lead-status span {
    color: #5f728c;
    font-size: 12px;
    font-weight: 900;
}

.tgw-lead-status strong {
    margin-top: 4px;
    color: #18487e;
    font-size: 24px;
    font-weight: 900;
}

@media (max-width: 1199px) {
    .tgw-ops-body {
        grid-template-columns: 1fr;
    }

    .tgw-action-grid {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }

    .tgw-kpi-panel {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
    }

    .tgw-legacy-dashboard-widgets #widget-top_stats > .row,
    .tgw-legacy-dashboard-widgets #widget-top_stats .row {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    .tgw-legacy-dashboard-widgets .tgw-whatsbot-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    .tgw-command-grid {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
    }

    .tgw-leads-strip {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }
}

@media (max-width: 767px) {
    .tgw-ops-topbar {
        display: block;
        padding: 20px 16px 8px;
    }

    .tgw-ops-status {
        justify-content: flex-start;
        min-width: 0;
        margin-top: 14px;
    }

    .tgw-ops-body {
        padding: 12px 16px 18px;
    }

    .tgw-action-grid,
    .tgw-kpi-panel {
        grid-template-columns: 1fr;
    }

    .tgw-legacy-heading {
        display: block;
    }

    .tgw-legacy-heading small {
        margin-top: 8px;
    }

    .tgw-legacy-dashboard-widgets #widget-top_stats > .row,
    .tgw-legacy-dashboard-widgets #widget-top_stats .row {
        grid-template-columns: 1fr;
    }

    .tgw-legacy-dashboard-widgets .tgw-whatsbot-grid {
        grid-template-columns: 1fr;
    }

    .tgw-command-grid,
    .tgw-leads-strip {
        grid-template-columns: 1fr;
    }

    .tgw-page-row {
        grid-template-columns: minmax(0, 1fr) 70px 56px;
        font-size: 12px;
    }
}

.panel,
.tw-card,
.panel_s {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid rgba(220, 233, 246, 0.92);
    border-radius: 18px;
    box-shadow: 0 16px 42px rgba(15, 33, 58, 0.08);
    margin-bottom: var(--tgw-spacing-lg);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.panel:hover,
.tw-card:hover {
    box-shadow: 0 20px 52px rgba(15, 33, 58, 0.13);
    transform: translateY(-2px);
    border-color: rgba(65, 219, 242, 0.45);
}

.panel-heading,
.panel-title {
    background: linear-gradient(135deg, rgba(246, 251, 255, 0.96), rgba(255, 255, 255, 0.98)) !important;
    border-bottom: 1px solid rgba(220, 233, 246, 0.95);
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 800;
    color: #18487e;
    border-radius: 18px 18px 0 0;
}

.panel-body {
    padding: var(--tgw-spacing-lg);
}

.panel-primary,
.panel-info {
    border-top: 3px solid var(--tgw-primary);
}

/* Widget Stats - Dashboard Cards */
.widget {
    background: linear-gradient(135deg, #ffffff 0%, #f6fbff 100%);
    border: 1px solid rgba(220, 233, 246, 0.95);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 14px 34px rgba(15, 33, 58, 0.08);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
    position: relative;
    overflow: hidden;
}

.widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #18487e, #0065f8, #00caff);
}

.widget::after {
    content: '';
    position: absolute;
    inset: auto -34px -44px auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(0, 202, 255, 0.1);
    pointer-events: none;
}

.widget:hover {
    box-shadow: 0 20px 48px rgba(24, 72, 126, 0.14);
    transform: translateY(-3px);
    border-color: rgba(0, 202, 255, 0.42);
}

.widget h3 {
    font-size: clamp(24px, 2vw, 34px);
    font-weight: 900;
    background: linear-gradient(135deg, #18487e, #0065f8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.widget p {
    font-size: 13px;
    color: #5f728c;
    font-weight: 800;
    text-transform: none;
    letter-spacing: 0;
}

/* Widget Icons */
.widget-icon,
.dashboard-icon {
    background: linear-gradient(135deg, #18487e, #00caff);
    color: white;
    border-radius: 14px;
    padding: var(--tgw-spacing-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 24px rgba(0, 101, 248, 0.22);
    width: 48px;
    height: 48px;
    font-size: 24px;
    transition: all var(--tgw-transition-fast);
}

.widget:hover .widget-icon,
.widget:hover .dashboard-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--tgw-shadow-cyber);
}

/* ========================================
   BUTTONS - Lightweight & Modern
   ======================================== */

.btn {
    border-radius: var(--tgw-radius-md);
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    transition: all var(--tgw-transition-fast);
    border: none;
    box-shadow: var(--tgw-shadow-sm);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--tgw-shadow-md);
}

.btn-primary {
    background: linear-gradient(135deg, var(--tgw-primary) 0%, var(--tgw-primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--tgw-primary-hover) 0%, var(--tgw-primary-dark) 100%);
    box-shadow: 0 4px 15px rgba(65, 219, 242, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--tgw-success) 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--tgw-warning) 0%, #D97706 100%);
    color: white;
}

.btn-warning:hover {
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--tgw-danger) 0%, #DC2626 100%);
    color: white;
}

.btn-danger:hover {
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, var(--tgw-info) 0%, #0891B2 100%);
    color: white;
}

.btn-info:hover {
    box-shadow: 0 4px 15px rgba(0, 202, 255, 0.4);
}

/* ========================================
   FORMS - Clean & Modern
   ======================================== */

.form-control {
    border: 1px solid var(--tgw-border-light);
    border-radius: var(--tgw-radius-md);
    padding: 0.625rem 1rem;
    font-size: 14px;
    transition: all var(--tgw-transition-fast);
    background: var(--tgw-bg-primary);
    color: var(--tgw-text-primary);
}

.form-control:focus {
    border-color: var(--tgw-primary);
    box-shadow: 0 0 0 3px rgba(65, 219, 242, 0.1);
    background: var(--tgw-bg-primary);
    outline: none;
}

.form-group label {
    font-weight: 500;
    color: var(--tgw-text-primary);
    margin-bottom: 0.5rem;
    font-size: 13px;
}

select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2341dbf2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
    height:45px;
}

/* ========================================
   TABLES - Modern & Lightweight
   ======================================== */

.table {
    background: var(--tgw-bg-primary);
    border-radius: var(--tgw-radius-lg);
    overflow: hidden;
}

.table thead th {
    background: var(--tgw-bg-tertiary);
    color: var(--tgw-text-primary);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem;
    border-bottom: 2px solid var(--tgw-primary);
}

.table tbody tr {
    transition: all var(--tgw-transition-fast);
    border-bottom: 1px solid var(--tgw-border-light);
}

.table tbody tr:hover {
    background: linear-gradient(90deg, rgba(65, 219, 242, 0.05) 0%, transparent 100%);
    border-left: 3px solid var(--tgw-primary);
}

.table tbody td {
    padding: 1rem;
    color: var(--tgw-text-secondary);
    font-size: 14px;
}

/* ========================================
   DROPDOWN MENUS - Clean & Modern
   ======================================== */

.dropdown-menu {
    border: 1px solid var(--tgw-border-light);
    border-radius: var(--tgw-radius-lg);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    padding: var(--tgw-spacing-sm);
    background: var(--tgw-bg-primary);
    margin-top: 0.5rem;
    background-color:#0a52fa;
}

.dropdown-menu > li > a {
    padding: 0.75rem 1rem;
    border-radius: var(--tgw-radius-sm);
    color: #ffffff !important;
    transition: all var(--tgw-transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-menu > li > a:hover {
    background: linear-gradient(90deg, rgba(65, 219, 242, 0.1) 0%, transparent 100%);
    color: var(--tgw-primary);
    transform: translateX(3px);
}

/* ========================================
   BADGES & LABELS
   ======================================== */

.badge,
.label {
    border-radius: var(--tgw-radius-sm);
    padding: 0.25rem 0.75rem;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.3px;
}

.label-primary {
    background: var(--tgw-primary-light);
    color: var(--tgw-primary);
}

.label-success {
    background: #D1FAE5;
    color: var(--tgw-success);
}

.label-warning {
    background: #FEF3C7;
    color: var(--tgw-warning);
}

.label-danger {
    background: #FEE2E2;
    color: var(--tgw-danger);
}

/* ========================================
   ALERTS - Modern Notifications
   ======================================== */

.alert {
    border-radius: var(--tgw-radius-lg);
    border: 1px solid;
    border-left-width: 4px;
    padding: var(--tgw-spacing-md);
    font-size: 14px;
    box-shadow: var(--tgw-shadow-sm);
}

.alert-success {
    background: #D1FAE5;
    border-color: var(--tgw-success);
    border-left-color: var(--tgw-success);
    color: #065F46;
}

.alert-info {
    background: linear-gradient(90deg, rgba(65, 219, 242, 0.1) 0%, rgba(0, 202, 255, 0.05) 100%);
    border-color: var(--tgw-primary);
    border-left-color: var(--tgw-primary);
    color: #0c4a6e;
}

.alert-warning {
    background: #FEF3C7;
    border-color: var(--tgw-warning);
    border-left-color: var(--tgw-warning);
    color: #92400E;
}

.alert-danger {
    background: #FEE2E2;
    border-color: var(--tgw-danger);
    border-left-color: var(--tgw-danger);
    color: #991B1B;
}

/* ========================================
   MODALS - Clean Design
   ======================================== */

.modal-content {
    border-radius: var(--tgw-radius-xl);
    border: none;
    box-shadow: var(--tgw-shadow-xl);
    margin-top: 100px !important;
}

.modal-header {
    background: var(--tgw-bg-secondary);
    border-bottom: 1px solid var(--tgw-border-light);
    padding: var(--tgw-spacing-lg);
    border-radius: var(--tgw-radius-xl) var(--tgw-radius-xl) 0 0;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--tgw-text-primary);
}

.modal-body {
    padding: var(--tgw-spacing-xl);
}
/* ========================================
   BREADCRUMB - Modern Trail
   ======================================== */

.breadcrumb {
    background: transparent;
    padding: var(--tgw-spacing-md) 0;
    margin-bottom: var(--tgw-spacing-lg);
}

.breadcrumb > li + li:before {
    content: "→";
    color: var(--tgw-text-tertiary);
    padding: 0 var(--tgw-spacing-sm);
}

.breadcrumb > li a {
    color: var(--tgw-primary);
    transition: color var(--tgw-transition-fast);
}

.breadcrumb > li a:hover {
    color: var(--tgw-primary-hover);
}

/* ========================================
   ANIMATIONS - Lightweight & Smooth
   ======================================== */

@keyframes pulseGlow {
    0%, 100% { 
        box-shadow: 0 4px 15px rgba(65, 219, 242, 0.3); 
    }
    50% { 
        box-shadow: 0 6px 25px rgba(65, 219, 242, 0.5); 
    }
}

@keyframes iconPulse {
    0%, 100% { 
        transform: scale(1);
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    }
    50% { 
        transform: scale(1.05);
        text-shadow: 0 0 25px rgba(255, 255, 255, 1);
    }
}

@keyframes badgePulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 0 4px 15px rgba(245, 158, 11, 0.7);
    }
}

@keyframes rotateBackground {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* ========================================
   SCROLLBAR - Modern Style
   ======================================== */

::-webkit-scrollbar {
    width: 12px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--tgw-bg-tertiary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--tgw-primary) 0%, var(--tgw-blue) 100%);
    border-radius: 10px;
    border: 2px solid var(--tgw-bg-tertiary);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--tgw-cyan) 0%, var(--tgw-primary) 100%);
}

/* ========================================
   RESPONSIVE - Mobile Optimization
   ======================================== */

@media (max-width: 991px) {
    .tgw-dashboard-hero {
        grid-template-columns: 1fr;
    }

    .tgw-dashboard-services {
        min-width: 0;
    }

    .panel-body {
        padding: var(--tgw-spacing-md);
    }
    
    .widget {
        padding: var(--tgw-spacing-md);
    }
}

@media (max-width: 767px) {
    .btn {
        padding: 0.5rem 1rem;
        font-size: 13px;
    }
    
    .widget h3 {
        font-size: 1.5rem;
    }
}

/* ========================================
   UTILITIES - Helper Classes
   ======================================== */

.text-gradient {
    background: var(--tgw-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.shadow-glow {
    box-shadow: var(--tgw-shadow-cyber);
}

.border-gradient {
    border: 2px solid transparent;
    border-image: var(--tgw-gradient) 1;
}

/* ========================================
   DASHBOARD BUILDER UTILITIES (migrated from style.css)
   ======================================== */
.preview-widgets .widget {display:none;}
.placeholder-dashboard-widgets {border:2px dashed #b9b9b9; margin-bottom:25px; min-height:130px;}
.widget-dragger:before {content:"\f58e"; font-family:"Font Awesome 6 Free"; -moz-osx-font-smoothing:grayscale; -webkit-font-smoothing:antialiased; display:var(--fa-display,inline-block); font-style:normal; font-variant:normal; line-height:1; text-rendering:auto; font-weight:900;}
.widget-dragger {position:absolute; top:15px; left:-15px; color:#cbd5e1; cursor:move; z-index:2;}
.widget-dragger:hover, .widget-dragger:active {color:#94a3b8;}
.mobile .widget-dragger {display:none;}
.screen-options-area {background:#f1f5f9; padding:10px 30px; border-bottom:1px solid #e2e8f0; display:none;}
.screen-options-btn {position:absolute; background:#e2e8f0; color:#1e293b; padding:5px 15px; display:inline-flex; align-items:center; right:38px; z-index:98; border-left:1px solid #e2e8f0; border-right:1px solid #e2e8f0; border-bottom:1px solid #e2e8f0; border-bottom-left-radius:3px; border-bottom-right-radius:3px; cursor:pointer; font-size:13px;}
[dir="rtl"] .screen-options-btn {right:auto; left:38px;}
