* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-secondary);
    position: relative;
    color: var(--text-primary);
}

.center {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
}

.grey-text {
    color: var(--text-secondary);
    font-weight: 500;
}

header {
    height: 3.5rem;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
}

.nav-bar {
    width: 100%;
    height: 3.5rem;
    background-color: var(--nav-bg);
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    border-bottom: 1px solid var(--border-color);
    box-sizing: border-box;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.brand-logo {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    object-fit: cover;
}

.brand h2 {
    font-size: 1.4rem;
}

.nav-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-content: center;
}

.nav-item {
    display: inline-block;
    margin-inline: 0.5rem;

}

.add-btn {
    height: 2.5rem;
    width: 12rem;
    border-radius: 10px;
    border: #C54344;
    display: grid;
    grid-template-columns: 2rem 1fr;
    grid-template-rows: 1fr;
    column-gap: 0.5rem;
    background-color: #C54344;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
}

.add-btn:active {
    transform: translate3d(0px, 1px, -5px);
}

.add-svg {
    grid-column: 1/2;
    grid-row: 1/2;
    display: flex;
    align-self: center;
    justify-self: end;
}

.add-item {
    grid-column: 2/3;
    grid-row: 1/2;
    display: flex;
    align-self: center;
    justify-self: start;
}

.toggle-theme {
    position: relative;
    height: 2rem;
    width: 3.8rem;
    border: var(--border-color) 1px solid;
    border-radius: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    align-self: center;
    cursor: pointer;
    background-color: var(--bg-primary);
    transition: border-color 0.2s;
}

.slider {
    width: 1.4rem;
    height: 1.4rem;
    background-color: var(--deco-red);
    border-radius: 50%;
    position: absolute;
    top: 4px;
    left: 4px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sun-theme,
.moon-theme {
    display: flex;
    flex-wrap: wrap;
    justify-self: center;
    align-self: center;
}

.sun-theme {
    grid-column: 1/2;
    grid-row: 1/2;
}

.moon-theme {
    grid-column: 2/3;
    grid-row: 1/2;
}

.user-profile {
    width: 2rem;
    height: 2rem;
    border: #000 1px solid;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-self: center;
    cursor: pointer;
}

main {
    position: relative;
    display: grid;
    grid-template-areas: "sidebar mainbar";
    grid-template-columns: 16rem 1fr;
    grid-template-rows: 1fr;
}

.sidebar {
    position: fixed;
    top: 3.5rem;
    bottom: 0;
    width: 16rem;
    grid-area: sidebar;
    padding: 2rem 1.5rem 1.5rem;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
}

.sidebar h2 {
    height: 3rem;
    border-bottom: 2px solid var(--border-color);
    justify-content: start;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.sidebar_list {
    list-style-type: none;
    font-size: 1rem;
}

.sidebar_list li {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    height: 2.5rem;
    margin: 0.7rem 0;
    background-color: var(--bg-primary);
}

.sidebar_list li a {
    height: 100%;
    display: grid;
    grid-template-columns: 3rem 1fr;
    grid-template-rows: 1fr;
    row-gap: 5px;
}

a:any-link {
    color: var(--text-primary);
    text-decoration: none;
}

.sidebar_list li:hover {
    background-color: var(--deco-red-muted);
}

/* Sidebar Active State */
.sidebar_list li.active {
    background-color: var(--deco-red-muted);
    border-color: var(--deco-red);
}

.sidebar_list li.active .item-name {
    color: var(--deco-red);
    font-weight: 700;
}

.sidebar_list li.active .item-svg {
    stroke: var(--deco-red);
    color: var(--deco-red);
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin: 2rem 0;
    padding: 1rem;
    width: 100%;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--deco-red-muted);
    border-color: var(--deco-red);
    color: var(--deco-red);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.item-svg {
    display: flex;
    flex-wrap: wrap;
    align-self: center;
    justify-self: center;
    stroke: var(--deco-red);
    color: var(--deco-red);
}

.item-name {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: start;
}

.sidebar_list li:last-child {
    height: 3rem;
}

.sidebar_list li:last-child svg {
    height: 24px;
    width: 24px;
}

.settings {
    display: grid;
    grid-template-columns: 3rem 1fr;
    grid-template-rows: 1fr;
    row-gap: 5px;
    position: absolute;
    bottom: 2rem;
}

.mainbar {
    grid-area: mainbar;
    background-color: var(--bg-secondary);
}

.main-section {
    padding: 2rem;
}

.main-section h1 {
    margin-bottom: 1rem;
}

.content-list {
    list-style-type: none;
    margin: 0.5rem 0 1rem;
    height: auto;
    width: 100%;
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 0.5rem;
    scrollbar-width: none; 
    -ms-overflow-style: none;
}

.content-list::-webkit-scrollbar {
    display: none;
}

.content-list-item {
    flex: 0 0 12rem;
    height: 8rem;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 1rem;
    background-color: var(--card-bg);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.item-state {
    font-size: 1rem;
    text-align: center;
    line-height: 1.2;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.numbers {
    font-size: 2.5rem;
    font-weight: 700;
    color: #C54344;
    margin-top: auto;
    line-height: 1;
}

.filter-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background-color: var(--card-bg);
    border-radius: 10px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.search-box {
    flex: 2;
    min-width: 200px;
    height: 3rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    background-color: var(--input-bg);
    gap: 0.5rem;
}

#search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 1rem;
    font-family: inherit;
    color: #333;
}

body.dark-mode #search-input {
    color: #e0e0e0;
}

.search-icon {
    color: #666;
    width: 20px;
    height: 20px;
}

.filter-select {
    flex: 1;
    height: 3rem;
    padding: 0 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--input-bg);
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

.filter-select:focus {
    outline: none;
    border-color: #4169e1;
}

.apply-btn {
    height: 3rem;
    padding: 0 1.5rem;
    border: none;
    border-radius: 8px;
    background-color: #C54344;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.apply-btn:hover {
    background-color: #C54344;
}

.apply-btn:active {
    transform: translateY(1px);
}

.filter-icon {
    width: 18px;
    height: 18px;
}

.reset-btn {
    height: 3rem;
    padding: 0 1.5rem;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    background-color: #fff;
    color: #666;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.reset-btn:hover {
    background-color: #f5f5f5;
    border-color: #999;
}

.reset-btn:active {
    transform: translateY(1px);
}

.resource-section {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.resource-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.2s;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
}

.resource-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.resource-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.no-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    margin-bottom: 1rem;
}

.resource-card h3 {
    margin: 0 0 1rem 0;
    color: #C54344;
}

.resource-card p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.resource-location {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.25rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background-color: var(--deco-red-muted);
    color: var(--deco-red);
    font-size: 0.85rem;
    font-weight: 600;
}

.resource-card-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
}

.details-btn {
    border: none;
    border-radius: 8px;
    padding: 0.7rem 1rem;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    background-color: #C54344;
    color: #fff;
    flex: 1;
}

.details-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.details-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 9999;
}

.details-modal.open {
    display: flex;
}

.details-modal__backdrop {
    position: absolute;
    inset: 0;
    background: var(--modal-backdrop);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.details-modal__panel {
    position: relative;
    width: min(100%, 32rem);
    background: var(--card-bg);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    z-index: 1;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.details-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.details-modal__subtitle {
    margin: 0.75rem 0 1rem;
    color: var(--text-secondary);
}

.details-close {
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 50%;
    background: var(--deco-red-muted);
    color: var(--deco-red);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.details-image-group {
    grid-column: 1 / -1;
}

.details-modal .form-group {
    margin-bottom: 0.5rem;
}

.details-modal label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: var(--text-primary);
}

.details-modal input,
.details-modal select {
    width: 100%;
    height: 3rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0 1rem;
    font: inherit;
    background: var(--input-bg);
    color: var(--text-primary);
}

.details-message {
    min-height: 1.2rem;
    margin: 0.25rem 0 0.9rem;
    color: #d9534f;
    font-size: 0.92rem;
}

.details-actions {
    display: flex;
    gap: 0.75rem;
}

.details-secondary,
.details-primary {
    flex: 1;
    height: 3rem;
    border: none;
    border-radius: 10px;
    font: inherit;
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
}

.details-secondary {
    background: #edf0f5;
    color: #333;
}

.details-primary {
    background: #C54344;
    color: #fff;
}

.details-primary:disabled,
.details-secondary:disabled {
    cursor: not-allowed !important;
    opacity: 0.6;
    filter: grayscale(0.3);
}

.resource-card .date {
    color: #999;
    margin-top: 1rem;
}

.no-resources,
.error-message {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 1.1rem;
}

.error-message {
    color: #d9534f;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
}

/* Dark Mode Styles (Cleaned up as variables handle most things) */
body.dark-mode .details-btn {
    background-color: var(--deco-red);
}

body.dark-mode .details-secondary {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* Tablet / iPad breakpoint — collapse sidebar to bottom nav */

/* Hide tablet-only nav items on desktop */
.tablet-nav-admin {
    display: none !important;
}

.mobile-filter-trigger {
    display: none;
}

.filter-header-mobile {
    display: none;
}

.filter-backdrop {
    display: none;
}

@media (max-width: 1024px) {
    .details-grid {
        grid-template-columns: 1fr;
    }

    main {
        grid-template-areas: "mainbar";
        grid-template-columns: 1fr;
        padding-bottom: 5rem;
    }

    .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        top: auto;
        width: 100%;
        height: 5rem;
        padding: 0;
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        border-top: 1px solid var(--border-color);
        border-right: none;
        z-index: 100;
        background-color: var(--sidebar-bg);
    }

    .sidebar h2 {
        display: none;
    }

    .sidebar_list {
        display: flex;
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
        align-items: center;
        margin: 0;
        padding: 0;
    }

    .sidebar_list li {
        width: auto;
        height: 100%;
        border: none;
        margin: 0;
        flex: 1;
        display: flex;
        justify-content: center;
        background-color: transparent;
    }

    .sidebar_list li a {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4px;
        padding: 0.5rem 0;
    }

    .item-name {
        font-size: 0.7rem;
        text-align: center;
        line-height: 1.1;
    }

    .sidebar-footer {
        display: none !important;
    }

    .settings {
        display: none !important;
    }

    .mainbar {
        width: 100%;
        min-width: 0;
    }

    /* Show tablet-only admin/logout items in bottom nav */
    .tablet-nav-admin {
        display: flex !important;
    }
}

@media (max-width: 600px) {
    .nav-bar {
        padding: 0 0.8rem;
        height: 4rem;
        flex-wrap: nowrap;
    }

    .brand h2 {
        font-size: 1rem;
        white-space: nowrap;
    }

    .nav-actions {
        gap: 0.3rem;
        flex-wrap: nowrap;
    }

    .add-btn {
        width: 2.5rem;
        padding: 0;
        grid-template-columns: 1fr;
        height: 2.5rem;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .add-item {
        display: none;
    }
    
    .add-svg {
        margin: 0;
    }

    .toggle-theme {
        margin-inline: 0.1rem;
        transform: scale(0.85);
    }

    .main-section {
        padding: 1.2rem 1rem;
    }

    .main-section h1 {
        font-size: 1.5rem;
    }

    .content-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        overflow-x: visible;
        gap: 0.8rem;
    }

    .content-list-item {
        flex: none;
        width: 100%;
        height: auto;
        min-height: 7rem;
        padding: 0.8rem;
    }

    .content-list-item .item-state {
        font-size: 0.75rem;
    }

    .content-list-item .numbers {
        font-size: 1.5rem;
    }

    .filter-box {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: var(--card-bg);
        z-index: 1000;
        padding: 1.5rem;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
        display: flex;
        flex-direction: column;
        gap: 1.2rem;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        visibility: hidden;
    }

    .filter-box.active {
        transform: translateY(0);
        visibility: visible;
    }

    .filter-header-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.5rem;
    }

    .filter-header-mobile h3 {
        font-size: 1.2rem;
        color: var(--text-primary);
    }

    .close-filter {
        background: none;
        border: none;
        font-size: 2rem;
        line-height: 1;
        color: var(--text-secondary);
        cursor: pointer;
    }

    .mobile-filter-trigger {
        display: flex !important;
        gap: 0.6rem;
        padding: 0.8rem;
        background-color: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        margin-bottom: 1rem;
        color: var(--text-primary);
        font-weight: 600;
        box-shadow: var(--card-shadow);
    }

    .filter-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        backdrop-filter: blur(4px);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }

    .filter-backdrop.active {
        opacity: 1;
        visibility: visible;
    }

    .search-box {
        width: 100%;
        border-radius: 8px;
    }

    .search-box svg {
        margin: 0;
    }

    .resource-grid {
        grid-template-columns: 1fr;
    }
}

/* Location Entry Styling */
.location-entry {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    padding: 14px;
    background-color: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

body.dark-mode .location-entry {
    background-color: #242424;
    border-color: #404040;
}

.location-entry .location-select,
.location-entry .custom-location-input,
.location-entry .location-quantity {
    margin-bottom: 0 !important;
}

.remove-location-btn {
    background-color: #ff4d4f !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0 14px !important;
    height: 42px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-location-btn:hover {
    background-color: #d9363e !important;
}

/* Custom File Input Styling */
input[type="file"]::file-selector-button {
    background-color: #C54344;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-right: 1rem;
}

input[type="file"]::file-selector-button:hover {
    background-color: #083452;
}

body.dark-mode input[type="file"] {
    background-color: #242424 !important;
    border-color: #404040 !important;
}
/* Integrated Auth Modals */
.auth-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    padding: 1.5rem;
}

.auth-panel {
    background: rgba(255, 255, 255, 0.95);
    width: min(100%, 28rem);
    padding: 3rem 2rem;
    border-radius: 30px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-logo {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #C54344;
}

.auth-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-panel h2 {
    margin-bottom: 0.2rem;
    font-size: 1.8rem;
    color: #1d1d1f;
}

.auth-panel .slogan {
    font-style: italic;
    color: #C54344;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.auth-description {
    color: #6e6e73;
    line-height: 1.5;
    margin-bottom: 2.5rem;
}

.auth-options {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.auth-btn {
    width: 100%;
    padding: 1.2rem 1.5rem;
    border-radius: 18px;
    border: 1.5px solid #d2d2d7;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.auth-btn.premium {
    background: #FCE8E8;
    border-color: #C54344;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.auth-btn.premium:hover {
    background: #C54344;
    color: #fff;
}

.auth-btn.premium:hover span {
    color: rgba(255, 255, 255, 0.8);
}

.auth-btn-content h3 {
    margin-bottom: 0.2rem;
    font-size: 1.1rem;
}

.auth-btn-content span {
    font-size: 0.85rem;
    color: #86868b;
}

.back-btn {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: none;
    background: #f5f5f7;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.back-btn:hover {
    background: #e8e8ed;
}

.auth-icon-circle {
    width: 4rem;
    height: 4rem;
    background: #FCE8E8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.auth-form {
    margin-top: 2rem;
}

.input-group {
    text-align: left;
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1d1d1f;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    width: 100%;
    height: 3.5rem;
    padding: 0 3.5rem 0 1.2rem;
    border-radius: 12px;
    border: 1.5px solid #d2d2d7;
    font-size: 1.2rem;
    letter-spacing: 0.2rem;
    background: #fff;
}

.toggle-pass {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #86868b;
}

.auth-submit-btn {
    width: 100%;
    height: 3.5rem;
    border-radius: 12px;
    border: none;
    background: #C54344;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.auth-submit-btn:hover {
    background: #a33536;
}

.auth-footer {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: #86868b;
}

/* Dark Mode Overrides for Auth Modals */
body.dark-mode .auth-panel {
    background: rgba(30, 30, 30, 0.95);
}

body.dark-mode .auth-panel h2 {
    color: #fff;
}

body.dark-mode .auth-btn {
    background: #2c2c2e;
    border-color: #48484a;
    color: #fff;
}

body.dark-mode .auth-btn.premium {
    background: rgba(197, 67, 68, 0.15);
    border-color: #C54344;
}

body.dark-mode .auth-btn.premium:hover {
    background: #C54344;
}

body.dark-mode .back-btn {
    background: #3a3a3c;
    color: #fff;
}

body.dark-mode .password-wrapper input {
    background: #1c1c1e;
    border-color: #3a3a3c;
    color: #fff;
}

body.dark-mode .input-group label {
    color: #fff;
}

/* Sidebar Footer & Logout */
.sidebar-footer {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-footer .settings {
    position: static;
}

.logout-link, .settings {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    border-radius: 10px;
    transition: background 0.2s;
}

.logout-link .item-svg, .settings .item-svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.logout-link:hover {
    background: rgba(197, 67, 68, 0.1);
}
