/* === ПРЕЛОАДЕР (ЗАГРУЗОЧНЫЙ ЭКРАН) === */
#global-loader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: #ffe135; z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.loader-spinner {
    width: 50px; height: 50px;
    border: 5px solid rgba(26, 26, 26, 0.1);
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
#global-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

Body{margin:0;padding:0;min-height:100vh;display:flex;flex-direction:column;align-items:center;transition:background-color .4s,color .4s;overflow-x:hidden}
body.theme-light{background-color:#ffe135;font-family:'Inter',sans-serif;color:#2c2c2c;text-align:center}
#light-app{width:100%;display:flex;flex-direction:column;align-items:center;flex-grow:1}
#light-app header{background-color:#ffcc00;padding:15px 30px;border-bottom:2px solid #e5b800;box-shadow:0 2px 10px rgba(0,0,0,.05);display:flex;justify-content:flex-end;align-items:center;gap:12px;width:100%;box-sizing:border-box}
#light-app .logos-container{display:flex;gap:16px;align-items:center;flex-wrap:wrap}
#light-app .logo{display:flex;align-items:center;gap:5px;text-decoration:none;background:#ffffff;padding:8px 18px;border-radius:50px;box-shadow:2px 2px 0px rgba(0,0,0,0.1);transition:transform .2s,box-shadow 0.2s}
#light-app .logo:hover{transform:translateY(-2px);box-shadow:4px 4px 0px rgba(0,0,0,0.15)}
#light-app .logo-text{font-family:'Montserrat',sans-serif;font-size:1.3em;font-weight:900;letter-spacing:-0.5px;color:#1a1a1a}
#light-app .logo-text span{color:#d4a000;font-weight:700}
#light-app .lang-switcher{display:flex;gap:5px;background:#ffffff;padding:5px;border-radius:50px;box-shadow:2px 2px 0px rgba(0,0,0,0.1)}
#light-app .lang-btn{display:flex;align-items:center;justify-content:center;gap:6px;background:none;border:none;font-size:1em;cursor:pointer;color:#888;transition:all 0.2s;padding:8px 12px;border-radius:40px;font-family:'Inter',sans-serif;font-weight:700}
#light-app .lang-btn.active{background:#ffe135;color:#1a1a1a}
.flag-svg{width:18px;height:13px;border-radius:2px;border:1px solid rgba(0,0,0,0.15);display:block}
#light-app .container{padding:30px 20px;max-width:800px;margin:0 auto;flex-grow:1;width:100%;box-sizing:border-box;display:flex;flex-direction:column}
#light-app h1{font-family:'Montserrat',sans-serif;font-size:1.8em;font-weight:800;margin-bottom:30px;letter-spacing:-0.5px}
#light-app .menu{display:flex;flex-wrap:wrap;justify-content:center;gap:15px;margin-bottom:30px}
#light-app .menu-btn{display:flex;align-items:center;justify-content:center;gap:8px;background-color:#ffffff;color:#d4a000;padding:12px 20px;font-size:14px;font-weight:800;border:2px solid #d4a000;border-radius:50px;cursor:pointer;transition:all 0.2s;font-family:'Montserrat',sans-serif;text-transform:uppercase;letter-spacing:0.5px;position:relative}
#light-app .menu-btn:hover,#light-app .menu-btn.active{background-color:#d4a000;color:#ffffff;transform:scale(1.05)}
.disabled-tool{opacity:0.55!important;filter:grayscale(100%);pointer-events:none!important;position:relative!important}
.disabled-tool::after{content:attr(data-soon);position:absolute;top:-8px;right:5px;background:#ef4444;color:#ffffff;font-family:'Montserrat',sans-serif;font-size:8px;font-weight:900;padding:1px 6px;border-radius:30px;text-transform:uppercase;box-shadow:0 2px 4px rgba(0,0,0,0.15);border:1.5px solid #ffffff;letter-spacing:0.5px;pointer-events:none;z-index:10}

.pro-tool{position:relative!important}
.pro-tool::after{content:"PRO";position:absolute;top:-8px;right:5px;background:#1a1a1a;color:#ffe135;font-family:'Montserrat',sans-serif;font-size:8px;font-weight:900;padding:1px 6px;border-radius:30px;text-transform:uppercase;box-shadow:0 2px 4px rgba(0,0,0,0.15);border:1.5px solid #ffe135;letter-spacing:0.5px;pointer-events:none;z-index:10}

#light-app .workspace{text-align:left;margin-bottom:40px}
#light-app .tool-panel{display:none;background:#ffffff;padding:30px;border-radius:20px;border:3px solid #e5b800;box-shadow:4px 4px 0px rgba(0,0,0,0.1);animation:bounceInLight 0.3s ease}
#light-app .tool-panel.active{display:block}
@keyframes bounceInLight{0%{opacity:0;transform:scale(0.95) translateY(10px)}100%{opacity:1;transform:scale(1) translateY(0)}}
#light-app .tool-panel h2{font-family:'Montserrat',sans-serif;margin-top:0;color:#1a1a1a;font-size:1.6em;text-align:center;border-bottom:2px dashed #ffe135;padding-bottom:10px;font-weight:800}
#light-app .input-group{margin-bottom:20px}
#light-app .input-group label{display:block;margin-bottom:8px;font-weight:600;font-size:1em;color:#4a3b00;font-family:'Inter',sans-serif}
.compress-level-switcher{display:flex;gap:3px;background:#ffffff;padding:4px;border-radius:50px;border:2px solid #d4a000;box-shadow:2px 2px 0px rgba(0,0,0,0.05)}
.compress-level-btn{background:none;border:none;font-size:11px;cursor:pointer;color:#888;padding:6px 14px;border-radius:40px;font-family:'Inter',sans-serif;font-weight:700;text-transform:uppercase;transition:all 0.2s}
.compress-level-btn.active{background:#ffe135;color:#1a1a1a}
.real-file-input{display:none!important}
.custom-file-wrapper{background:#fafafa;padding:10px;border:2px dashed #d4a000;border-radius:12px;width:100%;box-sizing:border-box;display:flex;align-items:center;gap:15px}
.custom-file-btn{background-color:#d4a000;color:#ffffff;padding:8px 16px;font-size:13px;font-weight:800;border:2px solid #d4a000;border-radius:50px;cursor:pointer;transition:all 0.2s;font-family:'Montserrat',sans-serif;text-transform:uppercase;letter-spacing:0.5px;display:inline-block;flex-shrink:0;margin:0}
.custom-file-btn:hover{background-color:#b38600;border-color:#b38600;transform:scale(1.02)}
.custom-file-name{font-family:'DM Mono',monospace;font-size:13px;color:#666;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 150px);margin:0}
#light-app input[type="text"],#light-app input[type="password"],#light-app textarea{background:#fafafa;padding:12px;border:2px solid #d4a000;border-radius:12px;width:100%;box-sizing:border-box;font-family:'Inter',sans-serif;font-size:14px;transition:0.2s}
#light-app input[type="text"]:focus,#light-app input[type="password"]:focus{border-color:#1a1a1a;outline:none}

/* Стили для выпадающего списка выбора позиции */
#light-app select.custom-select {
    background: #fafafa;
    padding: 12px;
    border: 2px solid #d4a000;
    border-radius: 12px;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #1a1a1a;
    cursor: pointer;
    transition: 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23d4a000%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 12px auto;
}
#light-app select.custom-select:focus {
    border-color: #1a1a1a;
    outline: none;
}

#light-app .flex-inputs{display:flex;gap:15px}
#light-app input[type="number"]{background:#fafafa;border:2px solid #d4a000;color:#1a1a1a;padding:12px;border-radius:12px;width:100%;box-sizing:border-box;font-family:'DM Mono',monospace;font-size:1.1em;font-weight:bold}
#light-app .action-btn{background-color:#ffcc00;color:#1a1a1a;border:2px solid #e5b800;padding:15px;font-size:16px;font-weight:800;border-radius:15px;cursor:pointer;box-shadow:3px 3px 0px rgba(0,0,0,0.1);transition:all 0.1s;width:100%;font-family:'Montserrat',sans-serif;text-transform:uppercase;letter-spacing:0.5px;margin-top:10px}
#light-app .action-btn:active{transform:translate(2px,2px);box-shadow:0px 0px 0px rgba(0,0,0,0.1)}
#light-app #light-status-msg{margin-top:20px;font-size:14px;font-weight:600;text-align:center;display:none;padding:14px;border-radius:12px;border:2px solid;font-family:'Inter',sans-serif}
.eye-btn{position:absolute;right:10px;background:none;border:none;cursor:pointer;color:#d4a000;padding:5px;display:flex;align-items:center;justify-content:center;transition:0.2s}
.eye-btn:hover{color:#1a1a1a;transform:scale(1.1)}
#light-app .pages-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(90px,1fr));gap:12px;margin-top:15px;max-height:400px;overflow-y:auto;padding:10px;background:#fafafa;border:2px dashed #d4a000;border-radius:12px}
#light-app .page-item{position:relative;cursor:pointer;border:3px solid transparent;border-radius:8px;overflow:hidden;transition:all 0.2s;background:#fff;box-shadow:0 3px 6px rgba(0,0,0,0.1);display:flex;flex-direction:column;align-items:center;justify-content:space-between;touch-action:none}
#light-app .page-item:hover{transform:translateY(-2px);box-shadow:0 5px 10px rgba(0,0,0,0.15)}
#light-app .page-item .img-wrapper{height:100px;width:100%;display:flex;align-items:center;justify-content:center;background:#eee;overflow:hidden;pointer-events:none}
#light-app .page-item img{max-height:100%;max-width:100%;object-fit:contain;background:#fff;pointer-events:none}
#light-app .page-item .page-num{background:#1a1a1a;color:#ffe135;font-size:10px;font-weight:bold;text-align:center;padding:4px;width:100%;font-family:'Inter',sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;pointer-events:none}
#light-app .page-item.selected{border-color:#22c55e}
#light-app .delete-btn-overlay{position:absolute;top:4px;right:4px;background:rgba(255, 60, 60, 0.9);color:white;border:none;border-radius:50%;width:22px;height:22px;font-size:12px;font-weight:bold;cursor:pointer;display:flex;align-items:center;justify-content:center;z-index:10;padding:0;box-shadow:0 2px 4px rgba(0,0,0,0.3);transition:background 0.2s}
#light-app .delete-btn-overlay:hover{background:red;transform:scale(1.1)}
#light-app .page-item .selection-badge{position:absolute;top:4px;left:4px;width:22px;height:22px;border-radius:50%;background:#22c55e;color:#fff;display:none;align-items:center;justify-content:center;font-size:12px;font-weight:bold;box-shadow:0 2px 4px rgba(0,0,0,0.3);font-family:'Montserrat',sans-serif;pointer-events:none}
#light-app .page-item.selected .selection-badge{display:flex}
#light-app .grid-ghost{opacity:0.4;transform:scale(0.95);border:2px dashed #d4a000}
#light-app .footer-signature{margin-top:auto;padding-top:20px;padding-bottom:20px;text-align:center;font-family:'DM Mono',monospace;font-size:11px;text-transform:uppercase;letter-spacing:1px;color:#4a3b00;opacity:0.6;transition:all 0.3s ease;user-select:none}
#light-app .drop-zone{border:2px dashed transparent;transition:all 0.2s ease;padding:5px;border-radius:12px}
#light-app .drop-zone.dragover{background-color:#fff8cc;border-color:#22c55e}
#light-app .drop-zone .drop-hint{display:block;font-size:12px;color:#888;margin-bottom:8px;font-family:'Inter',sans-serif;font-weight:500}
#info-banner{display:none;background:#1a1a1a;color:#ffe135;padding:15px 45px;text-align:center;position:relative;font-family:'Inter',sans-serif;font-weight:600;font-size:15px;width:100%;box-sizing:border-box}
#info-banner .close-banner{position:absolute;right:15px;top:50%;transform:translateY(-50%);background:none;border:none;color:#ffe135;font-size:20px;cursor:pointer;padding:5px;font-weight:bold}
#maintenance-msg-block{display:none;padding:60px 20px;text-align:center;animation:bounceInLight 0.4s ease}
#maintenance-msg-block h2{font-family:'Montserrat',sans-serif;font-size:2.2em;color:#1a1a1a;margin-bottom:15px;letter-spacing:-0.5px}
#maintenance-msg-block p{font-family:'Inter',sans-serif;font-size:1.2em;color:#4a3b00;margin:0;font-weight:500}
#site-popup-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.7);z-index:9999;display:none;align-items:center;justify-content:center;backdrop-filter:blur(5px);padding:20px;box-sizing:border-box}
#site-popup-box{background:#fff;padding:40px 25px 25px 25px;border-radius:20px;box-shadow:0 10px 30px rgba(0,0,0,0.3);width:100%;max-width:400px;text-align:center;position:relative;animation:bounceInLight 0.4s ease;border:3px solid #d4a000;display:flex;flex-direction:column;align-items:center}
#site-popup-close{position:absolute;top:15px;right:15px;font-size:24px;cursor:pointer;color:#888;border:none;background:none;transition:0.2s;padding:0;line-height:1;font-weight:bold}
#site-popup-close:hover{color:#dc143c;transform:scale(1.1)}
#site-popup-img{max-width:100%;max-height:250px;border-radius:12px;margin-bottom:15px;display:none;object-fit:contain}
#site-popup-text{font-family:'Inter',sans-serif;font-size:16px;color:#1a1a1a;white-space:pre-wrap;font-weight:500;margin:0;width:100%}

.photo-workspace-wrapper{position:relative;display:inline-block;margin:25px auto;background:#fafafa;padding:10px;border:2px dashed #d4a000;border-radius:12px;width:100%;max-width:270px;box-sizing:border-box}
@media (min-width: 600px){.photo-workspace-wrapper{max-width:380px}}
#plikowo-passport-canvas{width:100%!important;max-width:100%;height:auto!important;display:block;border-radius:8px;background:#fff}
.photo-measure-line{position:absolute;font-size:10px;font-family:'DM Mono',monospace;background:#ffffff;color:#1a1a1a;padding:1px 5px;border:2px solid #d4a000;border-radius:6px;z-index:10;font-weight:bold}
.p-meas-top{top:-13px;left:50%;transform:translateX(-50%);white-space:nowrap}
.p-meas-left{left:-25px;top:50%;transform:translateY(-50%) rotate(-90deg);white-space:nowrap}
.photo-guides-layer{position:absolute;inset:0;pointer-events:none;z-index:5}
.p-guide-line{position:absolute;left:0;right:0;height:1px;border-top:1px dashed #d4a000;opacity:0.7}
.passport-canvas-wrapper{position:relative;overflow:hidden;border-radius:8px;background:#fff;width:100%;line-height:0}
.passport-scanner{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:20;background:rgba(0,0,0,0.02)}
.scanner-sweep-head{position:absolute;top:0;bottom:0;width:120px;animation:scannerMove 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;pointer-events:none}
.scanner-beam{position:absolute;top:0;bottom:0;left:0;right:2px;background:linear-gradient(90deg,transparent 0%,rgba(212,160,0,0.05) 25%,rgba(255,215,0,0.3) 80%,rgba(255,255,255,0.7) 100%)}
.scanner-line{position:absolute;top:0;bottom:0;right:0;width:3px;background:#ffffff;box-shadow:0 0 10px 2px #fff,0 0 18px 4px #ffd700,0 0 30px 6px rgba(212,160,0,0.7)}
@keyframes scannerMove{0%{left:-130px}100%{left:100%}}
.photo-chk-label{cursor:pointer;font-size:13px;font-weight:600;color:#4a3b00;display:inline-flex;align-items:center;gap:6px;user-select:none}
.photo-slider-container{background:#fafafa;padding:15px;border-radius:12px;border:2px solid #d4a000;margin-top:15px;text-align:left}
.photo-slider-row{margin-bottom:12px}
.photo-slider-row div{display:flex;justify-content:space-between;font-size:12px;font-weight:600;color:#4a3b00;margin-bottom:4px}
.photo-slider-row input[type="range"]{width:100%;accent-color:#d4a000;cursor:pointer}
.photo-fine-tune-spoiler{margin-top:8px;border-top:1px dashed rgba(212,160,0,0.4);padding-top:10px}
.photo-fine-tune-summary{cursor:pointer;font-size:13px;font-weight:600;color:#4a3b00;display:flex;align-items:center;justify-content:space-between;list-style:none;user-select:none;padding:4px 0}
.photo-fine-tune-summary::-webkit-details-marker{display:none}
.photo-fine-tune-summary .spoiler-arrow{transition:transform 0.2s ease;color:#8a7300}
.photo-fine-tune-spoiler[open] .spoiler-arrow{transform:rotate(180deg)}
.photo-fine-tune-content{margin-top:12px}

.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.retro-btn {
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    background: #ffffff;
    color: #1a1a1a;
    border: 2px solid #1a1a1a;
    border-radius: 8px;
    padding: 0 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-shadow: 2px 2px 0px #1a1a1a;
    box-sizing: border-box;
    line-height: 1;
    transition: transform 0.15s, box-shadow 0.15s, background-color 0.15s;
    user-select: none;
    white-space: nowrap;
}

.retro-btn:hover {
    background: #ffe135;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px #1a1a1a;
}

.retro-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 0px 0px 0px #1a1a1a;
}

#auth-btn {
    padding: 0 14px;
}

#lang-main-btn {
    padding: 0 10px;
}

.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-options-panel {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: #ffffff;
    border: 2px solid #1a1a1a;
    border-radius: 8px;
    z-index: 9999;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.1);
    overflow: hidden;
    min-width: 120px;
    -webkit-tap-highlight-color: transparent;
}

.lang-options-panel.show {
    display: block;
    animation: fadeInDown 0.2s ease forwards;
}

.lang-options-panel button {
    background: none;
    border: none;
    border-bottom: 1px solid #eee;
    color: #1a1a1a;
    padding: 10px 16px;
    width: 100%;
    text-align: left;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.1s;
}

.lang-options-panel button:last-child {
    border-bottom: none;
}

.lang-options-panel button:hover, .lang-options-panel button.active {
    background: #ffe135;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDownCentered {
    from { opacity: 0; transform: translate(-50%, -5px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* ==========================================================================
   STATUS BAR: CURRENCY RATES & WEATHER WIDGETS (UNIFIED SIZE & DESIGN)
   ========================================================================== */
.header-status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.status-widget-wrapper {
    position: relative;
    display: inline-block;
}

/* Symmetrical status buttons */
.status-widget-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    background: #ffffff;
    border: 2px solid #1a1a1a;
    border-radius: 8px;
    padding: 0 12px;
    box-shadow: 2px 2px 0px #1a1a1a;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 800;
    color: #1a1a1a;
    box-sizing: border-box;
    line-height: 1;
    transition: transform 0.15s, box-shadow 0.15s, background-color 0.15s;
    user-select: none;
    white-space: nowrap;
}
.status-widget-btn:hover,
.status-widget-wrapper:hover .status-widget-btn,
.status-widget-btn.active {
    background: #ffe135;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px #1a1a1a;
}
.status-widget-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 0px 0px 0px #1a1a1a;
}
.widget-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #1a1a1a;
}

/* Currency button content */
.rates-btn-summary {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    font-weight: 700;
}
.rate-chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.rate-sep {
    color: #cbd5e1;
    font-weight: 400;
}
.c-sym { font-weight: 900; }
.c-usd { color: #16a34a; }
.c-eur { color: #2563eb; }
.c-uah { color: #d97706; }

/* Weather button content */
.weather-temp-current {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 13px;
    color: #1a1a1a;
}
.weather-city-badge {
    font-size: 10px;
    font-weight: 700;
    color: #555;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid #e2e8f0;
}

/* Symmetrical Dropdowns (both 270px wide) */
.status-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 270px;
    background: #ffffff;
    border: 2px solid #1a1a1a;
    border-radius: 12px;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.15);
    padding: 12px;
    z-index: 10000;
    text-align: left;
    box-sizing: border-box;
}

/* Invisible bridge preventing flicker while cursor moves between button and dropdown */
.status-dropdown::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

@media (hover: hover) and (pointer: fine) {
    .status-widget-wrapper:hover .status-dropdown {
        display: block;
        animation: fadeInDown 0.2s ease forwards;
    }
}

.status-dropdown.show {
    display: block;
    animation: fadeInDown 0.2s ease forwards;
}

/* Weather city selector bar inside weather dropdown */
.weather-city-bar {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #e2e8f0;
}
.weather-city-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.weather-city-pill {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 3px 6px;
    font-size: 11px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}
.weather-city-pill:hover {
    background: #ffe135;
    border-color: #1a1a1a;
    color: #1a1a1a;
}
.weather-city-pill.active {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #ffe135;
}
.weather-auto-pill {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #0369a1;
}
.weather-auto-pill:hover {
    background: #ffe135;
    border-color: #1a1a1a;
    color: #1a1a1a;
}
.weather-auto-pill.active {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #ffe135;
}
.weather-gps-pill {
    background: #fef08a;
    border-color: #eab308;
    color: #854d0e;
}
.weather-gps-pill:hover {
    background: #ffe135;
    border-color: #1a1a1a;
    color: #1a1a1a;
}


.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 2px dashed #e2e8f0;
}
.dropdown-header-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 800;
    color: #1a1a1a;
}
.dropdown-header-sub {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
}

/* Rates Dropdown rows */
.rates-list-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.rate-row {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 12px;
    transition: background 0.15s;
}
.rate-row:hover {
    background: #fffbeb;
}
.rate-row-flag {
    font-size: 14px;
    width: 22px;
    display: inline-block;
}
.rate-row-code {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    width: 42px;
    color: #1a1a1a;
}
.rate-row-eq {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: #64748b;
    flex: 1;
}
.rate-row-val {
    font-family: 'DM Mono', monospace;
    font-weight: 800;
    color: #1a1a1a;
    font-size: 13px;
    white-space: nowrap;
}

.dropdown-footer-updated {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px dashed #e2e8f0;
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    color: #94a3b8;
    text-align: right;
    font-weight: 600;
}

/* Forecast Dropdown rows */
.forecast-days-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.forecast-day-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 6px;
    border-radius: 6px;
    transition: background 0.15s;
}
.forecast-day-row:hover {
    background: #fffbeb;
}
.forecast-day-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 800;
    width: 58px;
    color: #1a1a1a;
}
.forecast-day-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.forecast-day-desc {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: #64748b;
    flex: 1;
    padding: 0 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.forecast-day-temp {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
}
.forecast-day-temp .temp-min {
    color: #94a3b8;
    font-weight: 500;
}
.forecast-loading {
    text-align: center;
    padding: 12px;
    color: #64748b;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
}

/* --- MOBILE DRAWER & ACTIVE TOOL BAR STYLES --- */

.header-left {
    display: flex;
    align-items: center;
}

.header-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 38px;
    height: 38px;
    background: #ffffff;
    border: 2px solid #d4a000;
    border-radius: 10px;
    cursor: pointer;
    box-sizing: border-box;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.1);
    transition: all 0.15s ease;
    padding: 0;
    flex-shrink: 0;
}
.mobile-hamburger-btn:active {
    transform: scale(0.95);
    background: #fffdf0;
}
.mobile-hamburger-btn .hamburger-bar {
    display: block;
    width: 19px;
    height: 2.2px;
    background-color: #1a1a1a;
    border-radius: 2px;
    transition: all 0.2s ease;
}

/* Mobile Side Drawer Overlay */
.mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99990;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}
.mobile-drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* Mobile Side Drawer */
.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 86%;
    max-width: 320px;
    background: #ffffff;
    border-right: 3px solid #d4a000;
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.25);
    z-index: 99999;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}
.mobile-drawer.open {
    transform: translateX(0);
}
body.mobile-drawer-locked {
    overflow: hidden !important;
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 2px solid #f0f0f0;
    background: #fffdf5;
}
.mobile-drawer-brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mobile-drawer-logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 19px;
    font-weight: 900;
    color: #1a1a1a;
}
.mobile-drawer-logo span {
    color: #d4a000;
}
.mobile-drawer-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 10.5px;
    font-weight: 800;
    color: #b28500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.mobile-drawer-close-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #ddd;
    font-size: 15px;
    font-weight: 900;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}
.mobile-drawer-close-btn:hover,
.mobile-drawer-close-btn:active {
    border-color: #d4a000;
    color: #d4a000;
    background: #fffdf0;
}

.mobile-drawer-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 14px 30px 14px;
}
.mobile-drawer-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mobile-drawer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 14px;
    background: #ffffff;
    border: 2px solid #eee;
    border-radius: 14px;
    box-sizing: border-box;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: #1a1a1a;
    text-align: left;
    transition: all 0.15s ease;
    position: relative;
}
.mobile-drawer-item:hover,
.mobile-drawer-item:active {
    border-color: #d4a000;
    background: #fffdf5;
}
.mobile-drawer-item.active {
    border-color: #d4a000;
    background: #fffdf0;
    color: #b28500;
    font-weight: 900;
    box-shadow: 2px 2px 0px rgba(212,160,0,0.25);
}
.drawer-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #fdf6d8;
    color: #b28500;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}
.mobile-drawer-item.active .drawer-item-icon {
    background: #d4a000;
    color: #ffffff;
}
.drawer-item-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.drawer-item-arrow {
    font-size: 15px;
    color: #ccc;
    transition: transform 0.15s;
}
.mobile-drawer-item.active .drawer-item-arrow {
    color: #d4a000;
    font-weight: 900;
    transform: translateX(2px);
}

@media (max-width: 768px) {
    #light-app .menu {
        display: none !important;
    }
    #light-app header {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        padding: 0 !important;
        padding-top: 54px !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    /* 1. Fixed Mobile Top Bar: [☰] [Plikowo.com.pl] [Auth] [Lang] */
    .header-top-bar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
        background-color: #ffcc00 !important;
        border-bottom: 2px solid #e5b800 !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 8px 12px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        gap: 6px !important;
    }

    .header-left {
        flex: 0 0 38px;
        width: 38px;
        min-width: 38px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    .mobile-hamburger-btn {
        display: flex !important;
        width: 36px;
        height: 36px;
        min-width: 36px;
        border-radius: 8px;
    }

    .header-center {
        flex: 1 1 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        text-align: center;
        padding: 0 4px;
    }

    #light-app .logo {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 5px 12px;
        border-radius: 50px;
        white-space: nowrap;
        max-width: 100%;
        box-sizing: border-box;
    }

    #light-app .logo-text {
        font-size: 1.15em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .header-controls {
        flex: 0 0 auto;
        min-width: 38px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        padding-right: 2px;
    }

    #auth-btn {
        height: 36px;
        min-height: 36px;
        max-height: 36px;
        padding: 0 10px;
        font-size: 11px;
        border-radius: 8px;
        gap: 5px;
        flex-shrink: 0;
    }

    #user-main-btn {
        height: 36px;
        min-height: 36px;
        max-height: 36px;
        padding: 0 8px;
        border-radius: 8px;
        gap: 5px;
        flex-shrink: 0;
    }

    #user-main-btn #user-name {
        max-width: 70px;
        font-size: 11px;
    }

    /* Mobile Language Button: no arrow, proportional flag */
    #lang-main-btn {
        height: 36px;
        min-height: 36px;
        max-height: 36px;
        width: 36px;
        min-width: 36px;
        max-width: 36px;
        padding: 0 !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        flex-shrink: 0;
        margin-right: 2px;
    }

    #lang-main-btn .lang-arrow-icon {
        display: none !important;
    }

    #lang-main-btn #current-lang-icon {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #lang-main-btn #current-lang-icon .flag-svg {
        width: 22px;
        height: 16px;
        border-radius: 3px;
        border: 1px solid rgba(0, 0, 0, 0.2);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
        display: block;
    }

    .lang-options-panel {
        right: 0;
        max-width: calc(100vw - 20px);
        box-shadow: 2px 4px 12px rgba(0,0,0,0.15);
    }

    /* 2. Status widgets (Currencies & Weather) scroll naturally with the page */
    .header-status-bar {
        position: relative !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 8px;
        padding: 10px 10px 4px 10px;
        width: 100%;
        box-sizing: border-box;
        flex-wrap: wrap;
    }

    .header-status-bar .status-widget-wrapper {
        position: static !important;
    }

    .status-dropdown {
        left: 50% !important;
        right: auto !important;
        transform: translate(-50%, 0) !important;
        top: calc(100% + 4px) !important;
        width: 280px !important;
        max-width: calc(100vw - 20px) !important;
        box-sizing: border-box !important;
    }

    .status-dropdown.show {
        animation: fadeInDownCentered 0.2s ease forwards !important;
    }

    #light-app .container {
        padding: 12px 14px 30px 14px !important;
    }
    #light-app h1 {
        font-size: 1.25em !important;
        margin-bottom: 14px !important;
    }
    #light-app .workspace {
        margin-bottom: 25px !important;
        scroll-margin-top: 65px;
    }
    #light-app .tool-panel {
        padding: 20px 14px !important;
        border-radius: 16px !important;
        scroll-margin-top: 65px;
    }
}

@media (max-width: 420px) {
    #light-app header {
        padding-top: 48px !important;
    }
    .header-top-bar {
        padding: 6px 10px;
        gap: 4px;
    }
    .header-left {
        flex: 0 0 36px;
        width: 36px;
        min-width: 36px;
    }
    .mobile-hamburger-btn {
        width: 34px;
        height: 34px;
        min-width: 34px;
    }
    .header-center {
        padding: 0 2px;
    }
    #light-app .logo {
        padding: 4px 8px;
    }
    #light-app .logo-text {
        font-size: 1.05em;
    }
    .header-controls {
        min-width: 36px;
        gap: 4px;
        padding-right: 2px;
    }
    #auth-btn {
        height: 34px;
        min-height: 34px;
        max-height: 34px;
        padding: 0 7px;
    }
    #auth-btn #auth-btn-text {
        display: none;
    }
    #user-main-btn {
        height: 34px;
        min-height: 34px;
        max-height: 34px;
    }
    #user-main-btn #user-name {
        display: none;
    }
    #lang-main-btn {
        width: 34px;
        height: 34px;
        min-width: 34px;
        max-width: 34px;
        min-height: 34px;
        max-height: 34px;
        margin-right: 2px;
    }
    #lang-main-btn #current-lang-icon .flag-svg {
        width: 20px;
        height: 14px;
    }
}

@media (min-width: 769px) {
    #light-app header {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 12px;
        width: 100%;
        box-sizing: border-box;
        background-color: #ffcc00;
        padding: 15px 30px;
        border-bottom: 2px solid #e5b800;
        box-shadow: 0 2px 10px rgba(0,0,0,.05);
    }
    .header-top-bar {
        display: contents;
    }
    .header-left {
        display: none !important;
    }
    .header-center {
        order: 1;
        display: flex;
        align-items: center;
        margin-right: auto; /* Pushes Logo to far left */
    }
    .header-status-bar {
        order: 2;
        display: flex;
        align-items: center;
        gap: 12px;
        margin: 0;
        padding: 0;
    }
    .header-status-bar .status-widget-wrapper {
        position: relative !important;
    }
    .status-dropdown {
        left: 0 !important;
        transform: none !important;
        top: calc(100% + 8px) !important;
        width: 270px !important;
        max-width: 270px !important;
    }
    .status-dropdown.show {
        animation: fadeInDown 0.2s ease forwards !important;
    }
    .header-controls {
        order: 3;
        display: flex;
        align-items: center;
        gap: 12px;
    }
    #lang-main-btn .lang-arrow-icon {
        display: inline-block !important;
    }
    .mobile-hamburger-btn {
        display: none !important;
    }
    .mobile-drawer-overlay {
        display: none !important;
    }
    .mobile-drawer {
        display: none !important;
    }
}

/* ==========================================================================
   DOMAIN MIGRATION POPUP / STUB (PLIKOWO STYLE)
   ========================================================================== */
.domain-migration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.78);
    backdrop-filter: blur(6px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: migFadeIn 0.3s ease;
}

@keyframes migFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.domain-migration-box {
    background: #ffffff;
    border: 4px solid #1a1a1a;
    border-radius: 28px;
    box-shadow: 8px 8px 0px #1a1a1a;
    width: 100%;
    max-width: 440px;
    padding: 28px 24px 22px 24px;
    text-align: center;
    position: relative;
    box-sizing: border-box;
    animation: migPopIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes migPopIn {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.migration-animation-stage {
    position: relative;
    width: 100%;
    height: 125px;
    background: linear-gradient(180deg, #fffbe6 0%, #ffe979 100%);
    border: 3px solid #1a1a1a;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 18px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.migration-cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 20px;
    height: 10px;
}
.migration-cloud.cloud-1 {
    width: 44px;
    top: 15px;
    animation: migCloudMove 3.2s linear infinite;
}
.migration-cloud.cloud-2 {
    width: 28px;
    top: 36px;
    animation: migCloudMove 2.4s linear infinite 0.9s;
}
@keyframes migCloudMove {
    0% { right: -50px; }
    100% { right: 120%; }
}

.migration-truck-container {
    animation: migTruckDrive 0.8s ease-in-out infinite;
    position: relative;
    z-index: 2;
    margin-bottom: 3px;
}
@keyframes migTruckDrive {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-2px) rotate(-0.5deg); }
    50% { transform: translateY(0px) rotate(0.5deg); }
    75% { transform: translateY(-2px) rotate(-0.5deg); }
}

.migration-truck-svg {
    display: block;
}

.migration-exhaust-puff {
    position: absolute;
    bottom: 24px;
    left: 2px;
    width: 9px;
    height: 9px;
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid #1a1a1a;
    border-radius: 50%;
    animation: migPuffOut 0.8s ease-out infinite;
    pointer-events: none;
}
.migration-exhaust-puff.puff-2 {
    animation-delay: 0.4s;
}
@keyframes migPuffOut {
    0% { transform: scale(0.3) translate(0, 0); opacity: 0.9; }
    100% { transform: scale(1.6) translate(-30px, -14px); opacity: 0; }
}

.migration-road {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 14px;
    background: #1a1a1a;
    overflow: hidden;
}
.migration-road-dashes {
    position: absolute;
    top: 6px;
    left: 0;
    width: 200%;
    height: 2px;
    background: repeating-linear-gradient(90deg, #ffffff 0, #ffffff 12px, transparent 12px, transparent 24px);
    animation: migRoadMove 0.4s linear infinite;
}
@keyframes migRoadMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-24px); }
}

.migration-badge {
    display: inline-block;
    background: #ffe135;
    border: 2px solid #1a1a1a;
    border-radius: 30px;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: #1a1a1a;
    padding: 3px 12px;
    margin-bottom: 12px;
    box-shadow: 2px 2px 0px #1a1a1a;
}
.migration-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25em;
    font-weight: 900;
    color: #1a1a1a;
    line-height: 1.3;
    margin: 0 0 10px 0;
    letter-spacing: -0.3px;
}
.migration-desc {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #4a5568;
    line-height: 1.5;
    margin: 0 0 20px 0;
    font-weight: 500;
}

.migration-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: #ffe135;
    color: #1a1a1a;
    text-decoration: none;
    border: 3px solid #1a1a1a;
    border-radius: 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.5px;
    box-shadow: 4px 4px 0px #1a1a1a;
    transition: all 0.15s ease;
    cursor: pointer;
    box-sizing: border-box;
}
.migration-action-btn:hover {
    background: #ffd700;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px #1a1a1a;
    color: #1a1a1a;
}
.migration-action-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #1a1a1a;
}

