.ab-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: hsl(0, 0%, 0%);
    z-index: 9000;
    display: flex;
    align-items: flex-end;
    padding-bottom: 7px;
    border-bottom: 1.5px solid hsl(0, 100%, 40%);
}

.ab-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 20px;
    gap: 16px;
}

.ab-bar__label {
    font-family: "Source Sans 3", Arial, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: hsl(0 0% 92%);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ab-bar__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: hsl(0, 100%, 50%);
    flex-shrink: 0;
    animation: ab-pulse 2.4s ease-in-out infinite;
}

@keyframes ab-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.35; }
}

.ab-bar__actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ab-btn {
    font-family: "Source Sans 3", Arial, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
    white-space: nowrap;
}
.ab-btn:hover:not(:disabled) { opacity: 0.78; }
.ab-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.ab-btn--add {
    background: hsla(43, 100%, 50%, 0.777);
    color: #000000;
    border: 1px solid hsl(0 0% 100% / 0.22);
    font-size: 15px;
}

.ab-btn--logout {
    background: transparent;
    color: hsl(0 0% 62%);
    border: 1px solid hsl(0 0% 100% / 0.14);
}

.event-delete-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 40px 24px 56px;
    background: hsl(0, 0%, 0%);
}

.event-delete-zone::before {
    content: 'Danger Zone';
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: hsl(5, 68%, 45%);
    opacity: 0.55;
}

.event-delete-btn {
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: hsl(5, 80%, 62%);
    background: hsl(5, 60%, 10%);
    border: 1.5px solid hsl(5, 68%, 38%);
    border-radius: 8px;
    padding: 14px 40px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 0 0 hsl(5 80% 40% / 0);
}
.event-delete-btn:hover {
    background: hsl(5, 68%, 16%);
    color: hsl(5, 90%, 72%);
    border-color: hsl(5, 75%, 52%);
    box-shadow: 0 0 18px 4px hsl(5 80% 40% / 0.35), inset 0 0 12px hsl(5 80% 30% / 0.2);
}
.event-delete-btn:active {
    background: hsl(5, 72%, 20%);
    box-shadow: 0 0 28px 8px hsl(5 80% 40% / 0.5), inset 0 0 18px hsl(5 80% 30% / 0.35);
}

.ua-mod-badge,
.fr-mod-badge,
.cm-pos-badge,
.pf-tag-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: hsl(45, 95%, 55%);
    background: hsl(40, 80%, 12%);
    border: 1px solid hsl(45, 60%, 32%);
    border-radius: 4px;
    padding: 3px 8px;
    vertical-align: middle;
    margin-top: 4px;
}

.ua-mod-badge--owner,
.fr-mod-badge--owner {
    color: hsl(275, 85%, 72%);
    background: hsl(270, 55%, 14%);
    border-color: hsl(275, 55%, 38%);
}

.cm-pos-badge {
    color: hsl(200, 85%, 65%);
    background: hsl(205, 60%, 12%);
    border-color: hsl(200, 55%, 32%);
    cursor: default;
    user-select: none;
}

.ab-overlay {
    position: fixed;
    inset: 0;
    background: hsl(0 0% 0% / 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 10000;
}

.ab-modal {
    background: hsl(0, 0%, 0%);
    border: 1px solid hsl(0, 0%, 29%);
    border-radius: 10px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    font-family: system-ui, sans-serif;
    color: hsl(0, 0%, 90%);
}

.ab-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.ab-modal__title {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
}

.ab-modal__close {
    background: none;
    border: none;
    color: hsl(0 0% 48%);
    font-size: 18px;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    transition: color 0.12s;
    line-height: 1;
}
.ab-modal__close:hover { color: hsl(0 0% 88%); }

.ab-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ab-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ab-label {
    font-size: 13px;
    font-weight: 700;
    color: hsl(0 0% 48%);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.ab-label small {
    font-size: 13px;
    color: hsl(0 0% 38%);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    margin-left: 6px;
}

.ab-input,
.ab-textarea {
    background: hsl(220, 14%, 17%);
    border: 1px solid hsl(220, 14%, 24%);
    border-radius: 6px;
    color: hsl(0, 0%, 90%);
    font-size: 14px;
    font-family: inherit;
    padding: 9px 12px;
    width: 100%;
    outline: none;
    transition: border-color 0.15s;
}
.ab-input:focus, .ab-textarea:focus { border-color: hsl(0, 100%, 50%); }
.ab-textarea { resize: vertical; min-height: 90px; }

.ab-file-input {
    font-size: 13px;
    color: hsl(0 0% 50%);
    cursor: pointer;
}

.ab-img-preview {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ab-img-preview img {
    width: 100%;
    max-height: 160px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid hsl(220, 14%, 24%);
}

.ab-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
}

.ab-form-btn {
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 9px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
}
.ab-form-btn:hover:not(:disabled) { opacity: 0.82; }
.ab-form-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ab-form-btn--primary { background: hsl(45,95%,55%); color: #000; }
.ab-form-btn--ghost   { background: transparent; color: hsl(0 0% 55%); border: 1px solid hsl(220, 14%, 26%); }

.ic-modal { max-width: fit-content; }

.ic-stage {
    position: relative;
    margin-inline: auto;
    background: hsl(233, 22%, 8%);
    user-select: none;
}

.ic-img {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    -webkit-user-drag: none;
}

.ic-mask {
    position: absolute;
    background: hsl(0 0% 0% / 0.6);
    pointer-events: none;
}

.ic-cropbox {
    position: absolute;
    box-shadow: 0 0 0 1px hsl(0 0% 100% / 0.9);
    cursor: move;
    touch-action: none;
}
.ic-cropbox--circle { border-radius: 50%; }

.ic-grid-line {
    position: absolute;
    background: hsl(0 0% 100% / 0.45);
    pointer-events: none;
}
.ic-grid-line--v1, .ic-grid-line--v2 { top: 0; bottom: 0; width: 1px; }
.ic-grid-line--v1 { left: 33.333%; }
.ic-grid-line--v2 { left: 66.667%; }
.ic-grid-line--h1, .ic-grid-line--h2 { left: 0; right: 0; height: 1px; }
.ic-grid-line--h1 { top: 33.333%; }
.ic-grid-line--h2 { top: 66.667%; }

.ic-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #fff;
    border: 1px solid hsl(233, 22%, 20%);
    border-radius: 50%;
    touch-action: none;
}
.ic-handle--nw { top: -7px;  left: -7px;  cursor: nwse-resize; }
.ic-handle--ne { top: -7px;  right: -7px; cursor: nesw-resize; }
.ic-handle--sw { bottom: -7px; left: -7px;  cursor: nesw-resize; }
.ic-handle--se { bottom: -7px; right: -7px; cursor: nwse-resize; }

.ab-error {
    font-size: 13px;
    color: hsl(5, 68%, 62%);
    background: hsl(5, 68%, 52%, 0.1);
    border: 1px solid hsl(5, 68%, 52%, 0.28);
    border-radius: 6px;
    padding: 9px 12px;
}

.fmt-toolbar {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 2px;
    background: hsl(220, 14%, 12%);
    border: 1px solid hsl(220, 14%, 24%);
    border-radius: 7px;
    padding: 5px 7px;
    box-shadow: 0 4px 16px hsl(0 0% 0% / 0.35);
    z-index: 9500;
    font-family: system-ui, sans-serif;
}

.fmt-btn {
    background: none;
    border: none;
    color: hsl(0 0% 72%);
    font-size: 13px;
    font-family: inherit;
    padding: 4px 9px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    white-space: nowrap;
}
.fmt-btn:hover { background: hsl(220, 14%, 22%); color: hsl(0 0% 95%); }

.fmt-sep {
    width: 1px;
    height: 16px;
    background: hsl(220, 14%, 26%);
    margin-inline: 4px;
    flex-shrink: 0;
}
