/* Temel CSS değişkenleri */
:root {
    --bg-primary: #020617;
    --bg-secondary: #0f172a;
    --accent-primary: #3b82f6;
    --accent-secondary: #60a5fa;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --danger: #ef4444;
    --success: #22c55e;
    --input-bg: rgba(15, 23, 42, 0.5);
    --card-bg: rgba(15, 23, 42, 0.7);
}

/* Genel stiller */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

body {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    min-height: 100vh;
    color: var(--text-primary);
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(96, 165, 250, 0.1) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header ve Tab stilleri */
.admin-header {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.tab-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.tabs {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.tab-button {
    padding: 0.25rem 1.5rem;
    border-radius: 0.5rem;
    color: var(--text-secondary);
    background: var(--input-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tab-button.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
}

/* Panel Kartları */
.panel-card {
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.75rem;
    margin-bottom: 2rem;
}

.panel-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Settings Card Stilleri */
.settings-card {
    background: rgba(30, 41, 59, 0.4);
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.settings-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.settings-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.5);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-section-title .material-icons {
    font-size: 1.25rem;
    color: #60a5fa;
}

.settings-section-content {
    padding: 1.5rem;
}

/* Form Element Stilleri */
.form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.form-group small {
    display: block;
    margin-top: 0.375rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: white;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
    outline: none;
}

.form-control:disabled, .form-control[readonly] {
    background-color: rgba(15, 23, 42, 0.7);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Özel Checkbox Stilleri */
.checkbox-container {
    display: flex;
    align-items: flex-start;
    margin-top: 2.5rem;
}

.custom-checkbox {
    position: absolute;
    opacity: 0;
    height: 0;
    width: 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

.checkbox-custom {
    position: relative;
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.25rem;
    background: rgba(15, 23, 42, 0.5);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.custom-checkbox:checked + .checkbox-label .checkbox-custom {
    background: #3b82f6;
    border-color: #3b82f6;
}

.checkbox-custom:after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: all 0.2s ease;
}

.custom-checkbox:checked + .checkbox-label .checkbox-custom:after {
    opacity: 1;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.25rem 1.5rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: white;
    margin-bottom: 0rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}

.btn-danger {
    background: var(--danger);
    color: white;
    margin-bottom: 0rem;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
}

/* Alert Boxes */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert:before {
    font-family: 'Material Icons';
    font-size: 1.25rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.alert-success:before {
    content: 'check_circle';
    color: var(--success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.alert-error:before {
    content: 'error';
    color: var(--danger);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--accent-primary);
}

.alert-info:before {
    content: 'info';
    color: var(--accent-primary);
}

/* Tab Content Animation */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

.neon-glow {
    text-shadow: 0 0 10px var(--accent-primary),
                 0 0 20px var(--accent-primary),
                 0 0 30px var(--accent-primary);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Analytics Styles */
.analytics-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(15, 23, 42, 0.5);
    transform: translateY(-2px);
}

.stat-card h3 {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-card div {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 600;
}

.analytics-chart-container {
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 2rem;
    height: 400px;
    position: relative;
}

.visitors-list-container {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.visitors-list-container::-webkit-scrollbar {
    width: 6px;
}

.visitors-list-container::-webkit-scrollbar-track {
    background: transparent;
}

.visitors-list-container::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.visitors-list-container::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.visitor-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    transition: background-color 0.2s ease;
}

.visitor-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Firma Kodları Stilleri */
.firm-code-add {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.firm-code-add .form-group {
    flex: 1;
    min-width: 200px;
}

.firm-code-item {
    margin-bottom: 1rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.firm-code-item:hover {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.firm-code-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
}

.firm-code-inputs {
    display: flex;
    flex: 1;
    gap: 1rem;
    flex-wrap: wrap;
}

.firm-code-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Language Selector */
.lang-selector {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.lang-select {
    padding: 0.5rem 1rem;
    background: var(--input-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

.lang-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Navigation */
.nav-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.redirect-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.redirect-btn:hover {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Utils */
.mt-4 {
    margin-top: 1rem;
}

.mt-5 {
    margin-top: 1.25rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.ml-auto {
    margin-left: auto;
}

.mb-4 {
    margin-bottom: 1rem;
}

.text-secondary {
    color: var(--text-secondary);
}

.text-sm {
    font-size: 0.875rem;
}

/* Grid Classes */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .grid, .grid-cols-2, .grid-cols-3 {
        grid-template-columns: 1fr;
    }

    .tab-container {
        flex-direction: column;
    }

    .tabs {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 0.5rem;
    }

    .tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-button {
        white-space: nowrap;
    }

    .settings-section-title {
        flex-wrap: wrap;
    }

    .settings-section-title small {
        width: 100%;
        margin-top: 0.5rem;
    }

    .firm-code-add, .firm-code-inputs {
        flex-direction: column;
    }

    .firm-code-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 1rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* Dil çeviri tablosu stilleri */
/* Sticky Buton Container */
.sticky-button-container {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 -1.75rem -1.75rem -1.75rem; /* Panel card padding'ini dengelemek için */
    z-index: 100;
    pointer-events: none; /* Alt katmanların tıklamasını engellememesi için */
}

.sticky-button-wrapper {
    background: linear-gradient(to top, 
        rgba(15, 23, 42, 0.95) 50%, 
        rgba(15, 23, 42, 0.8) 80%, 
        rgba(15, 23, 42, 0) 100%);
    padding: 2rem 2rem 1.5rem;
    display: flex;
    justify-content: center;
    pointer-events: auto; /* Butonun tıklanabilir olması için */
}

.top-actions-bar {
    margin-bottom: 1.5rem;
}

/* Dil çeviri tablosu stilleri */
.language-columns {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 80px; /* Alt buton alanına boşluk bırak */
}

.translations-table {
    width: 100%;
    border-collapse: collapse;
}

.translations-table th {
    text-align: left;
    padding: 10px;
    background: rgba(15, 23, 42, 0.7);
    color: white;
    font-weight: 500;
    position: sticky;
    top: 0;
    z-index: 10;
}

.translations-table td {
    padding: 6px 10px;
    vertical-align: top;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.translations-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.key-cell {
    word-break: break-all;
    color: var(--text-secondary);
    font-family: monospace;
    font-size: 0.75rem;
}

.key-wrapper {
    max-width: 100%;
    overflow-x: hidden;
    text-overflow: ellipsis;
}

.translation-input {
    font-size: 0.875rem !important;
    padding: 0.5rem 0.75rem !important;
}

/* Tablo görünümü için duyarlı tasarım */
@media (max-width: 768px) {
    .translations-table {
        min-width: 760px; /* Tablonun minimum genişliği */
    }
    
    .sticky-button-wrapper {
        padding: 1.5rem 1rem 1rem;
    }
}

/* Popup bildirim stili */
.admin-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    min-width: 300px;
    max-width: 400px;
    background: rgba(15, 23, 42, 0.9);
    border-left: 4px solid #3b82f6;
    backdrop-filter: blur(10px);
    border-radius: 0.5rem;
    padding: 1rem;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.admin-notification-success {
    border-left-color: #22c55e;
}

.admin-notification-error {
    border-left-color: #ef4444;
}

.admin-notification-show {
    transform: translateY(0);
    opacity: 1;
}

.admin-notification-hide {
    transform: translateY(100px);
    opacity: 0;
}

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

.notification-content .material-icons {
    font-size: 24px;
    color: #3b82f6;
}

.admin-notification-success .notification-content .material-icons {
    color: #22c55e;
}

.admin-notification-error .notification-content .material-icons {
    color: #ef4444;
}

.notification-content span:last-child {
    color: white;
    font-size: 0.875rem;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0;
    margin-left: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.notification-close:hover {
    color: white;
}

.notification-close .material-icons {
    font-size: 20px;
}