/* css/desktop2.css */

/* ==========================================================================
   01. ANIMATIONS & STATE MODIFIERS
   ========================================================================== */
@keyframes dropPulse {
    0%   { box-shadow: inset 0 0 0 1000px #00e676; transform: scale(1.02); z-index: 100; }
    15%  { box-shadow: inset 0 0 0 1000px #00e676; transform: scale(1.02); }
    40%  { box-shadow: inset 0 0 0 0 transparent; transform: scale(1); }
    60%  { box-shadow: inset 0 0 0 1000px #00e676; }
    100% { box-shadow: inset 0 0 0 0 transparent; transform: scale(1); }
}

@keyframes dateBoxPulse {
    0%   { box-shadow: inset 0 0 0 100px #00e676; border-color: #000000; }
    15%  { box-shadow: inset 0 0 0 100px #00e676; border-color: #000000; }
    40%  { box-shadow: inset 0 0 0 100px transparent; border-color: #000000; }
    60%  { box-shadow: inset 0 0 0 100px #00e676; border-color: #000000; }
    100% { box-shadow: inset 0 0 0 100px transparent; border-color: #000000; }
}

.ui-glow-success { animation: dateBoxPulse 2.5s ease-out forwards !important; }
.log-row.flash-success { animation: dropPulse 2.5s ease-out forwards; border-left: none !important; position: relative; }

/* ==========================================================================
   02. GLOBAL LAYOUT, SCROLLING & PANELS
   ========================================================================== */
.sidebar { width: 100%; background: #ffffff !important; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.sidebar-scroll-wrapper { flex: 1; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; background-color: transparent !important; padding-top: 10px; -ms-overflow-style: none; scrollbar-width: none; }
.sidebar-scroll-wrapper::-webkit-scrollbar { display: none; }

#panel-logs, #panel-stats, #panel-calc, #panel-egg { height: 100%; width: 100%; display: flex; flex-direction: column; padding-top: 0 !important; }
#panel-logs { background-color: transparent !important; }

#panel-logs .log-container, #panel-egg .log-container, #panel-daily .log-container, #panel-calc .calc-container, #panel-stats .stats-container { padding-top: 0 !important; margin-top: 0 !important; }
#panel-logs .config-card, #panel-egg .config-card, #panel-daily .daily-card, #panel-calc .calc-tool-card, #panel-stats .stats-group { margin-top: 10px !important; }
#panel-calc .calc-tool-card, #panel-stats .stats-group, #panel-daily .daily-card, #panel-egg .config-card, #panel-logs .config-card { margin-top: 5px !important; }

/* ==========================================================================
   03. SHARED UI COMPONENTS (Cards, Inputs, Buttons, Arrows)
   ========================================================================== */
#panel-logs .config-card, #panel-egg .config-card, .config-card { background-color: #EBF5FB !important; border: 2px solid #000000; border-radius: 12px; padding: 8px 10px; margin: 0 15px 15px 15px; display: flex; flex-direction: column; gap: 0px; background-clip: padding-box; container-type: inline-size; container-name: configcard; }
.config-card .war-setup-row, .config-card .date-row-styled { margin: 0 !important; width: 100%; padding: 2px 0; }
.stats-box-row, .egg-stats-row { background-color: #EBF5FB !important; border: 2px solid #000000; border-radius: 12px; display: flex; justify-content: center; align-items: center; gap: 40px; padding: 10px; margin: 0 15px 20px 15px; width: auto; box-sizing: border-box; }

#start-date, #egg-date-desktop { font-family: 'Fredoka', sans-serif !important; font-size: 1rem !important; font-weight: 600 !important; color: #000000 !important; -webkit-text-stroke: 0px transparent !important; background-color: #ffffff !important; border: 2px solid #000000 !important; border-radius: 8px !important; padding: 4px 8px !important; height: 34px !important; box-shadow: inset 0 2px 4px rgba(0,0,0,0.05); outline: none; box-sizing: border-box; cursor: pointer; }
#start-date::-webkit-calendar-picker-indicator, #egg-date-desktop::-webkit-calendar-picker-indicator { filter: none !important; cursor: pointer; opacity: 0.6; }

/* Fixed: Added span.stat-arrow to ensure stats tab arrows are green */
span.stat-arrow-table.stat-arrow-table, 
span.calc-arrow.calc-arrow, 
span.stat-arrow { 
    all: unset !important; 
    display: inline-flex !important; 
    color: #198754 !important; 
    -webkit-text-stroke: 0px transparent !important; 
    font-weight: 800 !important; 
    font-size: 1.1rem !important; 
    font-family: 'Fredoka', sans-serif !important; 
    margin: 0 6px !important; 
    vertical-align: middle !important; 
    transform: translateY(-1px) !important; 
}

.floating-cancel-btn, #capsule-logs button.floating-cancel-btn, #float-logs button.floating-cancel-btn, #capsule-egg button.floating-cancel-btn { display: none !important; width: auto !important; min-width: 100px !important; height: 32px !important; padding: 0 12px !important; margin: 0 auto !important; background-color: #e74c3c !important; color: #ffffff !important; border: 2px solid #000000 !important; border-radius: 8px !important; box-shadow: 0 4px 0 rgba(0,0,0,0.2) !important; align-items: center !important; justify-content: center !important; font-family: 'Fredoka One', sans-serif !important; font-size: 0.8rem !important; text-transform: uppercase !important; line-height: 1 !important; }
.floating-cancel-btn .btn-icon, #capsule-logs button.floating-cancel-btn .btn-icon, #float-logs button.floating-cancel-btn .btn-icon, #capsule-egg button.floating-cancel-btn .btn-icon { width: 16px !important; height: 16px !important; margin-right: 6px !important; display: block !important; filter: none !important; }
/* ==========================================================================
   04. HEADER SYSTEM (Controls, Capsules, Tabs)
   ========================================================================== */
.new-header-container { display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: center !important; gap: 15px !important; width: 100%; padding: 0 20px; margin-top: -24px; z-index: 100; position: relative; box-sizing: border-box; }
.new-mode-switch { display: flex !important; align-items: center !important; background-color: #34495e; border: 2px solid #000000 !important; border-radius: 12px; height: 36px !important; width: 220px !important; flex: 0 0 220px !important; padding: 0; overflow: visible !important; position: relative; z-index: 10; box-sizing: border-box; }
.new-mode-switch .seg-btn { border-right: 2px solid #000000 !important; }
.new-mode-switch .seg-btn:last-child { border-right: none !important; }
.seg-btn.active::before { border-width: 2px !important; height: 140% !important; }
.new-mode-switch .seg-btn.active::before { height: 120% !important; }

#btn-weekly-total.active, #btn-weekly-league.active { font-size: 1rem !important; }

.new-tools-cluster { display: flex !important; align-items: center !important; justify-content: flex-start !important; flex: 0 0 auto !important; height: 44px !important; }
.control-capsule { display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px !important; background-color: #ecf0f1; border: 2px solid #000000 !important; border-radius: 12px; padding: 0 6px; box-sizing: border-box; }
.control-capsule button { height: 34px !important; width: 34px !important; border-radius: 8px !important; border: 2px solid #000000 !important; margin: 0 !important; padding: 0 !important; min-width: 0 !important; box-sizing: border-box; }

.pane.left-pane .d-header-row.row-tabs { display: flex !important; justify-content: center !important; align-items: center !important; width: 100% !important; padding: 5px 20px 0 20px; box-sizing: border-box; margin-top: 15px !important; z-index: 20 !important; position: relative; background-color: transparent !important; pointer-events: none; }
.pane.left-pane .d-header-row.row-tabs > * { pointer-events: auto; }
.pane.left-pane .d-header-row.row-tabs .segmented-control { margin: 0 auto !important; width: 450px !important; max-width: 100% !important; align-self: center !important; transform: none !important; }

.floating-header-container { position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%); z-index: 600; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.fhc-circle { width: 54px; height: 54px; background: #ffffff; border: 2px solid #000000; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 24px; z-index: 10; box-shadow: 0 4px 0 rgba(0,0,0,0.1); overflow: hidden; padding: 0; }
.fhc-circle span { display: flex; width: 100%; height: 100%; justify-content: center; align-items: center; margin: 0; }
.fhc-circle img { width: 80% !important; height: 80% !important; object-fit: contain; display: block; }
.fhc-pill { height: 40px; background: #0097E6; border: 2px solid #000000; border-left: none; border-radius: 0 20px 20px 0; display: flex; align-items: center; padding: 0 20px; margin-left: -18px; z-index: 5; box-shadow: 4px 4px 0 rgba(0,0,0,0.1); }
.fhc-pill span { font-family: 'Fredoka One', cursive; font-size: 1.1rem; color: #ffffff; -webkit-text-stroke: 3px #000000; paint-order: stroke fill; margin-top: -2px; margin-left: 5px; white-space: nowrap !important; }

.tier-header { margin: 8px auto 40px auto !important; width: 100%; max-width: 600px; padding: 0 10px; display: flex !important; align-items: center; justify-content: space-between; box-sizing: border-box; position: relative; z-index: 5; }
.tier-header::before { content: ""; position: absolute; top: 50%; left: 0; width: 100%; height: 0; border-top: 2px dashed #000000; opacity: 1; transform: translateY(-50%); z-index: -1; }
.tier-title { height: 45px !important; width: 85px !important; font-family: 'Fredoka One', sans-serif !important; font-size: 1rem !important; color: #ffffff !important; text-transform: uppercase !important; -webkit-text-stroke: 2px #000000 !important; background-color: #aab2b9 !important; border: 2px solid #000000 !important; border-radius: 12px !important; box-shadow: 0 0px 0 rgba(0,0,0,0.2) !important; display: flex !important; align-items: center !important; justify-content: center !important; box-sizing: border-box !important; z-index: 2; padding: 0 5px !important; margin: 0 !important; }

/* ==========================================================================
   05. TREES & NODES (Map Components)
   ========================================================================== */
.tier-block { width: 100%; max-width: 100%; display: flex; flex-direction: column; align-items: center; margin-bottom: 0px; }
.node { width: 50px; height: 50px; background-color: #dcdcdc; border: 3px solid #7f8c8d; border-radius: 50%; position: relative; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 10; transition: transform 0.1s, border-color 0.2s, background-color 0.2s; -webkit-backface-visibility: hidden; backface-visibility: hidden; transform: translateZ(0); }
.node:hover { transform: scale(1.15); z-index: 20; }
.node .node-img { width: 80%; height: 80%; object-fit: contain; pointer-events: none; z-index: 5; filter: grayscale(100%); opacity: 0.5; transition: filter 0.2s, opacity 0.2s; }
.node.unlocked { background-color: #ffffff; border-color: #2d3436; }
.node.unlocked .node-img { filter: none; opacity: 1; }
.tree-forge .node.active-setup, .tree-forge .node.active-plan { background-color: #5eff8b; border-color: #000000;}
.tree-spt .node.active-setup, .tree-spt .node.active-plan { background-color: #fcfe5d; border-color: #000000;}
.tree-power .node.active-setup, .tree-power .node.active-plan { background-color: #e17373; border-color: #000000;}

.node.flash-success { animation: dropPulse 2.5s ease-out forwards !important; border-color: #00e676 !important; z-index: 100 !important; }
.node-level { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); color: #fff; font-family: 'Fredoka One', cursive; font-size: 0.9rem; -webkit-text-stroke: 3px #000; paint-order: stroke fill; white-space: nowrap; z-index: 10; pointer-events: none; }
.node-tier-badge { display: flex; align-items: center; justify-content: center; position: absolute; top: -8px; left: -8px; width: 20px; height: 20px; background: #ebebeb; border: 2px solid #000000; border-radius: 50%; color: #ffffff; -webkit-text-stroke: 2.5px #000000; paint-order: stroke fill; font-size: 10px; font-weight: 900; font-family: sans-serif; z-index: 15; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.node:not(.unlocked) .node-tier-badge { background: #bdc3c7; border-color: #7f8c8d; }
.connections-layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.connector { fill: none; stroke-width: 4px; stroke: #2d3436; stroke-linecap: round; stroke-linejoin: round; }
.connector.locked { stroke: #bdc3c7 !important; opacity: 0.5; }

/* ==========================================================================
   06. LOGS TAB (The Schedule)
   ========================================================================== */
.panel-title-bar { display: none !important; }
.log-container { padding: 10px 0; }
.sb-item { display: flex; align-items: center; justify-content: center; background: none !important; border: none !important; height: auto; flex: none; padding: 0; margin: 0; }
.sb-item::before { content: ''; display: inline-block; width: 24px; height: 24px; background-size: contain; background-repeat: no-repeat; background-position: center; position: static; margin-right: 5px; filter: none !important; }
.sb-item.type-res::before { background-image: url('../icons/red_potion.png'); }
.sb-item.type-time::before { background-image: url('../icons/icon_time.png'); }
.sb-value { color: #ffffff !important; font-family: 'Fredoka', sans-serif; font-size: 1.05rem; font-weight: 650; -webkit-text-stroke: 2.5px #000000; paint-order: stroke fill; background: none !important; border: none !important; box-shadow: none !important; margin: 0 !important; padding: 0 !important; }

.date-row-styled { display: flex; align-items: center; justify-content: space-between; margin: 0 15px 10px 15px; height: 40px; }
.drs-label, .war-setup-row label { color: #ffffff; font-family: 'Fredoka', sans-serif; font-size: 1rem; font-weight: 800; -webkit-text-stroke: 3px #000000; paint-order: stroke fill; margin-right: 5px; }
.war-setup-row { display: flex; align-items: center; justify-content: space-between; margin: 0 15px 10px 15px; height: 40px; }
.war-select-group { display: flex; gap: 5px; }
.war-select { font-family: 'Fredoka', sans-serif !important; font-size: 1rem !important; font-weight: 600 !important; color: #000000 !important; -webkit-text-stroke: 0px transparent !important; background-color: #ffffff !important; border: 2px solid #000000 !important; border-radius: 6px !important; padding: 0 2px !important; text-align: center; outline: none; cursor: pointer; height: 32px !important; }

.log-row { background-color: #EBEBEB; border-radius: 12px; margin: 0 15px 8px 15px; border: none; transition: background-color 0.2s; }
.log-row:hover { background-color: #e1e1e1; }
.log-row.expanded { background-color: #d6d6d6; }

/* Week 1: Similar Strength Opponent (Steel Blue) */
.log-row.war-active-w1 { background-color: #5d9cec !important; }
.log-row.war-active-w1:hover { background-color: #4a89dc !important; }
.log-row.war-active-w1.delay { opacity: 0.8; }

/* Week 2: Random Opponent (Standard Blue) */
.log-row.war-active-w2 { background-color: #00a2ff !important; }
.log-row.war-active-w2:hover { background-color: #0091e6 !important; }
.log-row.war-active-w2.delay { opacity: 0.8; }

.log-entry { display: flex; justify-content: space-between; align-items: center !important; padding: 12px 15px !important; cursor: pointer; border-left: none !important; flex-wrap: nowrap !important; gap: 12px; }
.log-entry.delay { background: transparent !important; border: none !important; padding: 10px 15px; }
.log-entry.delay .log-node-preview { box-shadow: inset 0 0 0 2px #000000, 0 2px 4px rgba(0,0,0,0.1); }

.log-left-group { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 140px; }
.log-icon-wrapper { display: flex; flex-direction: column; align-items: center; width: 48px; flex-shrink: 0; position: relative; }
.log-node-preview { width: 44px; height: 44px; box-shadow: inset 0 0 0 2px #000000, 0 2px 4px rgba(0,0,0,0.1); border: none; border-radius: 50% !important; display: flex; align-items: center; justify-content: center; background-color: #fff; margin-bottom: 0px !important; overflow: hidden; position: relative; z-index: 1; }
.lnp-img { width: 80%; height: 80%; object-fit: contain; z-index: 5; }
.log-tier-text { background-color: #fbb683; border: 2px solid #000000; border-radius: 10px; padding: 0 4px; height: 16px; min-width: 32px; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 400; color: #000000; font-family: 'Fredoka One', sans-serif; line-height: 1; -webkit-text-stroke: 0px #000000; paint-order: stroke fill; margin-top: -14px !important; position: relative; z-index: 10; box-shadow: 0 2px 3px rgba(0,0,0,0.2); }

.log-entry.forge .log-node-preview { background-color: #5eff8b; }
.log-entry.spt .log-node-preview   { background-color: #fcfe5d; }
.log-entry.power .log-node-preview { background-color: #e17373; }

.log-name { color: #ffffff; font-family: 'Fredoka One', sans-serif; font-size: 1rem; font-weight: 500; -webkit-text-stroke: 2.5px #000000; paint-order: stroke fill; line-height: 1.2; text-align: left; margin-right: 0; white-space: normal !important; word-break: normal !important; overflow-wrap: normal !important; word-wrap: normal !important; }
.log-right-group { display: flex; flex-direction: column; align-items: flex-end !important; text-align: right; flex: 0 1 auto; margin-left: auto; max-width: 50%; }
.log-time { color: #39FF14; font-family: 'Fredoka One', sans-serif; font-size: 1rem; font-weight: 300; -webkit-text-stroke: 2.5px #000000; paint-order: stroke fill; margin-bottom: 4px; margin-left: 5px; white-space: nowrap !important; }

.log-details { display: flex; justify-content: flex-end; align-items: flex-end; gap: 4px 8px; flex-wrap: wrap; width: 100%; }
.ld-part { display: flex; align-items: center; gap: 3px; font-family: 'Fredoka One', sans-serif; color: #ffffff; font-size: 0.9rem; font-weight: 500; -webkit-text-stroke: 2.5px #000000; paint-order: stroke fill; letter-spacing: 0.5px; }
.ld-part.pot { order: 2; width: auto !important; justify-content: flex-end; }
.ld-part.pot span { min-width: auto; text-align: left; }
.ld-part.time { order: 1; min-width: auto !important; justify-content: flex-end; }
.ld-icon { width: 20px; height: 20px; object-fit: contain; filter: drop-shadow(0 0px 0px rgba(0,0,0,0.3)); margin: 0; }

.log-controls { display: none; padding: 10px; background: #f1f1f1; justify-content: space-between; align-items: center; border-top: 1px solid #e0e0e0; animation: slideDown 0.2s ease-out; flex-wrap: wrap; gap: 6px; border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; overflow-x: auto; }
.log-row.expanded .log-controls { display: flex; }
.btn-game-ctrl { flex: 1; height: 36px; padding: 0 4px; font-family: 'Fredoka One', sans-serif !important; font-size: 0.85rem; color: #ffffff !important; text-transform: uppercase; letter-spacing: 0.5px; border: 2px solid #000000 !important; border-radius: 8px; box-shadow: 0 4px 0 rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center; cursor: pointer; white-space: nowrap; transition: transform 0.1s, box-shadow 0.1s; -webkit-text-stroke: 2.5px #000000; paint-order: stroke fill; }
.btn-game-ctrl:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,0.2); }
.btn-game-ctrl:hover { transform: translateY(-2px); filter: brightness(1.1); box-shadow: 0 6px 0 rgba(0,0,0,0.2); }

.btn-move-action .btn-icon {
    width: 16px !important;
    height: 16px !important;
    margin-right: 6px !important;
    display: block !important;
    filter: none !important;
}

.btn-game-ctrl.btn-move   { background-color: #2980b9; } 
.btn-game-ctrl.btn-insert { background-color: #8e44ad; } 
.btn-game-ctrl.btn-done   { background-color: #27ae60; } 
.btn-game-ctrl.btn-delay  { background-color: #f39c12; } 
.btn-game-ctrl.btn-del    { background-color: #c0392b; } 

/* ==========================================================================
   07. STATS TAB
   ========================================================================== */
.stats-container { display: block !important; flex: 1; overflow-y: visible; padding: 20px 0; background: transparent; width: 100%; }
.stats-group { background: #ffffff; border: 2px solid #000000; border-radius: 20px; margin: 0 15px 30px 15px; overflow: hidden; padding-bottom: 15px; box-shadow: 4px 4px 0 rgba(0,0,0,0.1); }
.stats-header { display: flex !important; flex-direction: row !important; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 12px 15px; margin-bottom: 15px; border-bottom: 2px solid #000000; min-height: 60px; box-sizing: border-box; overflow: visible !important; }
.stats-header.forge { background-color: #5eff8b !important; }
.stats-header.spt   { background-color: #fcfe5d !important; }
.stats-header.power { background-color: #e17373 !important; }

.header-left { display: flex; align-items: center; flex: 1; min-width: 0; overflow: visible !important; }
.header-icon-circle { width: 55px !important; height: 55px !important; background-color: #ffffff; border: 2px solid #000000; border-radius: 50%; box-shadow: 0 0px 0 rgba(0,0,0,0.1); display: flex; justify-content: center; align-items: center; margin-right: 18px; flex-shrink: 0; }
.stats-header img.nav-icon { width: 75% !important; height: 75% !important; object-fit: contain; }
.stats-header .header-title-text { font-family: 'Fredoka One', sans-serif; font-size: 1.3rem !important; line-height: 1.1; color: #ffffff !important; -webkit-text-stroke: 3.5px #000000; paint-order: stroke fill; filter: drop-shadow(0px 0px 0px rgba(0,0,0,0.1)); white-space: normal !important; overflow: visible !important; text-overflow: clip; display: block; padding-left: 2px; }

.header-right { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; flex-shrink: 0; text-align: right; align-self: flex-start; margin-top: 5px; }
.stat-count-text, .stat-pct-text { font-family: 'Fredoka', sans-serif; font-size: 1rem !important; font-weight: 650; color: #ffffff; -webkit-text-stroke: 2.5px #000000; paint-order: stroke fill; white-space: nowrap; }
.stat-count-text { margin-top: 5px; }

.stats-row { display: flex; align-items: center; margin: 0 15px 10px 15px; background-color: #ebf5fb ; border-radius: 12px; padding: 10px 15px; border: none !important; box-shadow: 0 0px 0 rgba(0,0,0,0.15); }
.stats-row:hover { transform: scale(1.01); filter: brightness(0.98); }
.stats-row:last-child { margin-bottom: 0; }
.stat-icon-box { width: 44px; height: 44px; background: #ffffff; border-radius: 50% !important; border: 2px solid #000000; display: flex; justify-content: center; align-items: center; margin-right: 15px; flex-shrink: 0; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.stat-icon-img { width: 80% !important; height: 80% !important; object-fit: contain; }
.stat-info { flex: 1; min-width: 0; }
.stat-name { margin-bottom: 4px; display: flex; align-items: center; font-size: 1rem; color: #ffffff; font-family: 'Fredoka One', sans-serif; font-weight: 300; -webkit-text-stroke: 3px #000000; letter-spacing: 0.5px; paint-order: stroke fill; }
.stat-value { font-size: 1rem; color: #000000; -webkit-text-stroke: 0px #000000; font-family: 'Fredoka', sans-serif; line-height: 1.3; }
.stat-new { color: #198754; font-size: 1rem; }
.stat-key-icon { height: 1.2em !important; width: auto !important; vertical-align: middle; margin-bottom: 2px; }
.btn-table { background: #ffffff; border: 2px solid #000; color: #333; border-radius: 6px; padding: 2px 8px; font-size: 0.75em; font-weight: bold; margin-left: 8px; cursor: pointer; vertical-align: middle; box-shadow: 0 2px 0 rgba(0,0,0,0.1); }
.btn-table:active { transform: translateY(1px); box-shadow: none; }

/* ==========================================================================
   08. CALCULATORS (Forge, Equipment, Daily/Weekly)
   ========================================================================== */
.calc-container { padding: 15px; display: flex; flex-direction: column; gap: 20px; }
.calc-tool-card { background: #ffffff; border: 2px solid #000000; border-radius: 16px; box-shadow: 0 6px 0 rgba(0,0,0,0.15); overflow: hidden; display: flex; flex-direction: column; padding: 15px; background-clip: padding-box; transform: translateZ(0); isolation: isolate; }
.calc-card-input-area { display: flex; flex-direction: column; width: 100%; margin-bottom: 15px; }
.calc-row-input { background-color: transparent; border: none; padding: 5px 0; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; width: 100%; box-sizing: border-box; }
.calc-line { background-color: #e4e4e4; border: 2px solid transparent; border-radius: 8px; padding: 10px 15px; margin-bottom: 10px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; width: 100%; box-sizing: border-box; }
.calc-row-input:last-child, .calc-line:last-child, .calc-tool-card > :last-child { margin-bottom: 0; }

.calc-row-input label, .calc-input-chunky, .calc-select-chunky, .calc-date-chunky, .calc-label, .calc-val-group, .calc-val-before, .calc-val-group span { font-family: 'Fredoka', sans-serif !important; font-size: 1rem !important; color: #000000 !important; -webkit-text-stroke: 0px transparent !important; text-shadow: none !important; font-weight: 600 !important; letter-spacing: 0.5px; }
.calc-input-chunky, .calc-select-chunky, .calc-date-chunky { background: #ffffff; border: 2px solid #000000 !important; border-radius: 8px; padding: 4px 8px; box-shadow: inset 0 2px 4px rgba(0,0,0,0.05); width: auto; min-width: 20px; text-align: center; cursor: pointer; outline: none; }
.daily-input { background: #ffffff; border: 2px solid #000000 !important; border-radius: 8px; padding: 0 8px !important; box-shadow: inset 0 2px 4px rgba(0,0,0,0.05); text-align: center; outline: none; height: 28px !important; line-height: 28px !important; font-family: 'Fredoka', sans-serif !important; font-size: 1rem !important; color: #000000 !important; font-weight: 600 !important; letter-spacing: 0.5px; -webkit-text-stroke: 0px transparent !important; }

.calc-val-group { display: flex; align-items: center; gap: 8px; }
#panel-calc .calc-val-group { display: flex !important; flex-wrap: wrap !important; justify-content: flex-end !important; align-items: center !important; width: auto !important; text-align: right !important; margin-left: auto !important; }
@media (min-width: 769px) { #panel-equipment .calc-val-group { display: flex !important; flex-wrap: wrap !important; justify-content: flex-end !important; align-items: center !important; width: auto !important; text-align: right !important; margin-left: auto !important; } }

.calc-val-group .calc-val-after, .calc-val-group .calc-val-after span, .calc-val-group .calc-val-after * { color: #198754 !important; fill: #198754 !important; font-family: 'Fredoka', sans-serif !important; font-size: 1rem !important; font-weight: 600 !important; -webkit-text-stroke: 0px transparent !important; }
.calc-icon { height: 20px; width: 20px; object-fit: contain; vertical-align: middle; margin-left: 5px; filter: none; }
.calc-icon-left { height: 18px; width: 18px; object-fit: contain; vertical-align: middle; margin-right: 4px; margin-bottom: 2px; filter: none; }
.calc-multiline-date { display: flex; flex-direction: row; align-items: center; gap: 0px; white-space: nowrap; }
.calc-time-block { font-size: 1rem !important; opacity: 1 !important; margin-left: 4px; }
.calc-date-comma { display: inline !important; } 
.info-tooltip { cursor: pointer; color: #95a5a6 !important; margin-left: 5px; opacity: 0.7; }

/* ==========================================================================
   09. EGG PLANNER TAB
   ========================================================================== */
#panel-egg #egg-date-desktop { letter-spacing: 0.5px !important; width: 220px !important; font-size: 0.8em !important; height: 30px !important; padding: 0 5px !important; }
.egg-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.egg-title { color: #8e44ad; font-size: 1.5em; font-weight: bold; }
.egg-actions { display: flex; gap: 5px; }
.egg-instruction { font-size: 0.85em; color: #7f8c8d; font-weight: 600; margin-bottom: 5px; padding-left: 2px; }

.egg-selector { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 10px; background: #ffffff !important; border: 2px solid #000000 !important; border-radius: 8px !important; box-shadow: inset 0 2px 4px rgba(0,0,0,0.05); margin-bottom: 5px; }
.egg-btn { background: transparent !important; border: none !important; box-shadow: none !important; cursor: pointer; padding: 2px; display: flex; justify-content: center; align-items: center; transition: transform 0.2s; }
.egg-btn img { width: 54px; height: 54px; object-fit: contain; filter: none !important; }
.egg-btn:hover img { transform: scale(1.15); filter: none !important; }

.egg-log-container { height: auto; overflow-y: visible; border-top: none !important; display: flex; flex-direction: column; }
.egg-row { display: flex; flex-direction: column; border-bottom: 1px solid #f1f1f1; padding: 6px 10px; border-left: 4px solid transparent; background: #ffffff; position: relative; font-size: 0.85em; }
.egg-row.common { border-left-color: #AE988C; }
.egg-row.rare { border-left-color: #3498db; }
.egg-row.epic { border-left-color: #2ecc71; }
.egg-row.legendary { border-left-color: #f1c40f; }
.egg-row.ultimate { border-left-color: #B25C5C; }
.egg-row.mythic { border-left-color: #9b59b6; }
.egg-row-header { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.egg-row:hover { background: #f8f9fa; }
.egg-row.expanded .egg-ctrls { display: flex; }

.egg-info { display: flex; align-items: center; gap: 12px; }       
.egg-info img { height: 2.2rem; width: auto; object-fit: contain; }
.egg-name { font-weight: normal; font-size: 0.85em; color: #333; }
.egg-details-right { text-align: right; }
.egg-time-finish { font-size: 1em; font-weight: 600; color: var(--accent-green); }
.egg-meta { font-size: 0.8em; color: #95a5a6; margin-top: 1px; }
.egg-ctrls { display: none; gap: 5px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #bdc3c7; justify-content: flex-end; }

.es-item { display: flex; align-items: center; justify-content: center; }
.es-item.type-points::before { content: ''; display: inline-block; width: 24px; height: 24px; background-image: url('../icons/warpoint.png'); background-size: contain; background-repeat: no-repeat; background-position: center; margin-right: 5px; }
.es-item.type-time::before { content: ''; display: inline-block; width: 24px; height: 24px; background-image: url('../icons/icon_time.png'); background-size: contain; background-repeat: no-repeat; background-position: center; margin-right: 5px; }
.es-value { color: #ffffff !important; font-family: 'Fredoka', sans-serif; font-size: 1.05rem; font-weight: 650; -webkit-text-stroke: 2.5px #000000; paint-order: stroke fill; }
.egg-prompt-text { color: #ffffff; font-family: 'Fredoka', sans-serif; font-size: 1rem; font-weight: 800; -webkit-text-stroke: 3px #000000; paint-order: stroke fill; text-align: left; margin: 15px 0 8px 0; display: block; }
#panel-egg .log-left-group { gap: 2px !important; }
#panel-egg .log-icon-wrapper img { filter: none !important; }

/* ==========================================================================
   10. INTERACTIVE MODES (Move, Insert, Drag & Drop)
   ========================================================================== */
.log-row.moving-active { background-color: #fff8e1 !important; border-left: none !important; z-index: 10; }
.log-row.drop-valid { cursor: pointer; border: 2px dashed #27ae60 !important; background-color: rgba(39, 174, 96, 0.05) !important; transition: background-color 0.2s; }
.log-row.drop-invalid { opacity: 0.3 !important; filter: grayscale(100%) !important; background-color: #ecf0f1 !important; cursor: not-allowed !important; border: none !important; pointer-events: none !important; }

.log-row.moving-active .log-name, .log-row.drop-valid .log-name, .log-row.drop-invalid .log-name { display: none !important; }
.log-row.moving-active .log-controls { display: none !important; }
.log-row.moving-active .log-time { display: none !important; }
.log-row.moving-active .ld-part.pot { visibility: hidden !important; }
.move-time-group, .move-actions-container { display: none; }
.log-row.moving-active .log-entry, .log-row.drop-valid .log-entry { flex-wrap: wrap !important; gap: 0px !important; }
.log-row.drop-valid .log-right-group, .log-row.moving-active .log-right-group { display: none !important; }

.move-time-group { display: none; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; flex: 1; padding: 0 5px; }
.log-row.drop-valid .move-time-group, .log-row.moving-active .move-time-group { display: flex !important; }
.log-row.has-top-btn .move-time-group { display: none !important; }
.mt-row, .log-time-style { font-family: 'Fredoka', cursive, sans-serif !important; font-size: 0.9rem !important; color: #00ff00 !important; -webkit-text-stroke: 2.5px #000 !important; paint-order: stroke fill; white-space: nowrap; }
.duration-style { font-family: 'Fredoka', cursive, sans-serif !important; font-size: 0.9rem !important; color: #ffffff !important; -webkit-text-stroke: 2.5px #000 !important; font-weight: 600 !important; }

@media (min-width: 769px) {
    .log-row.drop-valid .move-time-group, .log-row.moving-active .move-time-group { display: none !important; }
    .log-row.drop-valid .log-right-group, .log-row.moving-active .log-right-group { display: flex !important; flex: 1 1 auto; justify-content: flex-end; align-items: center; }
    .log-row.drop-valid .log-right-group, .log-row.moving-active .log-right-group, .log-row.drop-valid .log-right-group span, .log-row.moving-active .log-right-group span { font-family: 'Fredoka One', cursive, sans-serif !important; font-size: 0.9rem !important; color: #ffffff !important; -webkit-text-stroke: 2.5px #000 !important; }
    .log-row.drop-valid .log-entry, .log-row.moving-active .log-entry { padding-left: 15px !important; padding-right: 15px !important; }
    .log-row.drop-valid .log-left-group, .log-row.moving-active .log-left-group { min-width: 0 !important; flex: 0 0 auto !important; margin-left: 0 !important; margin-right: 10px !important; }
    .log-row.drop-valid .log-right-group, .log-row.moving-active .log-right-group { margin: 0 10px !important; }
    .log-row.moving-active .ld-part.pot { width: 0 !important; margin: 0 !important; }
}

@media (min-width: 769px) and (max-width: 920px) {
    .log-row .log-entry { padding-left: 5px !important; padding-right: 5px !important; }
    .log-row .log-left-group { margin-left: -8px !important; margin-right: 2px !important; }
    .log-row .log-right-group { margin: 0 2px !important; }
}

.move-actions-container { justify-content: flex-end; align-items: center; gap: 6px; height: 100%; width: auto; }
.log-row.moving-active .move-actions-container, .log-row.drop-valid .move-actions-container { display: flex !important; margin-left: auto; }
.btn-move-action { height: 32px; padding: 0 12px; width: auto; min-width: 70px; max-width: 100px; border: 2px solid #000000; border-radius: 8px; font-family: 'Fredoka One', sans-serif; font-size: 0.8rem; color: #ffffff; text-transform: uppercase; white-space: nowrap; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 0 rgba(0,0,0,0.2); transition: transform 0.1s; }
.btn-move-action:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,0.2); }
.btn-move-action:hover { transform: translateY(-2px); filter: brightness(1.1); box-shadow: 0 6px 0 rgba(0,0,0,0.2); }
.btn-move-top    { background-color: #27ae60; }  
.btn-move-cancel { background-color: #e74c3c; width: auto; flex: 0 0 auto; } 
.btn-move-below  { background-color: #27ae60; }  

.egg-insert-active { border: 3px dashed #00b0ff !important; background-color: #ffffff !important; box-shadow: 0 4px 12px rgba(0, 176, 255, 0.3) !important; transform: scale(1.02); transition: all 0.2s ease; position: relative; animation: none !important; margin-top: 25px !important; }
.egg-insert-active::after { content: 'INSERTING...'; position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: #00b0ff; color: #ffffff; padding: 2px 12px; border-radius: 12px; -webkit-text-stroke: 2px #000 !important; border: 2px solid #000000; font-family: 'Fredoka One', sans-serif; font-size: 0.9rem; letter-spacing: 1px; z-index: 10; box-shadow: 0 2px 0 rgba(0,0,0,0.2); }

#capsule-logs.is-moving button:not(.floating-cancel-btn), #capsule-logs.is-inserting button:not(.floating-cancel-btn), #float-logs.is-moving .control-capsule button:not(.floating-cancel-btn), #float-logs.is-inserting .control-capsule button:not(.floating-cancel-btn), #float-tree.is-inserting .control-capsule button:not(.floating-cancel-btn), #capsule-egg.is-inserting button:not(.floating-cancel-btn) { display: none !important; }
#capsule-logs.is-moving button.floating-cancel-btn, #capsule-logs.is-inserting button.floating-cancel-btn, #float-logs.is-moving button.floating-cancel-btn, #float-logs.is-inserting button.floating-cancel-btn, #float-logs.is-inserting .control-capsule button.floating-cancel-btn, #float-tree.is-inserting .control-capsule button.floating-cancel-btn { display: flex !important; }