/* Custom Charts Dashboard CSS (TMIS, DMS, HRS) */

/* General Custom Dashboard Card */
.custom-chart-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    overflow: hidden;
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    text-align: left;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.custom-chart-header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    background: #fafafa;
}
@media (max-width: 600px) {
    .custom-chart-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

.custom-chart-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.custom-chart-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.custom-chart-icon.tmis {
    background: rgba(24,160,251,0.1);
    color: #18a0fb;
}
.custom-chart-icon.dms {
    background: rgba(139,92,246,0.1);
    color: #8b5cf6;
}
.custom-chart-icon.hrs {
    width: 40px;
    height: 40px;
    background: rgba(16,185,129,0.1);
    color: #10b981;
    border-radius: 10px;
}
.custom-chart-icon i {
    font-size: 1.25rem;
}
.custom-chart-icon.hrs i {
    font-size: 1.5rem;
}

.custom-chart-title {
    font-weight: 800;
    color: #0f172a;
    font-size: 1.15rem;
    display: block;
}
.custom-chart-title.small {
    font-weight: 700;
    font-size: 1.05rem;
    display: inline;
}

.custom-chart-subtitle {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
    display: block;
}

.custom-chart-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}
.custom-chart-status.running .status-dot {
    width: 8px;
    height: 8px;
    background: #0ea5e9;
    border-radius: 50%;
}
.custom-chart-status.active .status-dot {
    width: 8px;
    height: 8px;
    background: #8b5cf6;
    border-radius: 50%;
}
.custom-chart-status.synced {
    color: #10b981;
    background: #ecfdf5;
    padding: 6px 12px;
    border-radius: 100px;
}

/* TMIS Chart Area */
.bar-chart-area {
    padding: 2rem 1.5rem;
    display: flex;
    gap: 1rem;
    height: 220px;
    align-items: flex-end;
    position: relative;
}
@media (max-width: 600px) {
    .bar-chart-area {
        padding: 1.5rem 1rem;
        height: 180px;
    }
}
.y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 500;
    padding-bottom: 1.5rem;
    padding-right: 0.5rem;
    width: 40px;
    text-align: right;
}
.grid-lines {
    position: absolute;
    top: 2rem;
    bottom: 3.5rem;
    left: 4rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 0;
}
.grid-lines div {
    border-bottom: 1px dashed #e2e8f0;
    width: 100%;
}
.grid-lines div:last-child {
    border-bottom: 1px solid #cbd5e1;
}

.bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    z-index: 1;
    gap: 0.5rem;
    height: 100%;
}
.bar {
    width: 100%;
    max-width: 85px;
    border-radius: 4px 4px 0 0;
}
.bar.green { background: #4ade80; }
.bar.blue { background: #3b82f6; }
.bar.yellow { background: #fbbf24; }
.bar.red { background: #ef4444; }

.bar-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}
@media (max-width: 600px) {
    .bar-label {
        font-size: 0.7rem;
    }
}

.tmis-footer {
    background: #f0fdf4;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-top: 1px solid #dcfce7;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
}

/* DMS List */
.dms-list {
    padding: 0.5rem 0;
}
.dms-item {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f8fafc;
}
.dms-item:last-child {
    border-bottom: none;
}
@media (max-width: 600px) {
    .dms-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
.dms-item-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.dms-item-title {
    color: #334155;
    font-weight: 500;
    font-size: 0.95rem;
}
.dms-item-time {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
}
.dms-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    border-top: 1px solid #f1f5f9;
}
@media (max-width: 600px) {
    .dms-stats-grid {
        grid-template-columns: 1fr;
    }
}
.dms-stat {
    padding: 1.5rem 1rem;
    text-align: center;
    border-right: 1px solid #f1f5f9;
}
@media (max-width: 600px) {
    .dms-stat {
        border-right: none;
        border-bottom: 1px solid #f1f5f9;
    }
    .dms-stat:last-child {
        border-bottom: none;
    }
}
.dms-stat:last-child {
    border-right: none;
}
.dms-stat-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.25rem;
}
.dms-stat-lbl {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

/* HRS Body */
.hrs-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
@media (max-width: 600px) {
    .hrs-body {
        padding: 1.5rem;
        gap: 1.5rem;
    }
}
.hrs-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}
.hrs-metric-card {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.hrs-m-header {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}
.hrs-m-val {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
}
.hrs-m-sub {
    color: #22c55e;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.5rem;
}
.hrs-progress-bg {
    width: 100%;
    height: 6px;
    background: #f1f5f9;
    border-radius: 10px;
    margin-top: 0.8rem;
    overflow: hidden;
}
.hrs-progress-fill {
    height: 100%;
    background: #f59e0b;
    border-radius: 10px;
}

.hrs-chart-area {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.hrs-chart-title {
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1.5rem;
}
.hrs-bars {
    height: 180px;
    display: flex;
    align-items: flex-end;
    gap: 2%;
    position: relative;
}
.hrs-grid-lines {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 0;
}
.hrs-grid-lines div {
    border-bottom: 1px dashed #e2e8f0;
}
.hrs-grid-lines div:last-child {
    border-bottom: 1px solid #cbd5e1;
}
.hrs-bar-col {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1;
}
.hrs-bar-val {
    width: 60%;
    border-radius: 6px 6px 0 0;
}
.hrs-bar-val.green-grad {
    background: linear-gradient(180deg, #10b981 0%, #34d399 100%);
}
.hrs-bar-val.blue-grad {
    background: linear-gradient(180deg, #3b82f6 0%, #60a5fa 100%);
    position: relative;
}
.hrs-bar-tooltip {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}
.hrs-x-labels {
    display: flex;
    justify-content: space-around;
    margin-top: 1rem;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
}
