/* Yardım Merkezi - Beyaz Responsive Tasarım */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    background: #fff;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
.header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 20px;
}

.header-inner {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.header-search {
    display: flex;
    flex: 1;
    min-width: 180px;
    max-width: 320px;
}

.header-search input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.header-search button {
    padding: 8px 16px;
    background: #0066cc;
    color: #fff;
    border: 1px solid #0066cc;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.search-results h2 {
    font-size: 1.2rem;
    margin: 0 0 16px;
}

.search-result-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-result-list li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-result-list a {
    font-weight: 500;
}

.cat-doc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cat-doc-list li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.cat-doc-list a {
    font-weight: 500;
    color: #0066cc;
}

.cat-doc-list a:hover {
    text-decoration: underline;
}

.cat-list-view h2 {
    margin: 0 0 20px;
    font-size: 1.5rem;
}

.search-cat {
    font-size: 0.85rem;
    color: #666;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
}

.logo {
    margin: 0;
    font-size: 1.25rem;
}

.logo a {
    color: #333;
    font-weight: 600;
}

.logo a:hover {
    color: #0066cc;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-badge {
    font-size: 0.85rem;
    color: #28a745;
    font-weight: 500;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background: #0066cc;
    color: #fff !important;
}

.btn-primary:hover {
    background: #0052a3;
}

.btn-outline {
    border-color: #ccc;
    color: #333;
}

.btn-outline:hover {
    background: #f5f5f5;
}

/* Layout */
.layout {
    display: flex;
    max-width: 100%;
    margin: 0 auto;
    min-height: calc(100vh - 60px);
}

/* Sidebar - Tree */
.sidebar {
    width: 280px;
    min-width: 280px;
    border-right: 1px solid #e0e0e0;
    padding: 20px 0;
    background: #fafafa;
}

.sidebar-title {
    font-size: 0.9rem;
    color: #666;
    margin: 0 16px 12px;
    font-weight: 600;
}

.tree-nav {
    padding: 0 8px;
}

.tree-item {
    margin: 0;
}

.tree-link {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: #333;
    font-weight: 600;
    font-size: 17px;
    border-radius: 4px;
}

.tree-link:hover {
    background: #eee;
}

.tree-item.active .tree-link {
    background: #e8f0fe;
    color: #0066cc;
    font-weight: 500;
}

.tree-toggle, .tree-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    flex-shrink: 0;
}

.tree-toggle {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23666' d='M6 4l4 4-4 4V4z'/%3E%3C/svg%3E") no-repeat center;
    transition: transform 0.2s;
}

.tree-item.expanded .tree-toggle {
    transform: rotate(90deg);
}

.tree-children {
    display: none;
    padding-left: 20px;
}

.tree-item.expanded .tree-children {
    display: block;
}

.tree-item[data-level="0"] .tree-children .tree-item {
    padding-left: 0;
}

/* Content */
.content {
    flex: 1;
    padding: 24px 32px;
    background: #fff;
}

.section-title {
    margin: 0 0 16px;
    font-size: 1.1rem;
}

.doc-links {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.doc-links li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.doc-links li a:first-child {
    flex: 1;
}

.doc-actions {
    font-size: 0.85rem;
}

.link-edit, .link-del, .link-move {
    margin-left: 12px;
}

.cat-list-link {
    font-size: 0.9rem;
    padding: 4px 6px;
    color: #666;
    text-decoration: none;
    margin-left: 4px;
}

.cat-list-link:hover {
    color: #0066cc;
}

.tree-actions {
    margin-left: auto;
    display: flex;
    gap: 4px;
}

.tree-actions a {
    font-size: 0.75rem;
    padding: 2px 4px;
    color: #666;
}

.tree-actions a:hover {
    color: #0066cc;
}

.tree-item {
    margin: 0;
}

.tree-cat {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.tree-item .tree-link {
    flex: 1;
    min-width: 0;
}

.tree-doc {
    display: flex;
    align-items: center;
    padding-left: 0;
    margin: 2px 0;
}

.tree-doc .tree-doc-link {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    color: #555;
    font-size: 0.9rem;
    font-size: 13px;
    font-weight: normal;
    line-height: 18px;
}

.tree-doc .tree-doc-link:hover {
    color: #0066cc;
}

.tree-doc.active .tree-doc-link {
    color: #0066cc;
    font-weight: 500;
}

/* Drag & drop sıralama */
.tree-nav [draggable="true"] {
    cursor: grab;
}

.tree-nav [draggable="true"]:active {
    cursor: grabbing;
}

.tree-item.dragging, .tree-doc.dragging {
    opacity: 0.5;
}

.tree-item.drop-before .tree-cat,
.tree-doc.drop-before {
    box-shadow: 0 -2px 0 0 #0066cc;
}

.tree-item.drop-after .tree-cat,
.tree-doc.drop-after {
    box-shadow: 0 2px 0 0 #0066cc;
}

.tree-doc.drop-before, .tree-doc.drop-after {
    border-radius: 4px;
}

.tree-doc-icon {
    width: 12px;
    height: 12px;
    margin-right: 8px;
    background: #ccc;
    border-radius: 2px;
}

.tree-doc.active .tree-doc-icon {
    background: #0066cc;
}

.sidebar-actions {
    padding: 12px 16px;
    border-top: 1px solid #e0e0e0;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.step-edit-block {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    background: #fafafa;
}

.upload-preview {
    position: relative;
}

.upload-preview img {
    position: relative;
}

.img-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #c00;
    color: #fff;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.prev-item {
    position: relative;
    display: inline-block;
    margin: 4px;
}

.prev-item .img-remove {
    position: absolute;
    top: 4px;
    right: 4px;
}

.link-del {
    color: #c00;
}

.empty-msg {
    color: #666;
    margin-bottom: 16px;
}

.welcome {
    color: #666;
}

/* Doc view */
.doc-content {
}

.doc-content h1 {
    font-size: 1.5rem;
    margin: 0 0 20px;
}

.doc-cover {
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
    max-width: 800px;
}

.doc-cover img {
    max-width: 100%;
    height: auto;
    display: block;
}

.cover-upload-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    background: #fafafa;
    cursor: pointer;
    max-width: 400px;
}

.cover-upload-zone:hover,
.cover-upload-zone.dragover {
    border-color: #0066cc;
    background: #e8f4fd;
}

.cover-preview {
    margin-top: 12px;
}

.cover-preview img {
    max-width: 400px;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    padding: 4px;
    border: 1px solid #eee;
}

.cover-preview .cover-remove {
    margin-top: 8px;
}

.adm-block {
    background: linear-gradient(135deg, #e8f4fd 0%, #d4e9f7 100%);
    border-left: 4px solid #0066cc;
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 0 4px 4px 0;
    font-weight: 500;
}

.adm-block .adm-menu-path {
    display: inline-block;
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #adb5bd;
    padding: 6px 14px;
    margin: 0 4px;
    border-radius: 4px;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    font-family: inherit;
}

/* SEKME - Tab başlığı tasarımı */
.sekme-block {
    margin: 16px 0;
}

.sekme-tab-bar {
    display: inline-flex;
    align-items: center;
    background: #4a5f7f;
    color: #fff;
    padding: 10px 16px;
    border-radius: 6px 6px 0 0;
    font-weight: 500;
}

.sekme-tab-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f4d03f'%3E%3Cpath d='M10 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.sekme-instruction {
    margin: 12px 0 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
    margin: 0px;
    padding: 12px;
    background: #ffefad;
    border-radius: 4px;
}

/* Step içerik editörü toolbar */
.step-editor-toolbar {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.step-editor-toolbar .step-tool-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
}

.step-editor-toolbar .btn-adm { background: #e8f4fd; border-color: #0066cc; color: #0066cc; }
.step-editor-toolbar .btn-sekme { background: #e8eaf6; border-color: #3f51b5; color: #3f51b5; }
.step-editor-toolbar .btn-tooldesc { background: #fef3e2; border-color: #e67e22; color: #e67e22; }
.step-editor-toolbar .btn-step-inner { background: #f0f9f0; border-color: #28a745; color: #28a745; }
.step-editor-toolbar .btn-source { background: #f5f5f5; border-color: #999; color: #555; }

.step-inner-block {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 12px 0;
    background: #f8f9fa;
}

.step-inner-block .step-inner-title {
    font-weight: 600;
    color: #333;
}

.step-block {
    border-radius: 8px;
    padding: 0px;
    background: #fff;
}

.step-block h3 {
    margin: 0 0 12px;
    font-size: 1.72rem;
    border-top: 11px solid #0000000d;
    padding-top: 15px;
    margin-top: 23px;
}

.step-images {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px 0;
    max-width: 875px;
}

.step-images img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #eee;
}

.step-video {
    margin: 12px 0;
}

.step-video iframe {
    max-width: 100%;
    border-radius: 4px;
}

/* Form */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    max-width: 500px;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    min-height: 120px;
}

/* Editor toolbar */
.editor-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.editor-toolbar button {
    padding: 8px 14px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.editor-toolbar button:hover {
    background: #f5f5f5;
}

.editor-toolbar .btn-adm {
    background: #e8f4fd;
    border-color: #0066cc;
    color: #0066cc;
}

.editor-toolbar .btn-step {
    background: #f0f9f0;
    border-color: #28a745;
    color: #28a745;
}

.editor-toolbar .btn-sekme {
    background: #e8eaf6;
    border-color: #3f51b5;
    color: #3f51b5;
}

.editor-toolbar .btn-tooldesc {
    background: #fef3e2;
    border-color: #e67e22;
    color: #e67e22;
}

.editor-toolbar .btn-source {
    background: #f5f5f5;
    border-color: #999;
    color: #555;
}

/* TOOLDESC dialog */
.tooldesc-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.tooldesc-dialog {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    min-width: 400px;
    max-width: 90%;
}

.tooldesc-dialog h3 {
    margin: 0 0 20px;
    font-size: 1.1rem;
}

.tooldesc-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* RELATED dialog */
.related-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.related-dialog {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    min-width: 400px;
    max-width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.related-dialog h3 {
    margin: 0 0 16px;
    font-size: 1.1rem;
}

.related-dialog #relatedSearch {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.related-results {
    list-style: none;
    padding: 0;
    margin: 12px 0;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.related-results li {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.related-results li:last-child {
    border-bottom: none;
}

.related-results li:hover {
    background: #f0f7ff;
}

.related-hint {
    margin: 8px 0;
    color: #666;
    font-size: 0.9rem;
}

.related-close {
    margin-top: 12px;
}

/* TOOLDESC (görüntüleme) */
.tooldesc {
    border-radius: 6px;
    padding: 6px;
    margin: 0px 0;
    background: #ffffff;
    display: flex;
    align-items: center;
}

.tooldesc .tooldesc-label {
    font-weight: 600;
    color: #333;
    font-weight: 600;
    margin-right: 15px;
    min-width: 180px;
    padding-left: 15px;
}

.tooldesc .tooldesc-value {
    color: #555;
    line-height: 1.5;
    white-space: pre-wrap;
    display: block;
    width: 100%;
    height: 39px;
    padding: 8px 13px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #000000;
    background-color: #fdfdfd;
    background-image: none;
    border: 1px solid #b0b0b094;
    border-radius: 2px;
    box-shadow: none;
    transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
    box-shadow: 2px 2px 5px #00000012 inset;
    font-size: 14px;
    font-weight: 400;
    font-family: 'Rubik',sans-serif;
    padding-top: 14px;
    padding-bottom: 14px;
    display: flex;
    align-items: center;
}

/* Upload area */
.upload-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    background: #fafafa;
    margin: 8px 0;
}

.upload-zone.dragover {
    border-color: #0066cc;
    background: #e8f4fd;
}

.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

/* File upload (.zip) */
.file-upload-zone {
    border: 2px dashed #0066cc;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    background: #f0f7ff;
    margin: 8px 0;
    cursor: pointer;
    color: #0066cc;
    font-weight: 500;
}

.file-upload-zone:hover {
    background: #e8f4fd;
    border-color: #0052a3;
}

.file-upload-zone.dragover {
    border-color: #0052a3;
    background: #d6ebff;
}

.file-preview {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.file-prev-item,
.doc-file-item,
.step-file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.file-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.file-name {
    flex: 1;
    font-weight: 500;
    color: #333;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-download {
    flex-shrink: 0;
    font-weight: 600;
    padding: 10px 20px;
    text-decoration: none !important;
}

.btn-download:hover {
    background: #0052a3 !important;
}

.file-remove {
    background: #dc3545;
    color: #fff;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    flex-shrink: 0;
}

.file-remove:hover {
    background: #c82333;
}

.upload-preview img {
    max-width: 120px;
    max-height: 120px;
    object-fit: cover;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .content {
        padding: 16px;
    }
}
