/* Modern dashboard revamp — scoped under .dash-modern so other pages are unaffected */

.dash-modern {
    padding-top: 4px;
}

.dash-modern .welcome-banner {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    padding: 14px 22px;
    margin-top: 25px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #2c3e50 0%, #3a536b 45%, #57c8f2 100%);
    box-shadow: 0 6px 18px rgba(44, 62, 80, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.dash-modern .welcome-banner::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 140px;
    height: 140px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.dash-modern .welcome-banner .welcome-text h2 {
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 2px 0;
}

.dash-modern .welcome-banner .welcome-text h2 span {
    font-weight: 700;
    color: #f8d347;
}

.dash-modern .welcome-banner .welcome-text p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 12px;
}

.dash-modern .welcome-banner .welcome-side {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.dash-modern .welcome-banner .welcome-date {
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    white-space: nowrap;
}

/* stat cards */
.dash-modern .stat-row {
    margin-bottom: 8px;
}

.dash-modern .stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: none;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(30, 40, 60, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.dash-modern .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(30, 40, 60, 0.14);
}

.dash-modern .stat-card .stat-icon {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
}

.dash-modern .stat-card .stat-icon.terques { background: linear-gradient(135deg, #6ccac9, #4aa9a8); }
.dash-modern .stat-card .stat-icon.red { background: linear-gradient(135deg, #ff6c60, #e14b3f); }
.dash-modern .stat-card .stat-icon.yellow { background: linear-gradient(135deg, #f8d347, #e0ac1a); }
.dash-modern .stat-card .stat-icon.blue { background: linear-gradient(135deg, #57c8f2, #2f9fd0); }

.dash-modern .stat-card .stat-value {
    flex: 1 1 auto;
    min-width: 0;
}

.dash-modern .stat-card .stat-value h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
    word-break: break-word;
    overflow-wrap: break-word;
}

.dash-modern .stat-card .stat-value p {
    margin: 2px 0 0 0;
    color: #8b95a5;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* compact report date-range filter — sits top-right, inside the welcome banner */
.dash-modern .mini-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.dash-modern .mini-filter-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
    white-space: nowrap;
}

.dash-modern .mini-filter-label strong {
    color: #fff;
}

.dash-modern .mini-filter select.form-control {
    width: auto;
    display: inline-block;
    height: 26px;
    padding: 2px 8px;
    font-size: 11px;
    border-radius: 6px;
    border: none;
}

.dash-modern .mini-filter .filter-custom-fields {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dash-modern .mini-filter .filter-custom-fields input.form-control {
    width: auto;
    display: inline-block;
    height: 26px;
    padding: 2px 8px;
    font-size: 11px;
    border-radius: 6px;
    border: none;
}

.dash-modern .mini-filter .filter-custom-fields span {
    color: rgba(255, 255, 255, 0.75);
    font-size: 11px;
}

.dash-modern .mini-filter .btn {
    height: 26px;
    padding: 0 10px;
    font-size: 11px;
    line-height: 26px;
    border-radius: 6px;
}

.dash-modern .mini-filter .mini-reset {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: underline;
}

.dash-modern .mini-filter .mini-reset:hover {
    color: #fff;
}

/* section cards (chart / earnings) */
.dash-modern .panel-card {
    background: #fff;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 4px 16px rgba(30, 40, 60, 0.08);
    margin-bottom: 24px;
}

.dash-modern .panel-card .border-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dash-modern .panel-card .border-head h3 {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
}

.dash-modern .card.terques-chart,
.dash-modern .card.green-chart {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(30, 40, 60, 0.08);
    border: none;
}

/* generic cards / alerts / category tiles shared across all dashboard variants */
.dash-modern .card:not(.terques-chart):not(.green-chart) {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(30, 40, 60, 0.08);
}

.dash-modern section.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(30, 40, 60, 0.08);
    margin-bottom: 24px;
}

.dash-modern [role="alert"] {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(30, 40, 60, 0.06);
}

.dash-modern .twt-feed.blue-bg {
    background: linear-gradient(135deg, #57c8f2, #2f9fd0);
    border-radius: 12px 12px 0 0;
}

.dash-modern .card .value.text-center {
    overflow: hidden;
}

.dash-modern .card .value.text-center h1 {
    word-break: break-word;
    overflow-wrap: break-word;
}

.dash-modern .personal-task thead,
.dash-modern table.table-hover thead {
    background: #f4f6f9;
}

/* modern sidebar — #sidebar is a unique id, so this is safe wherever this stylesheet loads */
#sidebar {
    background: linear-gradient(180deg, #1f2933 0%, #2c3e50 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

#sidebar::-webkit-scrollbar {
    width: 6px;
}

#sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

ul.sidebar-menu li a {
    border-radius: 8px;
    margin: 0;
    letter-spacing: 0.2px;
}

ul.sidebar-menu li a i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.06);
    margin-right: 8px;
    font-size: 13px;
    transition: background 0.2s ease, color 0.2s ease;
}

ul.sidebar-menu li a.active,
ul.sidebar-menu li a:hover,
ul.sidebar-menu li a:focus {
    background: linear-gradient(90deg, rgba(87, 200, 242, 0.18), rgba(87, 200, 242, 0.04));
    box-shadow: inset 3px 0 0 #57c8f2;
    color: #fff;
}

ul.sidebar-menu li a.active i,
ul.sidebar-menu li a:hover i,
ul.sidebar-menu li a:focus i {
    background: #57c8f2;
    color: #1f2933;
}

ul.sidebar-menu li ul.sub {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    overflow: hidden;
}

ul.sidebar-menu li ul.sub li {
    background: transparent;
}

ul.sidebar-menu li ul.sub li a:hover,
ul.sidebar-menu li ul.sub li.active a {
    color: #57c8f2;
}

.dcjq-icon:before {
    color: rgba(255, 255, 255, 0.4);
}

/* modern header — header_file.php is shared across every admin page, and dashboard-modern.css is now loaded everywhere, so this is safe unscoped */
.header.white-bg {
    display: flex;
    align-items: center;
    box-shadow: 0 2px 12px rgba(30, 40, 60, 0.06);
}

.header .sidebar-toggle-box {
    margin-top: 0;
    padding: 9px 12px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.header .sidebar-toggle-box:hover {
    background: #f1f5f9;
}

.header .sidebar-toggle-box .fa-bars {
    color: #2c3e50;
}

a.logo {
    display: flex;
    align-items: center;
    margin-top: 0;
    text-transform: none;
}

a.logo strong {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 700;
}

.notify-row {
    margin-top: 0;
    margin-left: auto;
    display: flex;
    align-items: center;
}

#header_inbox_bar > a.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #57c8f2;
    transition: background 0.2s ease;
}

#header_inbox_bar > a.dropdown-toggle:hover {
    background: #e6f6fd;
}

#header_inbox_bar .badge-danger {
    position: absolute;
    top: -2px;
    right: -2px;
}

.top-nav {
    margin-top: 0;
    display: flex;
    align-items: center;
}

.top-nav ul.top-menu {
    margin: 0;
    display: flex;
    align-items: center;
}

.top-nav ul.top-menu > li {
    display: flex;
    align-items: center;
}

.search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-wrap .search-icon {
    position: absolute;
    left: 12px;
    z-index: 2;
    font-size: 12px;
    color: #8b95a5;
    pointer-events: none;
}

.search {
    background: #f1f5f9 !important;
    background-image: none !important;
    padding-left: 30px !important;
    border-radius: 18px !important;
    border: 1px solid transparent !important;
}

.search:focus {
    background-color: #fff !important;
    border-color: #57c8f2 !important;
    box-shadow: 0 0 0 3px rgba(87, 200, 242, 0.15) !important;
}

.top-nav .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #57c8f2, #2f9fd0);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
}

.top-nav .username {
    font-weight: 600;
    color: #2c3e50;
}

.dropdown-menu.extended {
    border-radius: 10px !important;
    box-shadow: 0 10px 30px rgba(30, 40, 60, 0.15) !important;
    overflow: hidden;
    margin-top: 10px;
}

.log-arrow-up,
.notify-arrow {
    display: none;
}

.dropdown-menu.extended.logout > li:not(:last-child) > a:hover {
    background: #f1f5f9 !important;
}

.dropdown-menu.extended.logout > li:last-child > a:hover {
    background: #93c454 !important;
    color: #fff !important;
}

@media (max-width: 767px) {
    .dash-modern .welcome-banner {
        text-align: center;
        justify-content: center;
    }
    .dash-modern .welcome-banner .welcome-side {
        align-items: center;
    }
    .dash-modern .mini-filter {
        justify-content: center;
    }
}
