/* MakeNoize - Custom styles, Dark theme, BEM, Mobile-first */
:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: #16213e;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --accent: #6c63ff;
    --accent-hover: #5a52d5;
    --danger: #ff4757;
    --success: #2ed573;
    --border: #2a2a4a;
    --header-height-mobile: 48px;
    --header-height-desktop: 56px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
}
*,
*::before,
*::after {
    box-sizing: border-box;
}
body {
    margin: 0;
    padding: 0;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        Segoe UI,
        Roboto,
        Oxygen,
        Ubuntu,
        sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
html {
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
}
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
    background: var(--bg-primary);
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border) var(--bg-primary);
}
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
/* AUTH */
.auth {
    min-height: 100vh;
    background-color: var(--bg-primary);
    position: relative;
}
.auth__logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}
.auth__logo--accent {
    color: var(--accent);
}
.auth__subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-align: center;
    margin: 0 0 0.5rem;
}
.auth__card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}
.auth__tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.auth__tab {
    flex: 1;
    padding: 0.75rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
    font-family: inherit;
}
.auth__tab:hover {
    color: var(--text-primary);
}
.auth__tab--active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.auth__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.auth__field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}
.auth__label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.auth__input {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border-color 0.2s;
    font-family: inherit;
}
.auth__input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}
.auth__input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
    outline: none;
}
.auth__input--error {
    border-color: var(--danger);
}
.auth__error {
    display: none;
    font-size: 0.75rem;
    color: var(--danger);
    min-height: 0;
    transition: min-height 0.2s;
}
.auth__error--visible {
    display: block;
    min-height: 1rem;
}
.auth__button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background-color: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: inherit;
}
.auth__button:hover {
    background-color: var(--accent-hover);
}
.auth__button--danger {
    background-color: var(--danger);
}
.auth__button--danger:hover {
    background-color: #e8384a;
}
.auth__button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.auth__button--loading {
    pointer-events: none;
    opacity: 0.7;
}
.auth__button--loading::after {
    content: "";
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 0.5rem;
}
.auth__link {
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}
.auth__link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}
.auth__message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1000;
    animation: slideDown 0.3s ease;
}
.auth__message--success {
    background-color: var(--success);
    color: #0f0f1a;
}
.auth__message--error {
    background-color: var(--danger);
    color: #fff;
}
/* HEADER */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height-mobile);
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 100;
}
.header__logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}
.header__logo--accent {
    color: var(--accent);
}
.header__nav {
    display: none;
    gap: 1.5rem;
    align-items: center;
}
@media (min-width: 768px) {
    .header__nav {
        display: flex;
    }
}
.header__nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}
.header__nav a:hover,
.header__nav a.active {
    color: var(--accent);
}
.header__btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.2s;
    font-family: inherit;
}
.header__btn:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

/* EDITOR */
.editor {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: var(--header-height-mobile);
    padding-bottom: 280px;
    background-color: var(--bg-primary);
}
@media (min-width: 768px) {
    .editor {
        padding-top: var(--header-height-desktop);
        padding-bottom: 0;
        display: grid;
        grid-template-columns: 60px 1fr;
        grid-template-rows: 1fr 80px;
        grid-template-areas: "tools canvas" "footer footer";
        min-height: 100vh;
    }
}
.editor__canvas-area {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background-color: var(--bg-primary);
}
@media (min-width: 768px) {
    .editor__canvas-area {
        grid-area: canvas;
    }
}
.editor__canvas-area canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}
.editor__upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    border: 2px dashed var(--border);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: border-color 0.2s;
    padding: 2rem;
    text-align: center;
}
.editor__upload-zone:hover,
.editor__upload-zone--dragover {
    border-color: var(--accent);
    background-color: rgba(108, 99, 255, 0.05);
}
.editor__upload-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}
.editor__upload-text {
    color: var(--text-secondary);
    font-size: 1rem;
}
/* BOTTOM PANEL */
.bottom-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 50;
    max-height: 60vh;
    overflow-y: auto;
}
@media (min-width: 768px) {
    .bottom-panel {
        position: static;
        grid-area: footer;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        max-height: none;
        overflow: visible;
        height: 80px;
        border-top: 1px solid var(--border);
    }
}
.bottom-panel__tools {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
@media (min-width: 768px) {
    .bottom-panel__tools {
        display: none;
    }
}
.bottom-panel__tool-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color 0.2s;
    padding: 0;
    font-size: 0.85rem;
    font-family: inherit;
}
.bottom-panel__tool-btn:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}
.bottom-panel__tool-btn--active {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.bottom-panel__prompt-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.bottom-panel__select {
    flex: 1;
    padding: 0.5rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}
.bottom-panel__select:focus {
    border-color: var(--accent);
    outline: none;
}
.bottom-panel__edit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
    padding: 0;
    font-family: inherit;
}
.bottom-panel__edit-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}
.bottom-panel__generate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background-color: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s;
    font-family: inherit;
}
.bottom-panel__generate-btn:hover {
    background-color: var(--accent-hover);
}
.bottom-panel__generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.bottom-panel__result-btns {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.bottom-panel__result-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    background: none;
    color: var(--text-primary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: border-color 0.2s;
    font-family: inherit;
    white-space: nowrap;
}
.bottom-panel__result-btn:hover {
    border-color: var(--text-secondary);
    background-color: var(--bg-primary);
}
.bottom-panel__result-btn--primary {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.bottom-panel__result-btn--primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
}
.bottom-panel__result-btn--secondary {
    background: none;
    border-color: var(--border);
    color: var(--text-secondary);
}
.bottom-panel__result-btn--secondary:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}
.bottom-panel__photo-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.bottom-panel__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}
.bottom-panel__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.75rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 9999px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
    font-family: inherit;
}
.bottom-panel__chip:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}
.bottom-panel__chip--active {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.bottom-panel__chip--default::before {
    content: "°5";
    font-size: 0.7rem;
    color: var(--accent);
}
.bottom-panel__chip--active.bottom-panel__chip--default::before {
    color: #fff;
}
.bottom-panel__tools-sidebar {
    display: none;
}
@media (min-width: 768px) {
    .bottom-panel__tools-sidebar {
        display: flex;
        grid-area: tools;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 0;
        background-color: var(--bg-secondary);
        border-right: 1px solid var(--border);
    }
}
/* CANVAS LOADING */
.canvas-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(15, 15, 26, 0.8);
    z-index: 20;
}
.canvas-loading__spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.canvas-loading__text {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* BRUSH SIZE */
.brush-size {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
}
.brush-size__label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}
.brush-size__value {
    font-size: 0.75rem;
    color: var(--text-primary);
    min-width: 2rem;
    text-align: center;
}
.brush-size input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    outline: none;
}
.brush-size input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
}
.brush-size input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

/* INNER PAGE (shared layout for profile, history, prompt-edit, exif-edit) */
.inner-page {
    min-height: 100vh;
    background-color: var(--bg-primary);
    padding-top: calc(var(--header-height-mobile) + 1rem);
    padding-bottom: 2rem;
}
@media (min-width: 768px) {
    .inner-page {
        padding-top: calc(var(--header-height-desktop) + 1.5rem);
    }
}
.inner-page__content {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 1rem;
}
@media (min-width: 768px) {
    .inner-page__content {
        max-width: 560px;
    }
}
.inner-page__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* PROFILE */
.profile {
    min-height: 100vh;
    background-color: var(--bg-primary);
    padding-top: calc(var(--header-height-mobile) + 1rem);
    padding-bottom: 2rem;
}
@media (min-width: 768px) {
    .profile {
        padding-top: calc(var(--header-height-desktop) + 1.5rem);
        max-width: 600px;
        margin: 0 auto;
    }
}
.profile__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1rem;
    margin-bottom: 1.5rem;
}
.profile__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}
.profile__section {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 0 1rem 1rem;
}
.profile__field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}
.profile__field:last-child {
    border-bottom: none;
}
.profile__value {
    color: var(--text-primary);
    font-size: 0.95rem;
}
.profile__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    color: var(--accent);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: inherit;
}
.profile__btn:hover {
    border-color: var(--accent);
    background-color: rgba(108, 99, 255, 0.1);
}
.profile__balance {
    text-align: center;
    padding: 1rem 0;
}
.profile__balance-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}
.profile__topup-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--accent);
    border: none;
    border-radius: var(--border-radius-sm);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 0.75rem;
    font-family: inherit;
}
.profile__topup-btn:hover {
    background-color: var(--accent-hover);
}
.profile__payments {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.profile__payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}
.profile__payment-item:last-child {
    border-bottom: none;
}
.profile__logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    margin: 1rem 1rem 0;
    background: none;
    border: 1px solid var(--danger);
    border-radius: var(--border-radius-sm);
    color: var(--danger);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: inherit;
}
/* HISTORY */
.history {
    background-color: var(--bg-primary);
    padding-top: calc(var(--header-height-mobile) + 1rem);
    padding-bottom: 2rem;
    min-height: 100vh;
}
@media (min-width: 768px) {
    .history {
        padding-top: calc(var(--header-height-desktop) + 1.5rem);
        max-width: 800px;
        margin: 0 auto;
    }
}
.history__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1rem;
    margin-bottom: 1.5rem;
}
.history__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}
.history__card {
    display: flex;
    gap: 0.75rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    margin: 0 1rem 0.75rem;
    transition: border-color 0.2s;
}
.history__card:hover {
    border-color: var(--accent);
}
.history__thumbnail {
    width: 64px;
    height: 64px;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background-color: var(--bg-primary);
}
.history__info {
    flex: 1;
    min-width: 0;
}
.history__prompt {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.history__meta {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.history__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    color: var(--text-secondary);
    text-align: center;
    padding: 2rem;
}
.history__empty-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.4;
}

/* ADMIN */
.admin {
    min-height: 100vh;
    background-color: var(--bg-primary);
    padding-top: calc(var(--header-height-desktop) + 1.5rem);
    padding-bottom: 2rem;
}
.admin__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    margin-bottom: 1.5rem;
}
.admin__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}
.admin__tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    margin-bottom: 1.5rem;
}
.admin__tab {
    padding: 0.75rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.2s;
    font-family: inherit;
}
.admin__tab:hover {
    color: var(--text-primary);
}
.admin__tab--active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.admin__tab-content {
    /* Базовые стили для содержимого вкладок админки */
}
.admin__card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 0 2rem 1rem;
}
.admin__stat {
    text-align: center;
    padding: 1rem;
}
.admin__stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}
.admin__stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}
.admin__table-wrapper {
    overflow-x: auto;
    margin: 0 2rem;
}
.admin__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.admin__table th {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
}
.admin__table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}
.admin__table tr:last-child td {
    border-bottom: none;
}
.admin__search {
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    width: 100%;
    max-width: 320px;
    padding: 0.5rem 0.75rem;
}
.admin__search::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}
.admin__search:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}
/* MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}
.modal {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}
.modal__title {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}
.modal__actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}
.modal__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.6rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    background: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: inherit;
}
.modal__btn:hover {
    border-color: var(--text-secondary);
}
.modal__btn--primary {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.modal__btn--primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
}
.modal__btn--secondary {
    background: none;
    border-color: var(--border);
    color: var(--text-secondary);
}
.modal__btn--secondary:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}
.modal__btn--danger {
    background-color: var(--danger);
    border-color: var(--danger);
    color: #fff;
}
.modal__btn--danger:hover {
    background-color: #e0313f;
    border-color: #e0313f;
}

/* KEYFRAMES */

/* EXIF EDIT */
.exif-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}
.exif-preview__img {
    max-width: 100%;
    max-height: 200px;
    border-radius: var(--border-radius-sm);
    object-fit: contain;
}
.exif-preview__name {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.exif-row {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}
.exif-row .auth__input {
    flex: 1;
}
.exif-btn-now {
    white-space: nowrap;
    padding: 0.75rem 1rem !important;
}
.exif-btn-gps {
    white-space: nowrap;
    padding: 0.75rem 0.75rem !important;
    font-size: 1.1rem;
}
.exif-camera-info {
    padding: 1rem;
    background-color: var(--bg-card);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.85rem;
}
.exif-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}
.exif-actions .auth__button {
    flex: 1;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.exif-actions .auth__button--secondary {
    background-color: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
@keyframes slideUp {
    from {
        transform: translateY(1rem);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* UTILS */
button,
input,
select,
textarea {
    font-family: inherit;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}
.bottom-panel {
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
}
