* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #f8f7ff;
    --text: #1f2937;
    --muted: #64748b;
    --top-bg: #eef2ff;
    --sidebar-bg: #f5f6ff;
    --footer-bg: #eef2ff;
    --accent: #7c3aed;
    --accent-soft: #c4b5fd;
    --accent-strong: #4f46e5;
    --card-bg: #ffffff;
    --card-border: #e0e7ff;
    --table-search-bg: #eef2ff;
    --input-border: #dbeafe;
    --button-bg: #7c3aed;
    --button-hover: #5b21b6;
    --button-text: #ffffff;
    --border: #e2e8f0;
    --shadow: rgba(99, 102, 241, 0.12);
}

.dark-theme {
    --bg: #0b1220;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --top-bg: #111b2e;
    --sidebar-bg: #101a2e;
    --footer-bg: #0b1220;
    --accent: #8b5cf6;
    --accent-soft: #4338ca;
    --accent-strong: #6d28d9;
    --card-bg: #111a2b;
    --card-border: #1f2937;
    --table-search-bg: #111a2b;
    --input-border: #374151;
    --button-bg: #7c3aed;
    --button-hover: #5b21b6;
    --button-text: #ffffff;
    --border: #24344f;
    --shadow: rgba(15, 23, 42, 0.36);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin-left: 120px;
    transition: background-color 0.25s ease, color 0.25s ease;
}

div {
    display: block;
    unicode-bidi: isolate;
}

.g81FSa {
    padding: 15px 50px;
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 25px;
}

/* боковая панель */
.sidebar-navbar {
    background-color: var(--sidebar-bg);
    width: 80px;
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    z-index: 99;
}

.sidebar-navbar .navbar-logo {
    margin-bottom: 30px;
    margin-right: 0;
}

.sidebar-navbar .logo-link {
    width: 50px;
    height: 50px;
        background: var(--accent);
        color: var(--button-text);
        font-size: 18px;
        font-weight: bold;
        border-radius: 8px;
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }

    .sidebar-navbar .logo-link:hover {
        background: var(--accent-strong);
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}

.sidebar-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    padding: 10px;
    text-align: center;
}

.sidebar-link:hover {
    color: var(--text);
}

.sidebar-link .icon {
    font-size: 19px;
    margin-bottom: 5px;
    color: inherit;
}
.sidebar-link:hover .icon {
    font-size: 20px;
}

.sidebar-link .label {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
}

/* Верхняя панель */
.top-navbar {
    background-color: var(--top-bg);
    height: 60px;
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    margin-left: -40px;
    z-index: 100;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 30px;
    border-bottom: 1px solid var(--border);
    gap: 30px;
}

.navbar-language {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.flag {
    font-size: 20px;
}

.lang-text {
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.navbar-language:hover .lang-text {
    color: var(--text);
}

.header__profile {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-none-user {
    width: 40px;
    height: 40px;
    background-color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.header-none-user a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
}

.user-avatar {
    width: 12px;
    height: auto;
    cursor: pointer;
}

.deauth {
    display: flex;
    align-items: center;
}

.header__profile a {
    text-decoration: none;
    color: inherit;
}

.deauth {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.deauth .user-avatar {
    width: 15px;
    height: 12px;
    border-radius: 50%;
    transition: transform 0.15s ease;
}

.deauth:hover .user-avatar {
    transform: scale(1.1);
}

.user__popup {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
        background: var(--card-bg);
        border: 1px solid var(--border);
        border-radius: 6px;
        box-shadow: 0 4px 12px var(--shadow);
    visibility: hidden;
    transform: translateY(-6px);
    transition: 0.2s ease;
    pointer-events: none;
}

.user__popup.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

.profile-popup__header-wrapper {
    padding: 0 12px 8px 12px;
    border-bottom: 1px solid #eee;
}

.profile-popup__header {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.profile-popup__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-popup__nick {
    display: block;
    font-weight: 600;
}

/* обычные пункты меню */
.user__popup-link {
    display: block;
    padding: 8px 16px;
    text-decoration: none;
        color: var(--text);
    }

    .user__popup-link:hover {
        background-color: var(--table-search-bg);
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.user-auth:hover,
.user-profile:hover {
    color: #fff;
    transition: all 0.3s ease;
    font-size: 14.1px;
}

.user-logout:hover {
    color: #d32f2f;
}

main {
    padding: 40px;
    min-height: calc(100vh - 60px);
}

main h1 {
    color: #333;
    margin-bottom: 20px;
    font-size: 28px;
}

footer {
    background-color: var(--footer-bg);
    color: var(--muted);
    padding: 20px;
    text-align: center;
    border-top: 1px solid #ddd;
    margin-top: 40px;
}

footer p {
    margin: 0;
}

form {
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    max-width: 400px;
}

form input,
form button {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

form button {
    background-color: var(--button-bg);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

form button:hover {
    background-color: var(--button-hover);
}

.table-genre {
    background: var(--card-bg);
    width: 100%;
    padding: 20px;
    overflow: hidden;
    border-radius: 16px;
}

.table-header {
    height: calc(-100px + 100vh);
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-self: start;
    overflow: hidden;
    position: sticky;
    top: 0px;
}

.table-search {
    height: 58px;
    width: 100%;
    background: var(--table-search-bg);
    border-radius: 8px;
    display: flex;
    overflow: hidden;
    margin-bottom: 13px;
    transition: 0.2s;
}

input {
    border: 1px solid var(--input-border);
    border-radius: 6px;
    display: block;
    width: 100%;
}

/* Тема переключателя в футере */
.theme-toggle {
    margin-left: 12px;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--input-border);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 16px;
}

.theme-toggle:hover {
    background: rgba(0,0,0,0.04);
}
.table-search input, .table-search input::placeholder {
    font-weight: 400;
    color: rgb(105, 113, 131);
    padding: 0px 18px;
}

ul {
    display: block;
    list-style-type: disc;
    margin-block-start: 1em;
    margin-block-end: 1em;
    padding-inline-start: 0px;
    unicode-bidi: isolate;
}

.home-page {
    display: grid;
    gap: 32px;
}

.home-carousel {
    position: relative;
    left: -120px;
    width: calc(90vw);
    overflow: hidden;
}

.carousel {
    position: relative;
    min-height: 420px;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.12);
}

.carousel-track {
    display: flex;
    transition: transform 0.6s ease;
    height: 100%;
}

.carousel-item {
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 64px 80px;
    color: white;
    position: relative;
    min-height: 420px;
    background-size: cover;
    background-position: center;
}

.carousel-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.32);
}

.carousel-item .slide-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.carousel-item span {
    display: inline-block;
    margin-bottom: 16px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #f7f7f7;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.carousel-item h2 {
    font-size: clamp(2.2rem, 2.8vw, 4rem);
    line-height: 1.05;
    margin-bottom: 18px;
}

.carousel-item p {
    max-width: 640px;
    font-size: 18px;
    line-height: 1.7;
    color: rgba(255,255,255,0.9);
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    color: #222;
    font-size: 28px;
    cursor: pointer;
    display: grid;
    place-items: center;
    z-index: 2;
    transition: transform 0.2s ease, background 0.2s ease;
}

.carousel-arrow:hover {
    transform: translateY(-50%) scale(1.05);
    background: rgba(255, 255, 255, 1);
}

.carousel-arrow.prev {
    left: 18px;
}

.carousel-arrow.next {
    right: 18px;
}

.carousel-item.slide-1 { background: linear-gradient(135deg, #5b8def 0%, #2a5ac4 100%); }
.carousel-item.slide-2 { background: linear-gradient(135deg, #ff7a59 0%, #c1441d 100%); }
.carousel-item.slide-3 { background: linear-gradient(135deg, #34c38f 0%, #0b845f 100%); }
.carousel-item.slide-4 { background: linear-gradient(135deg, #f5b74f 0%, #d78a1d 100%); }

.books-new {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.books-new__header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 20px;
}

.books-new__header h2 {
    margin: 0;
    font-size: 28px;
}

.books-new__header p {
    margin: 8px 0 0;
    color: var(--muted);
}

.books-new__controls {
    display: flex;
    gap: 12px;
}

.books-new__arrow {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: var(--bg);
    color: var(--text);
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.books-new__arrow:hover:not(:disabled) {
    transform: translateY(-1px);
    background: rgba(0, 123, 255, 0.08);
}

.books-new__arrow:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.books-new__viewport {
    overflow: hidden;
}

.books-new__track {
    display: flex;
    gap: 16px;
    transition: transform 0.45s ease;
}

.books-new__item {
    flex: 0 0 100%;
}

.book-card {
    border-radius: 20px;
    overflow: hidden;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.book-card__cover {
    min-height: 160px;
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.2));
    position: relative;
}

.book-card__cover::after {
    content: '';
    position: absolute;
    inset: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.book-card__content {
    padding: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(248,250,255,0.98));
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.book-card__badge {
    display: inline-flex;
    align-self: flex-start;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0, 123, 255, 0.12);
    color: #0d4faa;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.book-card__content h3 {
    font-size: 22px;
    margin: 0;
}

.book-card__content p {
    color: var(--muted);
    line-height: 1.6;
    flex: 1;
}

.book-card__content a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    align-self: flex-start;
}

.book-card--blue .book-card__cover {
    background: linear-gradient(135deg, #7dd3fc, #2563eb);
}

.book-card--peach .book-card__cover {
    background: linear-gradient(135deg, #fdba74, #f97316);
}

.book-card--mint .book-card__cover {
    background: linear-gradient(135deg, #86efac, #10b981);
}

.book-card--gold .book-card__cover {
    background: linear-gradient(135deg, #fde68a, #f59e0b);
}

@media (min-width: 768px) {
    .books-new__item {
        flex-basis: calc((100% - 16px) / 2);
    }
}

@media (min-width: 1100px) {
    .books-new__item {
        flex-basis: calc((100% - 32px) / 3);
    }
}

.public-chat {
    width: 90%;
    padding: 0 20px;
}

.chat-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.chat-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}

.chat-header h2 {
    margin: 0;
    font-size: 28px;
}

.chat-header p {
    margin: 8px 0 0;
    color: var(--muted);
}

.chat-meta {
    color: var(--text);
    font-size: 14px;
}

.chat-messages {
    max-height: 420px;
    overflow-y: auto;
    padding: 18px;
    border-radius: 20px;
    background: #f7f8fb;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.chat-empty {
    color: var(--muted);
    font-size: 16px;
    text-align: center;
    padding: 40px 0;
}

.chat-message {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.chat-message:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.chat-message__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
}

.chat-message__top strong {
    font-weight: 700;
}

.chat-message__meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.chat-message p {
    margin: 0;
    color: #444;
    line-height: 1.7;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: pre-wrap;
}

.chat-delete-form {
    margin: 0;
}

.chat-delete-button {
    border: 0;
    border-radius: 999px;
    padding: 6px 11px;
    background: #c0392b;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.chat-delete-button:hover {
    background: #a93226;
}

.chat-form {
    margin-top: 22px;
    display: grid;
    gap: 14px;
}

.chat-form textarea {
    height: 140px;
    max-height: 140px;
    overflow-y: auto;
    resize: none;
    border: 1px solid var(--input-border);
    border-radius: 14px;
    padding: 16px;
    font-size: 15px;
    color: var(--text);
    background: #fff;
}

.chat-form button {
    width: auto;
    padding: 14px 22px;
    border-radius: 14px;
    background: var(--button-bg);
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.chat-form button:hover {
    background: var(--button-hover);
}

.chat-login-note {
    display: inline-block;
    margin-top: 4px;
    color: var(--muted);
}

.chat-login-prompt {
    margin-top: 22px;
    padding: 22px;
    border-radius: 18px;
    background: #f7f8fb;
    border: 1px solid rgba(0,0,0,0.05);
}

.chat-login-prompt p {
    margin: 0 0 14px;
    color: #555;
    line-height: 1.6;
}

.chat-login-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.chat-login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 12px;
    background: var(--button-bg);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.chat-login-button:hover {
    background: var(--button-hover);
}

.chat-register-button {
    background: #555;
}

.chat-register-button:hover {
    background: #444;
}

@media screen and (max-width: 980px) {
    .home-carousel { left: -40px; width: calc(100vw + 40px); }
    .carousel-item { padding: 40px 24px; }
    .carousel-arrow { width: 46px; height: 46px; }
}

@media screen and (max-width: 720px) {
    .carousel-item { padding: 32px 18px; }
    .carousel-header h2 { font-size: 2.4rem; }
    .chat-card { padding: 22px; }
    .chat-messages { max-height: 320px; }
}

.table-list {
    max-height: 100%;
    overflow: auto;
    width: calc(100% + 10px);
    padding-right: 10px;
    position: static;
    padding-bottom: 60px;
    z-index: 1;
}

.sc-table-list {
    display: flex;
    -webkit-box-align: center;
    align-items: center;
    width: 100%;
}

.table-overall li {
    border: 1px solid transparent;
    border-radius: 10px;
    background: rgb(25, 30, 40);
    margin-bottom: 6px;
    cursor: pointer;
    padding: 14px;
    transition: 0.2s;
    overflow: hidden;
    width: 100%;
}

.table-text {
    display: flex;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    color: rgb(199, 211, 226);
    -webkit-box-align: center;
    align-items: center;
    gap: 5px;
    line-height: 19px;
}

.table-count {
    font-size: 14px;
    color: rgb(180, 190, 210);
    font-weight: 600;
}

.loaded-books {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.loaded-book {
    padding: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

.loaded-book h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #ffffff;
}

.loaded-book p {
    margin: 0 0 8px;
    color: rgb(159, 166, 182);
    line-height: 1.6;
}

.grey-scroll::-webkit-scrollbar-thumb {
    background: #374256;
    border-radius: 4px;
    border: none;
}

.boarder {
    background: rgb(25, 30, 40);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    padding: 45px;
    -webkit-box-pack: start;
    justify-content: flex-start;
    align-items: flex-start;
    margin-bottom: 19px;
}

.sc-banner-title {
    font-weight: 700;
    font-size: 40px;
    display: flex;
    -webkit-box-align: center;
    align-items: center;
}

.sc-banner-text {
    margin: 7px 0px 15px;
    font-weight: 400;
    font-size: 17px;
    line-height: 24px;
    max-width: 620px;
    color: rgb(122, 134, 151);
}

.sc-banner-buttons {
    display: flex;
    -webkit-box-align: center;
    align-items: center;
    gap: 8px;
}

button {
    cursor: pointer;
    font-family: Roboto;
    transition: filter 0.3s;
}

.g82FKa {
    background: rgba(166, 133, 115, 0.1);
    border-radius: 8px;
    padding: 0px 14px;
    font-weight: 500;
    height: 42px;
    font-size: 14px;
    color: rgb(235, 182, 103);
    display: flex;
    -webkit-box-align: center;
    align-items: center;
    transition: 0.2s;
}

.auth-card {
      width: 100%;
      max-width: 390px;
      background: #121212;
      border-radius: 10px;
      padding: 24px 22px 22px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    }

    .logo {
      text-align: center;
      margin-bottom: 18px;
      font-weight: 800;
      font-size: 34px;
      line-height: 1;
      letter-spacing: -1px;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .majestic {
      color: #fff;
      font-style: italic;
      font-size: 34px;
    }

    .subtitle {
      text-align: center;
      color: #9c9c9c;
      font-size: 15px;
      line-height: 1.5;
      margin-bottom: 18px;
      font-weight: 600;
    }

    .info-box,
    .input,
    .btn {
      width: 100%;
      border: none;
      border-radius: 8px;
    }

    .info-box {
      background: #242424;
      color: #9b9b9b;
      padding: 14px 14px;
      font-size: 13px;
      line-height: 1.45;
      margin-bottom: 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .info-left {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }

    .info-icon {
      width: 18px;
      height: 18px;
      flex: 0 0 18px;
      color: #6f6f6f;
    }

    .chevron {
      color: #7b7b7b;
      font-size: 20px;
      line-height: 1;
      flex: 0 0 auto;
    }

    .field {
      position: relative;
      margin-bottom: 12px;
    }

    .input {
      background: #232323;
      color: #d8d8d8;
      padding: 15px 44px 15px 44px;
      font-size: 15px;
      outline: none;
      border: 1px solid transparent;
      transition: 0.2s ease;
      font-weight: 600;
    }

    .input::placeholder {
      color: #7e7e7e;
      font-weight: 600;
    }

    .input:focus {
      border-color: #3b3b3b;
      background: #272727;
    }

    .field-icon {
      position: absolute;
      left: 14px;
      top: 50%;
      transform: translateY(-50%);
      width: 18px;
      height: 18px;
      color: #6f6f6f;
      pointer-events: none;
    }

    .eye {
      position: absolute;
      right: 14px;
      top: 50%;
      transform: translateY(-50%);
      width: 18px;
      height: 18px;
      color: #fff;
      cursor: pointer;
    }

    .btn {
      padding: 15px 16px;
      background: #232323;
      color: #8d8d8d;
      font-weight: 800;
      font-family: 'Courier New', Courier, monospace;
      font-size: 16px;
      cursor: pointer;
      margin-bottom: 10px;
      transition: 0.2s ease;
    }

    .btn:hover {
      background: #2c2c2c;
    }

    .btn.primary {
      background: #151515;
      color: #fff;
      border: 1px solid #1f1f1f;
    }

    .forgot {
      text-align: center;
      margin-top: 8px;
      color: #8d8d8d;
      font-size: 14px;
      font-weight: 600;
    }

    .forgot a {
      color: #fff;
      text-decoration: none;
      margin-left: 6px;
      font-weight: 700;
    }

    @media (max-width: 420px) {
      .auth-card {
        padding: 20px 16px 18px;
      }

      .majestic {
        font-size: 30px;
      }

      .subtitle {
        font-size: 14px;
      }
    }

    .admin_nav {
        background: rgb(19, 24, 33);
        border-radius: 10px;
        padding: 5px 4px;
    }
    
    .overlay_adminbuttons {
        padding: 9px 20px;
        border-radius: 5px;
        border: 1px solid transparent;
        background: rgb(25, 30, 40);
        font-family: 'Segoe UI', monospace;
    }
    
    .overlay_adminbuttons:hover {
        background: rgb(27, 32, 45);
        transition: 0.5s;
    }

    .admin_content_container {
        padding: 20px;
        margin-top: 20px;
        display: flex;  
        justify-content: space-between;
        align-items: flex-start;
        width: 100%;
    }

    .admin_content_left {
        background: rgb(25, 30, 40);
        border-radius: 10px;
        padding: 20px;
        margin-bottom: 20px;
    }

/* ===== PROFILE STYLES ===== */
.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
}

.profile-sidebar {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.profile-header {
    text-align: center;
    margin-bottom: 25px;
}

.profile-avatar-container {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.profile-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
}

.profile-edit-avatar {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 40px;
    background: #007bff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    border: 3px solid white;
    font-size: 18px;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--text);
}

.profile-role {
    color: #007bff;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.profile-stat-item {
    text-align: center;
}

.profile-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #007bff;
}

.profile-stat-label {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}

.profile-actions {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.profile-btn {
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.profile-btn-primary {
    background: #007bff;
    color: white;
}

.profile-btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.profile-btn-secondary {
    background: #f0f0f0;
    color: var(--text);
    border: 1px solid #e0e0e0;
}

.profile-btn-secondary:hover {
    background: #e8e8e8;
}

.profile-content {
    display: grid;
    gap: 24px;
}

.profile-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.profile-section-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-section-title i {
    color: #007bff;
}

.profile-info-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 20px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.profile-info-item:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.profile-info-label {
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
}

.profile-info-value {
    color: var(--text);
    font-weight: 500;
}

.profile-info-value.email {
    word-break: break-all;
}

.profile-recommendations {
    display: grid;
    gap: 12px;
}

.recommendation-card {
    background: #f8f9fb;
    padding: 16px;
    border-radius: 12px;
    border-left: 4px solid #007bff;
}

.recommendation-title {
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--text);
}

.recommendation-desc {
    font-size: 14px;
    color: var(--muted);
    margin: 0;
    line-height: 1.5;
}

.profile-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
}

/* ===== SETTINGS PAGE STYLES ===== */
.settings-container {
    max-width: 900px;
    margin: 0 auto;
}

.settings-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text);
}

.settings-grid {
    display: grid;
    gap: 24px;
}

.settings-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.settings-section-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-form {
    display: grid;
    gap: 20px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-label {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.form-input,
.form-textarea,
.form-select {
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.avatar-upload-section {
    display: grid;
    gap: 16px;
}

.avatar-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 36px;
    font-weight: bold;
    overflow: hidden;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-input {
    display: none;
}

.avatar-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #007bff;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.avatar-upload-label:hover {
    background: #0056b3;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

.btn-submit {
    padding: 12px 28px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.btn-cancel {
    padding: 12px 28px;
    background: #f0f0f0;
    color: var(--text);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #e8e8e8;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #28a745;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #dc3545;
}

@media (max-width: 768px) {
    .profile-container {
        grid-template-columns: 1fr;
    }

    .profile-sidebar {
        position: static;
    }

    .profile-info-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}
    
    