/* ============================================================
   EdgeCRM — SpringEdge Theme
   Inspired by seweb-new design language
   Primary: #da6f29 (orange)  |  Secondary: #124265 (dark blue)
   ============================================================ */

/* --- Base & Body --- */
body {
    background-color: #f1f5f9 !important;
    font-family: 'Raleway', 'Open Sans', sans-serif;
}
.main-container {
    background-color: #f1f5f9 !important;
}
/* The sidebar is only as tall as its menu, so paint its colour as a stripe down
   the container to carry it to the bottom of the page. Widths match the sidebar
   in main-responsive.css; on phones the menu collapses to the top, so no stripe. */
@media (min-width: 768px) {
    .main-container {
        background-image: linear-gradient(to right, #124265 35px, transparent 35px);
        background-repeat: repeat-y;
    }
}
@media (min-width: 980px) {
    body:not(.navigation-small) .main-container {
        background-image: linear-gradient(to right, #124265 225px, transparent 225px);
    }
}
body.page-full-width .main-container {
    background-image: none;
}
.footer {
    background-color: #f8fafc !important;
}

/* --- Top Navbar (Header) --- */
.navbar-inverse {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}
.navbar-inverse .navbar-brand,
.navbar-inverse .navbar-brand:hover {
    color: #124265;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.5px;
}
.navbar-inverse .navbar-brand i,
.navbar-inverse .navbar-brand:hover i {
    color: #da6f29;
}
.navbar-inverse .nav > li > a {
    color: #64748b;
}
.navbar-inverse .nav > li.current-user > a {
    color: #334155 !important;
}
.navbar-inverse .nav > li.current-user > a i {
    display: inline-block;
    text-align: center;
    width: 1.25em;
    color: #da6f29 !important;
    font-size: 12px;
}
.navbar-inverse .nav > li:hover > a,
.navbar-inverse .nav > li:active > a {
    color: #124265;
    background: #f1f5f9;
}
.navbar-inverse .nav li.dropdown.open > .dropdown-toggle,
.navbar-inverse .nav li.dropdown.active > .dropdown-toggle,
.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle {
    background: #f1f5f9;
    color: #124265;
}
.navbar-tools .dropdown-menu li .dropdown-menu-title {
    background: #124265;
    color: #ffffff;
}
.nav > li.dropdown .dropdown-toggle .badge {
    background-color: #da6f29;
    border: none;
}
.navbar-toggle {
    background-color: #f1f5f9;
    border-color: #e2e8f0;
}
.navbar-inverse .navbar-toggle:hover,
.navbar-inverse .navbar-toggle:focus {
    background-color: #e2e8f0;
}
.navbar-toggle span {
    color: #124265;
}

/* User avatar circle */
.user-avatar-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #da6f29;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    margin-right: 8px;
    vertical-align: middle;
}

/* --- Sidebar Navigation --- */
.main-navigation {
    background-color: #124265 !important;
}
ul.main-navigation-menu > li > ul.sub-menu,
.navigation-small ul.main-navigation-menu > li > ul.sub-menu {
    background-color: #0d3350 !important;
}
ul.main-navigation-menu > li a {
    border-bottom: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    transition: all 0.2s ease;
}
ul.main-navigation-menu > li a > i {
    color: #da6f29;
    font-weight: normal;
}
ul.main-navigation-menu > li a .title {
    color: #cbd5e1;
}
ul.main-navigation-menu > li a .icon-arrow {
    color: #64748b;
}

/* Active menu item */
ul.main-navigation-menu > li.active > a {
    background: #da6f29 !important;
    border-top: none !important;
    color: #fff;
    box-shadow: 0 2px 8px rgba(218, 111, 41, 0.3);
}
ul.main-navigation-menu > li.active > a .selected:before {
    color: #da6f29 !important;
}
ul.main-navigation-menu > li.active > a i {
    color: #fff;
}
ul.main-navigation-menu > li.active > a .title {
    color: #fff;
}

/* Hover menu item */
ul.main-navigation-menu > li.open > a,
ul.main-navigation-menu > li > a:hover,
ul.main-navigation-menu > li:hover > a {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}
ul.main-navigation-menu > li.open > a .title,
ul.main-navigation-menu > li > a:hover .title,
ul.main-navigation-menu > li:hover > a .title {
    color: #ffffff;
}

/* Sub-menu items */
ul.main-navigation-menu li > ul.sub-menu > li > a {
    color: #94a3b8 !important;
    border-top-color: rgba(255, 255, 255, 0.04);
}
ul.main-navigation-menu li > ul.sub-menu > li.open > a,
ul.main-navigation-menu li > ul.sub-menu > li.active > a,
ul.main-navigation-menu li > ul.sub-menu > li > a:hover {
    color: #ffffff !important;
    background: rgba(218, 111, 41, 0.15) !important;
}
ul.main-navigation-menu li > ul.sub-menu > li.active > a {
    border-left: 3px solid #da6f29;
}

/* Icon alignment — consistent width for all menu icons */
ul.main-navigation-menu > li > a > i:first-child {
    width: 22px;
    text-align: center;
    font-size: 16px;
    display: inline-block;
    vertical-align: middle;
    transition: transform 0.2s ease;
}
ul.main-navigation-menu > li:hover > a > i:first-child,
ul.main-navigation-menu > li.open > a > i:first-child {
    transform: scale(1.1);
}

/* Sub-menu icons — smaller and muted */
ul.main-navigation-menu li > ul.sub-menu > li > a > i:first-child {
    width: 18px;
    text-align: center;
    font-size: 12px;
    display: inline-block;
    vertical-align: middle;
    color: #64748b;
    transition: color 0.2s ease;
}
ul.main-navigation-menu li > ul.sub-menu > li:hover > a > i:first-child,
ul.main-navigation-menu li > ul.sub-menu > li.active > a > i:first-child {
    color: #da6f29;
}

/* Smooth sub-menu slide */
ul.main-navigation-menu li > ul.sub-menu {
    padding: 4px 0;
}
ul.main-navigation-menu li > ul.sub-menu > li > a {
    padding-top: 7px !important;
    padding-bottom: 7px !important;
    transition: all 0.15s ease;
}

/* Menu section separator for parent items */
ul.main-navigation-menu > li:first-child > a {
    border-top: none !important;
}

/* Navigation toggler */
.navigation-toggler,
.go-top {
    background-color: #0d3350 !important;
    color: #64748b;
}
.navigation-toggler:hover i:first-child,
.go-top:hover {
    color: #da6f29;
}
.navigation-toggler:hover i:last-child {
    color: #64748b;
}
.navigation-small .navigation-toggler:hover i:first-child {
    color: #64748b;
}
.navigation-small .navigation-toggler:hover i:last-child {
    color: #da6f29;
}

/* --- Content Area --- */
.main-content .container {
    border-left: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}
body.rtl .main-content .container {
    border-left: none;
    border-right: 1px solid #e2e8f0;
}

/* --- Breadcrumbs --- */
.breadcrumb {
    background: transparent;
    border-bottom: 1px solid #e2e8f0;
}
.breadcrumb i {
    color: #94a3b8;
}
.breadcrumb a {
    color: #da6f29;
}
.breadcrumb a:hover {
    color: #c05f22;
}

/* --- Headings --- */
h1, h2, h3, h4, h5, h6 {
    color: #124265;
}

/* --- Links --- */
a {
    color: #da6f29;
}
a:hover,
a:focus {
    color: #c05f22;
}

/* --- Buttons --- */
.btn {
    border-radius: 5px;
    transition: all 0.2s ease;
}
.btn-primary {
    background-color: #da6f29;
    border-color: #c05f22;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.open .dropdown-toggle.btn-primary {
    background-color: #c05f22;
    border-color: #a8511d;
}
.btn-bricky {
    background-color: #da6f29;
    border-color: #c05f22;
}
.btn-bricky:hover {
    background-color: #c05f22;
    border-color: #a8511d;
}

/* --- Form Controls --- */
.form-control {
    border-radius: 6px;
    border-color: #e2e8f0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control:focus {
    border-color: #da6f29;
    box-shadow: 0 0 0 3px rgba(218, 111, 41, 0.1);
}

/* --- Panels & Cards --- */
.panel {
    border-radius: 8px;
    border-color: #e2e8f0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
}
.panel-heading {
    border-radius: 8px 8px 0 0;
}
.panel-body {
    border-radius: 0 0 8px 8px;
}
.panel-primary > .panel-heading {
    background-color: #124265;
    border-color: #124265;
}

/* --- Tables --- */
.table > thead > tr > th {
    background-color: #124265;
    color: #ffffff;
    border-bottom-color: #124265;
    font-weight: 600;
}
.table-bordered > thead > tr > th {
    border-color: #0d3350;
}
.table-hover > tbody > tr:hover {
    background-color: #f8fafc;
}
.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #f8fafc;
}

/* --- Dropdowns --- */
.dropdown-menu {
    border-radius: 8px;
    border-color: #e2e8f0;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
    background-color: #f1f5f9;
    color: #124265;
}

/* --- Pagination --- */
.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > a:focus {
    background-color: #da6f29;
    border-color: #c05f22;
}
.pagination > li > a,
.pagination > li > span {
    color: #da6f29;
    border-radius: 4px;
    margin: 0 2px;
}
.pagination > li > a:hover {
    color: #c05f22;
    background-color: #fff7ed;
}

/* --- Badges & Labels --- */
.badge {
    background-color: #da6f29;
}
.label-primary {
    background-color: #da6f29;
}
.label-info {
    background-color: #124265;
}

/* --- Alerts --- */
.alert-info {
    border-color: #bfdbfe;
    background-color: #eff6ff;
    color: #124265;
}

/* --- Footer --- */
.footer-fixed .footer {
    background: #f8fafc !important;
    border-top-color: #e2e8f0;
}
.footer-inner {
    color: #64748b;
}
.go-top {
    transition: all 0.2s ease;
}
.go-top:hover {
    background-color: #da6f29 !important;
    color: #fff;
}

/* --- Login Page --- */
body.springedge-login {
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.login-wrapper {
    display: flex;
    max-width: 900px;
    width: 90%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    margin: 40px auto;
}
.login-brand-panel {
    background: #124265;
    color: #ffffff;
    padding: 50px 40px;
    flex: 0 0 42%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.login-brand-panel h1 {
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}
.login-brand-panel h1 span {
    color: #da6f29;
}
.login-brand-panel p {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 30px;
}
.login-brand-panel ul {
    list-style: none;
    padding: 0;
}
.login-brand-panel ul li {
    color: #cbd5e1;
    font-size: 14px;
    margin-bottom: 14px;
    padding-left: 24px;
    position: relative;
}
.login-brand-panel ul li:before {
    content: "\f00c";
    font-family: FontAwesome;
    position: absolute;
    left: 0;
    color: #da6f29;
    font-size: 13px;
}
.login-form-panel {
    background: #ffffff;
    padding: 50px 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.login-form-panel h3 {
    color: #124265;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}
.login-form-panel .login-subtitle {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 28px;
}
.login-form-panel .form-group {
    margin-bottom: 18px;
}
.login-form-panel label {
    color: #334155;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
}
.login-form-panel .form-control {
    height: 44px;
    background: #f9fafb;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0 14px;
    font-size: 14px;
}
.login-form-panel .form-control:focus {
    border-color: #da6f29;
    box-shadow: 0 0 0 3px rgba(218, 111, 41, 0.1);
    background: #ffffff;
}
.login-form-panel .btn-login {
    width: 100%;
    height: 44px;
    background: #da6f29;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: 8px;
}
.login-form-panel .btn-login:hover {
    background: #c05f22;
}
.login-form-panel .forgot-link {
    color: #64748b;
    font-size: 13px;
    text-decoration: none;
    display: inline-block;
    margin-top: 14px;
}
.login-form-panel .forgot-link:hover {
    color: #da6f29;
}
.login-form-panel .remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

/* Login responsive */
@media (max-width: 767px) {
    .login-wrapper {
        flex-direction: column;
    }
    .login-brand-panel {
        flex: none;
        padding: 30px 25px;
    }
    .login-form-panel {
        padding: 30px 25px;
    }

    .navbar-inverse {
        background: none !important;
    }
    .navbar-tools {
        background: #ffffff;
        border-top-color: #e2e8f0;
    }
    .navbar-header {
        background-color: #ffffff;
    }
}

/* --- Misc Overrides --- */
.layout-boxed header,
.layout-boxed .main-container,
.layout-boxed .footer {
    border-left-color: #e2e8f0;
    border-right-color: #e2e8f0;
}

/* Select2 override */
.select2-container .select2-choice {
    border-radius: 6px;
    border-color: #e2e8f0;
}

/* iCheck orange theme */
.iCheck-helper + .icheckbox_square-blue.checked,
.icheckbox_square-blue.checked {
    border-color: #da6f29;
}

/* Tooltip */
.tooltip-inner {
    background-color: #124265;
    border-radius: 6px;
}
.tooltip.top .tooltip-arrow {
    border-top-color: #124265;
}

/* ============================================================
   Dashboard
   ============================================================ */

/* Welcome Banner */
.dash-welcome {
    background: linear-gradient(135deg, #124265 0%, #1a5a8a 100%);
    color: #fff;
    border-radius: 10px;
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(18, 66, 101, 0.2);
}
.dash-welcome h2 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 600;
    color: #fff;
}
.dash-welcome .dash-date {
    font-size: 13px;
    opacity: 0.8;
}

/* KPI Stat Cards */
.dash-kpi-card {
    background: #fff;
    border-radius: 8px;
    padding: 18px 16px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    border-left: 4px solid #ccc;
    transition: box-shadow 0.2s, transform 0.15s;
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
    margin-bottom: 12px;
}
.dash-kpi-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}
.dash-kpi-card:focus { text-decoration: none; color: inherit; }
.dash-kpi-top {
    display: flex;
    align-items: center;
    gap: 12px;
}
.dash-kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
}
.dash-kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: #124265;
    line-height: 1.1;
}
.dash-kpi-label {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

/* Overview Panels */
.dash-panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    margin-bottom: 20px;
    overflow: hidden;
}
.dash-panel-head {
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dash-panel-head.revenue { background: #16a34a; }
.dash-panel-head.expense { background: #f59e0b; }
.dash-panel-head.neutral { background: #124265; }
.dash-panel-body {
    padding: 18px;
}
.dash-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}
.dash-metric:last-child { border-bottom: none; }
.dash-metric-label { color: #64748b; }
.dash-metric-value { font-weight: 600; color: #124265; }
.dash-metric-value.green { color: #16a34a; }
.dash-metric-value.red   { color: #ef4444; }
.dash-metric-value.amber { color: #f59e0b; }

/* Progress Bar Override */
.dash-progress {
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    margin-top: 12px;
    margin-bottom: 4px;
    overflow: hidden;
}
.dash-progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}
.dash-progress-label {
    font-size: 11px;
    color: #94a3b8;
    text-align: right;
}

/* CSS Bar Chart */
.dash-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 140px;
    padding: 0 4px;
}
.dash-chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}
.dash-bar {
    width: 100%;
    max-width: 40px;
    background: linear-gradient(180deg, #da6f29, #e8955e);
    border-radius: 4px 4px 0 0;
    transition: height 0.4s ease;
    min-height: 4px;
    position: relative;
}
.dash-bar:hover {
    background: linear-gradient(180deg, #c05f22, #da6f29);
}
.dash-bar-amount {
    font-size: 10px;
    color: #64748b;
    margin-bottom: 4px;
    white-space: nowrap;
    font-weight: 600;
}
.dash-bar-label {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 6px;
    font-weight: 500;
}

/* Horizontal Status Bars */
.dash-hbar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13px;
}
.dash-hbar-label {
    width: 120px;
    flex-shrink: 0;
    color: #334155;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-hbar-track {
    flex: 1;
    height: 18px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}
.dash-hbar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
    min-width: 2px;
}
.dash-hbar-count {
    width: 45px;
    flex-shrink: 0;
    font-weight: 600;
    color: #124265;
    font-size: 13px;
}

/* Recent Tables */
.dash-table {
    width: 100%;
    font-size: 13px;
}
.dash-table thead th {
    background: #124265;
    color: #fff;
    font-weight: 600;
    padding: 10px 12px;
    font-size: 12px;
    white-space: nowrap;
    border: none;
}
.dash-table thead th:first-child { border-radius: 6px 0 0 0; }
.dash-table thead th:last-child  { border-radius: 0 6px 0 0; }
.dash-table tbody td {
    padding: 9px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}
.dash-table tbody tr:hover td {
    background: #f8fafc;
}
.dash-table .status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}
.dash-view-all {
    display: block;
    text-align: center;
    padding: 10px;
    font-size: 13px;
    color: #da6f29;
    font-weight: 500;
    border-top: 1px solid #f1f5f9;
}
.dash-view-all:hover {
    color: #c05f22;
    background: #fef7f0;
    text-decoration: none;
}

/* Quick Actions */
.dash-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}
.dash-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    transition: all 0.2s;
    text-decoration: none;
}
.dash-action-btn:hover {
    border-color: #da6f29;
    color: #da6f29;
    box-shadow: 0 2px 8px rgba(218, 111, 41, 0.12);
    text-decoration: none;
}
.dash-action-btn i {
    font-size: 14px;
    color: #da6f29;
}

/* Empty State */
.dash-empty {
    text-align: center;
    padding: 30px 20px;
    color: #94a3b8;
    font-size: 14px;
}

@media (max-width: 767px) {
    .dash-welcome { padding: 18px 16px; }
    .dash-welcome h2 { font-size: 18px; }
    .dash-kpi-value { font-size: 20px; }
    .dash-hbar-label { width: 80px; font-size: 11px; }
    .dash-chart { height: 100px; }
}

/* ============================================================
   Activity Timeline Widget
   ============================================================ */
.activity-timeline { padding: 10px 0; }
.activity-timeline h4 { color: #124265; font-weight: 600; }
.act-list { list-style: none; padding: 0; margin: 0; position: relative; }
.act-list::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
}
.act-item {
    display: flex;
    align-items: flex-start;
    padding: 8px 0;
    position: relative;
}
.act-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 1;
    font-size: 12px;
    color: #fff;
}
.act-icon-green  { background: #16a34a; }
.act-icon-blue   { background: #3b82f6; }
.act-icon-orange { background: #f59e0b; }
.act-icon-red    { background: #ef4444; }
.act-icon-grey   { background: #9ca3af; }
.act-icon-purple { background: #8b5cf6; }
.act-content { margin-left: 12px; flex: 1; }
.act-desc { margin: 0; font-size: 13px; color: #333; line-height: 1.4; }
.act-meta { font-size: 11px; color: #999; }
.act-change {
    display: inline-block;
    margin-left: 8px;
    font-size: 11px;
    color: #666;
    background: #f3f4f6;
    padding: 1px 6px;
    border-radius: 3px;
}

/* ============================================================
   Reports Module
   ============================================================ */
.report-filter-bar {
    background: #fff;
    padding: 14px 20px;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.report-filter-bar .form-group {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.report-filter-bar label {
    margin-bottom: 0;
    font-weight: 600;
    font-size: 13px;
    color: #64748b;
    white-space: nowrap;
}
.report-filter-bar .form-control {
    width: 150px;
}

.report-summary-card {
    background: #fff;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    border-left: 4px solid #ccc;
    margin-bottom: 12px;
}
.report-summary-card span {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.3px;
    display: block;
}
.report-summary-card strong {
    font-size: 22px;
    color: #124265;
    display: block;
    margin-top: 4px;
    line-height: 1.2;
}
.report-summary-card small {
    font-size: 11px;
    color: #94a3b8;
    display: block;
    margin-top: 2px;
}

.report-table thead th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 10px 14px;
}
.report-table tbody td {
    padding: 10px 14px;
    font-size: 13px;
    vertical-align: middle;
}

/* ============================================================
   Modal Overrides — Fix bootstrap-modal plugin conflicts
   ============================================================ */

/* Reset bootstrap-modal plugin's absolute positioning for standard modals */
.modal.fade {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    display: none;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 1050;
}
.modal.fade.in {
    top: 0 !important;
    display: block;
}
.modal-backdrop {
    z-index: 1040 !important;
    background: #0f172a !important;
    opacity: 0 !important;
}
.modal-backdrop.in {
    opacity: 0.5 !important;
}

/* Modal Dialog */
.modal-dialog {
    position: relative;
    margin: 60px auto;
}
.modal-dialog.modal-sm {
    width: 380px;
}

/* Modal Content — Enhanced styling */
.modal .modal-content {
    background: #fff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* Modal Header */
.modal .modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #124265;
    color: #fff;
}
.modal .modal-header .modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}
.modal .modal-header .modal-title i {
    margin-right: 8px;
    opacity: 0.85;
}
.modal .modal-header .close {
    color: #fff;
    opacity: 0.7;
    text-shadow: none;
    font-size: 22px;
    margin-top: -2px;
}
.modal .modal-header .close:hover {
    opacity: 1;
}

/* Danger modal header variant */
.modal .modal-header.modal-header-danger {
    background: #ef4444;
}

/* Modal Body */
.modal .modal-body {
    padding: 24px;
    font-size: 14px;
    color: #334155;
    max-height: 70vh;
    overflow-y: auto;
}
.modal .modal-body label {
    font-weight: 600;
    color: #334155;
    font-size: 13px;
    margin-bottom: 6px;
}
.modal .modal-body .form-control {
    height: 38px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}
.modal .modal-body .form-control:focus {
    border-color: #da6f29;
    box-shadow: 0 0 0 3px rgba(218, 111, 41, 0.1);
}
.modal .modal-body textarea.form-control {
    height: auto;
}

/* Modal Footer */
.modal .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.modal .modal-footer .btn {
    min-width: 80px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
}
.modal .modal-footer .btn-default {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #64748b;
}
.modal .modal-footer .btn-default:hover {
    background: #f1f5f9;
    color: #334155;
}
.modal .modal-footer .btn-primary {
    background: #da6f29;
    border-color: #c05f22;
    color: #fff;
}
.modal .modal-footer .btn-danger {
    background: #ef4444;
    border-color: #dc2626;
    color: #fff;
}
.modal .modal-footer .btn-danger:hover {
    background: #dc2626;
}

/* Ajax modal (loaded content) — uses plugin's modal manager */
#ajax-modal {
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
    overflow: hidden;
}
#ajax-modal .modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #124265;
}
#ajax-modal .modal-header h3,
#ajax-modal .modal-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}
#ajax-modal .modal-header .close {
    color: #fff;
    opacity: 0.7;
    text-shadow: none;
}
#ajax-modal .modal-header .close:hover {
    opacity: 1;
}
#ajax-modal .modal-body {
    padding: 24px;
}
#ajax-modal .modal-body .form-group {
    margin-bottom: 14px;
}
#ajax-modal .modal-body .control-label {
    font-weight: 600;
    color: #334155;
    font-size: 13px;
}
#ajax-modal .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}
#ajax-modal .modal-footer .btn {
    min-width: 80px;
    padding: 8px 20px;
    font-weight: 600;
    border-radius: 6px;
}

/* Legacy modals without modal-dialog wrapper (call logs, footer, etc.) */
#myModal2,
#alert_modal {
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
    width: 400px !important;
    margin-left: -200px !important;
    left: 50% !important;
    overflow: hidden;
}
#myModal2 .modal-header,
#alert_modal .modal-header {
    background: #124265;
}
#myModal2 .modal-header h4,
#alert_modal .modal-header h4 {
    color: #fff;
}
#myModal2 .modal-footer,
#alert_modal .modal-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

/* Responsive modals */
@media (max-width: 480px) {
    .modal-dialog.modal-sm {
        width: auto;
        margin: 20px 10px;
    }
    #myModal2,
    #alert_modal {
        width: 90% !important;
        margin-left: -45% !important;
    }
}

/* Print styles */
@media print {
    .main-navigation, .navbar-inverse, .breadcrumb, .footer,
    .report-filter-bar, .go-top, .navigation-toggler { display: none !important; }
    .main-content .container { border: none !important; }
    .report-summary-card { box-shadow: none; border: 1px solid #ddd; }
    .panel { box-shadow: none; border: 1px solid #ddd; }
    body { background: #fff !important; }
}
