body{
    font-family:Arial, sans-serif;
    background:#f5f5f5;
    padding:40px;
    margin:0;
}

*{
    box-sizing:border-box;
}

.app-layout{
    display:flex;
    min-height:100vh;
    background:#f6f4f1;
}

.sidebar{
    width:260px;
    background:#ffffff;
    border-right:1px solid #e5e0d9;
    padding:40px 24px;
    position:sticky;
    top:0;
    height:100vh;
}

.sidebar-title{
    font-size:22px;
    font-weight:700;
    margin-bottom:40px;
    color:#111;
}

.tab-btn{
    width:100%;
    text-align:left;
    padding:14px 18px;
    margin-bottom:10px;
    border:none;
    background:transparent;
    border-radius:12px;
    font-size:15px;
    font-weight:500;
    cursor:pointer;
    transition:.2s;
}

.tab-btn:hover{
    background:#f5f1ec;
}

.tab-btn.active{
    background:#242424;
    color:#ffffff;
}

.container{
    flex:1;
    padding:50px;
    max-width:1100px;
    background:#ffffff;
    border-radius:12px;
    box-shadow:0 0 20px rgba(0,0,0,0.08);
}

.tab-content{
    display:none;
}

.tab-content.active{
    display:block;
}

input,
textarea{
    width:100%;
    padding:12px;
    margin-top:8px;
    margin-bottom:20px;
    box-sizing:border-box;
    border:1px solid #ddd;
    border-radius:8px;
    background:#ffffff;
}

textarea{
    height:100px;
}

.hint{
    font-size:14px;
    color:#666;
    margin-top:-8px;
    margin-bottom:18px;
    line-height:1.5;
}

.hidden{
    display:none !important;
}

/* SAVE BUTTON */

.save-btn{
    margin-top:30px;
    padding:14px 28px;
    cursor:pointer;
    background:#242424;
    color:#ffffff;
    border:1px solid #242424;
    border-radius:10px;
    font-size:15px;
    font-weight:600;
    transition:.2s;
}

.save-btn:hover{
    opacity:.9;
}

/* SECONDARY BUTTON */

.secondary-btn{
    padding:12px 18px;
    cursor:pointer;
    background:#242424;
    color:#ffffff;
    border:1px solid #242424;
    border-radius:8px;
    font-weight:600;
}

/* DEPOSIT MODE */

.deposit-mode-compact{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px;
    margin:18px 0 22px;
}

.deposit-mode-option{
    display:grid;
    grid-template-columns:20px 1fr;
    gap:12px;
    align-items:flex-start;
    padding:16px 18px;
    min-height:112px;
    border:1px solid #ded8d3;
    border-radius:14px;
    background:#ffffff;
    color:#111;
    cursor:pointer;
    transition:.2s;
}

.deposit-mode-option:hover{
    border-color:#242424;
}

.deposit-mode-option input{
    width:18px;
    height:18px;
    margin-top:2px;
    accent-color:#242424;
}

.deposit-mode-option strong{
    display:block;
    font-size:16px;
    margin-bottom:4px;
    color:#111;
}

.deposit-mode-option small{
    display:block;
    color:#666;
    font-size:13px;
    line-height:1.35;
}

.deposit-mode-option:has(input:checked){
    background:#242424;
    border-color:#242424;
    color:#ffffff;
}

.deposit-mode-option:has(input:checked) strong{
    color:#ffffff;
}

.deposit-mode-option:has(input:checked) small{
    color:rgba(255,255,255,.75);
}

/* TOP RULE BOX */

.compact-rule-box{
    display:grid;
    grid-template-columns:1fr 1fr auto;
    gap:12px;
    align-items:end;
    padding:18px;
    border:1px solid #e4ddd6;
    border-radius:14px;
    background:#faf8f6;
    margin-bottom:22px;
}

.compact-rule-box label{
    color:#111;
    font-weight:600;
}

.compact-rule-box input{
    height:46px;
    border:1px solid #d8d2cb;
    background:#ffffff;
    color:#111111;
    margin:0;
}

.compact-rule-box .secondary-btn{
    height:46px;
    white-space:nowrap;
    background:#242424;
    color:#ffffff;
    border:1px solid #242424;
    border-radius:8px;
}

/* RULES TABLE */

.rules-table{
    border:1px solid #d8d2cb;
    border-radius:12px;
    overflow:hidden;
    background:#ffffff;
    margin-top:18px;
    max-width:640px;
}

.rules-head,
.rules-row{
    display:grid;
    grid-template-columns:1fr 1fr 48px;
    align-items:center;
}

.rules-head{
    background:#faf8f6;
    padding:14px 18px;
    font-size:14px;
    color:#5f5954;
    font-weight:700;
}

.rules-row{
    min-height:54px;
    padding:0 14px;
    gap:10px;
    border-top:1px solid #eee8e1;
    background:#ffffff;
}

.rules-row:nth-child(odd){
    background:#fbfaf8;
}

.rules-row input{
    height:42px;
    margin:0;
    border:none;
    background:transparent;
    padding:0 6px;
    font-size:16px;
    color:#111111;
}

.rules-row input:focus{
    outline:none;
    box-shadow:none;
}

.icon-delete{
    width:38px;
    height:38px;
    border:none;
    background:transparent;
    color:#ff4d5a;
    font-size:28px;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
}

/* QUANTITY SETTINGS */

.quantity-deposit-settings{
    margin-top:22px;
}

.quantity-rule-card{
    padding:22px;
    border:1px solid #e4ddd6;
    border-radius:14px;
    background:#faf8f6;
}

.quantity-rule-card h3{
    margin:0 0 10px;
    font-size:22px;
    font-weight:700;
    color:#111;
}

.quantity-rule-card p{
    margin:0 0 20px;
    color:#666;
    line-height:1.5;
}

.quantity-rule-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
}

.quantity-rule-grid label{
    display:block;
    margin-bottom:8px;
    font-weight:600;
    color:#111;
}

.quantity-rule-grid input{
    height:48px;
    border:1px solid #d8d2cb;
    background:#ffffff;
    border-radius:10px;
    padding:0 14px;
    color:#111;
    margin:0;
}

/* MOBILE */

@media(max-width:700px){
    .deposit-mode-compact,
    .compact-rule-box,
    .rules-head,
    .rules-row,
    .quantity-rule-grid{
        grid-template-columns:1fr;
    }

    .icon-delete{
        width:100%;
    }
}

.save-status{
    margin-top:14px;
    font-size:14px;
    font-weight:600;
    color:#168a3a;
}

.active-mode-status{
    display:inline-flex;
    align-items:center;
    margin-bottom:18px;
    padding:10px 14px;
    border-radius:999px;
    background:#f5f1ec;
    color:#242424;
    font-size:14px;
    font-weight:700;
}

.save-status{
    margin-top:14px;
    font-size:14px;
    font-weight:700;
    color:#168a3a;
}

.deposit-mode-badge{
    grid-column:2;
    display:inline-flex;
    width:max-content;
    margin-top:10px;
    padding:6px 10px;
    border-radius:999px;
    background:#ffffff;
    color:#242424;
    font-size:13px;
    font-weight:700;
}

.dashboard-color-picker{
    background:#faf8f6;
    border:1px solid #e4ddd6;
    border-radius:16px;
    padding:18px;
    margin:12px 0 26px;
    max-width:520px;
}

.color-area{
    position:relative;
    height:220px;
    border-radius:12px;
    margin-bottom:16px;
    cursor:crosshair;
    background:
        linear-gradient(to top, #000, transparent),
        linear-gradient(to right, #fff, hsl(25, 100%, 50%));
    overflow:hidden;
    border:1px solid #ddd5ce;
}

.color-cursor{
    position:absolute;
    width:20px;
    height:20px;
    border:3px solid #fff;
    border-radius:50%;
    box-shadow:0 0 0 2px rgba(0,0,0,.35);
    transform:translate(-50%, -50%);
    left:25%;
    top:35%;
    pointer-events:none;
}

#hueRange{
    width:100%;
    margin:0 0 18px;
    accent-color:#242424;
}

.color-bottom-row{
    display:grid;
    grid-template-columns:1fr auto;
    gap:16px;
    align-items:end;
}

#accentColorHex{
    height:46px;
    margin:8px 0 0;
    font-size:15px;
    font-weight:600;
    text-transform:uppercase;
}

.color-preview-wrap{
    display:flex;
    flex-direction:column;
    gap:8px;
    font-size:14px;
    font-weight:600;
}

.color-preview{
    width:58px;
    height:46px;
    border-radius:10px;
    border:1px solid #d8d2cb;
    background:#AF9483;
}

.dashboard-toggle{
    display:grid;
    grid-template-columns:22px 1fr;
    gap:12px;
    align-items:flex-start;
    padding:18px;
    border:1px solid #ded8d3;
    border-radius:14px;
    background:#faf8f6;
    margin:18px 0 22px;
    cursor:pointer;
}

.dashboard-toggle input{
    width:18px;
    height:18px;
    margin-top:3px;
    accent-color:#242424;
}

.dashboard-toggle strong{
    display:block;
    margin-bottom:4px;
}

.dashboard-toggle small{
    display:block;
    color:#666;
    font-size:13px;
    line-height:1.35;
}

.dashboard-switch-card{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:24px 28px;
    border:1px solid #e8e2dc;
    border-radius:18px;
    background:#faf8f6;
    margin:22px 0;
}

.switch-text{
    display:flex;
    flex-direction:column;
    gap:6px;
}

.switch-text strong{
    font-size:20px;
    font-weight:700;
    color:#111;
}

.switch-text small{
    font-size:14px;
    color:#777;
}

.dashboard-switch{
    position:relative;
    width:54px;
    height:30px;
    flex:0 0 64px;
}

.dashboard-switch input{
    opacity:0;
    width:0;
    height:0;
}

.dashboard-switch-slider{
    position:absolute;
    inset:0;
    background:#d8d1ca;
    border-radius:999px;
    cursor:pointer;
    transition:.25s ease;
}

.dashboard-switch-slider::before{
    content:"";
    position:absolute;
    width:22px;
    height:22px;
    left:4px;
    top:4px;
    background:#fff;
    border-radius:50%;
    transition:.25s ease;
    box-shadow:0 2px 8px rgba(0,0,0,.12);
}

.dashboard-switch input:checked + .dashboard-switch-slider{
    background:#222;
}

.dashboard-switch input:checked + .dashboard-switch-slider::before{
    transform:translateX(24px);
}

.api-saved-status{
    margin-top:8px;
    font-size:13px;
    font-weight:600;
    color:#198754;
}

.saved-inline-status {
    color: #16a34a;
    font-size: 14px;
    font-weight: 600;
    margin-left: 10px;
}

.radius-control {
    margin-bottom: 38px;
}

.radius-control input[type="range"] {
    width: 100%;
    margin: 8px 0 10px;
    accent-color: #000000;
}

.radius-control input[type="number"] {
    width: 96px;
    height: 42px;
    margin: -2px 0 4px;
    padding: 0 12px;
    border: 1px solid #d8d2cb;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
}

.radius-control .unit,
.radius-control span {
    display: block;
    margin-bottom: 14px;
}

/* повзунок логотипу — стиль як у checkout */

#logoSize {
    width: 100%;
    margin: 8px 0 10px;
    accent-color: #000000;
}

/* favicon preview — в 2 рази менший */

#faviconPreview {
    width: 120px !important;
    height: auto;
    max-width: 120px;
    object-fit: contain;
}

#logoSizeValue {
    display: block;
    margin-bottom: 24px;
}
#logoSizeValue {
    width: 96px;
    height: 42px;
    margin: -2px 0 4px;
    padding: 0 12px;
    border: 1px solid #d8d2cb;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    background: #fff;
}

.unit {
    display: block;
    margin-bottom: 24px;
    font-size: 14px;
}