/**
 * ESAPUB - Ana Stil Dosyası
 */

/* ===== Genel ===== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ===== Navbar ===== */
.navbar-brand {
    font-size: 1.1rem;
}

.navbar .badge {
    font-size: 0.65rem;
}

/* ===== Sidebar ===== */
.sidebar {
    min-height: calc(100vh - 120px);
}

.sidebar .list-group-item {
    border: none;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
}

.sidebar .list-group-item:hover {
    background-color: #e9ecef;
}

.sidebar .list-group-item.active {
    background-color: #0d6efd;
    color: #fff;
}

/* Admin menü bölümü */
.sidebar .sidebar-admin-label {
    background-color: #f8d7da;
    color: #842029;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 1rem;
    border-left: 3px solid #dc3545;
}

.sidebar .sidebar-admin-item {
    background-color: #fff5f5;
    border-left: 3px solid #dc3545 !important;
    font-size: 0.85rem;
}

.sidebar .sidebar-admin-item:hover {
    background-color: #f8d7da;
}

.sidebar .sidebar-admin-item.active {
    background-color: #dc3545;
    color: #fff;
    border-left-color: #a71d2a !important;
}

/* Navbar editör/yönetici menü (editor+admin) */
.navbar-editor-link {
    color: #ffc107 !important;
    opacity: 0.85;
}

.navbar-editor-link:hover,
.navbar-editor-link:focus {
    color: #ffd54f !important;
    opacity: 1;
}

/* Navbar admin menü */
.navbar-admin-link {
    color: #f8d7da !important;
    background-color: rgba(220, 53, 69, 0.25);
    border-radius: 0.375rem;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

.navbar-admin-link:hover,
.navbar-admin-link:focus,
.navbar-admin-item.show .navbar-admin-link {
    color: #fff !important;
    background-color: rgba(220, 53, 69, 0.5);
}

.dropdown-menu-admin {
    border-top: 3px solid #dc3545;
    border-left: 3px solid #dc3545;
}

.dropdown-menu-admin .dropdown-item:hover,
.dropdown-menu-admin .dropdown-item:focus {
    background-color: #f8d7da;
    color: #842029;
}

/* ===== Kartlar ===== */
.stat-card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card .card-body {
    padding: 1.2rem;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: #6c757d;
}

/* ===== Durum Badge ===== */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* ===== Timeline ===== */
.timeline {
    position: relative;
    padding: 0;
    list-style: none;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    width: 2px;
    background: #dee2e6;
}

.timeline-item {
    position: relative;
    padding-left: 50px;
    margin-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #0d6efd;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #0d6efd;
}

.timeline-item.completed::before {
    background: #198754;
    box-shadow: 0 0 0 2px #198754;
}

.timeline-item.current::before {
    background: #ffc107;
    box-shadow: 0 0 0 2px #ffc107;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 2px #ffc107; }
    50% { box-shadow: 0 0 0 6px rgba(255, 193, 7, 0.3); }
}

.timeline-date {
    font-size: 0.8rem;
    color: #6c757d;
}

.timeline-content {
    font-size: 0.9rem;
}

/* ===== Dosya Yükleme Alanı ===== */
.file-drop-zone {
    border: 2px dashed #ced4da;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8f9fa;
}

.file-drop-zone:hover,
.file-drop-zone.dragover {
    border-color: #0d6efd;
    background: #e7f1ff;
}

.file-drop-zone .icon {
    font-size: 2.5rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.file-drop-zone.dragover .icon {
    color: #0d6efd;
}

/* ===== Tablo ===== */
.table-hover tbody tr {
    cursor: pointer;
    transition: background-color 0.15s;
}

.table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #6c757d;
    border-bottom: 2px solid #dee2e6;
}

.table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

/* ===== Bildirimler ===== */
.notification-item {
    border-bottom: 1px solid #f0f0f0;
    padding: 0.75rem 1rem;
    transition: background-color 0.15s;
}

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

.notification-item.unread {
    background-color: #e7f1ff;
    border-left: 3px solid #0d6efd;
}

.notification-item .time {
    font-size: 0.75rem;
    color: #6c757d;
}

/* ===== Auth Sayfaları ===== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
    overflow: hidden;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(13, 110, 253, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.auth-wrapper::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(15, 52, 96, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.auth-row {
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
}

.auth-card .card-header {
    background: none;
    border-bottom: none;
    text-align: center;
    padding: 2rem 2rem 0;
}

.auth-card .card-header p {
    display: none;
}

@media (max-width: 991.98px) {
    .auth-card .card-header p {
        display: block;
    }
}

.auth-card .card-body {
    padding: 1.5rem 2rem 2rem;
}

.auth-card .card-footer {
    background: #f8f9fa;
    border-top: none;
    text-align: center;
    padding: 1rem;
    border-radius: 0 0 12px 12px;
}

/* Auth Promo (sol panel) */
.auth-promo {
    color: #fff;
    padding: 2rem 1rem 2rem 0;
}

.auth-brand {
    display: inline-block;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 2rem;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.auth-brand:hover {
    color: #fff;
    opacity: 1;
}

.auth-brand-mobile {
    display: inline-block;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    opacity: 0.9;
}

.auth-brand-mobile:hover {
    color: #fff;
    opacity: 1;
}

.auth-promo-title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.auth-promo-desc {
    font-size: 0.95rem;
    opacity: 0.8;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-feature {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.auth-feature-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #7eb8ff;
}

.auth-feature strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}

.auth-feature p {
    font-size: 0.82rem;
    opacity: 0.7;
    margin: 0;
    line-height: 1.4;
}

/* Auth dil değiştirici */
.auth-lang-switch {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
}

.auth-lang-switch .lang-switch {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-lang-switch .lang-switch:hover,
.auth-lang-switch .lang-switch.active {
    color: #fff;
}

/* ===== Mesajlar ===== */
.message-bubble {
    max-width: 75%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.message-bubble.sent {
    background: #0d6efd;
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.message-bubble.received {
    background: #e9ecef;
    border-bottom-left-radius: 4px;
}

.message-bubble .time {
    font-size: 0.7rem;
    opacity: 0.7;
}

/* ===== Yükleniyor Spinner ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ===== Landing Page ===== */
body.landing-page {
    display: block;
    background-color: #fff;
}

.landing-navbar {
    background: rgba(26, 26, 46, 0.85) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.3s;
}

.landing-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    padding: 6rem 0 5rem;
    position: relative;
    overflow: hidden;
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(13, 110, 253, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.landing-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(15, 52, 96, 0.3) 0%, transparent 70%);
    pointer-events: none;
}

.landing-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
}

.landing-hero .lead {
    font-size: 1.15rem;
    opacity: 0.85;
    max-width: 540px;
}

.landing-hero-icon {
    font-size: 12rem;
    opacity: 0.08;
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
}

.landing-section {
    padding: 4rem 0;
}

.landing-section-alt {
    background-color: #f8f9fa;
}

.landing-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.landing-book-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s, box-shadow 0.25s;
    height: 100%;
}

.landing-book-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

.landing-step-card {
    position: relative;
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
    transition: transform 0.25s, box-shadow 0.25s;
    height: 100%;
}

.landing-step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.landing-step-number {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0d6efd;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.4);
}

.landing-step-icon {
    font-size: 2.5rem;
    color: #0d6efd;
    margin-bottom: 0.75rem;
}

.landing-cta {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    color: #fff;
    padding: 4rem 0;
}

.landing-footer {
    background: #1a1a2e;
    color: rgba(255, 255, 255, 0.6);
    padding: 2rem 0;
    font-size: 0.85rem;
}

.landing-footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.landing-footer a:hover {
    color: #fff;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
    }

    .stat-card .stat-number {
        font-size: 1.5rem;
    }

    .timeline::before {
        left: 15px;
    }

    .timeline-item {
        padding-left: 40px;
    }

    .timeline-item::before {
        left: 9px;
    }

    .landing-hero {
        padding: 4rem 0 3rem;
        text-align: center;
    }

    .landing-hero h1 {
        font-size: 1.75rem;
    }

    .landing-hero .lead {
        margin: 0 auto;
    }

    .landing-hero-icon {
        display: none;
    }
}
