[hidden] { display: none !important; }

.ad-body {
    min-height: 100vh;
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(230, 0, 0, 0.16), transparent 60%),
        radial-gradient(900px 500px at 0% 100%, rgba(230, 0, 0, 0.07), transparent 60%),
        var(--black);
    position: relative;
    --glass-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
    --glass-border: 1px solid rgba(255, 255, 255, 0.22);
    --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.18), 0 0.7rem 1.8rem rgba(0, 0, 0, 0.22), 0 1.8rem 3.6rem rgba(0, 0, 0, 0.16);
}
.ad-body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

.ad-header {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: calc(0.9rem + env(safe-area-inset-top)) clamp(1rem, 4vw, 3rem) 0.9rem;
    background: rgba(7, 7, 7, 0.82);
}
.ad-brand { display: flex; align-items: center; gap: 0.85rem; text-decoration: none; }
.ad-brand img { display: block; height: clamp(1.8rem, 2.4vw, 2.3rem); width: auto; }
.ad-brand-tag {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--red-bright);
    border: 1px solid rgba(230, 0, 0, 0.45);
    border-radius: 999px;
    padding: 0.28rem 0.6rem;
    line-height: 1;
}
.ad-demo-tag { color: #ffd166; border-color: rgba(255, 209, 102, 0.5); }
.ad-header-actions { display: flex; align-items: center; gap: 0.6rem; }
.ad-net {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
}
.ad-net-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: #2ecc71;
    box-shadow: 0 0 0.6rem rgba(46, 204, 113, 0.7);
}
.ad-net.offline .ad-net-dot { background: var(--red-bright); box-shadow: 0 0 0.6rem rgba(255, 28, 28, 0.8); }

.ad-main {
    position: relative;
    z-index: 1;
    width: min(1440px, calc(100% - clamp(2rem, 7vw, 6rem)));
    margin: 0 auto;
    padding: clamp(1.2rem, 3vh, 2.4rem) 0 clamp(2rem, 6vh, 4rem);
}

.ad-login {
    min-height: calc(100vh - 14rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}
.ad-login-card {
    width: min(26rem, 100%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: clamp(1.4rem, 4vw, 2.4rem);
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 1.2rem;
    box-shadow: 0 1.5rem 3.5rem rgba(0, 0, 0, 0.35), 0 3rem 6rem rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
}
.ad-login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--red), transparent);
}
.ad-login-card h1 { font-size: clamp(1.5rem, 3.84vw, 2rem); line-height: 1.05; letter-spacing: -0.02em; }
.ad-login-sub { color: rgba(255, 255, 255, 0.6); font-size: 0.78rem; line-height: 1.7; }
.ad-login-foot { color: rgba(255, 255, 255, 0.38); font-size: 0.62rem; letter-spacing: 0.06em; text-align: center; }
.ad-login-foot code { color: var(--red-bright); font-family: var(--font-main); }
#configWarn {
    padding: 0.6rem 0.7rem;
    border: 1px solid rgba(230, 0, 0, 0.28);
    border-radius: 0.5rem;
    background: rgba(230, 0, 0, 0.06);
    color: rgba(255, 255, 255, 0.55);
}
#configWarn code { white-space: nowrap; }

.ad-kicker {
    display: inline-block;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--red-bright);
}
.ad-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    padding: clamp(0.5rem, 2vh, 1.4rem) 0 0.6rem;
}
.ad-hero h1 { font-size: clamp(2rem, 4.8vw, 4rem); line-height: 0.95; letter-spacing: -0.03em; margin: 0.4rem 0 0.5rem; }
.ad-hero p { color: rgba(255, 255, 255, 0.55); font-size: 0.78rem; }
.ad-hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; padding-bottom: 0.4rem; }
.ad-sync { font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); white-space: nowrap; }
.ad-sync.ok { color: #2ecc71; }
.ad-sync.bad { color: var(--red-bright); }

.ad-tabs {
    display: flex;
    gap: 0.25rem;
    margin: 0.2rem 0 1.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
    scrollbar-width: none;
}
.ad-tabs::-webkit-scrollbar { display: none; }
.ad-tab {
    appearance: none;
    background: none;
    border: 0;
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-main);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 0.9rem 1rem;
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
    transition: color 0.25s;
}
.ad-tab:hover { color: var(--white); }
.ad-tab.active { color: var(--white); }
.ad-tab::after {
    content: '';
    position: absolute;
    left: 0.5rem; right: 0.5rem; bottom: -1px;
    height: 2px;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s var(--ease-out-expo);
}
.ad-tab.active::after { transform: scaleX(1); }
.ad-tab-count {
    font-size: 0.55rem;
    padding: 0.1rem 0.38rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0;
}
.ad-tab.active .ad-tab-count { background: rgba(230, 0, 0, 0.25); color: var(--red-bright); }

.ad-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.9rem;
}
.ad-stat {
    position: relative;
    padding: 0.65rem 0.85rem 0.55rem;
    background: var(--glass-bg);
    border: var(--glass-border);
    border-radius: 0.7rem;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
}
.ad-stat::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--red), transparent);
    opacity: 0.65;
}
.ad-stat-num { display: block; font-size: clamp(1.2rem, 1.9vw, 1.6rem); font-weight: 800; line-height: 1; }
.ad-stat-label { display: block; margin-top: 0.25rem; font-size: 0.5rem; letter-spacing: 0.16em; line-height: 1.35; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); }

.ad-toolbar {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.1rem;
}
.ad-search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.68rem 0.9rem;
    background: var(--glass-bg);
    border: var(--glass-border);
    border-radius: 0.7rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 0.4rem 1rem rgba(0, 0, 0, 0.16), 0 1rem 2.4rem rgba(0, 0, 0, 0.12);
    transition: border-color 0.25s, background 0.25s;
}
.ad-search:focus-within { border-color: rgba(230, 0, 0, 0.55); background: linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.07)); }
.ad-search svg { width: 1rem; height: 1rem; color: rgba(255, 255, 255, 0.4); flex-shrink: 0; }
.ad-search input {
    flex: 1;
    min-width: 0;
    background: none;
    border: 0;
    outline: 0;
    color: var(--white);
    font-family: var(--font-main);
    font-size: 0.75rem;
}
.ad-search input::placeholder { color: rgba(255, 255, 255, 0.3); }

.ad-btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 0.65rem;
    padding: 0.7rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-family: var(--font-main);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s var(--ease-out-expo), border-radius 0.4s var(--ease-out-expo), background 0.2s, border-color 0.2s, opacity 0.2s;
}
.ad-btn svg { width: 0.95rem; height: 0.95rem; }
.ad-btn:hover { transform: translateY(-1px); border-radius: 0.9rem 0.5rem 0.85rem 0.55rem; }
.ad-btn:active { transform: translateY(0); }
.ad-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.ad-btn--primary {
    background: linear-gradient(135deg, var(--red-bright), var(--red-dark));
    color: #fff;
    box-shadow: 0 0.6rem 1.4rem rgba(230, 0, 0, 0.25);
}
.ad-btn--primary:hover { box-shadow: 0 0.8rem 1.8rem rgba(230, 0, 0, 0.35); }
.ad-btn--ghost { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.14); color: var(--white); }
.ad-btn--ghost:hover { background: rgba(255, 255, 255, 0.1); }
.ad-btn--danger { background: rgba(230, 0, 0, 0.14); border-color: rgba(230, 0, 0, 0.5); color: #ff7b7b; }
.ad-btn--danger:hover { background: rgba(230, 0, 0, 0.25); color: #fff; }
.ad-btn--exit {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(230, 0, 0, 0.22), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(230, 0, 0, 0.55);
    color: var(--white);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 0 18px rgba(230, 0, 0, 0.14), 0 6px 18px rgba(0, 0, 0, 0.3);
    transition: background 0.25s, border-color 0.25s, color 0.25s, box-shadow 0.25s, transform 0.2s var(--ease-out-expo);
}
.ad-btn--exit::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--red-bright), var(--red-dark));
    box-shadow: 0 0 12px rgba(230, 0, 0, 0.8);
}
.ad-btn--exit::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.18) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.55s var(--ease-out-expo);
    pointer-events: none;
}
.ad-btn--exit:hover {
    background: linear-gradient(135deg, var(--red-bright), var(--red-dark));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 22px rgba(230, 0, 0, 0.4);
}
.ad-btn--exit:hover::after { transform: translateX(120%); }
.ad-btn--exit svg { width: 0.95rem; height: 0.95rem; position: relative; z-index: 1; }
.ad-btn--exit span { position: relative; z-index: 1; }
.ad-btn--block { width: 100%; }
.ad-icon-btn {
    appearance: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.ad-icon-btn svg { width: 0.95rem; height: 0.95rem; }
.ad-icon-btn:hover { color: var(--white); background: rgba(255, 255, 255, 0.1); }
.ad-icon-btn--danger:hover { color: #ff8a8a; border-color: rgba(230, 0, 0, 0.45); background: rgba(230, 0, 0, 0.12); }

.ad-form { display: flex; flex-direction: column; gap: 0.95rem; }
.ad-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}
.ad-field small { font-size: 0.55rem; font-weight: 500; letter-spacing: 0.04em; text-transform: none; color: rgba(255, 255, 255, 0.32); margin-left: 0.35rem; }
.ad-field input,
.ad-field textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 0.55rem;
    padding: 0.72rem 0.85rem;
    color: var(--white);
    font-family: var(--font-main);
    font-size: 0.8rem;
    letter-spacing: 0;
    text-transform: none;
    outline: 0;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.ad-field textarea { resize: vertical; min-height: 4.5rem; line-height: 1.6; }
.ad-field input:focus,
.ad-field textarea:focus { border-color: rgba(230, 0, 0, 0.6); box-shadow: 0 0 0 3px rgba(230, 0, 0, 0.12); }
.ad-field input::placeholder,
.ad-field textarea::placeholder { color: rgba(255, 255, 255, 0.24); text-transform: none; }
.ad-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.ad-alert { min-height: 1.1rem; font-size: 0.66rem; line-height: 1.5; color: #ff8080; letter-spacing: 0.02em; }
.ad-note { font-size: 0.62rem; line-height: 1.7; color: rgba(255, 255, 255, 0.38); }

.ad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
    gap: 0.9rem;
}
.ad-card {
    display: flex;
    flex-direction: column;
    background: var(--glass-bg);
    border: var(--glass-border);
    border-radius: 1.15rem;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
    transition: border-color 0.3s, transform 0.3s var(--ease-out-expo), border-radius 0.55s var(--ease-out-expo), box-shadow 0.3s;
}
.ad-card:hover { border-color: rgba(230, 0, 0, 0.32); border-radius: 1.3rem 1rem 1.4rem 1rem; transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), inset 0 -1px 0 rgba(0, 0, 0, 0.2), 0 0.9rem 2.2rem rgba(0, 0, 0, 0.28), 0 2.4rem 5rem rgba(0, 0, 0, 0.20); }
.ad-card.is-off { opacity: 0.62; }
.ad-badges { display: flex; gap: 0.35rem; flex-wrap: wrap; min-height: 1.35rem; align-items: center; }
.ad-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 0.26rem 0.55rem 0.26rem 0.42rem;
    border-radius: 0;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 0.38rem), calc(100% - 0.38rem) 100%, 0 100%);
    background: rgba(7, 7, 7, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.78);
}
.ad-badge--top {
    background: linear-gradient(135deg, rgba(230, 0, 0, 0.96), rgba(112, 0, 0, 0.86));
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}
.ad-badge--top::before {
    content: '';
    width: 0.42rem;
    height: 0.58rem;
    flex: 0 0 auto;
    background: #fff;
    clip-path: polygon(62% 0, 0 58%, 42% 58%, 28% 100%, 100% 36%, 52% 36%);
}
.ad-badge--preventa { background: rgba(255, 28, 28, 0.16); border-color: rgba(255, 28, 28, 0.55); color: #ff9d9d; }
.ad-badge--off { background: rgba(0, 0, 0, 0.7); border-color: rgba(255, 255, 255, 0.16); color: rgba(255, 255, 255, 0.55); }
.ad-card-body { padding: 0.9rem; display: flex; flex-direction: column; gap: 0.75rem; flex: 1; }
.ad-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.ad-name-wrap { min-width: 0; flex: 1; }
.ad-name { font-size: 0.82rem; font-weight: 700; line-height: 1.35; display: block; word-break: break-word; }
.ad-name-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(230, 0, 0, 0.55);
    border-radius: 0.4rem;
    padding: 0.3rem 0.45rem;
    color: var(--white);
    font-family: var(--font-main);
    font-size: 0.82rem;
    font-weight: 700;
    outline: 0;
}
.ad-name-actions { display: flex; gap: 0.25rem; flex: 0 0 auto; }
.ad-desc-hint { font-size: 0.6rem; line-height: 1.55; color: rgba(255, 255, 255, 0.42); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ad-card-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.ad-card-label { font-size: 0.52rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255, 255, 255, 0.38); }
.ad-stepper { display: inline-flex; align-items: center; border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 0.5rem; overflow: hidden; background: rgba(0, 0, 0, 0.35); }
.ad-stepper button { appearance: none; border: 0; background: none; color: rgba(255, 255, 255, 0.62); width: 1.9rem; height: 1.85rem; font-size: 0.95rem; cursor: pointer; transition: background 0.2s, color 0.2s; }
.ad-stepper button:hover { background: rgba(230, 0, 0, 0.2); color: #fff; }
.ad-stepper input {
    width: 3rem;
    height: 1.85rem;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    background: none;
    color: var(--white);
    font-family: var(--font-main);
    font-size: 0.72rem;
    text-align: center;
    outline: 0;
    -moz-appearance: textfield;
}
.ad-stepper input::-webkit-outer-spin-button,
.ad-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ad-price { display: inline-flex; align-items: center; gap: 0.3rem; border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 0.5rem; background: rgba(0, 0, 0, 0.35); padding: 0 0.15rem 0 0.45rem; }
.ad-price span { color: var(--red-bright); font-size: 0.72rem; font-weight: 700; }
.ad-price input { width: 4.1rem; border: 0; background: none; color: var(--white); font-family: var(--font-main); font-size: 0.72rem; text-align: right; outline: 0; -moz-appearance: textfield; }
.ad-price input::-webkit-outer-spin-button,
.ad-price input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ad-price button { appearance: none; border: 0; background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.7); font-family: var(--font-main); font-size: 0.5rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; height: 1.7rem; padding: 0 0.5rem; border-radius: 0.35rem; cursor: pointer; transition: background 0.2s, color 0.2s; }
.ad-price button:hover { background: var(--red); color: #fff; }
.ad-top-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.45);
    border-radius: 0;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 0.32rem), calc(100% - 0.32rem) 100%, 0 100%);
    padding: 0.34rem 0.55rem 0.34rem 0.42rem;
    font-family: var(--font-main);
    font-size: 0.48rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.ad-top-btn::before {
    content: '';
    width: 0.36rem;
    height: 0.5rem;
    flex: 0 0 auto;
    background: var(--red-bright);
    clip-path: polygon(62% 0, 0 58%, 42% 58%, 28% 100%, 100% 36%, 52% 36%);
}
.ad-top-btn:hover { border-color: rgba(230, 0, 0, 0.5); background: rgba(230, 0, 0, 0.12); color: #ffb0b0; }
.ad-top-btn.active { background: linear-gradient(135deg, rgba(230, 0, 0, 0.96), rgba(112, 0, 0, 0.86)); border-color: rgba(255, 255, 255, 0.2); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24); }
.ad-top-btn.active::before { background: #fff; }
.ad-top-btn:focus-visible { outline: 0; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.75); }
.ad-top-btn.active:focus-visible { box-shadow: inset 0 0 0 2px #fff; }
.ad-switch { position: relative; display: inline-flex; width: 2.4rem; height: 1.3rem; flex: 0 0 auto; }
.ad-switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; z-index: 2; }
.ad-switch span { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.14); transition: background 0.25s; }
.ad-switch span::after { content: ''; position: absolute; top: 0.17rem; left: 0.17rem; width: 0.96rem; height: 0.96rem; border-radius: 50%; background: rgba(255, 255, 255, 0.75); transition: transform 0.3s var(--ease-out-expo), background 0.25s; }
.ad-switch input:checked + span { background: rgba(230, 0, 0, 0.85); }
.ad-switch input:checked + span::after { transform: translateX(1.1rem); background: #fff; }
.ad-switch input:focus-visible + span { outline: 2px solid var(--red-bright); outline-offset: 2px; }
.ad-card-foot { margin-top: auto; padding-top: 0.35rem; border-top: 1px solid rgba(255, 255, 255, 0.07); display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.ad-enabled-label { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.55rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); }
.ad-enabled-label.on { color: #59d98e; }
.ad-reservas { display: flex; align-items: center; gap: 0.45rem; padding: 0.55rem 0.65rem; border-radius: 0.55rem; background: rgba(230, 0, 0, 0.09); border: 1px solid rgba(230, 0, 0, 0.22); font-size: 0.62rem; letter-spacing: 0.04em; color: #ffb3b3; }
.ad-reservas svg { width: 0.9rem; height: 0.9rem; }
.ad-reservas strong { font-size: 0.82rem; color: #fff; }

.ad-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    text-align: center;
    padding: 2.6rem 1.2rem;
    border: 1px dashed rgba(255, 255, 255, 0.24);
    border-radius: 1rem;
    background: var(--glass-bg);
    box-shadow: var(--glass-shadow);
}
.ad-empty-icon { width: 2.6rem; height: 2.6rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(230, 0, 0, 0.14); border: 1px solid rgba(230, 0, 0, 0.35); color: var(--red-bright); font-size: 1.4rem; }
.ad-empty h2 { font-size: 0.95rem; }
.ad-empty p { font-size: 0.7rem; color: rgba(255, 255, 255, 0.45); max-width: 24rem; line-height: 1.7; margin-bottom: 0.4rem; }

.ad-tasa-card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
    padding: clamp(1.2rem, 3vw, 2rem);
    border: var(--glass-border);
    border-radius: 1.1rem;
    background: var(--glass-bg);
    box-shadow: var(--glass-shadow);
}
.ad-tasa-current {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.2rem;
    border-radius: 0.9rem;
    background: radial-gradient(600px 200px at 20% 0%, rgba(230, 0, 0, 0.18), transparent 70%), var(--glass-bg);
    border: 1px solid rgba(230, 0, 0, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 20px rgba(0, 0, 0, 0.3);
}
.ad-tasa-current strong { font-size: clamp(2.2rem, 4.8vw, 3.6rem); font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.ad-tasa-current small { font-size: 0.6rem; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.42); }
.ad-tasa-form { justify-content: center; }
.ad-counter { font-size: 0.55rem; text-align: right; color: rgba(255, 255, 255, 0.35); }

.ad-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 1.2rem 1rem;
    border: 1px dashed rgba(255, 255, 255, 0.22);
    border-radius: 0.7rem;
    background: rgba(0, 0, 0, 0.25);
    color: rgba(255, 255, 255, 0.7);
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.25s, background 0.25s;
}
.ad-dropzone:hover { border-color: rgba(230, 0, 0, 0.55); background: rgba(230, 0, 0, 0.05); }
.ad-dropzone svg { width: 1.4rem; height: 1.4rem; color: var(--red-bright); }
.ad-dropzone span { font-size: 0.7rem; font-weight: 700; }
.ad-dropzone small { font-size: 0.55rem; color: rgba(255, 255, 255, 0.35); }
.ad-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; }
.ad-thumb { position: relative; aspect-ratio: 1; border-radius: 0.45rem; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.14); background: #0b0b0b; }
.ad-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ad-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(3, 3, 3, 0.72);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s;
}
.ad-modal.open { opacity: 1; visibility: visible; }
.ad-modal-card {
    width: min(34rem, 100%);
    max-height: min(90vh, 52rem);
    overflow-y: auto;
    padding: clamp(1.1rem, 3vw, 1.6rem);
    background: linear-gradient(160deg, rgba(32, 32, 32, 0.84), rgba(8, 8, 8, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1.4rem 3rem rgba(0, 0, 0, 0.35), 0 2.8rem 6rem rgba(0, 0, 0, 0.30);
    transform: translateY(0.7rem) scale(0.985);
    transition: transform 0.35s var(--ease-out-expo);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.ad-modal.open .ad-modal-card { transform: translateY(0) scale(1); }
.ad-modal-card--sm { width: min(24rem, 100%); text-align: center; align-items: center; }
.ad-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.ad-modal-head h2 { font-size: 1.05rem; letter-spacing: -0.01em; }
.ad-modal-text { font-size: 0.72rem; line-height: 1.7; color: rgba(255, 255, 255, 0.55); }
.ad-modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.3rem; }
.ad-modal-actions--center { justify-content: center; }
.ad-warn-icon { width: 3rem; height: 3rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(230, 0, 0, 0.14); border: 1px solid rgba(230, 0, 0, 0.4); color: var(--red-bright); font-size: 1.4rem; font-weight: 800; }

.ad-toasts { position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 120; display: flex; flex-direction: column; gap: 0.5rem; width: min(22rem, calc(100% - 2rem)); }
.ad-toast {
    padding: 0.75rem 0.9rem;
    background: rgba(14, 14, 14, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-left: 3px solid #2ecc71;
    border-radius: 0.6rem;
    font-size: 0.65rem;
    line-height: 1.5;
    color: var(--white);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 0.6rem 1.6rem rgba(0, 0, 0, 0.22), 0 1.6rem 3.2rem rgba(0, 0, 0, 0.16);
    animation: adToastIn 0.35s var(--ease-out-expo);
}
.ad-toast.error { border-left-color: var(--red-bright); }
.ad-toast.out { opacity: 0; transform: translateY(0.4rem); transition: opacity 0.3s ease, transform 0.3s ease; }
@keyframes adToastIn { from { opacity: 0; transform: translateY(0.6rem); } to { opacity: 1; transform: translateY(0); } }

.ad-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem 1rem;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: 1rem;
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.7rem;
}

.ad-body :focus-visible { outline: 2px solid var(--red-bright); outline-offset: 2px; }

@media (max-width: 1100px) {
    .ad-tasa-card { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .ad-hide-sm { display: none; }
    .ad-header { padding-left: 1rem; padding-right: 1rem; }
    .ad-net { display: none; }
    .ad-main { width: calc(100% - 2rem); }
    .ad-hero { align-items: flex-start; flex-direction: column; gap: 0.6rem; }
    .ad-hero-side { align-items: flex-start; padding-bottom: 0; }
    .ad-toolbar { flex-direction: column; align-items: stretch; }
    .ad-toolbar .ad-btn { width: 100%; }
    .ad-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; overflow: visible; }
    .ad-tab { justify-content: center; white-space: normal; text-align: center; padding: 0.8rem 0.35rem; font-size: 0.52rem; letter-spacing: 0.08em; line-height: 1.4; }
    .ad-tab-count { font-size: 0.48rem; padding: 0.08rem 0.3rem; }
    .ad-form-row { grid-template-columns: 1fr; }
    .ad-modal { align-items: flex-end; padding: 0; }
    .ad-modal-card { width: 100%; max-height: 92vh; border-radius: 1rem 1rem 0 0; border-bottom: 0; }
    .ad-modal-card--sm { width: 100%; }
    .ad-tasa-current strong { font-size: 2.4rem; }
}
@media (max-width: 430px) {
    .ad-brand-tag { display: none; }
    .ad-stats { gap: 0.35rem; margin-bottom: 0.8rem; }
    .ad-stat { padding: 0.5rem 0.45rem 0.45rem; border-radius: 0.6rem; }
    .ad-stat-num { font-size: 1.15rem; }
    .ad-stat-label { margin-top: 0.15rem; font-size: 0.42rem; letter-spacing: 0.1em; }
    .ad-grid { grid-template-columns: 1fr; }
    .ad-header-actions .ad-btn { padding: 0.62rem 0.75rem; }
}
@media (prefers-reduced-motion: reduce) {
    .ad-card, .ad-btn, .ad-modal-card, .ad-toast { transition: none; animation: none; }
    .ad-card:hover { transform: none; }
}

.ad-cats {
    margin-bottom: 0.8rem;
    border: var(--glass-border);
    border-radius: 0.7rem;
    background: var(--glass-bg);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}
.ad-cats summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.65rem 0.8rem;
    font-family: var(--font-main);
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.68);
    cursor: pointer;
    list-style: none;
}
.ad-cats summary::-webkit-details-marker { display: none; }
.ad-cats summary::after {
    content: '+';
    color: var(--red-bright);
    font-size: 0.8rem;
    line-height: 1;
}
.ad-cats[open] summary::after { content: '−'; }
.ad-cats-hint {
    margin-left: auto;
    font-size: 0.48rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: none;
    color: rgba(255, 255, 255, 0.34);
}
.ad-cat-list { padding: 0 0.8rem 0.55rem; }
.ad-cat-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.ad-cat-name {
    flex: 1;
    min-width: 0;
    font-family: var(--font-main);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ad-cat-count {
    min-width: 1.2rem;
    text-align: right;
    font-size: 0.5rem;
    color: rgba(255, 255, 255, 0.42);
}
.ad-cat-move {
    appearance: none;
    width: 1.45rem;
    height: 1.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.35rem;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-main);
    font-size: 0.62rem;
    cursor: pointer;
}
.ad-cat-move:hover:not(:disabled) { border-color: rgba(230, 0, 0, 0.55); color: #fff; }
.ad-cat-move:disabled { opacity: 0.25; cursor: not-allowed; }
.ad-field select {
    width: 100%;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 0.55rem;
    padding: 0.62rem 0.75rem;
    color: var(--white);
    font-family: var(--font-main);
    font-size: 0.7rem;
    outline: 0;
}
.ad-field select:focus { border-color: rgba(230, 0, 0, 0.6); box-shadow: 0 0 0 3px rgba(230, 0, 0, 0.12); }
.ad-image-current,
.ad-image-preview {
    margin-top: 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0.65rem;
    background: #080808;
    overflow: hidden;
}
.ad-image-current img,
.ad-image-preview img {
    display: block;
    width: 100%;
    max-height: 14rem;
    object-fit: contain;
}
