@charset "UTF-8";
/* ========================================================================== */
/* Dosya: auth-editor.css                                                     */
/* Kullanıcı İkonu, Çoklu Yetki Profili ve Yönetici Çok Dilli Editörü         */
/* ========================================================================== */

/* 1. Üst Menü Kullanıcı İkonu */
.user-auth-btn {
    position: relative;
    background: transparent;
    border: none;
    padding: 4px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    color: #64748b;
    transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.user-auth-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    display: block;
}

.user-auth-btn:hover {
    transform: scale(1.08);
    background-color: rgba(74, 44, 17, 0.08);
    color: var(--brand-brown);
}

.user-auth-btn.is-logged-in {
    color: #1e6b45;
    background-color: rgba(46, 139, 87, 0.1);
}

.user-auth-btn.is-researcher {
    color: #1d4ed8;
    background-color: rgba(37, 99, 235, 0.12);
}

.user-auth-btn.is-admin {
    color: var(--brand-brown);
    background-color: rgba(212, 163, 75, 0.22);
}

.user-auth-btn.is-logged-in::after {
    content: "";
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #27ae60;
    border: 1.5px solid #ffffff;
}

.user-auth-btn.is-researcher::after {
    background: #2563eb;
}

.user-auth-btn.is-admin::after {
    background: #b37400;
}

/* 2. Ayet Kartı Yönetici "Düzelt" Butonu */
.ayet-card__top-actions .duzelt-btn {
    background: rgba(212, 163, 75, 0.16);
    border: 1px solid rgba(181, 137, 72, 0.45);
    border-radius: 6px;
    padding: 3px 7px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-family: inherit;
    font-size: var(--fs-kart-aksiyon);
    font-weight: 700;
    color: var(--brand-brown);
    cursor: pointer;
    transition: all 0.15s ease;
}

.ayet-card__top-actions .duzelt-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    display: block;
}

.ayet-card__top-actions .duzelt-btn:hover {
    background: var(--brand-brown);
    border-color: var(--brand-brown);
    color: #ffffff;
}

/* 3. Ortak Modal Katmanları (Giriş ve Editör) */
#authModalOverlay,
#ayetEditorModalOverlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(2.5px);
    z-index: 100030;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 14px;
}

#authModalOverlay.active,
#ayetEditorModalOverlay.active {
    display: flex;
}

.auth-sheet-box,
.editor-sheet-box {
    background: #faf8f5;
    border: 1px solid #e2ddd5;
    border-top: 3.5px solid var(--brand-brown);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(30, 41, 59, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 92dvh;
}

.auth-sheet-box {
    width: 94%;
    max-width: 420px;
}

.editor-sheet-box {
    width: 96%;
    max-width: 780px;
}

.auth-sheet-header,
.editor-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fffdf9;
    border-bottom: 1px solid #e6d5b8;
    flex-shrink: 0;
}

.auth-sheet-title,
.editor-sheet-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--fs-modal-baslik);
    font-weight: 700;
    color: var(--brand-brown);
}

.auth-sheet-title svg,
.editor-sheet-title svg {
    width: 17px;
    height: 17px;
    fill: var(--brand-brown);
    flex-shrink: 0;
}

.auth-sheet-subtitle,
.editor-sheet-subtitle {
    display: block;
    font-size: var(--fs-menu-alt);
    font-weight: 500;
    color: #576574;
    margin-top: 2px;
}

.auth-sheet-body,
.editor-sheet-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.auth-sheet-footer,
.editor-sheet-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 16px;
    background: #fffdf9;
    border-top: 1px solid #e6d5b8;
    flex-shrink: 0;
}

/* 4. Form Alanları ve Mesaj Kutuları */
.auth-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.auth-field label {
    font-size: var(--fs-menu-oge);
    font-weight: 700;
    color: #2c3e50;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #d5cfc5;
    border-radius: 7px;
    background: #ffffff;
    font-family: inherit;
    font-size: var(--fs-menu-baslik);
    color: #2c3e50;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input:focus {
    border-color: var(--brand-brown);
    box-shadow: 0 0 0 2.5px rgba(74, 44, 17, 0.14);
}

.auth-pass-toggle {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-pass-toggle svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.auth-status-msg {
    display: none;
    padding: 9px 12px;
    border-radius: 7px;
    font-size: var(--fs-menu-oge);
    font-weight: 600;
    line-height: 1.4;
}

.auth-status-msg.is-error {
    display: block;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.auth-status-msg.is-success {
    display: block;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.auth-profile-card {
    background: #fffdf7;
    border: 1px solid #e6d5b8;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: var(--fs-menu-oge);
}

.auth-profile-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.auth-roles-wrap {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: flex-end;
}

.auth-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 14px;
    font-size: var(--fs-meta-pill);
    font-weight: 700;
}

.auth-role-badge.role-admin {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.auth-role-badge.role-researcher {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #60a5fa;
}

.auth-role-badge.role-reader {
    background: #e0f2fe;
    color: #075985;
    border: 1px solid #7dd3fc;
}

.btn-auth-danger {
    padding: 0 16px;
    height: 34px;
    background: #dc2626;
    color: #ffffff;
    border: 1px solid #dc2626;
    border-radius: 6px;
    font-weight: 600;
    font-size: var(--fs-menu-oge);
    cursor: pointer;
}

.btn-auth-danger:hover {
    background: #b91c1c;
}

/* 5. Çok Dilli Ayet & Dipnot Editörü */
.editor-top-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.editor-select {
    flex: 1;
    min-width: 220px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #d5cfc5;
    border-radius: 7px;
    background: #ffffff;
    font-family: inherit;
    font-size: var(--fs-menu-oge);
    font-weight: 600;
    color: var(--brand-brown);
    outline: none;
}

.editor-tools-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.editor-tool-btn {
    height: 30px;
    min-width: 30px;
    padding: 0 8px;
    background: #ffffff;
    border: 1px solid #d5cfc5;
    border-radius: 6px;
    font-family: inherit;
    font-size: var(--fs-menu-alt);
    font-weight: 700;
    color: #2c3e50;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.editor-tool-btn sup,
.editor-tool-btn sub {
    font-size: 0.72em;
    line-height: 0;
    position: relative;
}

.editor-tool-btn sup {
    top: -0.42em;
}

.editor-tool-btn sub {
    top: 0.38em;
}

.editor-tool-btn:hover,
.editor-tool-btn.active {
    background: var(--brand-brown);
    border-color: var(--brand-brown);
    color: #ffffff;
}

.editor-tool-sep {
    width: 1px;
    height: 18px;
    background: #dcd5cb;
    margin: 0 2px;
}

/* Özel Karakter Paleti (Şapkalı, Transkripsiyon, Arapça, Hareke) */
.editor-char-panel {
    background: #fffdf7;
    border: 1px solid #e6d5b8;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.editor-char-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 1px dashed #e6d5b8;
    padding-bottom: 6px;
}

.editor-char-tab {
    padding: 4px 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 5px;
    font-family: inherit;
    font-size: var(--fs-menu-alt);
    font-weight: 700;
    color: #576574;
    cursor: pointer;
}

.editor-char-tab.active {
    background: rgba(74, 44, 17, 0.1);
    border-color: rgba(74, 44, 17, 0.25);
    color: var(--brand-brown);
}

.editor-char-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.editor-char-btn {
    min-width: 30px;
    height: 30px;
    padding: 0 6px;
    background: #ffffff;
    border: 1px solid #dcd5cb;
    border-radius: 5px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s ease;
}

.editor-char-btn.is-ar {
    font-family: var(--ar-arab-font);
    font-size: 1.25rem;
    min-width: 34px;
    height: 34px;
}

.editor-char-btn:hover {
    background: var(--brand-brown);
    border-color: var(--brand-brown);
    color: #ffffff;
}

.editor-textarea {
    width: 100%;
    min-height: 115px;
    padding: 10px 12px;
    border: 1px solid #d5cfc5;
    border-radius: 8px;
    background: #ffffff;
    color: #1e293b;
    font-family: var(--tr-tr-font);
    font-size: var(--tr-tr-fs);
    line-height: 1.55;
    resize: vertical;
    outline: none;
}

.editor-textarea:focus {
    border-color: var(--brand-brown);
    box-shadow: 0 0 0 2.5px rgba(74, 44, 17, 0.14);
}

.editor-textarea.mode-arab {
    font-family: var(--ar-arab-font);
    font-size: var(--ar-arab-fs);
    line-height: var(--ar-arab-lh);
    direction: rtl;
    text-align: right;
}

.editor-textarea.mode-utmani {
    font-family: var(--ar-utmani-font);
    font-size: var(--ar-utmani-fs);
    line-height: var(--ar-utmani-lh);
    direction: rtl;
    text-align: right;
}

.editor-textarea.mode-latn {
    font-style: italic;
    color: var(--ana-latn-color);
}

.editor-textarea--dipnot {
    min-height: 78px;
    font-size: var(--fs-dipnot);
}

.editor-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.editor-meta-count {
    font-size: var(--fs-meta-pill);
    color: #64748b;
    font-weight: 600;
}

.editor-preview-box {
    display: none;
    background: #fcfbf9;
    border: 1px dashed #c8b89d;
    border-radius: 8px;
    padding: 10px 12px;
}

.editor-preview-box.active {
    display: block;
}

.editor-preview-box sup,
.editor-preview-box sub {
    font-size: 0.72em;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

.editor-preview-box sup { top: -0.45em; }
.editor-preview-box sub { bottom: -0.25em; }

.editor-preview-title {
    font-size: var(--fs-meta-pill);
    font-weight: 700;
    color: #8c6418;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* 6. Ceylan Derisi Teması (body.theme-parchment) Uyumu */
body.theme-parchment .auth-sheet-box,
body.theme-parchment .editor-sheet-box {
    background: linear-gradient(135deg, #fdf8ee 0%, #f5e7c8 60%, #ebd6ad 100%);
    border: 1.5px solid #c49756;
    border-top: 3.5px solid var(--brand-brown);
    border-radius: 10px 24px 10px 24px;
}

body.theme-parchment .auth-sheet-header,
body.theme-parchment .editor-sheet-header,
body.theme-parchment .auth-sheet-footer,
body.theme-parchment .editor-sheet-footer {
    background: rgba(235, 211, 162, 0.4);
    border-color: #c8ab78;
}

body.theme-parchment .auth-input,
body.theme-parchment .editor-select,
body.theme-parchment .editor-textarea,
body.theme-parchment .editor-char-btn,
body.theme-parchment .editor-tool-btn {
    background: #fffdf8;
    border-color: #c49756;
    color: #2b1d0c;
}

body.theme-parchment .editor-char-panel,
body.theme-parchment .auth-profile-card,
body.theme-parchment .editor-preview-box {
    background: #fdf9f0;
    border-color: #d4b886;
}

@media screen and (max-width: 600px) {
    .user-auth-btn { width: 30px; height: 30px; }
    .ayet-card__top-actions .duzelt-btn span { display: none; }
    .editor-sheet-box { width: 99%; max-height: 95dvh; }
    .auth-sheet-footer,
    .editor-sheet-footer { flex-wrap: wrap; }
}