@import url('shared.css');

/* ==================== PMS Module Specific Styles ==================== */

/* Search bar layout */
.search-bar{background:#fff;border:1px solid var(--color-border);border-radius:var(--radius-md);padding:var(--spacing-lg);margin-bottom:var(--spacing-lg)}
.search-row{display:flex;flex-wrap:wrap;gap:var(--spacing-md);margin-bottom:var(--spacing-md)}
.search-row .form-group{flex:1;min-width:180px;margin-bottom:0}
.search-row .form-group label{display:block;font-size:13px;font-weight:500;color:var(--color-text-secondary);margin-bottom:6px}
.search-actions{display:flex;align-items:center;gap:var(--spacing-sm)}
.search-actions .btn{height:36px}
.search-actions .btn iconify-icon{display:inline-flex;width:14px;height:14px}

/* Stat card icon variants */
.stat-icon.cyan{background:#E6F9F7;color:#00B8A9}
.stat-icon.red{background:#FEF0F0;color:#F56C6C}

/* Capacity utilization bar */
.cap-row{display:grid;grid-template-columns:120px 1fr 80px 80px;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid #E4E7ED}
.cap-row:last-child{border-bottom:none}
.cap-line-name{font-size:13px;color:#333;font-weight:500}
.cap-bar-wrap{height:18px;background:#E4E7ED;border-radius:10px;overflow:hidden;position:relative}
.cap-bar{height:100%;border-radius:10px;transition:width .6s;display:flex;align-items:center;justify-content:flex-end;padding-right:8px;font-size:11px;color:#fff;font-weight:500}
.cap-bar.green{background:linear-gradient(90deg,#36B37E,#4dd391)}
.cap-bar.yellow{background:linear-gradient(90deg,#F5A623,#ffc14d)}
.cap-bar.red{background:linear-gradient(90deg,#F56C6C,#ff8585)}
.cap-status{font-size:12px;text-align:center}

/* Gantt chart */
.gantt-wrap{overflow-x:auto;border:1px solid #E4E7ED;border-radius:6px}
.gantt{min-width:900px;font-size:12px}
.gantt-header{display:grid;grid-template-columns:120px repeat(16,1fr);background:#FAFAFA;border-bottom:1px solid #E4E7ED;position:sticky;top:0;z-index:2}
.gantt-header div{padding:8px 4px;text-align:center;color:#666;font-weight:500;border-right:1px solid #E4E7ED;font-size:11px}
.gantt-header div:first-child{text-align:left;padding-left:12px}
.gantt-row{display:grid;grid-template-columns:120px repeat(16,1fr);border-bottom:1px solid #E4E7ED;min-height:42px;align-items:center}
.gantt-label{padding:8px 12px;font-weight:500;color:#333;border-right:1px solid #E4E7ED;background:#fff;position:sticky;left:0;z-index:1}
.gantt-cell{border-right:1px solid #f0f0f0;height:100%;min-height:42px;position:relative}
.gantt-bar{position:absolute;top:6px;bottom:6px;border-radius:4px;display:flex;align-items:center;padding:0 6px;color:#fff;font-size:11px;overflow:hidden;white-space:nowrap;box-shadow:0 1px 3px rgba(0,0,0,.1)}
.gantt-bar.semi{background:linear-gradient(90deg,#F5A623,#ffc14d)}
.gantt-bar.bread{background:linear-gradient(90deg,#00B8A9,#4dd9cb)}
.gantt-bar.cake{background:linear-gradient(90deg,#7C3AED,#a78bfa)}
.gantt-bar.transfer{background:linear-gradient(90deg,#409EFF,#79bbff);border:2px dashed #fff}

/* Schedule level badge */
.badge-amber{background:#FFF8E6;color:#F5A623}
.badge-cyan{background:#E6F9F7;color:#00B8A9}

/* Forecast source tag */
.forecast-tag{display:inline-flex;align-items:center;gap:2px;padding:1px 6px;border-radius:3px;font-size:11px;background:#F3E8FF;color:#7C3AED;font-weight:500}

/* Transfer record indicator */
.transfer-arrow{display:inline-flex;align-items:center;gap:4px;color:#409EFF;font-size:12px;font-weight:500}

/* Capacity dashboard grid */
.cap-dashboard{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}

/* MRP source chips */
.mrp-source{display:inline-block;padding:2px 8px;border-radius:10px;font-size:11px;margin-right:4px}
.mrp-source.store{background:#E6F9F7;color:#00B8A9}
.mrp-source.oem{background:#FFF8E6;color:#F5A623}
.mrp-source.ecom{background:#ECF5FF;color:#409EFF}
.mrp-source.forecast{background:#F3E8FF;color:#7C3AED}
.mrp-source.mts{background:#E6F9EE;color:#36B37E}

/* Semi-product demand highlight */
tr.semi-row{background:#FFFBF0}
tr.semi-row:hover{background:#FFF8E6}

/* Plan version tag */
.version-tag{display:inline-block;padding:1px 6px;border-radius:3px;font-size:11px;background:#f0f0f0;color:#666;margin-left:6px}

/* Alert list for dashboard */
.alert-list-pms{display:flex;flex-direction:column;gap:10px}
.alert-item-pms{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border-radius:6px;background:#FAFAFA}
.alert-item-pms.warn{background:#FFF8E6;border-left:3px solid #F5A623}
.alert-item-pms.danger{background:#FEF0F0;border-left:3px solid #F56C6C}
.alert-item-pms.info{background:#ECF5FF;border-left:3px solid #409EFF}
.alert-item-pms .alert-icon{flex-shrink:0;margin-top:1px}
.alert-item-pms .alert-body{font-size:13px;color:#333;flex:1}
.alert-item-pms .alert-time{font-size:11px;color:#999;margin-top:2px}

/* Time axis label */
.time-axis{display:flex;justify-content:space-between;padding:0 4px;font-size:11px;color:#999;margin-bottom:6px}
