body{font-family:Arial;margin:0;background:#f3f4f6}.layout{display:flex}.sidebar{width:220px;min-height:100vh;background:#2563eb;color:#fff}.sidebar a{display:block;color:#fff;padding:12px;text-decoration:none}.sidebar a:hover{background:#1d4ed8}.main{flex:1;padding:20px}.card{background:#fff;padding:15px;border-radius:8px}.login-page{display:flex;height:100vh;align-items:center;justify-content:center}.login-card{background:#fff;padding:30px;width:350px;border-radius:8px}.form-control{width:100%;padding:8px;margin:6px 0}.btn{background:#2563eb;color:#fff;padding:10px;border:none;width:100%}table{width:100%;background:#fff;border-collapse:collapse}th,td{border:1px solid #ddd;padding:8px}

.content{

    transition:
        opacity .15s ease;

}

body{

    transition:
        opacity .15s ease;

}
#sidebar-container{

min-height:100vh;

}
.page-container {
    
    width: 98%;
    max-width: 1800px;
    margin: 20px auto;

}

.form-card {
    max-width: 600px;
    margin-bottom: 20px;
}
.form-card {
    max-width: 500px;
}

.small-input {
    max-width: 400px;
}

.btn-action {
    margin-right: 5px;
}

#errorMsg {
    margin-bottom: 10px;
    font-weight: bold;
}


.back-btn {
    display: inline-block;
    width: 220px;
    text-align: center;
    text-decoration: none;
    margin-bottom: 15px;
}
.small-input{max-width:400px}.form-card{max-width:500px}

.action-btn {
    padding: 4px 8px;
    font-size: 11px;
    margin-right: 4px;
    cursor: pointer;
}

.edit-btn {
    background: #ffc107;
    border: none;
}

.delete-btn {
    background: #dc3545;
    color: white;
    border: none;
}


.filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.pagination {
    margin-top: 15px;
}

.pagination button {
    padding: 6px 12px;
    margin-right: 5px;
}



/* Login Page */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
}

.login-card {
    background: #ffffff;
    width: 420px;
    padding: 40px;
    border-radius: 12px;
    box-shadow:
        0 4px 12px rgba(0,0,0,0.08),
        0 8px 24px rgba(0,0,0,0.05);
}

.login-card h1 {
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
    color: #1f2937;
    font-size: 32px;
}

#group_id{

    min-height:40px;

}

#saveUserBtn{

    min-width:180px;

}



.button-row .btn {

    width: 120px;

    height: 35px;

    font-size: 13px;

    padding: 6px 12px;

}

.secondary-btn {

    background: #6c757d;

    color: white;

}


.action-btn{

    margin-right:4px;

}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.login-card .form-control {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.login-card .form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.btn-primary {
    width: 100%;
    border: none;
    border-radius: 6px;
    background: #2563eb;
    color: white;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-primary:active {
    transform: scale(0.98);
}

.login-subtitle {
    text-align: center;
    color: #6b7280;
    margin-top: -10px;
    margin-bottom: 25px;
    font-size: 14px;
}


/* =========================
   Activity Page
   ========================= */

.card{
    padding:10px;
}


.activity-card {
    background: white;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 20px;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

.activity-card h2{
    margin-top:0;
    margin-bottom:12px;
    font-size:28px;
}

.filter-row {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
}

.filter-row .form-control {
    flex: 1;
    min-width: 180px;
    height: 34px;
}

.filter-row .btn {
    width: 120px;
    height: 34px;
}



.back-btn {
    width: auto;
    padding: 8px 16px;
    margin-bottom: 15px;
    cursor: pointer;
}

#activityTable {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

#activityTable th {
    background: #2563eb;
    color: white;
    padding: 12px;
}

#activityTable td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
}

#activityTable tr:nth-child(even) {
    background: #f8fafc;
}

#activityTable tr:hover {
    background: #eef4ff;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.page-info {
    min-width: 60px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
}

.pagination button {
    padding: 8px 14px;
    border: none;
    background: #2563eb;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

.pagination button:hover {
    background: #1d4ed8;
}

/* Roles & Groups */


.master-page {
    width: 100%;
    max-width: 700px;
    margin: 20px auto;
}

.master-page .back-btn {
    width: auto;
    margin-bottom: 15px;
}

.master-page .card {
    margin-bottom: 20px;
}


.master-page table {
    width: 100%;
}

.master-page .pagination {
    justify-content: flex-start;
}



/* Applications */

#createApplicationBtn {

    margin-top: 10px;

    width: 220px;

    height: 45px;

    font-size: 13px;

}

#classification {

    height: 40px;

    font-size: 14px;

    padding: 5px 10px;

    width: 100%;
}



.app-page {
    width: 98%;
    max-width: 1600px;
    margin: 20px auto;
}

.app-form {
    width: 800px;
}

.app-form input,
.app-form select {
    width: 100%;
    box-sizing: border-box;
}

#applicationsTable {
    width: 100%;
    min-width: 100%;
    border-collapse: collapse;
}

#applicationsTable th {
    background: #2563eb;
    color: white;
}

#applicationsTable th,
#applicationsTable td {
    padding: 10px;
    border: 1px solid #ddd;
}

#applicationsTable tr:hover {
    background: #eef4ff;
}

#searchBox {
    width: 300px;
    margin-bottom: 15px;
}

.app-search {
    display: flex;
    justify-content: flex-start;
}
/* Productivity */

#productivityTable th,
#productivityTable td {

    white-space: nowrap;

}

#productivityTable th:nth-child(5),
#productivityTable td:nth-child(5),

#productivityTable th:nth-child(7),
#productivityTable td:nth-child(7),

#productivityTable th:nth-child(9),
#productivityTable td:nth-child(9) {

    width: 80px;

}

.productivity-page {
    width: 98%;
    max-width: 1800px;
    margin: 20px auto;
}

.productivity-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

#productivityTable {
    width: 100%;
    border-collapse: collapse;
}

#productivityTable th {
    background: #2563eb;
    color: white;
    padding: 12px;
}

#productivityTable td {
    padding: 10px;
    border: 1px solid #ddd;
}

#productivityTable tr:nth-child(even) {
    background: #f8fafc;
}

#productivityTable tr:hover {
    background: #eef4ff;
}


.summary-cards {

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(
                180px,
                1fr
            )
        );

    gap: 15px;

    margin-bottom: 20px;

}

.summary-card {

    background: white;

    border-radius: 8px;

    padding: 15px;

    box-shadow:
        0 2px 8px
        rgba(0,0,0,.08);

}


.summary-title {
    color: #6b7280;
    font-size: 14px;
}

.summary-value {
    font-size: 28px;
    font-weight: bold;
    margin-top: 5px;
}

.score-high {
    color: green;
    font-weight: bold;
}

.score-medium {
    color: orange;
    font-weight: bold;
}

.score-low {
    color: red;
    font-weight: bold;
}

.productivity-page {
    width: 98%;
    max-width: 1800px;
    margin: 20px auto;
}


.empty-message {
    text-align: center;
    padding: 20px;
    color: #6b7280;
    font-style: italic;
}
.totals-row {
    background: #eff6ff;
    border-top: 2px solid #2563eb;
}

.totals-row td {
    font-weight: bold;
}


/* Dashboard */
#topUsersTable th{

    padding: 6px 10px;

    font-size: 14px;

}

#topUsersTable td{


    padding: 2px 8px;

    font-size: 12px;


}

#topUsersTable tbody tr{

    height: 28px;

}
.card{

    background:#fff;

    border-radius:10px;

    padding:12px;

    border:1px solid #e5e7eb;

    box-shadow:
        0 2px 8px
        rgba(0,0,0,.08);

}
.trend-indicator{

    font-size:14px;

    font-weight:bold;

    margin-bottom:10px;

}

.trend-up{

    color:#16a34a;

}

.trend-down{

    color:#dc2626;

}

.insight-table{
    width:100%;
    border-collapse:collapse;
}

.insight-table th{
    background:#2563eb;
    color:#fff;
    text-align:left;
    padding:10px;
    font-size:12px;
    font-weight:600;
}
button {

cursor: pointer;

}
.insight-table td{
    padding:10px;
    border:1px solid #e5e7eb;
}

.dashboard-chart-row{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:20px;
}

.chart-card{
    height:340px;
}

.chart-container{
    height:260px;
}

.chart-card h3{


    margin-top: 0;

    margin-bottom: 8px;

    font-size: 16px;


}

.dashboard-filters{

    display:flex;

    gap:15px;

    margin-bottom:0px;

    align-items:center;

}

.chart-container{

    height:300px;

    position:relative;

}

.card{

    padding:12px;

}

.dashboard-filters select{

    width:180px;

}
.dashboard-page{

    width:100%;

    max-width:1600px;

    margin:20px auto;

    padding:0 20px;

    box-sizing:border-box;

}
body{

    overflow-x:hidden;

}


#topUsersTable{

    min-width:900px;

}

.dashboard-cards .kpi-card:nth-child(1){

    background:
    linear-gradient(
        135deg,
        #4f46e5,
        #7c3aed
    );

}

.dashboard-cards .kpi-card:nth-child(2){

    background:
    linear-gradient(
        135deg,
        #0ea5e9,
        #2563eb
    );

}

.dashboard-cards .kpi-card:nth-child(3){

    background:
    linear-gradient(
        135deg,
        #22c55e,
        #16a34a
    );

}

.dashboard-cards .kpi-card:nth-child(4){

    background:
    linear-gradient(
        135deg,
        #f59e0b,
        #f97316
    );

}

.dashboard-cards .kpi-card:nth-child(5){

    background:
    linear-gradient(
        135deg,
        #ef4444,
        #dc2626
    );

}

.dashboard-cards .kpi-card:nth-child(6){

    background:
    linear-gradient(
        135deg,
        #8b5cf6,
        #6366f1
    );

}

.dashboard-cards .kpi-card:nth-child(7){

    background:
    linear-gradient(
        135deg,
        #14b8a6,
        #06b6d4
    );

}
.dashboard-cards .kpi-card:nth-child(8){

    background:
    linear-gradient(
        135deg,
        #dc2626,
        #ef4444
    );

}

.dashboard-cards .kpi-card:nth-child(9){

    background:
    linear-gradient(
        135deg,
        #16a34a,
        #22c55e
    );

}

.dashboard-cards .kpi-card:nth-child(10){

    background:
    linear-gradient(
        135deg,
        #ca8a04,
        #facc15
    );

}

.dashboard-cards{

    display:grid;

    grid-template-columns:
        repeat(
            5,
            minmax(140px,1fr)
        );

    gap:12px;

    margin-bottom:20px;

}

.kpi-card{

    border-radius:14px;

    padding:10px 14px;

    min-height:60px;

    color:white;

    position:relative;

    overflow:hidden;

    box-shadow:
        0 4px 12px rgba(0,0,0,.12);

}

.kpi-card::after{

    content:"";

    position:absolute;

    top:-30px;

    right:-30px;

    width:90px;

    height:90px;

    background:
        rgba(255,255,255,.15);

    border-radius:50%;

}
.kpi-card:hover{

    transform:translateY(-4px);

    box-shadow:
        0 15px 35px rgba(0,0,0,.18);

}

.kpi-card:hover{

    transform:translateY(-3px);

}

.kpi-card:nth-child(1){

background:linear-gradient(135deg,#4f46e5,#7c3aed);

}



.kpi-card:nth-child(2){

background:linear-gradient(135deg,#2563eb,#06b6d4);

}



.kpi-card:nth-child(3){

background:linear-gradient(135deg,#16a34a,#22c55e);

}

 

.kpi-card:nth-child(4){

background:linear-gradient(135deg,#f59e0b,#fbbf24);

}
.kpi-title{

    font-size:12px;

    color:#6b7280;

    margin-bottom:6px;

}
.user-bar{

height:10px;
border-radius:99px;
background:#22c55e;
}

.badge-active{
background:#dcfce7;
color:#15803d;
padding:6px 12px;
border-radius:20px;
}
.badge-idle{

    background:#fef3c7;
    color:#b45309;
}
.kpi-title{

    color:
        rgba(255,255,255,.85);

    font-size:14px;

    margin-bottom:10px;

}

.kpi-value{

    color:white;

    font-size:18px;

    font-weight:600;

}
.chart-card{

    background:#fff;

    border-radius:10px;

    padding:20px;

    border:1px solid #e5e7eb;

    box-shadow:
        0 2px 8px
        rgba(0,0,0,.08);

}

.chart-card h3{

    margin-bottom:15px;

}
#topUsersTable {
    width: 100%;
    border-collapse: collapse;
}

#topUsersTable th {
    background: #2563eb;
    color: white;
}

#topUsersTable th,
#topUsersTable td {
    padding: 12px;
    border: 1px solid #dcdcdc;
}


/* Sidebar */


@media (max-width:1400px){

    .dashboard-chart-row{

        grid-template-columns:
            1fr;

    }

}


.layout {
    display: flex;
}

.sidebar {
    
    position: fixed;
    left: 0;
    top: 0;
    width: 180px;
    height: 100vh;
    background:#0f172a;
    color: white;
    overflow-y: auto;
}

.sidebar h2 {
    padding: 20px;
    margin: 0;
    text-align: center;
    color: white;
    border-bottom: 1px solid rgba(255,255,255,.2);
}

.sidebar a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 14px 20px;
}

.sidebar a:hover {
    background: #2563eb;
}

.content {
    margin-left: 240px;
    padding: 20px;
    width: calc(100% - 240px);
}



.sidebar a.active{

    background:#1e293b;

    border-left:
        4px solid #22c55e;
}
.sidebar a:hover {
    background: #3157d5;
}

.logout-link {
    margin-top: auto;
    background: #dc2626;
    color: white !important;
    text-align: center;
}

.logout-link:hover {
    background: #b91c1c !important;
}


/* Agents */


.action-btn{

    margin-right:4px;

}


.form-card {

    width: 320px;

    margin-bottom: 20px;

}

.form-card .form-control{

    width: 300px;

    height: 30px;

    padding: 4px 6px;

    margin-bottom: 8px;

}

#agentTable {

    width: 100%;

}

#hostname,
#username,
#start_date {

    background: #f5f5f5;
     color:#555;
}


.button-row .btn {

    width: 120px;

}

/* Alerts */



#realtimeTable {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 11px;
}

#realtimeTable th {
    padding: 4px;
    font-size: 10px;
    font-weight: 600;
    text-align: left;
    background: #f4f4f4;
}

#realtimeTable td {
    padding: 3px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#realtimeTable tbody tr:hover {
    background: #f8f9fa;
}


#activeAlertsTable th{

    background:#2563eb !important;

    color:#ffffff !important;

    padding:8px;

    font-size:10px;

    font-weight:600;

    text-align:left;

}

#activeAlertsTable {

    width:100%;

    table-layout:fixed;

    border-collapse:collapse;

    font-size:11px;

}

#activeAlertsTable td {

    padding:3px 4px;

    white-space:nowrap;

    overflow:hidden;

    text-overflow:ellipsis;

}

#activeAlertsTable tbody tr:hover {

    background:#f8f9fa;

}
.ack-btn{

    background:#16a34a;

    color:white;

    border:none;

    border-radius:4px;

    padding:4px 10px;

    font-size:11px;

    cursor:pointer;

}

.ack-btn:hover{

    background:#15803d;

}
.card {
    padding: 8px;
}

.pagination {
    margin-top: 8px;
    font-size: 11px;
}
.status-active{
    color:#28a745;
    font-size:14px;
    font-weight:bold;
}

.status-idle{
    color:#ff9800;
    font-size:14px;
    font-weight:bold;
}
.alert-count {
    text-align: center;
    font-weight: bold;
}

#realtimeTable th{

    background:#2563eb !important;

    color:#ffffff !important;

    padding:8px;

}


.alert-page {

    max-width: 700px;

    margin: 0 auto;

}

.alert-card {

    padding: 8px;

}

.alert-filter-row {

    display: flex;

    gap: 6px;

    align-items: center;

}

.alert-filter-row select {

    width: 220px;

    height: 30px;

    font-size: 12px;

}

.alert-filter-row input {

    width: 220px;

    height: 28px;

    font-size: 12px;

}

.alert-filter-row .btn {

    width: 80px;

    height: 28px;

    font-size: 12px;

}

#alertsRulesTable {

    width: 500;

    margin: 0 auto;

    border-collapse: collapse;

}


#alertsRulesTable thead th {

    background: #2563eb !important;

    color: #ffffff !important;

    padding: 4px 8px;

    font-size: 12px;

    font-weight: 600;

}


#alertsRulesTable td {

    padding: 4px 8px;

    font-size: 12px;

    border: 1px solid #dcdcdc;

}

#alertsRulesTable th:nth-child(1),
#alertsRulesTable td:nth-child(1) {

    width: 250px;

}

#alertsRulesTable th:nth-child(2),
#alertsRulesTable td:nth-child(2) {

    width: 250px;

}

.alert-title {

    margin: 0 0 8px 0;

    font-size: 20px;

}

.alert-pagination {

    margin-top: 10px;

}




.tabs{

display:flex;

gap:10px;

margin-top:10px;

}

.tab-btn{

background:#2563eb;

color:white;

border:none;

padding:8px; 
}

/* WorkForce Ingights */
.hidden{
    display:none;
}
.tab-btn{
    background:#2563eb;
    color:white;
    border:none;
    padding:8px 12px;
    cursor:pointer;
}

.tab-btn.active{
    background:#f59e0b;
    color:black;
    font-weight:bold;
    border:2px solid #d97706;
}

.tab-btn:hover{
    background:#1d4ed8;
}

/* Executive Insights */

.executive-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:15px;
    margin:15px 0;
}


.executive-row{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:20px;
    margin-top:20px;
}

.category-item{
    margin-bottom:15px;
}

.category-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    font-size:14px;
    font-weight:600;
    margin-bottom:6px;
}

.progress-bar{
    width:100%;
    height:12px;
    background:#e5e7eb;
    border-radius:999px;
    overflow:hidden;
}

.progress-fill{
    height:100%;
    border-radius:999px;
    background:linear-gradient(
        90deg,
        #2563eb,
        #60a5fa
    );
}

.leak-fill{
    background:linear-gradient(
        90deg,
        #dc2626,
        #f87171
    );
}

#aiInsights{
    line-height:1.6;
    font-size:14px;
}

.filters{
    display:flex;
    gap:10px;
    margin-bottom:15px;
}

.filters select{
    height:36px;
    padding:4px 10px;
}

@media(max-width:900px){

    .executive-row{
        grid-template-columns:1fr;
    }

}

.executive-header{
    display:flex;
    flex-direction:column;
    gap:15px;
}


@media(max-width:1200px){
    .executive-kpis{
        grid-template-columns:repeat(2,1fr);
    }
}

.executive-kpis{

    display:grid;

    grid-template-columns:
        repeat(
            4,
            minmax(180px,1fr)
        );

    gap:15px;

    margin-top:10px;
}


.loading-box{

    display:flex;

    align-items:center;

    gap:12px;

    padding:15px;
}

.spinner{

    width:20px;

    height:20px;

    border:3px solid #e5e7eb;

    border-top:3px solid #2563eb;

    border-radius:50%;

    animation:spin 1s linear infinite;
}

@keyframes spin{

    from{
        transform:rotate(0deg);
    }

    to{
        transform:rotate(360deg);
    }
}

.ai-summary{

    background:#f8fafc;

    border-left:4px solid #2563eb;

    padding:15px;

    border-radius:8px;

    line-height:1.8;
}

.ai-footer{

    margin-top:10px;

    font-size:12px;

    color:#6b7280;
}

.metric-card{

    background:#ffffff;

    border:1px solid #e5e7eb;

    border-radius:10px;

    padding:15px;

    min-height:90px;

    display:flex;

    flex-direction:column;

    justify-content:center;

    box-shadow:
        0 2px 8px
        rgba(0,0,0,.08);
}

.metric-title{
    color:#6b7280;
    font-size:13px;
    margin-bottom:8px;
}

.metric-value{

    font-size:32px;

    font-weight:700;

    color:#2563eb;
}

.reports-container {

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(220px,1fr)
        );

    gap: 16px;

    margin-top: 20px;
}

.report-btn {

    background: white;

    border: 1px solid #d8dce5;

    border-radius: 10px;

    padding: 20px;

    font-size: 15px;

    font-weight: 600;

    text-align: left;

    cursor: pointer;

    transition: 0.2s;
}

.report-btn:hover {

    transform: translateY(-2px);

    box-shadow:
        0 4px 12px
        rgba(
            0,0,0,0.12
        );

    border-color:
        #3367e8;
}

.page-title {

    color: #3367e8;

    font-weight: 700;

    margin-bottom: 8px;
}

#reportTable {

    width: 100%;

    border-collapse: collapse;

    margin-top: 15px;
}

#reportTable th {

    background: #3367e8;

    color: white;

    padding: 10px;
}

#reportTable td {

    padding: 10px;

    border-bottom:
        1px solid #e9e9e9;
}


.export-btn {

    width: auto;

    min-width: 120px;

    padding: 8px 16px;

    font-size: 13px;

    margin: 10px 0;

    display: inline-block;
}

.report-toolbar {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin: 10px 0;
}

.report-count {

    font-weight: 600;

    color: #555;
}
.sidebar-logo {
  max-width: 130px;
  max-height: 40px;
  object-fit: contain;
  display: block;
  margin: 0 auto; /* Centers the image inside the sidebar header */
}

/* Table Header Blue Styling */
table thead th,
#userTable thead th {
    background-color: #007bff; /* Primary blue background */
    color: #ffffff;            /* White text */
    font-weight: bold;
    padding: 10px 12px;
    text-align: left;
    border-right: 1px solid #0056b3; /* Darker blue vertical separator line */
    border-bottom: 1px solid #0056b3;
}

/* Remove vertical line on the last header column */
table thead th:last-child,
#userTable thead th:last-child {
    border-right: none;
}

/* Table Body Cell Vertical Borders & Padding */
table tbody td,
#userTable tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0;
    border-right: 1px solid #f0f0f0; /* Light vertical separator line */
}

table tbody td:last-child,
#userTable tbody td:last-child {
    border-right: none;
}