* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    background: url("/static/img/bg.jpg") center / cover no-repeat fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: -1;
}

/* AUTH */

.auth-box {
    width: 400px;
    padding: 35px;
    border-radius: 22px;

    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.45);

    text-align: center;
}

h1 {
    margin: 0 0 10px;
    font-size: 38px;
    letter-spacing: 2px;
}

h2 {
    margin: 0 0 25px;
    font-weight: normal;
    color: rgba(255, 255, 255, 0.85);
}

input,
textarea {
    width: 100%;
    margin-bottom: 15px;
    padding: 0 15px;

    border: none;
    outline: none;
    border-radius: 12px;

    background: rgba(255, 255, 255, 0.18);
    color: white;
    font-size: 15px;
}

input {
    height: 48px;
}

textarea {
    padding-top: 15px;
    padding-bottom: 15px;
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

button {
    width: 100%;
    height: 48px;

    border: none;
    border-radius: 12px;

    background: rgba(255, 255, 255, 0.28);
    color: white;
    font-size: 16px;

    cursor: pointer;
    transition: 0.25s;
}

button:hover {
    background: rgba(255, 255, 255, 0.42);
}

p {
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.8);
}

a {
    color: white;
    font-weight: bold;
    text-decoration: none;
}

.error {
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 12px;

    background: rgba(255, 60, 60, 0.25);
    border: 1px solid rgba(255, 80, 80, 0.45);

    color: white;
    font-size: 14px;
}

.success {
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 12px;

    background: rgba(60, 255, 120, 0.22);
    border: 1px solid rgba(80, 255, 140, 0.45);

    color: white;
    font-size: 14px;
}

/* DASHBOARD */

.dashboard-layout {
    display: flex;
    width: 100%;
    height: 100vh;
}

.sidebar {
    width: 260px;
    padding: 25px;

    display: flex;
    flex-direction: column;
    gap: 15px;

    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    border-left: 1px solid rgba(255, 255, 255, 0.25);
}

.sidebar-logo {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

.sidebar-link {
    padding: 12px 15px;
    border-radius: 12px;

    background: rgba(255, 255, 255, 0.12);
    color: white;
    text-decoration: none;

    transition: 0.25s;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.25);
}

.sidebar-link.active {
    background: rgba(255, 255, 255, 0.35);
}

.admin-link {
    background: rgba(255, 200, 50, 0.25);
}

.logout {
    margin-top: auto;
    background: rgba(255, 80, 80, 0.25);
}

.logout:hover {
    background: rgba(255, 80, 80, 0.45);
}

.content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* DASHBOARD SOCIAL */

.dashboard-socials {
    display: flex;
    gap: 40px;
}

.dashboard-card {
    width: 150px;
    height: 80px;
    border-radius: 20px;

    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.45);

    color: white;
    font-size: 20px;
    font-weight: bold;

    display: flex;
    justify-content: center;
    align-items: center;

    text-decoration: none;
    transition: 0.25s;
}

.dashboard-card:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-5px);
}

/* PROFILE + ADMIN BOX */

.profile-box {
    width: 420px;
    padding: 30px;
    border-radius: 20px;

    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    border: 1px solid rgba(255, 255, 255, 0.25);
}

.profile-box h2 {
    margin-bottom: 20px;
    text-align: center;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;

    color: rgba(255, 255, 255, 0.9);
}

.change-password-btn {
    margin-top: 20px;
    width: 100%;
    height: 45px;

    border-radius: 12px;

    background: rgba(255, 255, 255, 0.25);
    color: white;

    display: flex;
    justify-content: center;
    align-items: center;

    text-decoration: none;
    font-size: 15px;

    transition: 0.25s;
}

.change-password-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* MAIL SYSTEM */

.mail-box {
    width: 650px;
}

.item-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 45px;
    gap: 10px;
    margin-bottom: 10px;
}

.item-row input {
    margin-bottom: 0;
}

.add-item-btn {
    margin-bottom: 15px;
    width: 100%;
    height: 45px;
}

.remove-item-btn {
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 80, 80, 0.25);
    color: white;
    cursor: pointer;
}

.remove-item-btn:hover {
    background: rgba(255, 80, 80, 0.45);
}

.results-box {
    margin-top: 20px;
    padding: 15px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
}

.result-row {
    margin-bottom: 8px;
    font-size: 14px;
}

/* WIKI */

.wiki-list-box {
    width: 650px;
}

.wiki-list-item {
    display: block;
    padding: 14px 16px;
    margin-bottom: 10px;
    border-radius: 14px;

    background: rgba(255, 255, 255, 0.14);
    color: white;
    text-decoration: none;

    transition: 0.25s;
}

.wiki-list-item:hover {
    background: rgba(255, 255, 255, 0.25);
}

.wiki-page-box {
    width: 760px;
    max-height: 80vh;
    overflow-y: auto;
}

.wiki-content {
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.92);
}

.wiki-content h1,
.wiki-content h2,
.wiki-content h3 {
    text-align: left;
}

.wiki-editor-box {
    width: 760px;
}

.wiki-editor {
    width: 100%;
    min-height: 360px;
    resize: vertical;

    padding: 15px;
    margin-bottom: 15px;

    border: none;
    outline: none;
    border-radius: 12px;

    background: rgba(255, 255, 255, 0.18);
    color: white;
    font-size: 15px;
    font-family: Arial, sans-serif;
}

.wiki-editor::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 15px;
    color: white;
}

.checkbox-row input {
    width: auto;
    height: auto;
    margin: 0;
}

.admin-wiki-row {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 14px;
    margin-bottom: 10px;
    border-radius: 14px;

    background: rgba(255, 255, 255, 0.14);
}

.admin-wiki-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.small-text {
    margin-top: 4px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
}

.empty-text {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.small-delete-btn {
    width: auto;
    height: auto;
    padding: 8px 12px;

    background: rgba(255, 80, 80, 0.25);
    font-size: 13px;
}

.small-delete-btn:hover {
    background: rgba(255, 80, 80, 0.45);
}

.editor-toolbar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.editor-toolbar button {
    height: 40px;
    font-size: 14px;
}

.image-upload-box {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 10px;
    margin-bottom: 15px;
}

.image-upload-box input {
    margin-bottom: 0;
}

.image-upload-box button {
    height: 48px;
}

.wiki-editor {
    min-height: 520px;
    line-height: 1.6;
}

.wiki-content img,
.wiki-image {
    max-width: 100%;
    border-radius: 14px;
    margin: 15px 0;
    display: block;
}

.wiki-content p {
    margin: 0 0 14px;
}

.wiki-content ul,
.wiki-content ol {
    margin: 12px 0 18px 25px;
}

.wiki-content li {
    margin-bottom: 8px;
}

.wiki-visual-editor {
    width: 100%;
    min-height: 520px;
    max-height: 65vh;
    overflow-y: auto;

    padding: 18px;
    margin-bottom: 15px;

    border-radius: 12px;
    outline: none;

    background: rgba(255, 255, 255, 0.18);
    color: white;

    font-size: 16px;
    line-height: 1.7;
}

.wiki-visual-editor:focus {
    background: rgba(255, 255, 255, 0.22);
}

.wiki-visual-editor p {
    margin: 0 0 14px;
}

.wiki-visual-editor h2 {
    margin: 18px 0 12px;
    text-align: left;
}

.wiki-visual-editor ul,
.wiki-visual-editor ol {
    margin: 12px 0 18px 25px;
}

.wiki-visual-editor li {
    margin-bottom: 8px;
}

.editable-image {
    display: block;
    margin: 18px 0;
    border-radius: 14px;
    cursor: pointer;
}

.selected-image {
    outline: 3px solid rgba(255, 255, 255, 0.75);
    outline-offset: 4px;
}

.image-size-box {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 10px;
    margin-bottom: 15px;
}

.image-size-box input {
    margin-bottom: 0;
}

.image-size-box button {
    height: 48px;
}
.warehouse-box {
    width: 900px;
    max-width: calc(100vw - 340px);
    min-height: 520px;

    padding: 30px;
    border-radius: 24px;

    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.45);
}

.warehouse-box h2 {
    margin-bottom: 28px;
    text-align: center;
    font-size: 34px;
    color: white;
}

.warehouse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 18px;
}

.warehouse-card {
    width: 100%;
}

.warehouse-card form {
    margin: 0;
}

.warehouse-take-btn {
    width: 100%;
    min-height: 210px;

    padding: 18px 14px;

    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;

    background: rgba(255, 255, 255, 0.08);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;

    cursor: pointer;
    transition: 0.25s;
}

.warehouse-take-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-4px);
}

.warehouse-icon-wrap {
    position: relative;

    width: 72px;
    height: 72px;

    margin-bottom: 14px;
}

.warehouse-icon {
    width: 72px;
    height: 72px;

    object-fit: contain;
    image-rendering: auto;

    display: block;
}

.warehouse-no-icon {
    width: 72px;
    height: 72px;

    border-radius: 14px;

    background: rgba(255, 255, 255, 0.12);
}

.warehouse-count {
    position: absolute;
    right: -10px;
    bottom: -8px;

    min-width: 30px;
    height: 24px;

    padding: 0 8px;

    border-radius: 10px;

    background: rgba(0, 0, 0, 0.82);

    display: flex;
    justify-content: center;
    align-items: center;

    color: white;
    font-size: 12px;
    font-weight: bold;
}

.warehouse-name {
    width: 100%;
    min-height: 42px;

    margin-bottom: 14px;

    color: white;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;

    text-align: center;
    word-break: break-word;
}

.warehouse-action {
    width: 100%;
    margin-top: auto;

    padding: 10px 0;

    border-radius: 12px;

    background: rgba(255, 255, 255, 0.14);

    color: white;
    font-size: 14px;
    font-weight: 600;

    transition: 0.25s;
}

.warehouse-take-btn:hover .warehouse-action {
    background: rgba(255, 255, 255, 0.24);
}

.warehouse-take-all-form {
    margin-top: 26px;
}

.warehouse-take-all-btn {
    width: 240px;
    height: 52px;
    margin: 0 auto;
    display: block;

    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);

    color: white;
    font-size: 16px;
    font-weight: 700;
}

.warehouse-take-all-btn:hover {
    background: rgba(255, 255, 255, 0.32);
}
/* SHOP */

.shop-box {
    width: 90vw;
    max-width: 1500px;
    min-height: 70vh;

    padding: 30px;
    border-radius: 24px;

    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.45);
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.shop-header h2 {
    margin: 0;
    font-size: 32px;
}

.shop-coins {
    padding: 8px 16px;
    border-radius: 12px;
    background: rgba(255, 200, 50, 0.22);
    border: 1px solid rgba(255, 200, 50, 0.4);
    font-weight: 700;
}

.shop-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 22px;
}

.shop-categories {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shop-category {
    padding: 12px 14px;
    border-radius: 12px;

    background: rgba(255, 255, 255, 0.12);
    color: white;
    text-decoration: none;

    transition: 0.25s;
}

.shop-category:hover {
    background: rgba(255, 255, 255, 0.22);
}

.shop-category.active {
    background: rgba(255, 255, 255, 0.35);
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    align-content: start;
}

.shop-card {
    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 14px 10px;

    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);

    transition: 0.25s;
}

.shop-card:hover {
    background: rgba(255, 255, 255, 0.14);
}

.shop-icon-wrap {
    width: 64px;
    height: 64px;
    margin-bottom: 10px;
}

.shop-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    display: block;
}

.shop-no-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
}

.shop-name {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    margin-bottom: 6px;
    word-break: break-word;
}

.shop-price {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 220, 120, 0.95);
    margin-bottom: 6px;
}

.shop-buy-form {
    width: 100%;
    margin: auto 0 0;
}

.qty-control {
    display: grid;
    grid-template-columns: 34px 1fr 34px;
    gap: 6px;
    align-items: center;
    margin-bottom: 10px;
}

.qty-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 18px;
    line-height: 1;
}

.qty-input {
    width: 100%;
    height: 34px;
    margin-bottom: 0;
    text-align: center;
    padding: 0;
    font-size: 14px;
}

.desc-toggle {
    width: 100%;
    height: 36px;
    margin-bottom: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 13px;
    font-weight: 600;
}

.desc-toggle:hover {
    background: rgba(255, 255, 255, 0.24);
}

/* Description modal */
.desc-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;

    background: rgba(0, 0, 0, 0.6);

    justify-content: center;
    align-items: center;
}

.desc-modal-inner {
    position: relative;
    width: 90%;
    max-width: 520px;
    max-height: 75vh;
    overflow-y: auto;

    padding: 28px 26px;
    border-radius: 20px;

    background: rgba(40, 30, 25, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.6);

    color: white;
}

.desc-modal-inner h3 {
    margin: 0 0 16px;
    font-size: 20px;
    text-align: left;
}

#desc-modal-body {
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
}

.desc-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;

    width: 34px;
    height: 34px;
    padding: 0;

    border-radius: 10px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 22px;
    line-height: 1;
}

.desc-modal-close:hover {
    background: rgba(255, 80, 80, 0.4);
}

.shop-buy-btn {
    width: 100%;
    height: 40px;
    border-radius: 12px;
    background: rgba(80, 200, 120, 0.30);
    font-size: 14px;
    font-weight: 600;
}

.shop-buy-btn:hover {
    background: rgba(80, 200, 120, 0.5);
}