/* =============================================
   EDUTECHCPT - Blazor Uygulama Stilleri
   ============================================= */

:root {
    --sidebar-bg: #1e1b2e;
    --sidebar-active: #312d52;
    --sidebar-hover: #2a2548;
    --sidebar-text: #ffffff;
    --sidebar-sub-hover: #c4b5fd;
    --sidebar-group-title: rgba(255,255,255,0.38);
    --primary-color: #0E66AE;
    --primary-hover: #02AEC2;
    --accent-color: #02AEC2;
    --body-bg: #f5f7fd;
}

html, body {
    font-family: "Source Sans Pro", sans-serif;
    background-color: var(--body-bg);
    height: 100%;
    margin: 0;
    padding: 0;
}

.container-scroller {
    display: flex;
    min-height: 100vh;
}

.page-body-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 0;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    height: 100vh;
    width: 255px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    flex-shrink: 0;
    z-index: 11;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    transition: width 0.25s ease;
}

.sidebar .sidebar-brand-wrapper {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar .sidebar-brand-wrapper img {
    max-width: 180px;
    height: auto;
    filter: brightness(0) invert(1);
}

.sidebar .nav-scrollable {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.sidebar .nav-scrollable::-webkit-scrollbar {
    width: 4px;
}

.sidebar .nav-scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar .nav-scrollable::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
}

.sidebar .nav {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    margin: 0;
    list-style: none;
}

.sidebar .nav .nav-item {
    position: relative;
}

.sidebar .nav .nav-item .nav-link {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: var(--sidebar-text);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.25s ease;
    cursor: pointer;
}

.sidebar .nav .nav-item .nav-link:hover,
.sidebar .nav .nav-item.active > .nav-link {
    background: var(--sidebar-active);
    color: var(--sidebar-text);
}

.sidebar .nav .nav-item .nav-link .menu-icon {
    font-size: 1.125rem;
    margin-right: 12px;
    color: var(--sidebar-text);
    line-height: 1;
}

.sidebar .nav .nav-item .nav-link .menu-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
}

.sidebar .nav .nav-item .nav-link .menu-arrow {
    margin-left: auto;
    transition: transform 0.2s ease;
    font-size: 1rem;
}

.sidebar .nav .nav-item .nav-link.expanded .menu-arrow {
    transform: rotate(90deg);
}

.sidebar .sub-menu {
    list-style: none;
    padding: 5px 0 10px 40px;
    background: rgba(0,0,0,0.15);
    margin: 0;
}

.sidebar .sub-menu .nav-item {
    position: relative;
    padding: 0;
}

.sidebar .sub-menu .nav-item::before {
    content: "";
    width: 5px;
    height: 5px;
    position: absolute;
    left: -14px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    background: var(--sidebar-text);
}

.sidebar .sub-menu .nav-item .nav-link {
    padding: 8px 15px;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
}

.sidebar .sub-menu .nav-item .nav-link:hover {
    color: var(--sidebar-sub-hover);
    background: transparent;
}

/* NAV GROUP TITLE */
.sidebar .nav-group-title {
    padding: 0;
    margin-top: 6px;
}

.sidebar .nav-group-title .group-label {
    display: block;
    padding: 10px 25px 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--sidebar-group-title);
    pointer-events: none;
    white-space: nowrap;
}

/* LOGOUT */
.sidebar .logout-item {
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar .user-name-item .nav-link {
    padding: 15px 25px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    font-size: 0.875rem;
    cursor: default;
}

.sidebar .user-name-item .nav-link:hover {
    background: transparent;
}

/* MAIN PANEL */
.main-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--body-bg);
}

.main-content {
    flex: 1;
    padding: 25px;
}

/* TOP NAVBAR */
.top-navbar {
    background: #ffffff;
    border-bottom: 1px solid #e8eaf6;
    padding: 12px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,.06);
}

.top-navbar .page-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sidebar-bg);
    margin: 0;
}

.top-navbar .user-info {
    font-size: 0.875rem;
    color: #555;
}

/* LOGIN */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--body-bg);
}

.login-box {
    background: #fff;
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    padding: 40px 35px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 24px rgba(34,62,156,0.10);
}

.login-box .logo-wrapper {
    text-align: left;
    margin-bottom: 28px;
}

.login-box .logo-wrapper img {
    max-width: 200px;
}

.login-box .form-control {
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    padding: 12px 15px;
    font-size: 1rem;
    margin-bottom: 16px;
}

.login-box .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(2,174,194,0.25);
    outline: none;
}

.btn-login {
    background-color: var(--primary-color);
    color: #fff;
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
    letter-spacing: 1px;
}

.btn-login:hover {
    background-color: var(--primary-hover);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-error {
    background: #fdecea;
    color: #c62828;
    border: 1px solid #f5c6c6;
    border-radius: 4px;
    padding: 10px 14px;
    margin-top: 12px;
    font-size: 0.9rem;
}

/* CARDS */
.card {
    border-radius: 6px;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    margin-bottom: 20px;
}

.card .card-body {
    padding: 20px;
}

.card .card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--sidebar-bg);
    margin-bottom: 15px;
}

/* TABLES */
.table thead th {
    background-color: var(--sidebar-bg);
    color: #fff;
    font-weight: 600;
    border: none;
}

.table tbody tr:hover {
    background-color: rgba(34,62,156,0.06);
}

/* BUTTONS */
.btn-primary-custom {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-primary-custom:hover {
    background-color: var(--primary-hover);
    color: #fff;
}

/* ERROR UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* LOADING */
.loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner-edutechcpt {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(34,62,156,0.2);
    border-top-color: var(--sidebar-bg);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 991px) {
    .sidebar {
        width: 100%;
        min-height: auto;
    }
}
