:root {
    --sidebar-width: 300px;
    --primary-dark: #212529;
    --text-muted: #6c757d;
    --surface-light: #f8f9fa;
    --border-light: #e9ecef;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: #f4f6f9;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

/* Auth — public site ile uyumlu açık tema */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #ffffff 0%, var(--surface-light) 100%);
    padding: 1rem;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    border: none;
    border-radius: 0.75rem;
    border: 1px solid var(--border-light);
}

.auth-card .form-control {
    font-size: 16px;
    min-height: 44px;
}

.auth-brand-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.auth-brand-logo {
    width: 100%;
    max-width: 340px;
    height: auto;
    max-height: 120px;
    object-fit: contain;
    mix-blend-mode: multiply;
    filter: contrast(1.05) saturate(0.9) brightness(0.98);
}

.sidebar-brand-link {
    text-decoration: none;
    display: block;
    line-height: 0;
}

.sidebar-brand-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0;
}

.sidebar-brand-logo {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 88px;
    object-fit: contain;
    mix-blend-mode: multiply;
    filter: contrast(1.05) saturate(0.9) brightness(0.98);
}

.page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.94);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.page-loader.is-active {
    opacity: 1;
    visibility: visible;
}

.page-loader-inner {
    text-align: center;
}

.page-loader-icon {
    display: block;
    margin: 0 auto 0.85rem;
    width: 96px;
    height: 96px;
    object-fit: contain;
    mix-blend-mode: screen;
    animation: brandIconPulse 1.1s ease-in-out infinite;
}

.page-loader-text {
    font-size: 0.875rem;
    color: #6c757d;
}

@keyframes brandIconPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.75;
    }
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1040;
    transition: transform 0.3s ease;
}

.sidebar-header {
    background: linear-gradient(180deg, #ffffff 0%, var(--surface-light) 100%);
    border-bottom: 1px solid var(--border-light) !important;
    padding: 1rem 1rem 0.85rem !important;
}

.sidebar-header .sidebar-panel-label {
    color: var(--text-muted) !important;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.sidebar .nav-link {
    border-radius: 0.375rem;
    padding: 0.6rem 1rem;
    margin-bottom: 2px;
}

.sidebar .nav-link:hover {
    background: rgba(255,255,255,0.1);
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1035;
}

.sidebar-backdrop.show {
    display: block;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
}

#adminWrapper > .flex-grow-1 {
    margin-left: var(--sidebar-width);
    min-width: 0;
}

.admin-content {
    overflow-x: hidden;
}

.stat-card {
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.avatar-placeholder {
    width: 40px;
    height: 40px;
    background: #e9ecef;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
}

.avatar-placeholder-lg {
    width: 150px;
    height: 150px;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #adb5bd;
}

.lazy-img {
    object-fit: cover;
    background: #e9ecef;
}

.cast-status-dropdown {
    min-width: 130px;
    text-align: left;
}

.cast-status-form .dropdown-menu {
    min-width: 130px;
}

.cast-status-form .dropdown-item.active {
    font-weight: 600;
}

.table-action-btns {
    flex-wrap: nowrap;
}

.whatsapp-link {
    padding: 0.2rem 0.5rem;
    line-height: 1;
}

.whatsapp-link .bi-whatsapp {
    font-size: 1.1rem;
}

.meeting-note-item:last-child {
    margin-bottom: 0 !important;
}

/* Oyuncu fotoğrafları — sayfa düzeni + lightbox */
.applicant-img-wrap {
    position: relative;
    display: inline-block;
    text-decoration: none;
    color: inherit;
}

.applicant-img-wrap--profile {
    display: block;
    width: 100%;
    max-width: 280px;
    margin: 0 auto 1rem;
    cursor: zoom-in;
}

.applicant-img-wrap--gallery {
    display: block;
    width: 100%;
    cursor: zoom-in;
    border-radius: 0.375rem;
    overflow: hidden;
    background: #e9ecef;
}

.applicant-img-wrap--thumb {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.applicant-img--profile {
    display: block;
    width: 100%;
    max-height: 320px;
    height: auto;
    object-fit: contain;
    border-radius: 0.375rem;
    background: #e9ecef;
}

.applicant-img--gallery {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 0.375rem;
}

.applicant-img--thumb {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.applicant-img-zoom-hint {
    position: absolute;
    right: 0.35rem;
    bottom: 0.35rem;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border-radius: 50%;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.applicant-img-wrap:hover .applicant-img-zoom-hint,
.applicant-img-wrap:focus-visible .applicant-img-zoom-hint {
    opacity: 1;
}

.image-lightbox-full {
    max-height: min(85vh, 1200px);
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

@media (max-width: 767px) {
    .applicant-img--gallery {
        height: 140px;
    }

    .applicant-img--profile {
        max-height: 260px;
    }
}

@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
        box-shadow: 0 0 20px rgba(0,0,0,0.2);
    }
    #adminWrapper > .flex-grow-1 {
        margin-left: 0;
    }

    .admin-topbar .fw-semibold {
        font-size: 0.95rem;
        max-width: 55vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .table-action-btns .btn-group {
        flex-wrap: wrap;
    }
}

.admin-user-info {
    max-width: 45vw;
}

@media (max-width: 767px) {
    .admin-content .card-header h5,
    .admin-content .card-header h6 {
        font-size: 1rem;
    }

    .admin-content .card-header .btn-group,
    .admin-content .card-header .d-flex {
        width: 100%;
        justify-content: flex-start !important;
    }

    .admin-content .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    .admin-user-info {
        max-width: 100%;
        width: 100%;
        text-align: right;
    }

    .admin-content .form-control,
    .admin-content .form-select {
        font-size: 16px;
        min-height: 44px;
    }

    .admin-content .btn-sm {
        min-height: 38px;
    }

    .admin-content .table {
        font-size: 0.875rem;
    }

    .admin-content .d-flex.gap-2,
    .admin-content .btn-group {
        flex-wrap: wrap;
    }

    .cast-status-dropdown {
        min-width: 100%;
    }

    .candidate-list .d-flex {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.75rem;
    }

    .candidate-list form {
        margin-left: 0 !important;
    }

    .candidate-list .btn {
        width: 100%;
    }
}
