ProductionGame/frontend/css/views/production.css

890 lines
18 KiB
CSS

/* ==========================================================================
PRODUCTION FLOOR & FACILITY CARDS
========================================================================== */
.production-toolbar {
background: var(--bg-surface);
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
padding: 6px 8px;
}
.sector-tabs-scroll {
display: flex;
gap: 6px;
width: 100%;
}
.sector-pill {
flex: 1 1 0;
min-width: 0;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
background: var(--bg-surface-sub);
border: 1px solid var(--border-color);
padding: 8px 6px;
border-radius: var(--radius-sm);
cursor: pointer;
white-space: nowrap;
transition: all 0.15s;
box-sizing: border-box;
}
.sector-pill iconify-icon {
font-size: 1.15rem;
flex-shrink: 0;
}
.sector-pill:hover {
border-color: var(--text-muted);
}
.sector-pill.active {
background: var(--btn-active-bg);
color: var(--btn-active-text);
border-color: var(--btn-active-border);
box-shadow: var(--shadow-sm);
}
.sector-pill.active iconify-icon {
color: var(--btn-active-icon) !important;
}
.sector-pill.active .sector-pill-rate {
color: var(--btn-active-rate);
}
.production-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(390px, 1fr));
gap: 16px;
align-items: stretch;
}
.facility-card {
background: var(--bg-surface);
border: 1px solid var(--border-color);
border-radius: var(--radius-lg);
padding: 16px;
box-shadow: var(--shadow-sm);
display: flex;
flex-direction: column;
justify-content: space-between;
min-height: 440px;
gap: 10px;
cursor: pointer;
transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
position: relative;
box-sizing: border-box;
overflow: hidden;
}
.facility-card:hover {
border-color: #cbd5e1;
box-shadow: var(--shadow-md);
}
.facility-card.selected {
border-color: var(--primary-blue);
box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
/* Card Backdrop Art (Dimmed Photographic Watermark) */
.card-backdrop-art {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
border-radius: inherit;
overflow: hidden;
pointer-events: none;
z-index: 0;
}
.card-backdrop-img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center 25%;
opacity: 0.08;
transform: scale(1.05);
transition: opacity 0.3s ease, transform 0.3s ease;
}
[data-theme="dark"] .card-backdrop-img {
opacity: 0.12;
filter: brightness(0.9) contrast(1.1);
}
.card-backdrop-overlay {
position: absolute;
inset: 0;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, transparent 60%, rgba(255, 255, 255, 0.6) 100%);
pointer-events: none;
}
[data-theme="dark"] .card-backdrop-overlay {
background: linear-gradient(135deg, rgba(17, 24, 39, 0.5) 0%, transparent 60%, rgba(17, 24, 39, 0.7) 100%);
}
.facility-card:hover .card-backdrop-img {
opacity: 0.14;
transform: scale(1.08);
}
[data-theme="dark"] .facility-card:hover .card-backdrop-img {
opacity: 0.20;
}
.facility-card.locked-card {
opacity: 0.88;
background: var(--bg-surface-sub);
}
.facility-card.locked-card .card-backdrop-img {
filter: grayscale(45%) contrast(0.95);
opacity: 0.06;
}
[data-theme="dark"] .facility-card.locked-card .card-backdrop-img {
opacity: 0.09;
}
/* Ensure all interactive card contents sit above the background watermark */
.facility-card > *:not(.card-backdrop-art) {
position: relative;
z-index: 1;
}
.facility-header {
display: flex;
gap: 12px;
align-items: flex-start;
min-height: 60px;
box-sizing: border-box;
}
.facility-icon-wrap {
width: 44px;
height: 44px;
border-radius: var(--radius-md);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.icon-lg {
font-size: 1.6rem;
}
.facility-title-wrap {
flex: 1;
min-width: 0;
overflow: hidden;
}
.facility-meta-row {
display: flex;
justify-content: space-between;
align-items: center;
gap: 8px;
min-height: 22px;
height: 22px;
flex-wrap: nowrap;
margin-bottom: 2px;
box-sizing: border-box;
}
.facility-meta-actions {
display: flex;
align-items: center;
gap: 6px;
flex-shrink: 0;
}
.btn-card-detail {
display: inline-flex;
align-items: center;
gap: 3px;
background: var(--bg-surface-sub);
border: 1px solid var(--border-color);
border-radius: 12px;
padding: 2px 7px;
font-size: 0.68rem;
font-weight: 700;
color: var(--text-secondary);
cursor: pointer;
transition: all 0.15s;
height: 20px;
line-height: 1;
}
.btn-card-detail:hover {
background: var(--primary-blue-light);
border-color: #bfdbfe;
color: var(--primary-blue);
}
.sector-badge {
font-size: 0.7rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.03em;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex: 1;
min-width: 0;
}
.facility-name {
font-size: 1rem;
font-weight: 700;
color: var(--text-primary);
line-height: 1.2;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.facility-type-sub {
font-size: 0.75rem;
color: var(--text-secondary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.facility-desc {
font-size: 0.8rem;
color: var(--text-secondary);
line-height: 1.4;
}
/* Status Badges */
.status-badge {
display: inline-flex;
align-items: center;
gap: 4px;
font-size: 0.7rem;
font-weight: 700;
padding: 2px 8px;
border-radius: 12px;
white-space: nowrap;
flex-shrink: 0;
height: 20px;
line-height: 1;
box-sizing: border-box;
}
.badge-success {
background: var(--emerald-light);
color: var(--emerald-dark);
}
.badge-warning {
background: var(--amber-light);
color: var(--amber-dark);
animation: pulseWarning 1.5s infinite;
}
@keyframes pulseWarning {
0%, 100% { opacity: 1; }
50% { opacity: 0.75; }
}
.badge-idle {
background: var(--bg-surface-sub);
color: var(--text-muted);
}
/* Cycle Progress Track */
.cycle-bar-track {
width: 100%;
height: 6px;
background: var(--bg-surface-sub);
border-radius: 3px;
overflow: hidden;
}
.cycle-bar-fill {
height: 100%;
transition: width 0.1s linear;
}
/* Facility Stats Grid */
.facility-stats-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 8px;
background: var(--bg-surface-sub);
border-radius: var(--radius-sm);
padding: 8px 10px;
height: 86px;
min-height: 86px;
max-height: 86px;
box-sizing: border-box;
}
.stat-cell {
display: flex;
flex-direction: column;
min-width: 0;
}
.stat-label {
font-size: 0.65rem;
font-weight: 600;
color: var(--text-muted);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.stat-value {
font-size: 0.78rem;
color: var(--text-primary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.text-warning {
color: var(--amber-dark);
}
/* Inputs Strip - Standardized fixed-height container to eliminate grid shifts */
.inputs-strip {
display: flex;
flex-direction: column;
gap: 4px;
padding: 6px 8px;
background: var(--bg-surface-sub);
border: 1px dashed var(--border-color);
border-radius: var(--radius-sm);
height: 72px;
min-height: 72px;
max-height: 72px;
box-sizing: border-box;
overflow: hidden;
}
.inputs-strip.raw-placeholder {
justify-content: center;
align-items: center;
background: var(--bg-surface-sub);
border-style: dotted;
color: var(--text-muted);
font-size: 0.72rem;
font-style: italic;
text-align: center;
padding: 8px;
}
.inputs-label {
font-size: 0.68rem;
font-weight: 700;
color: var(--text-secondary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.inputs-chips {
display: flex;
flex-wrap: wrap;
gap: 6px;
overflow-y: auto;
max-height: 44px;
scrollbar-width: thin;
}
.input-chip {
display: inline-flex;
align-items: center;
gap: 4px;
font-size: 0.70rem;
background: var(--bg-surface);
border: 1px solid var(--border-color);
padding: 2px 6px;
border-radius: 4px;
color: var(--text-secondary);
white-space: nowrap;
flex-shrink: 0;
}
.input-chip.low-stock {
border-color: var(--amber-dark);
background: var(--amber-light);
color: var(--amber-dark);
}
/* Facility Logistics & Downstream Policy Bar */
.facility-policy-bar {
display: flex;
gap: 6px;
align-items: center;
background: var(--bg-surface-sub);
border: 1px solid var(--border-color);
border-radius: var(--radius-sm);
padding: 4px 6px;
}
.policy-label {
font-size: 0.68rem;
font-weight: 700;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.03em;
margin-right: 2px;
}
.btn-policy-toggle {
display: inline-flex;
align-items: center;
gap: 4px;
background: var(--bg-surface);
border: 1px solid var(--border-color);
border-radius: var(--radius-sm);
padding: 3px 7px;
font-size: 0.72rem;
font-weight: 600;
color: var(--text-secondary);
cursor: pointer;
transition: all 0.15s;
user-select: none;
}
.btn-policy-toggle:hover {
border-color: var(--border-subtle);
background: var(--bg-surface-sub);
}
.btn-policy-toggle.active {
background: var(--emerald-light);
border-color: var(--emerald-profit);
color: var(--emerald-dark);
font-weight: 700;
}
.btn-policy-toggle.inactive {
background: var(--amber-light);
border-color: var(--amber-warning);
color: var(--amber-dark);
font-weight: 700;
}
/* Facility Throttle Control Bar */
.facility-throttle-bar {
display: flex;
gap: 6px;
align-items: center;
background: var(--bg-surface-sub);
border: 1px solid var(--border-color);
border-radius: var(--radius-sm);
padding: 3px 6px;
box-sizing: border-box;
height: 32px;
}
.throttle-label {
font-size: 0.68rem;
font-weight: 700;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.03em;
margin-right: 2px;
white-space: nowrap;
}
.throttle-pills {
display: flex;
gap: 4px;
flex: 1;
}
.btn-throttle-pill {
flex: 1;
background: var(--bg-surface);
border: 1px solid var(--border-color);
border-radius: 4px;
padding: 2px 0;
font-size: 0.70rem;
font-weight: 600;
color: var(--text-secondary);
cursor: pointer;
text-align: center;
transition: all 0.15s;
user-select: none;
}
.btn-throttle-pill:hover {
border-color: var(--border-subtle);
background: var(--bg-surface-sub);
}
.btn-throttle-pill.active {
background: var(--primary-blue);
border-color: var(--primary-blue);
color: #ffffff;
font-weight: 700;
}
.btn-throttle-pill.active.pill-off {
background: #ef4444;
border-color: #dc2626;
color: #ffffff;
}
/* Action Buttons */
.facility-actions-row {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: auto;
}
.btn-primary-corp {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
background: var(--primary-blue);
color: #ffffff;
border: none;
border-radius: var(--radius-sm);
padding: 8px 12px;
font-size: 0.78rem;
font-weight: 700;
cursor: pointer;
white-space: nowrap;
transition: background 0.15s, opacity 0.15s;
}
.btn-primary-corp:hover:not(:disabled) {
background: var(--primary-blue-hover);
}
.btn-primary-corp:disabled {
background: var(--border-subtle);
cursor: not-allowed;
opacity: 0.65;
}
.btn-corp-action {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 4px;
background: var(--emerald-dark);
color: #ffffff;
border: none;
border-radius: var(--radius-sm);
padding: 8px 12px;
font-size: 0.78rem;
font-weight: 700;
cursor: pointer;
white-space: nowrap;
}
.btn-corp-action:hover {
background: var(--emerald-profit);
}
.btn-corp-secondary {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 4px;
background: var(--bg-surface);
border: 1px solid var(--border-color);
border-radius: var(--radius-sm);
padding: 7px 10px;
font-size: 0.75rem;
font-weight: 600;
color: var(--text-primary);
cursor: pointer;
white-space: nowrap;
}
.btn-corp-secondary:hover:not(:disabled) {
background: var(--bg-surface-sub);
}
.btn-corp-secondary:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.mgr-hired-badge {
display: inline-flex;
align-items: center;
gap: 4px;
background: var(--primary-blue-light);
color: var(--primary-blue);
font-size: 0.72rem;
font-weight: 700;
padding: 6px 10px;
border-radius: var(--radius-sm);
white-space: nowrap;
}
/* ==========================================================================
COMPACT PRODUCTION GRID VIEW & COMPACT FACILITY CARDS
========================================================================== */
.compact-production-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
gap: 10px;
align-items: stretch;
}
@media (max-width: 600px) {
.compact-production-grid {
grid-template-columns: 1fr;
gap: 8px;
}
}
.compact-card {
background: var(--bg-surface);
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
padding: 8px 12px;
box-shadow: var(--shadow-sm);
display: flex;
align-items: center;
gap: 12px;
min-height: 82px;
cursor: pointer;
position: relative;
box-sizing: border-box;
overflow: hidden;
transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.compact-card:hover {
border-color: #cbd5e1;
box-shadow: var(--shadow-md);
transform: translateY(-1px);
}
.compact-card.selected {
border-color: var(--primary-blue);
box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}
.compact-card.locked-compact-card {
background: var(--bg-surface-sub);
opacity: 0.88;
}
/* Miniature cycle bar strip across the top of compact cards */
.compact-progress-bar {
position: absolute;
top: 0;
left: 0;
height: 3px;
transition: width 0.1s linear;
border-top-left-radius: var(--radius-md);
z-index: 2;
}
/* Thumbnail Container */
.compact-thumb-wrap {
width: 58px;
height: 58px;
border-radius: var(--radius-sm);
border: 1px solid var(--border-color);
background: var(--bg-surface-sub);
overflow: hidden;
position: relative;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
}
.compact-thumb-img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
}
.compact-thumb-fallback {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.4rem;
}
.compact-tier-pill {
position: absolute;
bottom: 2px;
right: 2px;
font-size: 0.60rem;
font-weight: 800;
background: rgba(15, 23, 42, 0.8);
color: #ffffff;
padding: 1px 4px;
border-radius: 3px;
line-height: 1;
}
.compact-thumb-lock-overlay {
position: absolute;
inset: 0;
background: rgba(15, 23, 42, 0.6);
display: flex;
align-items: center;
justify-content: center;
color: #f8fafc;
font-size: 1.2rem;
}
/* Middle Information Column */
.compact-info-col {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 3px;
}
.compact-meta-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 6px;
}
.compact-sector-badge {
font-size: 0.65rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.03em;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.compact-status-badge {
display: inline-flex;
align-items: center;
gap: 3px;
font-size: 0.62rem;
font-weight: 700;
padding: 1px 5px;
border-radius: 8px;
white-space: nowrap;
}
.compact-status-badge iconify-icon {
font-size: 0.75rem;
}
.compact-title-row {
display: flex;
align-items: baseline;
gap: 8px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.compact-name {
font-size: 0.88rem;
font-weight: 700;
color: var(--text-primary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 1.2;
}
.compact-lines-badge {
font-size: 0.70rem;
color: var(--text-secondary);
}
.compact-sub {
font-size: 0.68rem;
color: var(--text-muted);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.compact-stats-row {
display: flex;
align-items: center;
gap: 5px;
font-size: 0.72rem;
color: var(--text-secondary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.compact-stat-item {
display: inline-flex;
align-items: center;
gap: 3px;
}
.compact-stat-item iconify-icon {
font-size: 0.80rem;
color: var(--text-muted);
}
.compact-stat-divider {
color: var(--border-subtle);
}
/* Right Actions Column */
.compact-actions-col {
display: flex;
flex-direction: column;
gap: 5px;
align-items: flex-end;
flex-shrink: 0;
}
.btn-compact-expand {
padding: 5px 8px !important;
font-size: 0.72rem !important;
gap: 4px;
white-space: nowrap;
border-radius: var(--radius-sm);
min-width: 90px;
}
.btn-compact-expand iconify-icon {
font-size: 0.85rem;
}
.btn-compact-unlock {
padding: 6px 10px !important;
font-size: 0.72rem !important;
gap: 4px;
white-space: nowrap;
border-radius: var(--radius-sm);
}
.btn-compact-detail {
height: 22px !important;
padding: 2px 6px !important;
font-size: 0.65rem !important;
gap: 2px !important;
}