/* ===== دکمه ورود ادمین در نوار بالا ===== */
.admin-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(52, 211, 153, 0.15);
    border: 1px solid rgba(110, 231, 183, 0.4);
    color: #6ee7b7;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    flex-shrink: 0;
}
.admin-toggle-btn:hover {
    background: rgba(52, 211, 153, 0.3);
    transform: scale(1.06);
}
body.admin-mode .admin-toggle-btn {
    background: #34d399;
    color: #022c22;
}

/* ===== مودال ورود ===== */
.admin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 10, 8, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 16px;
}
.admin-modal-overlay.open { display: flex; }
.admin-modal {
    width: 100%;
    max-width: 360px;
    background: rgba(6, 20, 14, 0.92);
    border: 1px solid rgba(110, 231, 183, 0.35);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 30px 70px rgba(0,0,0,0.6);
}
.admin-modal h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-modal input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(110, 231, 183, 0.3);
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 15px;
    margin-bottom: 12px;
    outline: none;
    direction: ltr;
    text-align: left;
}
.admin-modal input[type="password"]:focus {
    border-color: #34d399;
}
.admin-modal .error-msg {
    color: #fca5a5;
    font-size: 13px;
    margin-bottom: 10px;
    min-height: 18px;
}
.admin-modal-buttons {
    display: flex;
    gap: 10px;
}
.btn {
    flex: 1;
    padding: 11px 14px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s;
}
.btn-primary { background: #34d399; color: #022c22; }
.btn-primary:hover { background: #6ee7b7; }
.btn-secondary { background: rgba(255,255,255,0.1); color: #fff; }
.btn-secondary:hover { background: rgba(255,255,255,0.18); }
.btn-danger { background: rgba(248, 113, 113, 0.18); color: #fca5a5; border: 1px solid rgba(248,113,113,0.4); }
.btn-danger:hover { background: rgba(248, 113, 113, 0.3); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== نوار ابزار ادمین (شناور) ===== */
.admin-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(6, 20, 14, 0.92);
    border: 1px solid rgba(110, 231, 183, 0.4);
    border-radius: 999px;
    padding: 10px 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    transition: transform 0.35s ease;
}
body.admin-mode .admin-bar { transform: translateX(-50%) translateY(0); }
.admin-bar .status-dot {
    width: 9px; height: 9px; border-radius: 50%; background: #34d399;
    box-shadow: 0 0 8px #34d399;
    flex-shrink: 0;
}
.admin-bar span.label { color: #fff; font-size: 13px; white-space: nowrap; }
.admin-bar .btn { padding: 8px 14px; font-size: 13px; flex: none; }
.admin-save-status { font-size: 12px; color: #6ee7b7; min-width: 70px; }

/* ===== دکمه‌های ویرایش/حذف روی هر آیتم ===== */
.item-admin-controls {
    display: none;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(110, 231, 183, 0.3);
}
body.admin-mode .item-admin-controls { display: flex; }
.item-admin-controls .mini-btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
    border: 1px solid rgba(110,231,183,0.35);
    background: rgba(110,231,183,0.1);
    color: #a7f3d0;
    cursor: pointer;
    transition: all 0.2s;
}
.item-admin-controls .mini-btn:hover { background: rgba(110,231,183,0.25); }
.item-admin-controls .mini-btn.danger {
    border-color: rgba(248,113,113,0.4);
    background: rgba(248,113,113,0.1);
    color: #fca5a5;
}
.item-admin-controls .mini-btn.danger:hover { background: rgba(248,113,113,0.25); }

.add-item-btn {
    display: none;
    margin-top: 14px;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px dashed rgba(110,231,183,0.5);
    background: rgba(110,231,183,0.06);
    color: #a7f3d0;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
    transition: all 0.2s;
}
body.admin-mode .add-item-btn { display: block; }
.add-item-btn:hover { background: rgba(110,231,183,0.15); }

/* ===== فرم ویرایش درون‌خطی ===== */
.edit-form {
    display: none;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}
.edit-form.open { display: flex; }
.edit-form input[type="text"],
.edit-form textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(110, 231, 183, 0.3);
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.7;
    resize: vertical;
    outline: none;
}
.edit-form input[type="text"]:focus,
.edit-form textarea:focus { border-color: #34d399; }
.edit-form textarea { min-height: 90px; }
.edit-form .finglish-hint {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
}
.edit-form .edit-form-buttons {
    display: flex;
    gap: 8px;
}

.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(6, 20, 14, 0.95);
    border: 1px solid rgba(110, 231, 183, 0.4);
    color: #fff;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-color: rgba(248,113,113,0.5); }
