/* --- ZMIENNE SYSTEMOWE --- */
:root {
    --main-color: #f3bd44;
    --hover-color: #e2a930;
    --bg-dark: #0a0b0d;
    --card-dark: #16171a;
    --sidebar-dark: #000000;
    --text-muted: #8e8e93;
    --glass-blue: rgba(22, 29, 38, 0.95);
    --glass-border: rgba(243, 189, 68, 0.3);
}

/* --- RESET I BAZA --- */
body {
    background-color: var(--bg-dark);
    color: #f5f5f7;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    overflow-x: hidden;
}

/* --- SIDEBAR --- */
.sidebar {
    min-height: 100vh;
    background: var(--sidebar-dark);
    border-right: 1px solid #222;
    box-shadow: 15px 0 40px rgba(0,0,0,0.6);
    padding: 40px 0;
    position: fixed;
    z-index: 1000;
}

.client-brand-sidebar {
    color: var(--main-color);
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.sidebar a {
    color: var(--text-muted);
    padding: 14px 25px;
    margin: 6px 18px;
    border-radius: 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar a i { font-size: 1.2rem; }

.sidebar a:hover {
    background: rgba(243, 189, 68, 0.08);
    color: var(--main-color);
    transform: translateX(8px);
}

.sidebar a.active {
    background: var(--main-color);
    color: #000 !important;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(243, 189, 68, 0.25);
}

.sidebar-footer { margin-top: auto; }
.sidebar-footer hr { border-top: 1px solid #222; margin: 25px 0; opacity: 1; }

/* --- OBSZAR ROBOCZY --- */
.content {
    padding: 60px !important;
    background: radial-gradient(circle at top right, #1a1d23 0%, #0a0b0d 100%);
    min-height: 100vh;
}

/* --- KARTY (ULTRA PREMIUM) --- */
.card {
    background-color: var(--card-dark) !important;
    border: 1px solid #2a2a2c !important;
    border-radius: 28px !important;
    box-shadow: 0 25px 60px rgba(0,0,0,0.5) !important;
}

.card-body { padding: 50px !important; }

/* --- FORMULARZE --- */
.form-control {
    background-color: #1c1c1e !important;
    border: 1px solid #3a3a3c !important;
    color: #fff !important;
    padding: 16px 20px !important;
    border-radius: 16px !important;
    transition: all 0.25s ease;
}

.form-control:focus {
    background-color: #242426 !important;
    border-color: var(--main-color) !important;
    box-shadow: 0 0 0 4px rgba(243, 189, 68, 0.15) !important;
    outline: none;
}

/* --- PRZYCISKI --- */
.btn-main {
    background: linear-gradient(135deg, var(--main-color), var(--hover-color)) !important;
    color: #000 !important;
    border: none !important;
    font-weight: 800 !important;
    padding: 18px 35px !important;
    border-radius: 18px !important;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 10px 30px rgba(243, 189, 68, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.btn-main:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 15px 40px rgba(243, 189, 68, 0.5);
}

/* --- HELP / INFO --- */
.help-box {
    background: var(--glass-blue) !important;
    border: 1px solid var(--glass-border) !important;
    border-left: 6px solid var(--main-color) !important;
    border-radius: 24px;
    padding: 35px;
    box-shadow: 0 20px 45px rgba(0,0,0,0.5);
    margin-bottom: 40px;
    display: none;
}

/* --- ANIMACJA WEJŚCIA --- */
.animate-in {
    opacity: 0;
    animation: quickSlideUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes quickSlideUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* --- TYPOGRAFIA --- */
h2 { font-size: 2.5rem; font-weight: 900; color: #fff; margin-bottom: 10px; }
.letter-spacing-1 { letter-spacing: 2px !important; text-transform: uppercase; }

/* --- CUSTOM FILE INPUT PREMIUM --- */

input[type="file"]::file-selector-button {
    background: var(--main-color);
    color: #000;
    border: none;
    border-radius: 10px;
    padding: 8px 16px;
    margin-right: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

input[type="file"]::file-selector-button:hover {
    background: var(--hover-color);
}

.form-control-file-wrapper {
    position: relative;
    display: block;
    width: 100%;
    margin-top: 10px;
}

.custom-file-upload {
    border: 2px dashed rgba(255, 255, 255, 0.15) !important;
    background: rgba(255, 255, 255, 0.01) !important;
    padding: 50px 30px !important;
    text-align: center;
    cursor: pointer;
    border-radius: 24px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: border-color, box-shadow, transform;
}

/* EFEKTOWNA ZMIANA PO NAJECHANIU (HOVER) */
.form-control-file-wrapper:hover .custom-file-upload {
    border-color: var(--main-color) !important;
    border-style: solid !important;
    background: rgba(243, 189, 68, 0.04) !important;
    box-shadow: 0 15px 50px rgba(243, 189, 68, 0.2),
                0 0 15px rgba(243, 189, 68, 0.1) inset !important;
    transform: translateY(-3px);
}

.custom-file-upload i {
    font-size: 3rem;
    color: var(--main-color);
    opacity: 0.6;
    transition: 0.3s;
    filter: drop-shadow(0 0 10px rgba(243, 189, 68, 0));
}

.form-control-file-wrapper:hover .custom-file-upload i {
    opacity: 1;
    filter: drop-shadow(0 0 15px rgba(243, 189, 68, 0.5));
}

.custom-file-upload span {
    color: rgba(255,255,255,0.6);
    font-weight: 600;
    font-size: 1.1rem;
    transition: 0.3s;
}

.form-control-file-wrapper:hover .custom-file-upload span {
    color: #fff;
}

.hidden-file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

/* --- LIMIT BOX PREMIUM (v3.0) --- */
.limit-box {
    background: rgba(243, 189, 68, 0.05) !important;
    border: 1px solid rgba(243, 189, 68, 0.2) !important;
    border-radius: 20px;
    padding: 22px 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.limit-box:hover {
    background: rgba(243, 189, 68, 0.08) !important;
    border-color: rgba(243, 189, 68, 0.4) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Stylowanie ikony wewnątrz limit-box */
.limit-box i {
    font-size: 1.8rem !important;
    color: var(--main-color) !important;
    filter: drop-shadow(0 0 8px rgba(243, 189, 68, 0.5));
    flex-shrink: 0;
}

/* Stylowanie treści */
.limit-content .text-white {
    font-size: 1.05rem;
    line-height: 1.4;
}

.limit-content strong {
    color: var(--main-color);
    font-weight: 800;
}

.limit-content .small-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4) !important;
    margin-top: 2px;
}

/* Custom Scrollbar dla konsoli */
#ai-console::-webkit-scrollbar {
    width: 8px;
}

#ai-console::-webkit-scrollbar-track {
    background: #050505;
    border-radius: 0 16px 16px 0;
}

#ai-console::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
    border: 2px solid #050505;
}

#ai-console::-webkit-scrollbar-thumb:hover {
    background: var(--main-color); /* Twoje złoto */
}

/* Efekt CRT i głębi */
#ai-console {
    position: relative;
    background: linear-gradient(180deg, #0a0a0a 0%, #050505 100%) !important;
    text-shadow: 0 0 5px rgba(0, 255, 102, 0.5); /* Lekka poświata tekstu */
}

/* Opcjonalne: Nakładka z liniami skanującymi */
#ai-console::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%),
                linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.02));
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
    z-index: 10;
}

/* --- Edit Integrations Styles --- */

.ei-header-label {
    font-size: 0.65rem !important;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 8px;
    display: block;
}

.ei-input {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    padding: 10px 15px;
    border-radius: 10px;
}

.ei-input:focus {
    border-color: #00d1ff !important;
    box-shadow: 0 0 0 3px rgba(0, 209, 255, 0.1) !important;
}

.ei-category-name {
    color: #00d1ff !important;
    font-weight: 700 !important;
    font-size: 1.1rem;
}

.ei-store-param {
    color: #f3bd44 !important;
    font-weight: 600 !important;
}

.ei-category-card, 
.ei-special-card {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.02) !important;
    backdrop-filter: blur(15px);
    margin-bottom: 25px;
    border-radius: 16px;
}

/* iOS Switch Style */
.ei-ios-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.ei-ios-switch input { 
    opacity: 0; 
    width: 0; 
    height: 0; 
}

.ei-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 34px;
}

.ei-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.ei-ios-switch input:checked + .ei-slider {
    background-color: #2ecc71;
}

.ei-ios-switch input:checked + .ei-slider:before {
    transform: translateX(28px);
}

/* Wyróżnienie pól idących do sklepu (na żółto) */
.ei-input-target {
    color: #f3bd44 !important; /* Złoty/żółty tekst */
    border-color: rgba(243, 189, 68, 0.2) !important; /* Delikatna żółta obwódka */
    font-weight: 600 !important;
}

.ei-input-target:focus {
    border-color: #f3bd44 !important;
    box-shadow: 0 0 0 3px rgba(243, 189, 68, 0.15) !important;
}

/* Opcjonalnie: zmiana koloru placeholderów dla pól docelowych */
.ei-input-target::placeholder {
    color: rgba(243, 189, 68, 0.4) !important;
}

/* --- Logs View --- */
.log-container {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.log-container::-webkit-scrollbar {
    width: 6px;
}

.log-container::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.log-container pre {
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Animacja migania dla nagłówka aktywnego loga */
.text-info {
    text-shadow: 0 0 10px rgba(0, 209, 255, 0.3);
}