/*
 * İkra Sosyal — mobil uygulama ile ortak görünüm.
 * Renkler mobil uygulamadaki paletten gelir (src/components/ui.tsx): ana renk #2F5BEA,
 * gezinme lacivert #13243B (koyu temada #0A111C). Sayfa renkleri app.css değişkenlerindedir;
 * bu dosya yalnızca kenar menüsü, başlık ve küçük ortak ayrıntıları uygular.
 */

/* Kenar menüsü: mobildeki üst gezinme çubuğunun laciverti. Değişkenler menü içindeki
   bütün bileşenlere (marka seçici, kullanıcı kartı, dil düğmeleri) aynı tonu taşır. */
.sidebar {
    --surface: #13243b;
    --surface-raised: rgba(255, 255, 255, .07);
    --surface-soft: rgba(255, 255, 255, .06);
    --surface-hover: rgba(255, 255, 255, .08);
    --text: #f2f5fb;
    --text-soft: #c9d3e3;
    --muted: #a9b8cf;
    --border: rgba(255, 255, 255, .10);
    --border-strong: rgba(255, 255, 255, .18);
    --primary-soft: rgba(142, 174, 255, .16);
    --primary-text: #ffffff;
    --shadow-sm: none;
    border-right-color: rgba(0, 0, 0, .18) !important;
    background: #13243b !important;
    color: #f2f5fb;
    box-shadow: 10px 0 35px rgba(9, 15, 28, .10) !important;
}

html[data-theme="dark"] .sidebar {
    --surface: #0a111c;
    border-right-color: #1b2738 !important;
    background: #0a111c !important;
}

.sidebar .sidebar-brand {
    border-bottom-color: rgba(255, 255, 255, .10);
}

.sidebar .brand-mark strong {
    color: #ffffff;
}

.sidebar .brand-mark small,
.sidebar .nav-group-label {
    color: #93a4be;
}

.sidebar .sidebar-link {
    color: #c9d3e3;
}

.sidebar .sidebar-link:hover {
    border-color: transparent;
    background: rgba(255, 255, 255, .07);
    box-shadow: none;
    color: #ffffff;
}

.sidebar .sidebar-link.active,
.sidebar .sidebar-link.active:hover {
    border-color: rgba(142, 174, 255, .30);
    background: rgba(142, 174, 255, .16);
    box-shadow: none;
    color: #ffffff;
}

.sidebar .sidebar-link.active svg {
    color: #8eaeff;
}

.sidebar .sidebar-bottom {
    border-top-color: rgba(255, 255, 255, .10);
}

.sidebar .logout-link {
    color: #ff9c9c;
}

.sidebar .icon-btn {
    border-color: rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .06);
    color: #f2f5fb;
}

/* Menü daraltma düğmesi menünün kenarında durur; dolu zemini sayesinde altındaki yazı görünmez. */
.sidebar .sidebar-collapse {
    top: 34px;
    border: 1px solid #e1e6ee;
    background: #ffffff;
    color: #15233a;
    box-shadow: 0 6px 16px rgba(9, 15, 28, .22);
}

.sidebar .sidebar-collapse:hover {
    border-color: #2f5bea;
    color: #2f5bea;
}

html[data-theme="dark"] .sidebar .sidebar-collapse {
    border-color: #34465f;
    background: #172233;
    color: #e8eef8;
}

html[data-theme="dark"] .sidebar .sidebar-collapse:hover {
    border-color: #8eaeff;
    color: #8eaeff;
}

.sidebar .sidebar-brand {
    padding-right: 20px;
}

/* Kaydırma çubukları: ince, yuvarlak, temaya uygun. Bilerek gizlenen çubuklar
   (sınıf seçicileriyle scrollbar-width: none) daha özel olduğu için gizli kalır. */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(95, 108, 128, .38) transparent;
}

html[data-theme="dark"] * {
    scrollbar-color: rgba(157, 172, 194, .30) transparent;
}

.sidebar,
.sidebar * {
    scrollbar-color: rgba(255, 255, 255, .20) transparent;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: rgba(95, 108, 128, .38) padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(47, 91, 234, .6);
}

/* Dil düğmeleri kenar menüsünde lacivert zemine uyar. */
.sidebar .app-language-switcher {
    border-color: rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .05);
    color: #c9d3e3;
}

.sidebar .app-language-option:hover {
    background: rgba(255, 255, 255, .08);
    color: #ffffff;
}

/* Mobil başlık: uygulamadaki gibi lacivert çubuk. */
.mobile-header,
html[data-theme="dark"] .mobile-header {
    border-bottom-color: rgba(0, 0, 0, .2);
    background: #13243b;
    color: #f2f5fb;
}

html[data-theme="dark"] .mobile-header {
    background: #0a111c;
}

.mobile-header .icon-btn {
    border-color: rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .06);
    color: #f2f5fb;
}

.login-form .password-field {
    position: relative;
    display: block;
    margin: 0;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}

.login-form .password-field input {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-soft);
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover {
    background: var(--surface-soft);
    color: var(--primary);
}

.password-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

.password-toggle svg {
    width: 19px;
    height: 19px;
}

.password-toggle .icon-hide,
.password-toggle[aria-pressed="true"] .icon-show {
    display: none;
}

.password-toggle[aria-pressed="true"] .icon-hide {
    display: block;
}

/* Beni hatırla: kutu ve yazı aynı hizada; tıklayınca çerçeve çıkmaz, klavyeyle odakta halka görünür. */
.login-form .login-remember {
    gap: 10px;
    align-items: center;
}

.login-form .login-remember > span {
    display: inline;
    margin: 0;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.login-form .login-remember input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border-radius: 5px;
    box-shadow: none;
    cursor: pointer;
}

.login-form .login-remember input:focus {
    outline: none;
    box-shadow: none;
}

.login-form .login-remember input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Odak halkası ve seçim rengi ana renkle uyumlu. */
::selection {
    background: rgba(47, 91, 234, .18);
}

:focus-visible {
    outline-color: var(--primary);
}
