/* İHARS koyu tema. Sayfa içi stillerden sonra gelsin diye !important kullanılır. */

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: calc(100% - 24px);
    margin: 0 12px 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.2;
}

.theme-toggle:hover {
    border-color: #008080;
    color: #0f766e;
}

.theme-toggle-floating {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1100;
    width: auto;
    margin: 0;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.sidebar.collapsed .theme-toggle {
    width: 44px;
    margin: 0 auto 12px;
    justify-content: center;
    padding: 10px;
}

.sidebar.collapsed .theme-toggle-text {
    display: none;
}

html[data-theme="dark"] {
    color-scheme: dark;
    background: #0b1220;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .main-content {
    background: #0b1220 !important;
    color: #e2e8f0 !important;
}

html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .sidebar-header,
html[data-theme="dark"] .sidebar-footer,
html[data-theme="dark"] .header,
html[data-theme="dark"] .header-user,
html[data-theme="dark"] .user-info,
html[data-theme="dark"] .card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .card-header,
html[data-theme="dark"] .card-body,
html[data-theme="dark"] .toolbar,
html[data-theme="dark"] .pagination,
html[data-theme="dark"] .page-header,
html[data-theme="dark"] .filters,
html[data-theme="dark"] .filter-bar,
html[data-theme="dark"] .filter-section,
html[data-theme="dark"] .customers-list,
html[data-theme="dark"] .customer-item,
html[data-theme="dark"] .appointment-item,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .login-body,
html[data-theme="dark"] .login-footer,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-body,
html[data-theme="dark"] .modal-footer,
html[data-theme="dark"] .submenu,
html[data-theme="dark"] .table-wrapper,
html[data-theme="dark"] .table-container,
html[data-theme="dark"] .report-card,
html[data-theme="dark"] .info-card,
html[data-theme="dark"] .info-box,
html[data-theme="dark"] .detail-card,
html[data-theme="dark"] .summary-card,
html[data-theme="dark"] .form-card,
html[data-theme="dark"] .form-section,
html[data-theme="dark"] .content-card,
html[data-theme="dark"] .panel-card,
html[data-theme="dark"] .settings-card,
html[data-theme="dark"] .list-card {
    background: #162033 !important;
    color: #e2e8f0 !important;
    border-color: #2a3a52 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .sidebar-header {
    background: #121a2b !important;
}

html[data-theme="dark"] .logo-text h3,
html[data-theme="dark"] .header-title,
html[data-theme="dark"] .card-title,
html[data-theme="dark"] .modal-title,
html[data-theme="dark"] .stat-value,
html[data-theme="dark"] .user-name,
html[data-theme="dark"] .page-header h1,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] .menu-item,
html[data-theme="dark"] label,
html[data-theme="dark"] .form-label,
html[data-theme="dark"] td,
html[data-theme="dark"] .customer-item,
html[data-theme="dark"] .appointment-company {
    color: #e2e8f0 !important;
}

html[data-theme="dark"] .logo-text p,
html[data-theme="dark"] .user-role,
html[data-theme="dark"] .stat-label,
html[data-theme="dark"] .pagination-info,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .login-footer p,
html[data-theme="dark"] .appointment-contact,
html[data-theme="dark"] th,
html[data-theme="dark"] .tab,
html[data-theme="dark"] small {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .menu-item:hover,
html[data-theme="dark"] .submenu-item:hover,
html[data-theme="dark"] .table tbody tr:hover,
html[data-theme="dark"] .customer-item:hover {
    background: #1e2b42 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .menu-item.active,
html[data-theme="dark"] .submenu-item.active,
html[data-theme="dark"] .tab.active {
    background: rgba(45, 212, 191, 0.12) !important;
    color: #5eead4 !important;
    border-left-color: #2dd4bf !important;
}

html[data-theme="dark"] .submenu {
    background: #10192b !important;
}

html[data-theme="dark"] .submenu.open,
html[data-theme="dark"] .card-header,
html[data-theme="dark"] .tabs,
html[data-theme="dark"] .pagination,
html[data-theme="dark"] .login-footer,
html[data-theme="dark"] .stat-change {
    border-color: #2a3a52 !important;
}

html[data-theme="dark"] .table thead th,
html[data-theme="dark"] .report-table th {
    background: #10192b !important;
    color: #94a3b8 !important;
    border-color: #2a3a52 !important;
}

html[data-theme="dark"] .table tbody td,
html[data-theme="dark"] .report-table td {
    color: #e2e8f0 !important;
    border-color: #243246 !important;
    background: transparent !important;
}

html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="file"]):not([type="image"]):not([type="range"]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .search-input {
    background: #0f172a !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .search-input:focus {
    background: #0f172a !important;
    border-color: #2dd4bf !important;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.15) !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: #64748b !important;
}

html[data-theme="dark"] input:-webkit-autofill,
html[data-theme="dark"] input:-webkit-autofill:hover,
html[data-theme="dark"] input:-webkit-autofill:focus,
html[data-theme="dark"] textarea:-webkit-autofill {
    -webkit-text-fill-color: #e2e8f0 !important;
    caret-color: #e2e8f0;
    box-shadow: 0 0 0 1000px #0f172a inset !important;
    transition: background-color 9999s ease-out 0s;
}

html[data-theme="dark"] option {
    background: #0f172a;
    color: #e2e8f0;
}

html[data-theme="dark"] .page-link {
    background: #162033 !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

html[data-theme="dark"] .page-link.active,
html[data-theme="dark"] .page-link:hover {
    background: #0f766e !important;
    color: #ffffff !important;
    border-color: #0f766e !important;
}

html[data-theme="dark"] .modal {
    background: rgba(2, 6, 23, 0.72) !important;
}

html[data-theme="dark"] .theme-toggle {
    background: #0f172a !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

html[data-theme="dark"] .theme-toggle:hover {
    border-color: #2dd4bf !important;
    color: #5eead4 !important;
}

html[data-theme="dark"] .login-header {
    background: #000 !important;
}

html[data-theme="dark"] .logo {
    background: transparent !important;
    color: #e2e8f0 !important;
}

html[data-theme="dark"] .version-badge {
    background: rgba(45, 212, 191, 0.12) !important;
    color: #5eead4 !important;
    border-color: rgba(45, 212, 191, 0.35) !important;
}

html[data-theme="dark"] .alert-error {
    background: #3f1d24 !important;
    color: #fecaca !important;
    border-color: #7f1d1d !important;
}

html[data-theme="dark"] .alert-success {
    background: #052e16 !important;
    color: #bbf7d0 !important;
    border-color: #166534 !important;
}

html[data-theme="dark"] .btn-logout,
html[data-theme="dark"] .btn-delete {
    background: #3f1d24 !important;
    color: #fecaca !important;
}

html[data-theme="dark"] .btn-logout:hover,
html[data-theme="dark"] .btn-delete:hover {
    background: #7f1d1d !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .sidebar-menu::-webkit-scrollbar-track {
    background: #10192b !important;
}

html[data-theme="dark"] .sidebar-menu::-webkit-scrollbar-thumb {
    background: #334155 !important;
}

html[data-theme="dark"] a:not(.btn):not(.btn-primary):not(.btn-success):not(.btn-logout):not(.menu-item):not(.submenu-item):not(.page-link):not(.theme-toggle) {
    color: #5eead4;
}

html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .btn-success,
html[data-theme="dark"] .btn-login {
    color: #ffffff !important;
}

html[data-theme="dark"] .btn-secondary {
    background: #243246 !important;
    color: #e2e8f0 !important;
    border: 1px solid #334155 !important;
}

html[data-theme="dark"] .btn-secondary:hover {
    background: #334155 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .badge-success { color: #166534 !important; }
html[data-theme="dark"] .badge-warning { color: #92400e !important; }
html[data-theme="dark"] .badge-danger { color: #991b1b !important; }
html[data-theme="dark"] .badge-info { color: #075985 !important; }
html[data-theme="dark"] .page-header .badge { color: #ffffff !important; }

html[data-theme="dark"] [style*="background: white"],
html[data-theme="dark"] [style*="background:white"],
html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background:#fff"],
html[data-theme="dark"] [style*="background: #ffffff"],
html[data-theme="dark"] [style*="background:#ffffff"],
html[data-theme="dark"] [style*="background: #f8fafc"],
html[data-theme="dark"] [style*="background:#f8fafc"],
html[data-theme="dark"] [style*="background: #fafbfc"],
html[data-theme="dark"] [style*="background:#fafbfc"] {
    background: #162033 !important;
    color: #e2e8f0 !important;
    border-color: #2a3a52 !important;
}

html[data-theme="dark"] [style*="color: #1e293b"],
html[data-theme="dark"] [style*="color:#1e293b"],
html[data-theme="dark"] [style*="color: #334155"],
html[data-theme="dark"] [style*="color:#334155"],
html[data-theme="dark"] [style*="color: #0f172a"],
html[data-theme="dark"] [style*="color:#0f172a"] {
    color: #e2e8f0 !important;
}

html[data-theme="dark"] [style*="color: #64748b"],
html[data-theme="dark"] [style*="color:#64748b"],
html[data-theme="dark"] [style*="color: #94a3b8"],
html[data-theme="dark"] [style*="color:#94a3b8"] {
    color: #94a3b8 !important;
}

html[data-theme="dark"] ::selection {
    background: #0f766e;
    color: #ffffff;
}

html[data-theme="dark"] .ih-side,
html[data-theme="dark"] .sidebar.ih-side {
    background: #071525 !important;
}

html[data-theme="dark"] .ih-side .menu-item.active {
    background: #2f6fed !important;
    color: #fff !important;
    border-left-color: transparent !important;
}

html[data-theme="dark"] .ih-top,
html[data-theme="dark"] .ih-search,
html[data-theme="dark"] .ih-card,
html[data-theme="dark"] .ih-hero {
    background: #121a2b !important;
    border-color: #2a3a52 !important;
    color: #e2e8f0 !important;
}

html[data-theme="dark"] body:has(.ih-side),
html[data-theme="dark"] body:has(.ih-side) .main-content {
    background: #0b1220 !important;
}
