/* Genel Stiller */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    overflow: hidden;
}

/* Admin Container */
.admin-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sol Sidebar */
.sidebar {
    width: 320px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.sidebar-header {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.logo-section {
    flex-shrink: 0;
}

.title-section {
    flex: 1;
}

.brand-logo {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.brand-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.system-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 2px;
}

.logo-main {
    color: #ffffff;
    font-weight: 700;
}

.logo-acronym {
    background: linear-gradient(135deg, #a8e6cf, #88d8c0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    text-shadow: none;
    position: relative;
}

.logo-acronym::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(135deg, #a8e6cf, #88d8c0);
    border-radius: 1px;
}

.logo-acronym-expansion {
    font-size: 0.7rem;
    color: #a8e6cf;
    font-weight: 600;
    margin: 3px 0 0 0;
    opacity: 0.9;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-align: left;
}

.sidebar-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.sidebar-content .form-section h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: white;
}

/* Sağ Ana İçerik */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
}

/* Üst Navbar */
.top-navbar {
    background: white;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.navbar-row-1 {
    padding: 10px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

.navbar-row-2 {
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-left {
    display: flex;
    align-items: center;
}

.document-title-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.document-title-section label {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.document-title-section input {
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
    min-width: 250px;
}

.document-title-section input:focus {
    outline: none;
    border-color: #667eea;
}

.navbar-right {
    display: flex;
    align-items: center;
}

.navbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* Base Dropdown Settings */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background-color: white;
    min-width: 220px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    border: 1px solid #e9ecef;
    z-index: 1001;
    overflow: hidden;
}

.dropdown-menu.show {
    display: block;
    animation: fadeInDropdown 0.2s ease;
}

.dropdown-menu a {
    color: #495057;
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-menu a i.icon {
    font-size: 1.1rem;
}

.dropdown-menu a:hover {
    background-color: #f8f9fa;
    color: #667eea;
}

.dropdown-menu a:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.template-dropdown {
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    color: #333;
    min-width: 200px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.template-dropdown:focus {
    outline: none;
    border-color: #667eea;
}

.template-dropdown option {
    padding: 8px;
}

.template-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.template-selector {
    position: relative;
    min-width: 300px;
    width: 350px;
}

.template-selector-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
    font-size: 0.9rem;
    color: #333;
}

.template-selector-header input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 0.88rem;
    color: #333;
    cursor: text;
    padding: 2px 4px;
}

.template-selector-header:hover {
    border-color: #667eea;
}

.template-selector-header .icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.template-selector.active .template-selector-header .icon {
    transform: rotate(180deg);
}

.template-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.template-selector.active .template-list {
    display: block;
}

.template-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.template-item:last-child {
    border-bottom: none;
}

.template-item:hover {
    background-color: #f8f9fa;
}

.template-item.selected {
    background-color: #667eea;
    color: white;
}

.template-item-name {
    flex: 1;
    font-size: 0.9rem;
}

.template-item-date {
    font-size: 0.8rem;
    color: #666;
    margin-left: 8px;
}

.template-item.selected .template-item-date {
    color: #ccc;
}

.template-item-delete {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 3px;
    font-size: 0.8rem;
    margin-left: 8px;
    transition: all 0.2s ease;
}

.template-item-delete:hover {
    background-color: #dc3545;
    color: white;
}

.template-item.selected .template-item-delete {
    color: #ff6b6b;
}

.template-item.selected .template-item-delete:hover {
    background-color: #ff6b6b;
    color: white;
}

/* Ana İçerik Alanı */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 0;
    margin: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: #f8f9fa;
    color: #333;
}

.tab-btn.active {
    background: #667eea;
    color: white;
    border-bottom-color: #5a6fd8;
}

.tab-btn .icon {
    font-size: 1.1rem;
}

/* Tab Content */
.tab-content {
    flex: 1;
    overflow: hidden;
}

.tab-panel {
    display: none;
    height: 100%;
    overflow: hidden;
}

.tab-panel.active {
    display: block;
}

/* Editor Section */
.editor-section {
    height: 100%;
    padding: 20px;
    background: white;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Editor Layout - Yer Tutucular ve Düzenleme Alanı Yan Yana */
.editor-layout {
    display: flex;
    flex: 1;
    min-height: 0;
    gap: 20px;
    overflow: hidden;
}

/* Sol: Yer Tutucular Sidebar (%30) */
.placeholders-sidebar {
    width: 30%;
    min-width: 280px;
    max-width: 350px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    overflow-y: auto;
    padding: 15px;
}

/* Sağ: Düzenleme Alanı (%70) */
.editor-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    /* Flexbox overflow için gerekli */
}

/* Preview Section */
.preview-section {
    height: 100%;
    padding: 20px;
    background: white;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Placeholder Section */
.placeholder-section {
    background: transparent;
    border-radius: 8px;
    padding: 0;
    margin-bottom: 0;
    border: none;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.placeholder-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    padding: 0 0 15px 0;
    border-bottom: 1px solid #e9ecef;
}

.placeholder-actions .btn {
    flex: 1;
    font-size: 0.9rem;
    padding: 8px 12px;
}

.placeholder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.placeholder-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.placeholder-settings-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
    color: #666;
}

.placeholder-settings-btn:hover {
    background: #f8f9fa;
    color: #333;
    transform: scale(1.1);
}

.placeholder-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 20px;
}

.placeholder-btn {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    background: white;
    color: #495057;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.placeholder-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-1px);
}

/* Editor Container */
.editor-container {
    flex: 1;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.editor-container .tox-tinymce {
    border: none !important;
    flex: 1;
}

/* Form Container (Sidebar) */
.form-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    min-height: 200px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.no-form-message {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    padding: 20px;
}

/* Preview Container */
.preview-container {
    flex: 1;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.no-preview-message {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-icon {
    padding: 8px 10px;
    font-size: 1rem;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: #e9ecef;
    color: #333;
    transform: translateY(-1px);
}

.btn-icon .icon {
    font-size: 1.1rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    padding: 20px;
    box-sizing: border-box;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 60%;
    max-height: 80%;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
    margin: 0 auto;
    position: relative;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: #f8f9fa;
    padding: 15px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

.close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close:hover {
    background: #e9ecef;
    color: #333;
}

.modal-body {
    padding: 20px 25px;
    max-height: 70vh;
    overflow-y: auto;
}

.large-modal .modal-content {
    width: 95%;
    max-width: 1400px;
    min-width: 1000px;
}


.load-options {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.load-option {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    min-width: 400px;
}

.load-option:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.load-option h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1rem;
}

.load-option input[type="file"] {
    width: 100%;
    margin-bottom: 10px;
}

.load-option p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.saved-template-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

#savedTemplatesDropdown {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.modal-preview-container {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Notification Container */
.notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.notification {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid #667eea;
    position: relative;
    overflow: hidden;
}

.notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.notification-icon {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.notification-message {
    font-size: 0.9rem;
    color: #333;
}

.notification-close {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.notification-close:hover {
    background: #f8f9fa;
    color: #333;
}

.notification-success {
    border-left-color: #28a745;
}

.notification-success .notification-icon {
    color: #28a745;
}

.notification-danger {
    border-left-color: #dc3545;
}

.notification-danger .notification-icon {
    color: #dc3545;
}

.notification-warning {
    border-left-color: #ffc107;
}

.notification-warning .notification-icon {
    color: #ffc107;
}

.notification-info {
    border-left-color: #17a2b8;
}

.notification-info .notification-icon {
    color: #17a2b8;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.notification.removing {
    animation: slideOutRight 0.3s ease forwards;
}

/* Modal Alert Styles */
.modal-alert-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-alert-container.show {
    display: flex;
}

.modal-alert {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    animation: modalAlertSlideIn 0.3s ease;
    overflow: hidden;
}

@keyframes modalAlertSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-alert-header {
    padding: 20px 20px 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-alert-icon {
    font-size: 1.5rem;
    width: 30px;
    text-align: center;
}

.modal-alert-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.modal-alert-body {
    padding: 15px 20px;
}

.modal-alert-message {
    font-size: 1rem;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

.modal-alert-footer {
    padding: 0 20px 20px 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-alert-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-alert-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.modal-alert-btn-primary {
    background: #667eea;
    color: white;
}

.modal-alert-btn-primary:hover {
    background: #5a6fd8;
}

.modal-alert-btn-secondary {
    background: #6c757d;
    color: white;
}

.modal-alert-btn-secondary:hover {
    background: #5a6268;
}

.modal-alert-btn-danger {
    background: #dc3545;
    color: white;
}

.modal-alert-btn-danger:hover {
    background: #c82333;
}

.modal-alert-success .modal-alert-icon {
    color: #28a745;
}

.modal-alert-danger .modal-alert-icon {
    color: #dc3545;
}

.modal-alert-warning .modal-alert-icon {
    color: #ffc107;
}

.modal-alert-info .modal-alert-icon {
    color: #17a2b8;
}

/* Placeholder Settings Modal Styles */
.placeholder-settings-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    min-height: 500px;
}

.existing-placeholders-list,
.add-placeholder-form {
    min-width: 350px;
    padding: 32px 28px;
    box-sizing: border-box;
}

.existing-placeholders h3,
.add-placeholder-section h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.existing-placeholders-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
}

.existing-placeholder-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.existing-placeholder-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.existing-placeholder-item:last-child {
    margin-bottom: 0;
}

.existing-placeholder-info {
    flex: 1;
}

.existing-placeholder-code {
    font-weight: 600;
    color: #667eea;
    font-size: 0.9rem;
}

.existing-placeholder-label {
    color: #666;
    font-size: 0.8rem;
    margin-top: 2px;
}

.existing-placeholder-actions {
    display: flex;
    gap: 5px;
}

.existing-placeholder-actions .btn {
    padding: 4px 8px;
    font-size: 0.7rem;
}

.add-placeholder-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    min-height: 400px;
}

.add-placeholder-form .form-group {
    margin-bottom: 15px;
}

.add-placeholder-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.add-placeholder-form input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
}

.add-placeholder-form input:focus {
    outline: none;
    border-color: #667eea;
}

.add-placeholder-form .btn {
    width: 100%;
    margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .sidebar {
        width: 280px;
    }

    .placeholder-settings-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .existing-placeholders-list,
    .add-placeholder-form {
        min-width: 0;
        padding: 20px 10px;
    }
}

@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        max-height: 200px;
    }

    .main-content {
        height: calc(100vh - 200px);
    }

    .top-navbar {
        padding: 0;
    }

    .navbar-row-1 {
        padding: 10px 15px;
        flex-direction: column;
        gap: 10px;
    }

    .navbar-row-2 {
        padding: 10px 15px;
        flex-direction: column;
        gap: 10px;
    }

    .navbar-actions {
        justify-content: center;
        width: 100%;
    }

    .template-controls {
        flex-direction: column;
        gap: 5px;
        width: 100%;
    }

    .template-selector {
        min-width: auto;
        width: 100%;
        max-width: 400px;
    }

    .template-list {
        max-height: 150px;
    }

    .document-title-section {
        width: 100%;
    }

    .document-title-section input {
        min-width: auto;
        width: 100%;
    }

    .tab-btn {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    /* Editor Layout için responsive ayarlar */
    .editor-layout {
        flex-direction: column;
        gap: 15px;
    }

    .placeholders-sidebar {
        width: 100%;
        min-width: auto;
        max-width: none;
        max-height: 300px;
    }

    .editor-main {
        flex: 1;
        min-height: 400px;
    }

    .placeholder-buttons {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .placeholder-actions {
        flex-direction: column;
        gap: 6px;
    }

    .placeholder-settings-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .load-options {
        flex-direction: column;
        gap: 20px;
    }

    .load-option {
        min-width: auto;
        padding: 20px;
    }

    .notification-container {
        left: 20px;
        right: 20px;
        max-width: none;
    }

    .modal-alert {
        max-width: 350px;
        width: 95%;
    }

    .modal-alert-header {
        padding: 15px 15px 0 15px;
    }

    .modal-alert-body {
        padding: 10px 15px;
    }

    .modal-alert-footer {
        padding: 0 15px 15px 15px;
    }

    /* Modal Responsive */
    .modal {
        padding: 10px;
    }

    .modal-content {
        max-width: 90%;
        min-width: 280px;
    }

    .modal-body {
        padding: 20px;
    }

    /* Import/Export Modal Responsive */
    .import-options,
    .export-options {
        gap: 12px;
    }

    .import-option,
    .export-option {
        padding: 12px;
    }

    .import-option h3,
    .export-option h3 {
        font-size: 1.1rem;
    }

    .import-option p,
    .export-option p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .system-title {
        font-size: 1.8rem;
        gap: 1px;
    }

    .logo-acronym-expansion {
        font-size: 0.6rem;
    }

    .system-subtitle {
        font-size: 0.9rem;
    }

    .tab-btn {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    .tab-btn .icon {
        font-size: 1rem;
    }

    .btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .navbar-row-1 {
        padding: 8px 10px;
    }

    .navbar-row-2 {
        padding: 8px 10px;
    }

    .navbar-actions {
        gap: 5px;
    }

    .btn-icon {
        min-width: 35px;
        height: 35px;
        padding: 6px 8px;
    }

    .template-controls {
        gap: 3px;
    }

    .template-selector {
        min-width: 200px;
        width: 100%;
    }

    .template-selector-header {
        font-size: 0.8rem;
        padding: 6px 8px;
    }

    .template-item {
        padding: 6px 8px;
    }

    .template-item-name {
        font-size: 0.8rem;
    }

    .template-item-date {
        font-size: 0.7rem;
    }

    .modal-content {
        width: 95%;
        margin: 10px;
    }

    .large-modal .modal-content {
        min-width: auto;
        max-width: 95%;
    }

    .modal-alert {
        max-width: 300px;
        width: 95%;
    }

    .modal-alert-title {
        font-size: 1.1rem;
    }

    .modal-alert-message {
        font-size: 0.9rem;
    }

    .modal-alert-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    /* Editor Layout için küçük ekran ayarları */
    .editor-section {
        padding: 10px;
        margin: 10px;
    }

    .editor-layout {
        gap: 10px;
    }

    .placeholders-sidebar {
        max-height: 250px;
        padding: 10px;
    }

    .editor-main {
        min-height: 350px;
    }

    .placeholder-buttons {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 6px;
    }

    .placeholder-actions {
        flex-direction: column;
        gap: 4px;
    }

    .placeholder-actions .btn {
        font-size: 0.8rem;
        padding: 6px 10px;
    }

    .placeholder-btn {
        padding: 6px 8px;
        font-size: 0.7rem;
    }
}

/* TinyMCE Styles */
.tox-tinymce {
    border: none !important;
}

.tox .tox-toolbar {
    background: #f8f9fa !important;
    border-bottom: 1px solid #e9ecef !important;
}

.tox .tox-toolbar__group {
    border-right: 1px solid #e9ecef !important;
}

.tox .tox-tbtn {
    background: transparent !important;
}

/* Editör container'ı için yükseklik ayarı */
.editor-container .tox-tinymce {
    height: 100% !important;
}

.tox .tox-tbtn:hover {
    background: #e9ecef !important;
    color: #333 !important;
}

.tox .tox-tbtn--enabled {
    background: #667eea !important;
    color: white !important;
}

.tox .tox-tbtn--enabled:hover {
    background: #5a6fd8 !important;
}

/* Document Content Styles */
.document-content {
    font-family: 'Times New Roman', serif;
    font-size: 12pt;
    line-height: 1.5;
    color: #000000;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.document-content h1 {
    font-size: 18pt;
    font-weight: bold;
    text-align: center;
    margin: 0 0 20pt 0;
    padding: 0;
    color: #000000;
}

.document-content h2 {
    font-size: 14pt;
    font-weight: bold;
    margin: 16pt 0 8pt 0;
    padding: 0;
    color: #000000;
}

.document-content h3 {
    font-size: 12pt;
    font-weight: bold;
    margin: 12pt 0 6pt 0;
    padding: 0;
    color: #000000;
}

.document-content p {
    margin: 0 0 8pt 0;
    padding: 0;
    color: #000000;
}

.document-content ul,
.document-content ol {
    margin: 0 0 8pt 0;
    padding-left: 20pt;
    color: #000000;
}

.document-content li {
    margin: 0 0 4pt 0;
    color: #000000;
}

.document-content strong {
    font-weight: bold;
}

.document-content em {
    font-style: italic;
}

/* Placeholder vurgulama stilleri */
.document-content .placeholder-highlight {
    background-color: #ffffcc;
    border: 1px solid #cccccc;
    padding: 2px 4px;
    font-weight: bold;
    color: #856404;
    border-radius: 3px;
    display: inline-block;
    margin: 0 1px;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px;
    font-size: 0.9rem;
    background: #ffffff !important;
    color: #0f172a !important;
    transition: all 0.3s ease;
}

/* Form yer tutucu (placeholder) silikleştirme - Chrome/Safari/Firefox Uyumlu */
.form-control::placeholder {
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
    opacity: 0.45 !important;
    font-weight: 300 !important;
}

.form-control::-webkit-input-placeholder {
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
    opacity: 0.45 !important;
    font-weight: 300 !important;
}

.form-control::-moz-placeholder {
    color: #94a3b8 !important;
    opacity: 0.45 !important;
    font-weight: 300 !important;
}

.form-control:-ms-input-placeholder {
    color: #94a3b8 !important;
    opacity: 0.45 !important;
    font-weight: 300 !important;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Chrome / Edge / Safari Otomatik Doldurma (Autofill) Düzeltmesi */
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover, 
.form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #0f172a !important;
    transition: background-color 5000s ease-in-out 0s;
}

input.form-control,
textarea.form-control {
    color: #0f172a !important;
    background-color: #ffffff !important;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* Tarih input wrapper stilleri */
.date-input-wrapper {
    position: relative;
    width: 100%;
}

.date-input-wrapper .form-control {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    padding-right: 40px;
    width: 100%;
}

.date-input-wrapper .form-control:focus {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: #3b82f6 !important;
}

.date-input-wrapper input[type="date"] {
    background: transparent;
    border: none;
    color: transparent;
}

.date-input-wrapper input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 1;
    cursor: pointer;
    filter: invert(1);
    font-size: 16px;
    width: 20px;
    height: 20px;
}

.date-input-wrapper input[type="date"]:hover::-webkit-calendar-picker-indicator {
    opacity: 0.7;
    transform: scale(1.1);
    transition: all 0.2s ease;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease;
}

/* TCKN ve VKN alanları için özel stiller */
.form-control[data-placeholder="TCKN"],
.form-control[data-placeholder="VKN"] {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 1px;
    text-align: center;
    color: #333333;
    background-color: #ffffff;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

/* TCKN ve VKN için geçerli durum (yeşil) */
.form-control[data-placeholder="TCKN"]:valid,
.form-control[data-placeholder="VKN"]:valid {
    border-color: #28a745;
    background-color: #f8fff9;
    color: #333333;
}

/* TCKN ve VKN için geçersiz durum (kırmızı) */
.form-control[data-placeholder="TCKN"]:invalid:not(:placeholder-shown),
.form-control[data-placeholder="VKN"]:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
    background-color: #fff8f8;
    color: #333333;
}

/* TCKN ve VKN için focus durumu */
.form-control[data-placeholder="TCKN"]:focus,
.form-control[data-placeholder="VKN"]:focus {
    border-color: #667eea;
    background-color: #ffffff;
    color: #333333;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Checkbox stilleri */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 10px;
    user-select: none;
}

.checkbox-label.small {
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 18px;
    width: 18px;
    background-color: #ffffff;
    border: 2px solid #007bff;
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.checkbox-label.small .checkmark {
    height: 14px;
    width: 14px;
    margin-right: 6px;
}

.checkbox-label:hover .checkmark {
    border-color: #0056b3;
    background-color: #f8f9ff;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.2);
}

.checkbox-label input:checked~.checkmark {
    background-color: #28a745;
    border-color: #28a745;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.sidebar .checkbox-label {
    color: rgba(255, 255, 255, 0.9);
}

.sidebar .checkbox-label .checkmark {
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.sidebar .checkbox-label:hover .checkmark {
    border-color: rgba(255, 255, 255, 0.5);
}

.sidebar .checkbox-label input:checked~.checkmark {
    background-color: #28a745;
    border-color: #28a745;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

.checkbox-label.small .checkmark:after {
    left: 3px;
    top: 1px;
    width: 3px;
    height: 6px;
}

.checkbox-label input:checked~.checkmark:after {
    display: block;
}

.radio-label {
    display: block;
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}

.radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.radiomark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #ffffff;
    border: 2px solid #007bff;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.radio-label:hover input~.radiomark {
    background-color: #f8f9ff;
    border-color: #0056b3;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.2);
}

.radio-label input:checked~.radiomark {
    background-color: #fff;
    border-color: #28a745;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.radiomark:after {
    content: "";
    position: absolute;
    display: none;
}

.radio-label input:checked~.radiomark:after {
    display: block;
}

.radio-label .radiomark:after {
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28a745;
}

.sidebar .radio-label {
    color: rgba(255, 255, 255, 0.9);
}

.sidebar .radio-label .radiomark {
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.sidebar .radio-label:hover .radiomark {
    border-color: rgba(255, 255, 255, 0.5);
}

.sidebar .radio-label input:checked~.radiomark {
    background-color: transparent;
    border-color: #28a745;
}

.sidebar .radio-label .radiomark:after {
    background: #28a745;
}

.checkbox-container,
.radio-container {
    margin-bottom: 10px;
}

.checkbox-wrapper,
.radio-wrapper {
    margin-bottom: 5px;
}

/* Tarih rozeti */
.date-badge {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 8px;
    display: inline-block;
}

/* Yer tutucu aksiyonları grubu */
.placeholder-actions-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.placeholder-actions-group .checkbox-label {
    margin-bottom: 0;
    white-space: nowrap;
}

select.form-control {
    background: #fff;
    color: #333;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
    padding: 8px 12px;
    transition: all 0.3s ease;
}

select.form-control:focus {
    outline: none;
    border-color: #667eea;
    background: #f8f9fa;
    color: #222;
}

/* History Modal Enhanced Styles */
#historyModal .modal-content {
    width: 90%;
    max-width: 950px;
    max-height: 85vh;
}

.history-item-compact {
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.history-item-compact:hover {
    border-color: #a5b4fc !important;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.12) !important;
}

.history-tags-bar {
    background: #f8fafc;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 12px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.history-tag-chip {
    padding: 4px 10px;
    border-radius: 16px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.history-tag-chip:hover {
    border-color: #667eea;
    color: #667eea;
    background: #f0f3ff;
}

.history-tag-chip.active {
    background: #667eea;
    color: #ffffff;
    border-color: #667eea;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(102, 126, 234, 0.3);
}

.history-tag-chip .chip-count {
    font-size: 0.72rem;
    opacity: 0.85;
}

.history-field-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 6px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    font-size: 0.82rem;
    color: #334155;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-field-pill.active-tag-pill {
    background: #e0e7ff;
    border-color: #818cf8;
    color: #3730a3;
    font-weight: 600;
}

/* Form Inline Validation Details */
.form-control.is-invalid {
    border-color: #dc3545 !important;
    background-color: #fff8f8 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15) !important;
}

.invalid-feedback {
    color: #dc3545;
    font-size: 0.78rem;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    line-height: 1.3;
}