/* ═══════════════════════════════════════════════
   Azadel Biolink — Dashboard CSS v2.0
   Standalone · sayalah.com
═══════════════════════════════════════════════ */

/* ── Reset & Base ────────────────────────────── */
.abl-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    color: #0f172a;
    max-width: 780px;
    margin: 0 auto;
    padding: 0 0 60px;
}
.abl-wrap * { box-sizing: border-box; }
.abl-wrap a { text-decoration: none; }

/* ── Header / Logo ───────────────────────────── */
.abl-header {
    text-align: center;
    padding: 40px 20px 28px;
}
.abl-logo {
    display: inline-flex;
    align-items: baseline;
    gap: 0;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 10px;
}
.abl-logo__say {
    color: #0f172a;
}
.abl-logo__dot {
    color: #0095d3;
    font-size: 38px;
    line-height: 0.8;
}
.abl-logo__com {
    color: #0095d3;
}
.abl-header__sub {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
    font-weight: 500;
}

/* ── Card ────────────────────────────────────── */
.abl-card {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.abl-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1.5px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 12px;
}
.abl-card__head-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.abl-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f0f9ff;
    border: 1.5px solid #bae6fd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.abl-card--shorturl .abl-card__icon {
    background: #fdf4ff;
    border-color: #e9d5ff;
}
.abl-card__title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 2px;
    line-height: 1.3;
}
.abl-card__count {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
    font-weight: 500;
}

/* ── Biolink List ────────────────────────────── */
.abl-biolink-list {
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.abl-biolink-card {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s;
}
.abl-biolink-card:hover {
    border-color: #bae6fd;
    box-shadow: 0 2px 8px rgba(0,149,211,.08);
}
.abl-biolink-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    gap: 12px;
    flex-wrap: wrap;
}
.abl-biolink-card__info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.abl-biolink-card__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    flex-shrink: 0;
}
.abl-biolink-card__avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e0f2fe;
    border: 2px solid #bae6fd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.abl-biolink-card__title {
    font-size: 14px;
    font-weight: 700;
    display: block;
    color: #0f172a;
}
.abl-biolink-card__slug {
    font-size: 12px;
    color: #0095d3;
    font-weight: 600;
    margin-top: 2px;
}
.abl-biolink-card__meta {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}
.abl-biolink-card__actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ── Copy Row ────────────────────────────────── */
.abl-copy-row {
    padding: 10px 16px;
    background: #fff;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.abl-copy-item {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.abl-copy-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    flex-shrink: 0;
    min-width: 90px;
}
.abl-copy-box {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 5px 10px;
    flex: 1;
    min-width: 0;
}
.abl-copy-box span {
    font-size: 12px;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}
.abl-copy-box button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    color: #0095d3;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
    transition: background .15s;
}
.abl-copy-box button:hover { background: #e0f2fe; }

/* ── Short URL Form (Inline) ─────────────────── */
.abl-shortform {
    padding: 20px 24px;
    background: linear-gradient(135deg, #f0f9ff 0%, #faf5ff 100%);
    border-bottom: 1.5px solid #e2e8f0;
}
.abl-shortform__title {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    margin: 0 0 14px;
}
.abl-shortform__fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}
.abl-shortform__field--full {
    grid-column: 1 / -1;
}
.abl-shortform__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.abl-shortform__result {
    margin-top: 14px;
    padding: 12px 16px;
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #166534;
}
.abl-shortform__result .abl-result-url {
    font-size: 14px;
    color: #0095d3;
    word-break: break-all;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Short URL List ──────────────────────────── */
.abl-short-list {
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.abl-short-card {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: all .15s;
}
.abl-short-card:hover {
    border-color: #c4b5fd;
    box-shadow: 0 1px 6px rgba(124,58,237,.07);
}
.abl-short-card.is-inactive {
    opacity: 0.5;
}
.abl-short-card__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    gap: 10px;
    flex-wrap: wrap;
}
.abl-short-card__info { flex: 1; min-width: 0; }
.abl-short-card__url {
    font-size: 13px;
    font-weight: 700;
    color: #7c3aed;
}
.abl-short-card__title {
    font-size: 12px;
    color: #374151;
    font-weight: 600;
    margin-top: 2px;
}
.abl-short-card__dest {
    font-size: 11px;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
    margin-top: 2px;
}
.abl-short-card__actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* ── Buttons ─────────────────────────────────── */
.abl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none !important;
    transition: all .15s;
    font-family: inherit;
    -webkit-appearance: none;
    line-height: 1;
    pointer-events: auto !important;
}
.abl-btn--primary {
    background: #0095d3;
    color: #fff !important;
    box-shadow: 0 1px 3px rgba(0,149,211,.3);
}
.abl-btn--primary:hover { background: #007ab0; color: #fff !important; }
.abl-btn--ghost {
    background: #fff;
    color: #374151;
    border: 1.5px solid #e2e8f0;
}
.abl-btn--ghost:hover { background: #f8fafc; border-color: #cbd5e1; color: #0f172a; }
.abl-btn--danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1.5px solid #fecaca;
}
.abl-btn--danger:hover { background: #fee2e2; }
.abl-btn--sm {
    padding: 5px 11px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
}

/* ── Empty State ─────────────────────────────── */
.abl-empty {
    text-align: center;
    padding: 48px 20px;
    margin: 0 24px 20px;
    background: #f8fafc;
    border: 1.5px dashed #e2e8f0;
    border-radius: 12px;
}
.abl-empty--sm {
    padding: 24px 20px;
    margin: 0 24px 20px;
}
.abl-empty__icon { font-size: 40px; margin-bottom: 12px; }
.abl-empty p { font-size: 14px; color: #64748b; margin-bottom: 16px; }

/* ── Notice ──────────────────────────────────── */
.abl-notice {
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
}
.abl-notice--success { background: #f0fdf4; border: 1.5px solid #86efac; color: #166534; }
.abl-notice--error { background: #fef2f2; border: 1.5px solid #fca5a5; color: #991b1b; }

/* ── Form Fields ─────────────────────────────── */
.abl-field { margin-bottom: 14px; }
.abl-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.abl-required { color: #dc2626; }
.abl-optional { color: #94a3b8; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 11px; }
.abl-input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #0f172a;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
    background: #fff;
}
.abl-input:focus {
    border-color: #0095d3;
    box-shadow: 0 0 0 3px rgba(0,149,211,.1);
}
.abl-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #0f172a;
    outline: none;
    resize: vertical;
    font-family: inherit;
    transition: border-color .15s;
}
.abl-textarea:focus {
    border-color: #0095d3;
    box-shadow: 0 0 0 3px rgba(0,149,211,.1);
}
.abl-textarea--code {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    background: #0f172a;
    color: #e2e8f0;
}
.abl-hint { font-size: 11px; color: #94a3b8; margin-top: 4px; }

/* ── Slug Wrap ───────────────────────────────── */
.abl-slug-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: border-color .15s;
}
.abl-slug-wrap:focus-within {
    border-color: #0095d3;
    box-shadow: 0 0 0 3px rgba(0,149,211,.1);
}
.abl-slug-prefix {
    padding: 10px 10px;
    background: #f1f5f9;
    font-size: 12px;
    color: #64748b;
    border-right: 1px solid #e2e8f0;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 600;
}
.abl-slug-wrap .abl-input {
    border: none;
    border-radius: 0;
    box-shadow: none !important;
}
.abl-slug-status {
    padding: 0 10px;
    font-size: 12px;
    flex-shrink: 0;
    font-weight: 600;
}
.abl-slug-status.ok { color: #16a34a; }
.abl-slug-status.err { color: #dc2626; }

/* ── Toggle Group ────────────────────────────── */
.abl-toggle-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.abl-toggle-opt {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all .15s;
    background: #fff;
}
.abl-toggle-opt input { accent-color: #0095d3; }
.abl-toggle-opt.is-active,
.abl-toggle-opt:has(input:checked) {
    border-color: #0095d3;
    background: #f0f9ff;
    color: #0095d3;
}

/* ── Toggle Switch ───────────────────────────── */
.abl-toggle-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.abl-toggle-switch input { display: none; }
.abl-toggle-switch__track {
    width: 40px;
    height: 22px;
    background: #e2e8f0;
    border-radius: 999px;
    position: relative;
    transition: background .2s;
    flex-shrink: 0;
}
.abl-toggle-switch__track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.abl-toggle-switch input:checked + .abl-toggle-switch__track { background: #0095d3; }
.abl-toggle-switch input:checked + .abl-toggle-switch__track::after { transform: translateX(18px); }
.abl-toggle-switch__label { font-size: 13px; font-weight: 600; }

/* ── Theme Presets ───────────────────────────── */
.abl-theme-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.abl-theme-preset {
    width: 58px;
    height: 42px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s, border-color .15s;
    border: 2px solid #e2e8f0 !important;
}
.abl-theme-preset:hover { transform: scale(1.06); }
.abl-theme-preset.is-active { transform: scale(1.1); border-color: #0095d3 !important; }

/* ── Color Row ───────────────────────────────── */
.abl-color-row { display: flex; gap: 12px; flex-wrap: wrap; }
.abl-color-input {
    width: 48px;
    height: 36px;
    padding: 2px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
}

/* ── Avatar Pick ─────────────────────────────── */
.abl-avatar-pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ── Link Rows ───────────────────────────────── */
.abl-link-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 8px;
}
.abl-link-row__drag { color: #94a3b8; cursor: grab; font-size: 16px; flex-shrink: 0; }
.abl-link-row__fields {
    flex: 1;
    display: grid;
    grid-template-columns: 40px 1fr 1fr;
    gap: 6px;
}
.abl-link-row__icon {
    padding: 7px 6px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    font-size: 18px;
    text-align: center;
    background: #fff;
    width: 100%;
}
.abl-link-row__label,
.abl-link-row__url {
    padding: 7px 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    width: 100%;
    font-family: inherit;
}
.abl-link-row__toggle { flex-shrink: 0; }
.abl-link-row__remove {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    flex-shrink: 0;
    border-radius: 4px;
    transition: background .15s;
}
.abl-link-row__remove:hover { background: #fee2e2; }

/* ── Modal ───────────────────────────────────── */
.abl-modal {
    position: fixed;
    inset: 0;
    z-index: 999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.abl-modal__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(3px);
}
.abl-modal__box {
    position: relative;
    z-index: 1000000 !important;
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0,0,0,.2);
    animation: ablModalIn .22s cubic-bezier(.34,1.56,.64,1);
}
@keyframes ablModalIn {
    from { opacity:0; transform: translateY(16px) scale(.96); }
    to   { opacity:1; transform: none; }
}
.abl-modal__header {
    padding: 18px 22px 14px;
    border-bottom: 1.5px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.abl-modal__header h3 { font-size: 16px; font-weight: 700; margin: 0; }
.abl-modal__close {
    background: #f1f5f9;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #64748b;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}
.abl-modal__close:hover { background: #e2e8f0; color: #374151; }
.abl-modal__body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.abl-modal__footer {
    padding: 14px 22px;
    border-top: 1.5px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

/* ── Modal Tabs ──────────────────────────────── */
.abl-modal-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 18px;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 3px;
}
.abl-modal-tab {
    flex: 1;
    padding: 7px 6px;
    background: none;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
    text-align: center;
}
.abl-modal-tab.is-active {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
}
.abl-modal-content { display: none; }
.abl-modal-content.is-active { display: block; }

/* ── Mobile ──────────────────────────────────── */
@media (max-width: 640px) {
    .abl-wrap { padding: 0 0 40px; }
    .abl-header { padding: 28px 16px 20px; }
    .abl-logo { font-size: 26px; }
    .abl-card__head { padding: 16px; }
    .abl-biolink-list { padding: 12px 16px; }
    .abl-biolink-card__top { flex-direction: column; align-items: flex-start; }
    .abl-biolink-card__actions { width: 100%; }
    .abl-shortform { padding: 16px; }
    .abl-shortform__fields { grid-template-columns: 1fr; }
    .abl-shortform__footer { flex-direction: column; align-items: stretch; }
    .abl-short-list { padding: 12px 16px; }
    .abl-short-card__body { flex-direction: column; align-items: flex-start; }
    .abl-short-card__actions { width: 100%; justify-content: flex-start; }
    .abl-copy-item { flex-direction: column; align-items: flex-start; }
    .abl-modal__box {
        max-height: 95vh;
        border-radius: 16px 16px 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: 100%;
        margin: 0;
    }
    .abl-link-row__fields { grid-template-columns: 36px 1fr; }
    .abl-link-row__url { grid-column: 1/-1; }
    .abl-empty { margin: 0 16px 16px; }
    .abl-empty--sm { margin: 0 16px 16px; }
}
@media (max-width: 480px) {
    .abl-modal-tab { font-size: 11px; padding: 6px 4px; }
}

/* ── Touch & pointer fixes ───────────────────── */
body > .abl-modal { z-index: 999999 !important; }
body > .abl-modal .abl-modal__box { z-index: 1000000 !important; }
.abl-btn, button.abl-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0,0,0,.1);
    user-select: none;
    -webkit-user-select: none;
}
