:root {
    --bd-primary: #0d6efd;
    --bd-dark: #0b1020;
    --bd-sidebar-width: 260px;
    --bd-sidebar-bg: #0b1020;
    --bd-sidebar-bg-2: #131a2e;
    --bd-topbar-height: 60px;
}

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    color: #1f2937;
    background: #f4f5f9;
}

/* ============ Sidebar Layout ============ */

.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--bd-sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--bd-sidebar-bg) 0%, var(--bd-sidebar-bg-2) 100%);
    color: #cbd5e1;
    overflow-y: auto;
    z-index: 1030;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
}

.sidebar-brand {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.0rem;
    line-height: 1.2;
}

.sidebar-nav {
    margin: 0;
    padding: 0.5rem 0.75rem 1rem;
}

.sidebar-group-title {
    padding: 0.85rem 0.75rem 0.35rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.12s ease;
    font-size: 0.92rem;
    font-weight: 500;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.sidebar-link.active {
    background: rgba(13, 110, 253, 0.22);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--bd-primary);
}

.sidebar-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    color: #94a3b8;
}

.sidebar-link:hover i, .sidebar-link.active i {
    color: #60a5fa;
}

/* Offcanvas (mobile) sidebar */
.app-sidebar-offcanvas {
    background: linear-gradient(180deg, var(--bd-sidebar-bg) 0%, var(--bd-sidebar-bg-2) 100%);
    color: #cbd5e1;
    width: var(--bd-sidebar-width) !important;
}

.app-sidebar-offcanvas .offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Ana icerik alani - default full width (giris yapmamis) */
.app-main {
    margin-left: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.2s ease;
}

/* Giris yapmis kullanici (desktop) */
@media (min-width: 992px) {
    .app-main.has-sidebar {
        margin-left: var(--bd-sidebar-width);
    }
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    min-height: var(--bd-topbar-height);
    display: flex;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.5rem 1.25rem;
}

.topbar-brand {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: #1f2937;
    text-decoration: none;
}
.topbar-brand:hover { color: var(--bd-primary); }

.app-footer {
    margin-top: auto;
    padding: 1rem 1.25rem;
    background: #fff;
    border-top: 1px solid #e5e7eb;
}

/* ng-view icerigi direkt app-main icinde; padding icin */
.app-main > [ng-view], .app-main > section {
    flex: 1 0 auto;
}


.hero {
    background: linear-gradient(135deg, #0b1020 0%, #123 50%, #1e3a8a 100%);
    min-height: 520px;
    display: flex;
    align-items: center;
}

.hero .badge {
    background-color: rgba(13, 110, 253, 0.18);
    color: #9ec5fe !important;
    font-weight: 500;
    padding: 0.5rem 0.8rem;
    border: 1px solid rgba(158, 197, 254, 0.25);
}

.hero-card {
    background: #fff;
    color: #1f2937;
    border-radius: 16px;
    padding: 2rem;
    max-width: 420px;
    margin: 0 auto;
}

.stat-box {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    border: 1px solid #e9ecef;
}

.stat-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bd-primary);
}

.feature-card {
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 12px;
    padding: 1.75rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(13, 110, 253, 0.08);
    border-color: rgba(13, 110, 253, 0.25);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(13, 110, 253, 0.08);
    color: var(--bd-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.module-pill {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 999px;
    padding: 0.7rem 1.1rem;
    font-weight: 500;
    color: #1f2937;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.module-pill:hover {
    border-color: var(--bd-primary);
    color: var(--bd-primary);
}

.module-pill i {
    color: var(--bd-primary);
    font-size: 1.15rem;
}

footer a:hover {
    color: #fff !important;
}

.auth-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
}

.auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.25rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    border: 1px solid #eef0f3;
}

.module-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    font-weight: 500;
    color: #1f2937;
    text-decoration: none;
    transition: all 0.15s ease;
}

.module-card:hover:not(.disabled) {
    border-color: var(--bd-primary);
    color: var(--bd-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.08);
}

.module-card i:first-child {
    color: var(--bd-primary);
    font-size: 1.4rem;
}

.module-card.disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ---------- Mobile & touch improvements ---------- */

@media (max-width: 767.98px) {
    .hero { min-height: auto; padding: 2rem 0 !important; }
    .hero-card { padding: 1.25rem; }
    .stat-value { font-size: 1.25rem; }
    .auth-card { padding: 1.5rem; }

    .display-4 { font-size: 2rem; }
    .display-5 { font-size: 1.75rem; }
    .display-6 { font-size: 1.5rem; }

    /* Filter bars stack */
    .filter-bar {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    .filter-bar > * { width: 100%; }

    /* Touch target size */
    .btn-sm { min-height: 36px; }
    .form-control, .form-select { min-height: 40px; }

    /* Table cells less cramped */
    .table-sm td, .table-sm th { padding: 0.5rem; }

    /* Module cards more vertical spacing */
    .module-card { padding: 1rem; }

    /* Navbar brand smaller on mobile */
    .navbar-brand { font-size: 0.95rem; }

    /* Dashboard overview cards stack 2 per row */
    .display-6 { font-size: 1.5rem; }

    /* Modal dialog full-width on mobile */
    .modal-dialog { margin: 0.5rem; }
}

/* Tap-friendly row buttons */
.table tr td .btn + .btn { margin-left: 4px; }
.table tr td .btn-sm { white-space: nowrap; }

/* Horizontal scroll hint on overflow */
.table-responsive {
    -webkit-overflow-scrolling: touch;
}

/* Card body text wrap on narrow */
.card .small, .card small { word-wrap: break-word; }

/* Mobile nav polish */
@media (max-width: 991.98px) {
    .navbar-collapse {
        padding-top: 0.5rem;
        border-top: 1px solid rgba(255,255,255,0.1);
        margin-top: 0.5rem;
    }
    .navbar-collapse .nav-link {
        padding: 0.6rem 0 !important;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .navbar-collapse .dropdown-menu {
        background: transparent;
        border: 0;
        padding-left: 1rem;
    }
    .navbar-collapse .dropdown-menu .dropdown-item {
        color: rgba(255,255,255,0.7);
        padding: 0.4rem 0;
    }
    .navbar-collapse .dropdown-menu .dropdown-item:hover {
        background: transparent;
        color: #fff;
    }
    .navbar-collapse .dropdown-divider {
        border-color: rgba(255,255,255,0.1);
    }
}

/* Canli aktivite "yayinda" puls animasyonu */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(1.12); }
}
