:root {
    color-scheme: dark;
    --app-bg: #1f1f1f;
    --app-bg-elevated: #262626;
    --app-panel: linear-gradient(180deg, rgba(56, 56, 56, 0.97) 0%, rgba(39, 39, 39, 0.99) 100%);
    --app-panel-soft: linear-gradient(180deg, rgba(44, 44, 44, 0.97) 0%, rgba(33, 33, 33, 0.99) 100%);
    --app-panel-subtle: linear-gradient(180deg, rgba(40, 40, 40, 0.98) 0%, rgba(31, 31, 31, 0.99) 100%);
    --app-border: rgba(255, 255, 255, 0.1);
    --app-border-strong: #181818;
    --app-text: #e8e8e8;
    --app-muted: #a1a7b1;
    --app-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
    --app-shadow-soft: 0 8px 18px rgba(0, 0, 0, 0.14);
    --app-highlight: #8ab4f8;
    --app-success: #6b9878;
    --app-danger: #9f6666;
    --app-button-bg: linear-gradient(180deg, #4c4c4c 0%, #3d3d3d 100%);
    --app-button-bg-hover: linear-gradient(180deg, #555555 0%, #434343 100%);
    --app-button-text: #d8d8d8;
    --app-button-green-bg: linear-gradient(180deg, #5d725f 0%, #4b5f4d 100%);
    --app-button-green-hover: linear-gradient(180deg, #667d68 0%, #536955 100%);
    --app-button-green-text: #dbe7dc;
    --app-button-blue-bg: linear-gradient(180deg, #58677b 0%, #465466 100%);
    --app-button-blue-hover: linear-gradient(180deg, #627288 0%, #4e5d72 100%);
    --app-button-blue-text: #d9e2ed;
    --app-popup-bg: linear-gradient(180deg, rgba(36, 36, 36, 0.98) 0%, rgba(24, 24, 24, 0.99) 100%);
    --app-popup-border: rgba(255, 255, 255, 0.1);
    --app-popup-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
}

[v-cloak] {
    display: none;
}

body {
    min-height: 100vh;
    background: linear-gradient(180deg, #2b2b2b 0%, #202020 22%, #1a1a1a 100%);
    color: var(--app-text);
    font-family: Lato, "Helvetica Neue", Arial, Helvetica, sans-serif;
}

body.app-loading {
    overflow: hidden;
}

#shotsync-app {
    min-height: 100vh;
    background: transparent;
    color: var(--app-text);
}

.app-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--app-bg);
    opacity: 1;
    visibility: visible;
    transition: opacity 260ms ease, visibility 260ms ease;
}

.app-loader .ui.dimmer {
    background: var(--app-bg);
}

.app-loader .ui.loader {
    color: #f4f4f5;
}

.app-loader .ui.loader::before {
    border-color: rgba(255, 255, 255, 0.16);
}

.app-loader .ui.loader::after {
    border-color: #ffffff transparent transparent;
}

.app-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#shotsync-app .ui.header,
#shotsync-app .ui.form .field > label {
    color: var(--app-text);
}

#shotsync-app .app-panel {
    border: 1px solid var(--app-border);
    border-radius: 3px;
    background: var(--app-panel);
    color: var(--app-text);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        var(--app-shadow);
}

#shotsync-app .ui.form input {
    border-color: var(--app-border-strong);
    border-radius: 2px;
    background: linear-gradient(180deg, #505050 0%, #444444 100%);
    color: var(--app-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#shotsync-app .ui.form input:focus {
    background: linear-gradient(180deg, #575757 0%, #494949 100%);
    border-color: var(--app-highlight);
    color: #ffffff;
}

#shotsync-app .ui.form input::selection,
#shotsync-app .ui.form textarea::selection,
body.shotsync-theme-dark input::selection,
body.shotsync-theme-dark textarea::selection {
    background: #4f8cff;
    color: #ffffff;
}

#shotsync-app .ui.negative.message {
    background: #21161a;
    color: #ffd7df;
    box-shadow: 0 0 0 1px #5c2532 inset;
}

#shotsync-app .ui.positive.message {
    background: #10231f;
    color: #bdf7ec;
    box-shadow: 0 0 0 1px #1f6f63 inset;
}

#shotsync-app .ui.modal,
#shotsync-app .ui.modal > .header,
#shotsync-app .ui.modal > .content,
#shotsync-app .ui.modal > .actions,
body.shotsync-theme-dark .ui.dimmer,
body.shotsync-theme-dark .ui.page.dimmer,
body.shotsync-theme-dark .ui.modal,
body.shotsync-theme-dark .ui.modal > .header,
body.shotsync-theme-dark .ui.modal > .content,
body.shotsync-theme-dark .ui.modal > .actions {
    background: transparent !important;
    color: #f4f4f5 !important;
}

#shotsync-app .ui.modal,
body.shotsync-theme-dark .ui.modal,
body .ui.modal.app-profile-modal,
body .ui.modal.app-download-modal {
    overflow: hidden !important;
    border: 1px solid #161616 !important;
    border-radius: 3px !important;
    background: linear-gradient(180deg, #3a3a3a 0%, #2d2d2d 100%) !important;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42) !important;
}

body .ui.modal.app-profile-modal {
    overflow: visible !important;
}

body .ui.modal.app-profile-modal > .content {
    overflow: visible !important;
}

body .ui.modal.app-tariff-modal > .content {
    max-height: calc(100vh - 12rem);
    overflow-y: auto;
}

body .ui.modal.app-embed-access-modal > .content,
body .ui.modal.app-guest-access-modal > .content {
    max-height: calc(100vh - 12rem);
    overflow-y: auto;
}

#shotsync-app .ui.modal > .header,
body.shotsync-theme-dark .ui.modal > .header {
    padding: 0.7rem 0.7rem 0.45rem !important;
    border-bottom: 0 !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 100%) !important;
    color: #f2f4f7 !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
}

#shotsync-app .ui.modal > .actions,
body.shotsync-theme-dark .ui.modal > .actions {
    padding: 0.55rem 0.7rem 0.7rem !important;
    border-top: 0 !important;
    background: transparent !important;
}

#shotsync-app .ui.modal .close.icon,
body.shotsync-theme-dark .ui.modal .close.icon {
    display: grid !important;
    width: 24px !important;
    height: 24px !important;
    margin: 0 !important;
    place-items: center !important;
    border-radius: 2px !important;
    background: transparent !important;
    color: #cfcfcf !important;
}

body.shotsync-theme-dark .ui.modal > .close.icon {
    top: 0.9rem !important;
    right: 0.9rem !important;
    color: #a8b0bd !important;
}

body.shotsync-theme-dark .ui.modal > .close.icon:hover,
body.shotsync-theme-dark .ui.modal > .close.icon:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

body.shotsync-theme-dark .ui.modal .ui.form .field > label {
    color: #f4f4f5 !important;
}

body.shotsync-theme-dark .ui.modal .ui.form input {
    background: #1a1a1a !important;
    border-color: #333333 !important;
    color: #f4f4f5 !important;
}

body.shotsync-theme-dark .ui.modal .ui.form input:focus {
    background: #202020 !important;
    border-color: #4f8cff !important;
    color: #ffffff !important;
}

body.shotsync-theme-dark .ui.modal .ui.negative.message {
    background: #21161a !important;
    color: #ffd7df !important;
    box-shadow: 0 0 0 1px #5c2532 inset !important;
}

body.shotsync-theme-dark .ui.modal .ui.pointing.prompt.label {
    background: #2a171d !important;
    border-color: #7a2b3c !important;
    color: #ffd7df !important;
    box-shadow: 0 0 0 1px #7a2b3c inset !important;
}

body.shotsync-theme-dark .ui.modal .ui.pointing.prompt.label::before {
    background: #2a171d !important;
    border-color: #7a2b3c !important;
    box-shadow: 1px 1px 0 0 #7a2b3c !important;
}

#shotsync-app .ui.dropdown .menu,
body.shotsync-theme-dark .ui.dropdown .menu {
    padding: 0.2rem !important;
    border: 1px solid var(--app-popup-border) !important;
    border-radius: 3px !important;
    background: var(--app-popup-bg) !important;
    box-shadow: var(--app-popup-shadow) !important;
    backdrop-filter: blur(10px);
}

#shotsync-app .ui.dropdown .menu > .item,
body.shotsync-theme-dark .ui.dropdown .menu > .item {
    min-height: 26px;
    margin: 0;
    border-radius: 2px !important;
    background: transparent !important;
    color: #c9cfd8 !important;
    font-size: 0.76rem !important;
}

#shotsync-app .ui.dropdown .menu > .item *,
body.shotsync-theme-dark .ui.dropdown .menu > .item * {
    color: inherit !important;
}

#shotsync-app .ui.dropdown .menu > .item:hover,
#shotsync-app .ui.dropdown .menu > .item:focus,
body.shotsync-theme-dark .ui.dropdown .menu > .item:hover,
body.shotsync-theme-dark .ui.dropdown .menu > .item:focus {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
}

#shotsync-app .ui.dropdown .menu > .selected.item,
#shotsync-app .ui.dropdown .menu > .active.item,
#shotsync-app .ui.dropdown .menu > .selected.item:hover,
#shotsync-app .ui.dropdown .menu > .active.item:hover,
body.shotsync-theme-dark .ui.dropdown .menu > .selected.item,
body.shotsync-theme-dark .ui.dropdown .menu > .active.item,
body.shotsync-theme-dark .ui.dropdown .menu > .selected.item:hover,
body.shotsync-theme-dark .ui.dropdown .menu > .active.item:hover {
    background: rgba(88, 103, 123, 0.34) !important;
    color: #ffffff !important;
}

#shotsync-app .ui.selection.dropdown,
body.shotsync-theme-dark .ui.selection.dropdown {
    min-height: 24px !important;
    border: 1px solid #1e1e1e !important;
    border-radius: 2px !important;
    background: linear-gradient(180deg, #505050 0%, #444444 100%) !important;
    color: #ececec !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

#shotsync-app .ui.selection.dropdown > .text,
#shotsync-app .ui.selection.dropdown > .default.text,
body.shotsync-theme-dark .ui.selection.dropdown > .text,
body.shotsync-theme-dark .ui.selection.dropdown > .default.text {
    color: #ececec !important;
}

#shotsync-app .ui.selection.dropdown > .text *,
#shotsync-app .ui.selection.dropdown > .default.text *,
body.shotsync-theme-dark .ui.selection.dropdown > .text *,
body.shotsync-theme-dark .ui.selection.dropdown > .default.text * {
    color: inherit !important;
}

#shotsync-app .ui.selection.active.dropdown,
#shotsync-app .ui.selection.visible.dropdown,
body.shotsync-theme-dark .ui.selection.active.dropdown,
body.shotsync-theme-dark .ui.selection.visible.dropdown {
    background: linear-gradient(180deg, #505050 0%, #444444 100%) !important;
    border-color: #1e1e1e !important;
    color: #ececec !important;
}

#shotsync-app .ui.card,
#shotsync-app .ui.cards > .card {
    background: #151515;
    box-shadow: 0 0 0 1px #2b2b2b;
}

#shotsync-app .ui.card > .content > .header,
#shotsync-app .ui.cards > .card > .content > .header {
    color: #f4f4f5;
}

#shotsync-app .ui.card .meta,
#shotsync-app .ui.cards > .card .meta {
    color: #a8b0bd;
}

#shotsync-app .ui.form .field.error .ui.pointing.prompt.label,
#shotsync-app .ui.form .field .ui.pointing.prompt.label,
#shotsync-app .ui.pointing.prompt.label {
    background: #2a171d !important;
    border-color: #7a2b3c !important;
    color: #ffd7df !important;
    box-shadow: 0 0 0 1px #7a2b3c inset !important;
}

#shotsync-app .ui.form .field.error .ui.pointing.prompt.label::before,
#shotsync-app .ui.form .field .ui.pointing.prompt.label::before,
#shotsync-app .ui.pointing.prompt.label::before {
    background: #2a171d !important;
    border-color: #7a2b3c !important;
    box-shadow: 1px 1px 0 0 #7a2b3c !important;
}

#shotsync-app .ui.inline.loader::before {
    border-color: rgba(255, 255, 255, 0.16);
}

#shotsync-app .ui.inline.loader::after {
    border-color: #ffffff transparent transparent;
}

.app-menu.ui.fixed.menu {
    min-height: 2.9rem;
    border-bottom: 1px solid #141414;
    background: linear-gradient(180deg, #353535 0%, #292929 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 -1px 0 rgba(0, 0, 0, 0.38);
}

.app-menu.ui.fixed.menu,
.app-menu.ui.fixed.menu .item,
.app-menu.ui.fixed.menu .header.item,
.app-menu.ui.fixed.menu .ui.dropdown.item {
    color: #d8d8d8 !important;
}

.app-menu.ui.fixed.menu .ui.container {
    width: min(1320px, calc(100% - 2rem));
}

.app-menu.ui.fixed.menu .item,
.app-menu.ui.fixed.menu .header.item,
.app-menu.ui.fixed.menu .ui.dropdown.item {
    min-height: 2.9rem;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    font-size: 0.92rem;
}

.app-brand.header.item {
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.app-brand-logo {
    width: 20px;
    height: 20px;
    margin-right: 0.45rem !important;
    border-radius: 4px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.app-realtime-status {
    gap: 0.35rem;
    color: var(--app-muted) !important;
    font-size: 0.72rem;
    font-weight: 500;
}

.app-realtime-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--app-danger);
    box-shadow: 0 0 0 2px rgba(159, 102, 102, 0.12);
}

.app-realtime-status.online .app-realtime-dot {
    background: #7ea889;
    box-shadow: 0 0 0 2px rgba(126, 168, 137, 0.1);
}

.app-realtime-status.online {
    color: #c4cad2 !important;
}

.app-menu-action-button {
    display: inline-flex !important;
    align-items: center;
    gap: 0.45rem;
    border: 0 !important;
    background: transparent !important;
    color: #d8d8d8 !important;
    font-size: 0.92rem !important;
    cursor: pointer;
}

.app-menu-action-button:hover,
.app-menu-action-button:focus {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
}

.app-shell {
    min-height: 100vh;
    padding: 3.55rem 0 1.4rem;
}

.app-toast-stack {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1200;
    display: grid;
    gap: 0.5rem;
    max-width: min(360px, calc(100vw - 2rem));
}

.app-toast.ui.message {
    margin: 0;
    border: 1px solid #2b2b2b;
    border-radius: 3px;
    background: #151515;
    color: #f4f4f5;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42);
}

.app-toast.ui.positive.message {
    background: #152017;
    color: #cfeeda;
    box-shadow: 0 0 0 1px #2c6b38 inset, 0 14px 34px rgba(0, 0, 0, 0.42);
}

.app-section {
    margin-top: 1rem;
}

.app-dashboard {
    width: min(1320px, calc(100% - 2rem));
    padding: 0;
}

.app-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.app-dashboard .ui.header {
    margin-bottom: 0.1rem;
    color: #d7d9dd;
    font-size: 0.96rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.app-muted {
    color: var(--app-muted);
    font-size: 0.92rem;
}

.app-cameras-accordion.ui.styled.accordion {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: 3px;
    background: var(--app-panel);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        var(--app-shadow);
}

.app-cameras-accordion.ui.styled.accordion > .title.app-cameras-accordion-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.68rem 0.82rem;
    border: 0;
    color: var(--app-text);
    background: linear-gradient(180deg, rgba(58, 58, 58, 0.22) 0%, rgba(42, 42, 42, 0) 100%);
}

.app-cameras-accordion.ui.styled.accordion > .title.app-cameras-accordion-title .ui.header {
    margin: 0;
    font-size: 0.96rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.app-cameras-accordion.ui.styled.accordion > .title.app-cameras-accordion-title .ui.header .icon {
    color: #8f96a1;
}

.app-cameras-title-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.app-cameras-summary {
    display: inline-flex;
    gap: 0.5rem;
    color: var(--app-muted);
    font-size: 0.78rem;
}

.app-accordion-caret.icon {
    margin: 0;
    color: #8f96a1;
    font-size: 0.85rem;
}

.app-cameras-accordion.ui.styled.accordion > .content.app-cameras-accordion-content {
    padding: 0 0.9rem 0.9rem;
    border-top: 1px solid rgba(0, 0, 0, 0.38);
    background: var(--app-panel-subtle);
}

.app-shootings.ui.container {
    margin-top: 1rem;
    width: min(1320px, calc(100% - 2rem));
    padding: 0;
}

.app-shootings-segment.ui.segment {
    padding: 0.95rem;
    border: 1px solid var(--app-border);
    border-radius: 3px;
    background: var(--app-panel-subtle);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        var(--app-shadow);
}

.app-shootings-segment .ui.header,
.app-shooting-card .header {
    color: #f4f4f5 !important;
}

.app-shootings-segment > .app-section-header .ui.header {
    font-size: 0.96rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.app-shootings-segment > .app-section-header .ui.header .icon {
    color: #8f96a1;
}

.app-shooting-list.ui.two.cards {
    margin-top: 0;
}

.app-shooting-list.ui.cards {
    align-items: stretch;
}

.app-shooting-list.ui.cards > .app-shooting-card.ui.card {
    position: relative;
    z-index: 1;
    overflow: visible;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--app-border);
    border-radius: 3px;
    background: var(--app-panel-soft);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        var(--app-shadow-soft);
    transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.app-shooting-list.ui.cards > .app-shooting-card.ui.card.app-card-menu-open {
    z-index: 50;
}

.app-shooting-list.ui.cards > .app-shooting-card.ui.card.app-drop-target {
    border-color: #3a3a3a;
}

.app-shooting-list.ui.cards > .app-shooting-card.ui.card.app-drop-hover {
    border-color: var(--app-highlight);
    background: linear-gradient(180deg, rgba(54, 54, 54, 0.98) 0%, rgba(40, 40, 40, 0.98) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 10px 20px rgba(0, 0, 0, 0.16);
}

.app-shooting-list.ui.cards > .app-shooting-card.ui.card:hover {
    border-color: rgba(255, 255, 255, 0.16);
}

.app-shooting-list.ui.cards > .app-shooting-card.ui.card > .content {
    padding: 0.75rem 0.8rem;
    border-top: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.app-shooting-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    position: relative;
}

.app-shooting-card .header {
    min-width: 0;
    flex: 1 1 auto;
}

#shotsync-app .app-shooting-card-head .app-shooting-pipeline-icon.app-muted-icon-button.ui.button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: auto;
    min-width: 0;
    height: 28px;
    min-height: 28px;
    padding: 0 0.7rem !important;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

#shotsync-app .app-shooting-card-head .app-shooting-actions-dropdown .app-muted-icon-button.ui.button {
    width: 28px;
    min-width: 28px;
    height: 28px;
    min-height: 28px;
}

#shotsync-app .app-shooting-card-head .app-shooting-actions-dropdown .app-muted-icon-button.ui.button .icon {
    font-size: 0.95rem;
}

#shotsync-app .app-shooting-card-head .app-shooting-pipeline-icon .icon {
    margin: 0 !important;
}

.app-shooting-card .header .icon,
.app-shooting-card .meta {
    color: var(--app-muted) !important;
}

.app-shooting-actions-dropdown {
    flex: 0 0 auto;
}

.app-shooting-actions-dropdown.ui.dropdown .menu {
    z-index: 2000 !important;
}

.app-shooting-actions-dropdown .menu .item {
    display: flex !important;
    width: 100%;
    align-items: center;
    gap: 0.45rem;
    color: #d7dbe2 !important;
}

#shotsync-app .app-shooting-actions-dropdown.ui.dropdown .menu > .item .edit.icon {
    color: #7fb7df !important;
}

#shotsync-app .app-shooting-actions-dropdown.ui.dropdown .menu > .item .trash.icon {
    color: #d28a8a !important;
}

#shotsync-app .app-shooting-actions-dropdown.ui.dropdown .menu > .item:hover .edit.icon,
#shotsync-app .app-shooting-actions-dropdown.ui.dropdown .menu > .item:focus .edit.icon {
    color: #9cc0d8 !important;
}

#shotsync-app .app-shooting-actions-dropdown.ui.dropdown .menu > .item:hover .trash.icon,
#shotsync-app .app-shooting-actions-dropdown.ui.dropdown .menu > .item:focus .trash.icon {
    color: #ff8f8f !important;
}

.app-shooting-actions-dropdown .app-muted-icon-button.ui.button {
    flex: 0 0 auto;
}

.app-shooting-actions-dropdown .app-muted-icon-button.ui.button:hover,
.app-shooting-actions-dropdown .app-muted-icon-button.ui.button:focus {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

.app-shooting-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    margin-top: auto;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    align-items: stretch;
}

.app-shooting-card-actions > .ui.button,
.app-shooting-card-actions .app-shooting-action-secondary > .ui.button {
    margin: 0 !important;
}

.app-shooting-action-primary.ui.button {
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.app-shooting-action-secondary {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.app-shooting-action-secondary > .ui.button {
    white-space: nowrap;
}

.app-guest-access-link-row {
    margin-top: 0.15rem;
}

.app-guest-access-link-input.ui.input {
    width: 100%;
}

.app-guest-access-link-input.ui.input > input {
    background: var(--app-panel-soft) !important;
    border-color: var(--app-border) !important;
    color: #8ab4f8 !important;
    font-size: 0.78rem;
    cursor: text;
}

.app-guest-access-link-disabled {
    margin-top: 0.15rem;
    color: var(--app-muted);
    font-size: 0.82rem;
}

.app-guest-access-copied {
    margin-top: 0.35rem;
    color: #9fd0a8;
    font-size: 0.78rem;
}

.app-embed-code {
    width: 100%;
    margin-top: 0.45rem;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    background: #1a1a1a;
    color: #d5d8df;
    border: 0;
    box-shadow: 0 0 0 1px #333333 inset;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    line-height: 1.4;
    resize: vertical;
}

.app-embed-copy-code {
    margin-top: 0.45rem !important;
}

.app-embed-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.45rem;
}

.app-embed-qr-img {
    width: 160px;
    height: 160px;
    border-radius: 8px;
    background: #ffffff;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    image-rendering: pixelated;
}

.app-embed-qr-download {
    margin: 0 !important;
}

.app-shooting-summary {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.app-shooting-summary-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    background: rgba(20, 20, 20, 0.52);
    color: var(--app-muted);
    font-size: 0.78rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.app-shooting-summary-item .icon {
    margin: 0 !important;
    font-size: 0.82em;
    opacity: 0.7;
}

.app-shooting-summary-download {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.32rem 0.7rem;
    margin-left: auto;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 3px;
    background: rgba(45, 55, 72, 0.55);
    color: #d1d5db;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.app-shooting-summary-download:hover:not(:disabled) {
    background: rgba(55, 70, 90, 0.75);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.app-shooting-summary-download:disabled {
    opacity: 0.4;
    cursor: default;
}

.app-shooting-summary-download .icon {
    margin: 0 !important;
}

.app-shooting-cameras {
    margin-top: 0.6rem;
}

.app-shooting-no-cameras {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--app-muted);
    font-size: 0.76rem;
    line-height: 1.35;
}

.app-shooting-no-cameras .icon {
    margin: 0 !important;
    opacity: 0.5;
}

.app-shooting-camera-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0 0.28rem 0.28rem 0;
    padding: 0.24rem 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    background: rgba(20, 20, 20, 0.52);
    color: var(--app-muted);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    cursor: grab;
    font-size: 0.8rem;
}

.app-shooting-camera-badge:active {
    cursor: grabbing;
}

.app-shooting-camera-badge.actionable {
    cursor: pointer;
}

.app-shooting-camera-badge.actionable:hover,
.app-shooting-camera-badge.actionable:focus {
    border-color: rgba(138, 180, 248, 0.42);
    color: var(--app-text);
}

.app-shooting-camera-badge.scheduled {
    border-color: #3a3a3a;
    color: #a8b0bd;
}

.app-shooting-camera-icon.icon {
    margin: 0 !important;
    color: #a8b0bd;
}

.app-shooting-camera-icon.icon.active {
    color: #8fd19e;
}

.app-shooting-camera-icon.icon.busy {
    color: #d28a8a;
}

.app-shooting-camera-icon.icon.scheduled,
.app-shooting-camera-badge.scheduled .app-shooting-camera-icon.icon {
    color: #8b8b8b;
}

.app-camera-card[draggable="true"] {
    cursor: grab;
}

.app-camera-card[draggable="true"]:active {
    cursor: grabbing;
}

body .ui.modal.app-shooting-modal .ui.selection.dropdown {
    min-width: 100%;
    background: #1a1a1a !important;
    border-color: #333333 !important;
    color: #f4f4f5 !important;
}

body .ui.modal.app-shooting-modal .ui.multiple.dropdown > .label {
    background: #2b2b2b;
    color: #f4f4f5;
    box-shadow: 0 0 0 1px #3a3a3a inset;
}

body .ui.modal.app-shooting-modal .ui.selection.dropdown > .dropdown.icon {
    color: #a8b0bd;
}

body .ui.modal.app-shooting-modal .app-shooting-camera-checklist {
    display: grid;
    gap: 0.45rem;
}

body .ui.modal.app-shooting-modal .app-shooting-camera-checkbox.ui.toggle.checkbox,
body .ui.modal.app-guest-access-modal .app-shooting-camera-checkbox.ui.toggle.checkbox,
body .ui.modal.app-embed-access-modal .app-shooting-camera-checkbox.ui.toggle.checkbox,
body .ui.modal.app-download-modal .app-shooting-camera-checkbox.ui.toggle.checkbox,
body .ui.modal.app-profile-modal .app-shooting-camera-checkbox.ui.toggle.checkbox {
    display: flex;
    align-items: center;
    width: 100%;
    cursor: pointer;
    padding: 0.6rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: transparent;
    color: #e3e6ec;
    min-height: 2.2rem;
}

body .ui.modal.app-shooting-modal .app-shooting-camera-checkbox.ui.toggle.checkbox > label,
body .ui.modal.app-guest-access-modal .app-shooting-camera-checkbox.ui.toggle.checkbox > label,
body .ui.modal.app-embed-access-modal .app-shooting-camera-checkbox.ui.toggle.checkbox > label,
body .ui.modal.app-download-modal .app-shooting-camera-checkbox.ui.toggle.checkbox > label,
body .ui.modal.app-profile-modal .app-shooting-camera-checkbox.ui.toggle.checkbox > label {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #e3e6ec !important;
    line-height: 1.35;
    min-height: 1.45rem;
}

body .ui.modal.app-shooting-modal .app-shooting-camera-checkbox.ui.toggle.checkbox > label::before,
body .ui.modal.app-guest-access-modal .app-shooting-camera-checkbox.ui.toggle.checkbox > label::before,
body .ui.modal.app-embed-access-modal .app-shooting-camera-checkbox.ui.toggle.checkbox > label::before,
body .ui.modal.app-download-modal .app-shooting-camera-checkbox.ui.toggle.checkbox > label::before,
body .ui.modal.app-profile-modal .app-shooting-camera-checkbox.ui.toggle.checkbox > label::before {
    width: 2.75rem;
    height: 1.45rem;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    background: #22272e;
    border: 1px solid #3b414a;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
    border-radius: 999px;
}

body .ui.modal.app-shooting-modal .app-shooting-camera-checkbox.ui.toggle.checkbox > label::after,
body .ui.modal.app-guest-access-modal .app-shooting-camera-checkbox.ui.toggle.checkbox > label::after,
body .ui.modal.app-embed-access-modal .app-shooting-camera-checkbox.ui.toggle.checkbox > label::after,
body .ui.modal.app-download-modal .app-shooting-camera-checkbox.ui.toggle.checkbox > label::after,
body .ui.modal.app-profile-modal .app-shooting-camera-checkbox.ui.toggle.checkbox > label::after {
    width: 1rem;
    height: 1rem;
    top: 50%;
    left: 0.18rem;
    transform: translateY(-50%);
    background: linear-gradient(180deg, #b2bac5 0%, #8f98a6 100%);
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

body .ui.modal.app-shooting-modal .app-shooting-camera-checkbox.ui.toggle.checkbox > input + label,
body .ui.modal.app-guest-access-modal .app-shooting-camera-checkbox.ui.toggle.checkbox > input + label,
body .ui.modal.app-embed-access-modal .app-shooting-camera-checkbox.ui.toggle.checkbox > input + label,
body .ui.modal.app-download-modal .app-shooting-camera-checkbox.ui.toggle.checkbox > input + label,
body .ui.modal.app-profile-modal .app-shooting-camera-checkbox.ui.toggle.checkbox > input + label {
    padding-left: 3.35rem;
}

body .ui.modal.app-shooting-modal .app-shooting-camera-checkbox.ui.toggle.checkbox.checked > label::before,
body .ui.modal.app-guest-access-modal .app-shooting-camera-checkbox.ui.toggle.checkbox.checked > label::before,
body .ui.modal.app-embed-access-modal .app-shooting-camera-checkbox.ui.toggle.checkbox.checked > label::before,
body .ui.modal.app-download-modal .app-shooting-camera-checkbox.ui.toggle.checkbox.checked > label::before,
body .ui.modal.app-profile-modal .app-shooting-camera-checkbox.ui.toggle.checkbox.checked > label::before {
    background: linear-gradient(180deg, #3d4a5d 0%, #2f3947 100%);
    border-color: #526072;
}

body .ui.modal.app-shooting-modal .app-shooting-camera-checkbox.ui.toggle.checkbox.checked > label::after,
body .ui.modal.app-guest-access-modal .app-shooting-camera-checkbox.ui.toggle.checkbox.checked > label::after,
body .ui.modal.app-embed-access-modal .app-shooting-camera-checkbox.ui.toggle.checkbox.checked > label::after,
body .ui.modal.app-download-modal .app-shooting-camera-checkbox.ui.toggle.checkbox.checked > label::after,
body .ui.modal.app-profile-modal .app-shooting-camera-checkbox.ui.toggle.checkbox.checked > label::after {
    left: 1.47rem;
    background: linear-gradient(180deg, #f1f3f7 0%, #ced5df 100%);
}

body .ui.modal.app-shooting-modal .app-shooting-camera-checkbox.ui.toggle.checkbox:hover,
body .ui.modal.app-guest-access-modal .app-shooting-camera-checkbox.ui.toggle.checkbox:hover,
body .ui.modal.app-embed-access-modal .app-shooting-camera-checkbox.ui.toggle.checkbox:hover,
body .ui.modal.app-download-modal .app-shooting-camera-checkbox.ui.toggle.checkbox:hover,
body .ui.modal.app-profile-modal .app-shooting-camera-checkbox.ui.toggle.checkbox:hover {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.02);
}

/* Plugin enable toggle — match the switch look used in shooting/guest/embed modals */
body .ui.modal.app-plugins-modal .app-plugin-toggle.ui.toggle.checkbox {
    min-width: 2.75rem;
    min-height: 1.45rem;
}

body .ui.modal.app-plugins-modal .app-plugin-toggle.ui.toggle.checkbox > label {
    min-height: 1.45rem;
    padding-left: 0;
}

body .ui.modal.app-plugins-modal .app-plugin-toggle.ui.toggle.checkbox > label::before {
    width: 2.75rem;
    height: 1.45rem;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    background: #22272e;
    border: 1px solid #3b414a;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
    border-radius: 999px;
}

body .ui.modal.app-plugins-modal .app-plugin-toggle.ui.toggle.checkbox > label::after {
    width: 1rem;
    height: 1rem;
    top: 50%;
    left: 0.18rem;
    transform: translateY(-50%);
    background: linear-gradient(180deg, #b2bac5 0%, #8f98a6 100%);
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

body .ui.modal.app-plugins-modal .app-plugin-toggle.ui.toggle.checkbox > input:checked ~ label::before {
    background: linear-gradient(180deg, #3d4a5d 0%, #2f3947 100%);
    border-color: #526072;
}

body .ui.modal.app-plugins-modal .app-plugin-toggle.ui.toggle.checkbox > input:checked ~ label::after {
    left: 1.47rem;
    background: linear-gradient(180deg, #f1f3f7 0%, #ced5df 100%);
}

body .ui.modal.app-shooting-modal .ui.cancel.button,
body .ui.modal.app-guest-access-modal .ui.cancel.button,
body .ui.modal.app-embed-access-modal .ui.cancel.button,
body .ui.modal.app-download-modal .ui.cancel.button,
body .ui.modal.app-profile-modal .ui.cancel.button {
    background: #2b2b2b !important;
    color: #f4f4f5 !important;
}

body .ui.modal.app-shooting-modal .ui.cancel.button:hover,
body .ui.modal.app-shooting-modal .ui.cancel.button:focus,
body .ui.modal.app-guest-access-modal .ui.cancel.button:hover,
body .ui.modal.app-guest-access-modal .ui.cancel.button:focus,
body .ui.modal.app-download-modal .ui.cancel.button:hover,
body .ui.modal.app-download-modal .ui.cancel.button:focus,
body .ui.modal.app-profile-modal .ui.cancel.button:hover,
body .ui.modal.app-profile-modal .ui.cancel.button:focus {
    background: #3a3a3a !important;
    color: #ffffff !important;
}

body .ui.modal.app-download-modal > .actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem;
}
body .ui.modal.app-download-modal > .actions > .ui.button {
    height: 30px !important;
    min-height: 30px !important;
    margin: 0 !important;
    padding: 0 0.8rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.4rem !important;
    font-size: 0.78rem !important;
    line-height: 1 !important;
}
body .ui.modal.app-download-modal > .actions > .ui.button > .icon {
    margin: 0 !important;
    font-size: 0.9em;
    opacity: 0.9;
}
body .ui.modal.app-download-modal > .actions > .ui.button.app-yadisk-btn {
    background: linear-gradient(180deg, #4a4320 0%, #3a3418 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 1px #5c5228 inset !important;
}
body .ui.modal.app-download-modal > .actions > .ui.button.app-yadisk-btn:hover,
body .ui.modal.app-download-modal > .actions > .ui.button.app-yadisk-btn:focus {
    background: linear-gradient(180deg, #574e26 0%, #453e1e 100%) !important;
    color: #ffffff !important;
}

.app-camera-form {
    margin: 0;
}

.app-camera-form.ui.form .fields {
    margin-bottom: 0.55rem;
}

.app-camera-form.ui.form .field > label {
    margin-bottom: 0.3rem;
    color: #d5d8df;
    font-size: 0.82rem;
}

.app-camera-credential-fields {
    padding-top: 0.1rem;
}

.app-camera-type-message.ui.message {
    margin-top: 0.45rem;
    margin-bottom: 0;
    background: #1a1a1a;
    color: #d5d8df;
    box-shadow: 0 0 0 1px #333333 inset;
}

.app-field-message.ui.message {
    margin-top: 0.45rem;
    margin-bottom: 0;
    padding: 0.6rem 0.75rem;
    background: #1a1a1a;
    color: #a8b0bd;
    box-shadow: 0 0 0 1px #333333 inset;
    font-size: 0.82rem;
    line-height: 1.35;
}

.app-field-message.ui.message::before {
    content: none !important;
}

.app-field-hint {
    margin-top: 0.45rem;
    margin-bottom: 0;
    color: #a8b0bd;
    font-size: 0.82rem;
    line-height: 1.35;
}

body .ui.modal.app-camera-modal .ui.selection.dropdown,
.app-camera-form .ui.selection.dropdown {
    min-width: 100%;
    background: #1a1a1a;
    border-color: #333333;
    color: #f4f4f5;
}

body .ui.modal.app-camera-modal .ui.selection.dropdown > .text,
.app-camera-form .ui.selection.dropdown > .text {
    color: #f4f4f5;
}

body .ui.modal.app-camera-modal .ui.selection.dropdown > .dropdown.icon,
.app-camera-form .ui.selection.dropdown > .dropdown.icon {
    color: #a8b0bd;
}

body .ui.modal.app-camera-modal .ui.selection.dropdown .menu {
    background: #151515;
    border-color: #2b2b2b;
}

body .ui.modal.app-camera-modal .ui.selection.dropdown .menu > .item {
    border-top-color: #2b2b2b;
    color: #f4f4f5 !important;
}

body .ui.modal.app-camera-modal .ui.selection.dropdown .menu > .item *,
body .ui.modal.app-camera-modal .ui.selection.dropdown > .text,
body .ui.modal.app-camera-modal .ui.selection.dropdown > .text * {
    color: inherit !important;
}

body .ui.modal.app-camera-modal .ui.selection.dropdown .menu > .selected.item,
body .ui.modal.app-camera-modal .ui.selection.dropdown .menu > .active.item,
body .ui.modal.app-camera-modal .ui.selection.dropdown .menu > .selected.item:hover,
body .ui.modal.app-camera-modal .ui.selection.dropdown .menu > .active.item:hover {
    background: #2b2b2b !important;
    color: #ffffff !important;
}

body .ui.modal.app-camera-modal .ui.cancel.button {
    background: #2b2b2b !important;
    color: #f4f4f5 !important;
}

body .ui.modal.app-camera-modal .ui.cancel.button:hover,
body .ui.modal.app-camera-modal .ui.cancel.button:focus {
    background: #3a3a3a !important;
    color: #ffffff !important;
}

body .ui.modal.app-sftp-settings-modal .ui.cancel.button {
    background: #2b2b2b !important;
    color: #f4f4f5 !important;
}

body .ui.modal.app-sftp-settings-modal .ui.cancel.button:hover,
body .ui.modal.app-sftp-settings-modal .ui.cancel.button:focus {
    background: #3a3a3a !important;
    color: #ffffff !important;
}

.app-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.app-form-actions .ui.button:not(.green) {
    background: #2b2b2b;
    color: #f4f4f5;
}

.app-form-actions .ui.button:not(.green):hover,
.app-form-actions .ui.button:not(.green):focus {
    background: #3a3a3a;
    color: #ffffff;
}

.app-camera-list.ui.three.cards {
    margin-top: 0;
}

.app-camera-list.ui.three.cards > .app-camera-card.ui.card {
    position: relative;
    z-index: 1;
    border: 1px solid var(--app-border);
    border-radius: 3px;
    background: var(--app-panel-soft);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        var(--app-shadow-soft);
    overflow: visible;
    transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.app-camera-list.ui.three.cards > .app-camera-card.ui.card.app-card-menu-open {
    z-index: 50;
}

.app-camera-list.ui.three.cards > .app-camera-card.ui.card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background: linear-gradient(180deg, rgba(54, 54, 54, 0.98) 0%, rgba(40, 40, 40, 0.98) 100%);
}

.app-camera-list.ui.three.cards > .app-camera-card.ui.card.app-drop-hover {
    border-color: var(--app-highlight);
    background: linear-gradient(180deg, rgba(54, 54, 54, 0.98) 0%, rgba(40, 40, 40, 0.98) 100%);
}

.app-camera-list.ui.cards > .app-camera-card.ui.card > .content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.72rem 0.8rem;
    border-top: 0;
}

.app-camera-title {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #f4f4f5;
    font-weight: 700;
    min-width: 0;
}

.app-camera-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.app-camera-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #dbb9bf;
    font-size: 0.78rem;
    white-space: nowrap;
}

.app-camera-status.online {
    color: #9fd8ad;
}

.app-camera-status .icon {
    margin: 0;
    font-size: 0.62rem;
}

.app-camera-sftp,
.app-camera-offline {
    color: var(--app-muted);
    font-size: 0.92rem;
}

.app-camera-offline {
    margin-top: 0.35rem;
}

.app-camera-sftp,
.app-camera-direct {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    color: var(--app-muted);
    font-size: 0.92rem;
}

.app-camera-sftp {
    justify-content: flex-end;
    margin-top: 0.45rem;
}

.app-camera-direct-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.app-camera-sftp-settings-button.ui.button {
    width: 100%;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    justify-content: center;
    white-space: nowrap;
}

.app-camera-direct {
    justify-content: flex-end;
    margin-top: 0.45rem;
}

.app-camera-direct-settings-button.ui.button {
    width: 100%;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.app-direct-upload-title {
    margin-bottom: 0.75rem;
    color: #d5d8df;
    font-size: 0.82rem;
    font-weight: 600;
}

.app-direct-upload-input.ui.action.input > input {
    background: #1a1a1a !important;
    border-color: #333333 !important;
    color: #f4f4f5 !important;
    min-height: 28px !important;
    height: 28px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    font-size: 0.78rem !important;
}

.app-direct-upload-input.ui.action.input > input:focus {
    background: #202020 !important;
    border-color: #4f8cff !important;
    color: #ffffff !important;
}

.app-direct-upload-input.ui.action.input > .button {
    box-shadow: none !important;
}

.app-android-key-title {
    margin-bottom: 0.75rem;
    color: #d5d8df;
    font-size: 0.82rem;
    font-weight: 600;
}

.app-android-key-input.ui.action.input > input {
    background: #1a1a1a !important;
    border-color: #333333 !important;
    color: #f4f4f5 !important;
    min-height: 38px !important;
    height: 38px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    font-size: 0.82rem !important;
}

.app-android-key-input.ui.action.input > input:focus {
    background: #202020 !important;
    border-color: #4f8cff !important;
    color: #ffffff !important;
}

.app-android-key-input.ui.action.input > .button {
    min-height: 38px !important;
    height: 38px !important;
    box-shadow: none !important;
}

.app-camera-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.35rem;
}

.app-camera-actions-top {
    flex: 0 0 auto;
}

.app-camera-actions .ui.button:not(.blue):not(.red) {
    background: #2b2b2b;
    color: #f4f4f5;
}

.app-camera-actions .ui.button:not(.blue):not(.red):hover,
.app-camera-actions .ui.button:not(.blue):not(.red):focus {
    background: #3a3a3a;
    color: #ffffff;
}

.app-camera-actions .app-muted-icon-button.ui.button {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #a8b0bd !important;
    box-shadow: none !important;
}

.app-camera-actions .app-muted-icon-button.ui.button:hover,
.app-camera-actions .app-muted-icon-button.ui.button:focus {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

.app-camera-actions-dropdown {
    position: relative;
}

.app-camera-actions-dropdown.ui.dropdown .menu {
    z-index: 2000 !important;
}

.app-camera-actions-dropdown .menu .item {
    display: flex !important;
    width: 100%;
    align-items: center;
    gap: 0.45rem;
    color: #d7dbe2 !important;
}

#shotsync-app .app-camera-actions-dropdown.ui.dropdown .menu > .item .edit.icon {
    color: #7fb7df !important;
}

#shotsync-app .app-camera-actions-dropdown.ui.dropdown .menu > .item .trash.icon {
    color: #d28a8a !important;
}

#shotsync-app .app-camera-actions-dropdown.ui.dropdown .menu > .item:hover .edit.icon,
#shotsync-app .app-camera-actions-dropdown.ui.dropdown .menu > .item:focus .edit.icon {
    color: #9cc0d8 !important;
}

#shotsync-app .app-camera-actions-dropdown.ui.dropdown .menu > .item:hover .trash.icon,
#shotsync-app .app-camera-actions-dropdown.ui.dropdown .menu > .item:focus .trash.icon {
    color: #ff8f8f !important;
}

.app-delete-confirm-popup.ui.popup {
    display: block !important;
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    z-index: 2100;
    width: 210px;
    padding: 0.55rem;
    border-color: var(--app-popup-border) !important;
    border-radius: 3px !important;
    background: var(--app-popup-bg) !important;
    color: var(--app-text) !important;
    box-shadow: var(--app-popup-shadow) !important;
}

.app-delete-confirm-popup.ui.popup::before,
.app-delete-confirm-popup.ui.popup::after {
    content: none !important;
}

body .ui.modal.app-applications-modal {
    width: min(720px, calc(100vw - 2rem));
}

.app-applications-intro {
    margin: 0 0 1.1rem;
    color: #a8b0bd;
}

.app-applications-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.app-application-card {
    display: flex;
    min-height: 270px;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1rem;
    border: 1px solid #2b3038;
    border-radius: 12px;
    background: #171a20;
}

.app-application-card h3 {
    margin: 0 0 0.45rem;
    color: #f4f4f5;
    font-size: 1.03rem;
}

.app-application-card p {
    margin: 0;
    color: #a8b0bd;
    font-size: 0.88rem;
    line-height: 1.45;
}

.app-application-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 11px;
    overflow: hidden;
    background: #20252d;
}

.app-application-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-application-icon.shotsync { background: #0b0d10; }
.app-application-icon.shotsync img { object-fit: contain; padding: 0.18rem; }

.app-application-card > a { margin-top: auto !important; }

.app-landing-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 40px;
    padding: 0.35rem 0.6rem;
    border: 1px solid #517fb0;
    border-radius: 8px;
    color: #ffffff !important;
    text-decoration: none;
    background: #315f91;
}

.app-landing-badge:hover { background: #3c71a9; }
.app-landing-badge > i { margin: 0; }

.app-rustore-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 40px;
    padding: 0.35rem 0.6rem;
    border: 1px solid #e4e7eb;
    border-radius: 8px;
    color: #111318 !important;
    text-decoration: none;
    background: #f4f4f5;
}

.app-rustore-badge:hover { background: #ffffff; }
.app-rustore-badge > i { margin: 0; }
.app-rustore-badge span { display: grid; line-height: 1.05; }
.app-rustore-badge small { color: #4d5561; font-size: 0.62rem; }
.app-rustore-badge strong { font-size: 0.94rem; }

@media (max-width: 680px) {
    .app-applications-grid { grid-template-columns: 1fr; }
    .app-application-card { min-height: 0; }
}

.app-delete-confirm-text {
    margin-bottom: 0.55rem;
    color: #d7d9dd;
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

.app-delete-confirm-actions {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    gap: 0.4rem;
}

.app-delete-confirm-actions .ui.button {
    flex: 1 1 0;
    min-width: 0;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 0.75rem !important;
    font-size: 0.78rem !important;
    line-height: 1 !important;
    justify-content: center;
}

.app-delete-confirm-actions .ui.button:not(.red) {
    background: #2b2b2b;
    color: #f4f4f5;
}

.app-delete-confirm-actions .ui.button:not(.red):hover,
.app-delete-confirm-actions .ui.button:not(.red):focus {
    background: #3a3a3a;
    color: #ffffff;
}

.app-sftp-settings-title {
    margin-bottom: 0.75rem;
    color: #f4f4f5;
    font-weight: 700;
}

body .ui.modal.app-sftp-settings-modal textarea {
    resize: vertical;
    background: #1a1a1a !important;
    border-color: #333333 !important;
    color: #f4f4f5 !important;
}

.app-avatar-editor {
    display: inline-block;
}

.app-avatar-preview {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.app-avatar-preview-wrap {
    position: relative;
    width: 56px;
    height: 56px;
    overflow: visible;
}

.app-avatar-preview-frame {
    width: 56px;
    height: 56px;
    overflow: hidden;
    border-radius: 50%;
    background: #151515;
    border: 1px solid var(--app-border);
    box-shadow: var(--app-shadow-soft);
}

.app-avatar-edit-button {
    position: absolute;
    top: -0.45rem;
    right: -0.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    min-width: 2rem;
    height: 2rem;
    min-height: 2rem;
    padding: 0 !important;
    border-radius: 50% !important;
    box-shadow: 0 0 0 2px #151515 !important;
}

.app-avatar-edit-button:hover,
.app-avatar-edit-button:focus {
    background: linear-gradient(180deg, #627288 0%, #4e5d72 100%) !important;
    color: #ffffff !important;
}

.app-avatar-crop-anchor {
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.app-avatar-preview-large {
    width: 180px;
    height: 180px;
}

.app-avatar-grid {
    display: grid;
    grid-template-columns: repeat(5, 52px);
    gap: 0.6rem;
}

.app-avatar-picker-popup,
.app-avatar-crop-popup,
body.shotsync-theme-dark .app-avatar-picker-popup,
body.shotsync-theme-dark .app-avatar-crop-popup {
    padding: 1.15rem !important;
    background: var(--app-popup-bg) !important;
    border-color: var(--app-popup-border) !important;
    border-radius: 18px !important;
    color: #f4f4f5 !important;
    box-shadow: var(--app-popup-shadow) !important;
    z-index: 2100 !important;
    position: fixed;
}

.app-popup-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2090;
    background: transparent;
}

.app-avatar-picker {
    min-width: 296px;
    min-height: 52px;
    padding: 0.1rem;
}

.app-avatar-choice {
    width: 52px;
    height: 52px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.app-avatar-choice.active {
    border-color: #8ab4f8;
}

.app-avatar-choice img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.app-avatar-upload-choice {
    color: #f4f4f5;
    box-shadow: 0 0 0 1px #333333 inset;
}

.app-avatar-upload-choice:hover,
.app-avatar-upload-choice:focus {
    background: #202020;
}

.app-hidden-file {
    display: none;
}

.app-profile-avatar {
    width: 22px !important;
    height: 22px !important;
    object-fit: cover;
}

.app-profile-name {
    margin-left: 0.2rem;
    font-size: 0.76rem;
    color: #cfd3d8;
}

.app-tariff-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--app-border);
    border-radius: 3px;
    background: var(--app-panel-soft);
}

.app-tariff-summary-label {
    color: var(--app-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.app-tariff-summary-name {
    margin-top: 0.2rem;
    color: #f4f4f5;
    font-size: 1.05rem;
    font-weight: 700;
}

.app-tariff-summary-description,
.app-tariff-summary-date {
    margin-top: 0.25rem;
    color: #cfd3d8;
    font-size: 0.82rem;
}

.app-tariff-cards-wrap {
    margin-bottom: 0.75rem;
    padding-top: 3px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    -webkit-overflow-scrolling: touch;
}

.app-tariff-cards-wrap::-webkit-scrollbar {
    height: 8px;
}

.app-tariff-cards-wrap::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
}

.app-tariff-cards-wrap::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.app-tariff-cards-wrap::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.32);
}

.app-tariff-cards {
    display: flex;
    gap: 0.65rem;
    padding-bottom: 0.35rem;
}

.app-tariff-card {
    flex: 0 0 auto;
    min-width: 160px;
    max-width: 200px;
    padding: 0.85rem 0.75rem;
    border: 1px solid var(--app-border);
    border-radius: 6px;
    background: var(--app-panel-soft);
    cursor: pointer;
    transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.12s ease;
}

.app-tariff-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.app-tariff-card.active {
    border-color: var(--app-highlight);
    background: linear-gradient(180deg, rgba(74, 94, 122, 0.18) 0%, rgba(46, 56, 68, 0.42) 100%);
}

.app-tariff-card.current {
    border-top: 2px solid var(--app-highlight);
}

.app-tariff-card.downgrade {
    opacity: 0.5;
    cursor: not-allowed;
}

.app-tariff-card.downgrade:hover {
    transform: none;
}

.app-tariff-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    margin-bottom: 0.4rem;
}

.app-tariff-card-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f4f4f5;
}

.app-tariff-card-badge {
    font-size: 0.64rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--app-highlight);
    white-space: nowrap;
}

.app-tariff-card-badge.downgrade {
    color: #c9a45c;
}

.app-tariff-card-price {
    margin-bottom: 0.55rem;
}

.app-tariff-card-price-amount {
    font-size: 0.92rem;
    font-weight: 700;
    color: #f4f4f5;
}

.app-tariff-card-price-period {
    color: var(--app-muted);
    font-size: 0.74rem;
}

.app-tariff-card-price-free {
    color: var(--app-muted);
    font-size: 0.82rem;
}

.app-tariff-card-features {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.76rem;
    color: #cfd3d8;
}

.app-tariff-card-features li {
    padding: 0.18rem 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.app-tariff-card-features li .icon {
    font-size: 0.72rem;
    width: 1em;
}

.app-tariff-yes.icon {
    color: #8fd19e !important;
}

.app-tariff-no.icon {
    color: #5a5a5a !important;
}

.app-tariff-downgrade-note.ui.message {
    margin-top: 0.75rem;
}

.app-tariff-duration-section {
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
}

.app-tariff-duration-title {
    margin-bottom: 0.5rem;
    color: #f4f4f5;
    font-size: 0.84rem;
    font-weight: 700;
    text-align: center;
}

.app-tariff-duration-row {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: center;
}

.app-tariff-duration-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.12rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--app-border);
    border-radius: 3px;
    background: var(--app-panel-soft);
    color: #d8dde6;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.16s ease, background-color 0.16s ease;
}

.app-tariff-duration-pill:hover,
.app-tariff-duration-pill:focus {
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.app-tariff-duration-pill.active {
    border-color: var(--app-highlight);
    background: linear-gradient(180deg, rgba(74, 94, 122, 0.28) 0%, rgba(46, 56, 68, 0.52) 100%);
    color: #ffffff;
}

.app-tariff-duration-pill-name {
    font-size: 0.82rem;
    font-weight: 600;
}

.app-tariff-duration-pill-price {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f4f4f5;
}

.app-tariff-duration-pill-discount {
    color: #9fd0a8;
    font-size: 0.74rem;
}

.app-tariff-pay-button.ui.button {
    display: block;
    margin-top: 0.9rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
    font-size: 1.1rem;
    padding: 0.95rem 2.2rem;
}

.app-crop-stage {
    position: relative;
    width: min(100%, 420px);
    height: 320px;
    overflow: hidden;
    border: 1px solid #2b2b2b;
    border-radius: 3px;
    background: #0b0b0b;
    touch-action: none;
    user-select: none;
}

.app-crop-source {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.app-crop-frame {
    position: absolute;
    border: 2px solid #f4f4f5;
    box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.45);
    cursor: move;
}

.app-crop-grid {
    position: absolute;
    background: rgba(255, 255, 255, 0.58);
    pointer-events: none;
}

.app-crop-grid-v {
    top: 0;
    bottom: 0;
    width: 1px;
}

.app-crop-grid-v-one {
    left: 33.333%;
}

.app-crop-grid-v-two {
    left: 66.666%;
}

.app-crop-grid-h {
    left: 0;
    right: 0;
    height: 1px;
}

.app-crop-grid-h-one {
    top: 33.333%;
}

.app-crop-grid-h-two {
    top: 66.666%;
}

.app-crop-handle {
    position: absolute;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 2px solid #f4f4f5;
    border-radius: 50%;
    background: #151515;
    cursor: nwse-resize;
}

.app-crop-handle-nw {
    top: -10px;
    left: -10px;
}

.app-crop-handle-ne {
    top: -10px;
    right: -10px;
    cursor: nesw-resize;
}

.app-crop-handle-sw {
    bottom: -10px;
    left: -10px;
    cursor: nesw-resize;
}

.app-crop-handle-se {
    right: -10px;
    bottom: -10px;
}

.app-crop-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 0.75rem;
}

.app-crop-cancel-button.ui.button {
    background: #2b2b2b !important;
    color: #f4f4f5 !important;
}

.app-crop-cancel-button.ui.button:hover,
.app-crop-cancel-button.ui.button:focus {
    background: #3a3a3a !important;
    color: #ffffff !important;
}

.app-crop-popup-content {
    padding: 0.15rem;
    width: min(420px, calc(100vw - 3rem));
}

#shotsync-app .ui.message.app-empty-message,
body.shotsync-theme-dark .ui.message.app-empty-message {
    margin: 0.75rem 0 0;
    padding: 0.15rem 0;
    background: transparent !important;
    border: 0 !important;
    color: #aeb5bf !important;
    box-shadow: none !important;
    text-align: center;
    font-size: 0.94rem;
    line-height: 1.45;
}

#shotsync-app .ui.message.app-empty-message::before,
body.shotsync-theme-dark .ui.message.app-empty-message::before {
    content: none !important;
}

.app-auth {
    min-height: calc(100vh - 7.5rem);
    padding-inline: 1rem;
}

.app-auth-grid {
    min-height: calc(100vh - 7.5rem);
    margin: 0 !important;
}

.app-auth-grid > .column {
    max-width: 400px;
}

#shotsync-app .ui.button:not(.basic):not(.icon):not(.circular):not(.mini.red):not(.mini.blue):not(.blue):not(.green):not(.red) {
    height: 28px;
    padding: 0 0.75rem;
    border: 1px solid #1b1b1b;
    border-radius: 2px;
    background: var(--app-button-bg);
    color: var(--app-button-text);
    font-size: 0.78rem;
    line-height: 1;
    box-shadow: none;
}

#shotsync-app .ui.button.green,
#shotsync-app .ui.mini.green.button,
#shotsync-app .ui.large.green.submit.button,
body.shotsync-theme-dark .ui.modal .ui.green.button {
    background: var(--app-button-green-bg) !important;
    color: var(--app-button-green-text) !important;
}

#shotsync-app .ui.button.blue,
#shotsync-app .ui.mini.blue.button,
body.shotsync-theme-dark .ui.modal .ui.blue.button {
    background: var(--app-button-blue-bg) !important;
    color: var(--app-button-blue-text) !important;
}

#shotsync-app .ui.button.green:hover,
#shotsync-app .ui.button.green:focus,
#shotsync-app .ui.mini.green.button:hover,
#shotsync-app .ui.mini.green.button:focus,
#shotsync-app .ui.large.green.submit.button:hover,
#shotsync-app .ui.large.green.submit.button:focus,
body.shotsync-theme-dark .ui.modal .ui.green.button:hover,
body.shotsync-theme-dark .ui.modal .ui.green.button:focus {
    background: var(--app-button-green-hover) !important;
    color: #ffffff !important;
}

#shotsync-app .ui.button.blue:hover,
#shotsync-app .ui.button.blue:focus,
#shotsync-app .ui.mini.blue.button:hover,
#shotsync-app .ui.mini.blue.button:focus,
body.shotsync-theme-dark .ui.modal .ui.blue.button:hover,
body.shotsync-theme-dark .ui.modal .ui.blue.button:focus {
    background: var(--app-button-blue-hover) !important;
    color: #ffffff !important;
}

#shotsync-app .ui.button.green,
#shotsync-app .ui.button.blue,
#shotsync-app .ui.mini.blue.button,
#shotsync-app .ui.mini.green.button,
#shotsync-app .ui.large.green.submit.button {
    height: 28px;
    min-height: 28px;
    padding: 0 0.75rem;
    border: 1px solid #1b1b1b !important;
    border-radius: 2px !important;
    font-size: 0.78rem !important;
    line-height: 1 !important;
    box-shadow: none !important;
}

#shotsync-app .app-shooting-card-actions .app-shooting-action-primary.ui.button {
    height: auto !important;
    min-height: auto !important;
    font-size: 1rem !important;
    line-height: 1.2 !important;
    padding: 0.5rem 1rem !important;
}

#shotsync-app .app-shooting-card-actions .app-shooting-action-primary.ui.button > .icon {
    font-size: 1.15rem;
}

#shotsync-app .ui.button.red,
#shotsync-app .ui.mini.red.button,
body.shotsync-theme-dark .ui.modal .ui.red.button {
    border: 1px solid #291818 !important;
    border-radius: 2px !important;
    background: linear-gradient(180deg, #5a4040 0%, #493232 100%) !important;
    color: #e3cccc !important;
    box-shadow: none !important;
}

#shotsync-app .ui.button:hover,
#shotsync-app .ui.button:focus,
body.shotsync-theme-dark .ui.modal .ui.button:hover,
body.shotsync-theme-dark .ui.modal .ui.button:focus {
    background: var(--app-button-bg-hover) !important;
    color: #ffffff !important;
}

#shotsync-app .ui.button.red:hover,
#shotsync-app .ui.button.red:focus,
#shotsync-app .ui.mini.red.button:hover,
#shotsync-app .ui.mini.red.button:focus,
body.shotsync-theme-dark .ui.modal .ui.red.button:hover,
body.shotsync-theme-dark .ui.modal .ui.red.button:focus {
    background: linear-gradient(180deg, #664848 0%, #533838 100%) !important;
    color: #f0dddd !important;
}

#shotsync-app .app-muted-icon-button.ui.button,
#shotsync-app .ui.mini.icon.button {
    display: grid;
    width: 24px;
    min-width: 24px;
    height: 23px;
    min-height: 23px;
    padding: 0;
    place-items: center;
    border: 1px solid #1b1b1b;
    border-radius: 2px;
    background: var(--app-button-bg) !important;
    color: var(--app-button-text) !important;
    box-shadow: none !important;
}

#shotsync-app .app-muted-icon-button.ui.button:hover,
#shotsync-app .app-muted-icon-button.ui.button:focus,
#shotsync-app .ui.mini.icon.button:hover,
#shotsync-app .ui.mini.icon.button:focus {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

#shotsync-app .app-avatar-preview-wrap > .app-avatar-edit-button.ui.button {
    display: inline-grid;
    place-items: center;
    width: 1.5rem !important;
    min-width: 1.5rem !important;
    height: 1.5rem !important;
    min-height: 1.5rem !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--app-button-blue-bg) !important;
    color: var(--app-button-blue-text) !important;
    box-shadow: none !important;
}

#shotsync-app .app-avatar-preview-wrap > .app-avatar-edit-button.ui.button:hover,
#shotsync-app .app-avatar-preview-wrap > .app-avatar-edit-button.ui.button:focus {
    background: var(--app-button-blue-hover) !important;
    color: #ffffff !important;
}

#shotsync-app .ui.dropdown .menu,
#shotsync-app .ui.popup,
#shotsync-app .ui.popup::before {
    border-radius: 3px;
}

.app-auth .ui.grey.header {
    color: #d5d8df !important;
}

.app-auth .ui.form {
    font-size: 0.92rem;
}

.app-auth .app-panel {
    padding: 1rem !important;
}

.app-auth .ui.mini.form .field {
    margin-bottom: 0.75rem;
}

.app-auth .ui.mini.form .field:last-child {
    margin-bottom: 0;
}

.app-auth .ui.stacked.segment::after,
.app-auth .ui.stacked.segment::before {
    border-top-color: #2b2b2b;
}

.app-auth .ui.left.icon.input > i.icon {
    color: #8b96a8;
}

.app-auth .app-auth-submit-button.ui.button {
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 1rem !important;
    border-radius: 3px !important;
    font-size: 0.82rem !important;
    line-height: 1 !important;
}

.app-auth .app-auth-switch-button.ui.button {
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 0.85rem !important;
    border-radius: 3px !important;
    font-size: 0.76rem !important;
    line-height: 1 !important;
}

.app-auth .app-auth-switch-button.ui.button:hover,
.app-auth .app-auth-switch-button.ui.button:focus {
    background: var(--app-button-blue-hover) !important;
    color: #ffffff !important;
}

.app-field-loader {
    margin-top: 0.75rem;
}

.app-auth-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

#shotsync-app .app-auth-switch {
    background: #151515;
    color: #d5d8df;
    box-shadow: 0 0 0 1px #2b2b2b inset;
}

@media (max-width: 767px) {
    .app-menu-action-button {
        padding-right: 0.7rem !important;
        padding-left: 0.7rem !important;
    }

    .app-menu-action-label {
        display: none;
    }

    .app-profile-name {
        display: none;
    }

    .app-realtime-text {
        display: none;
    }

    .app-profile-menu.ui.dropdown.item {
        padding-right: 0.85rem;
        padding-left: 0.85rem;
    }

    .app-avatar-picker {
        min-width: 0;
    }

    .app-avatar-grid {
        grid-template-columns: repeat(4, 52px);
        justify-content: center;
    }

    .app-crop-popup-content {
        width: 100%;
    }

    .app-crop-stage {
        width: 100%;
        height: min(320px, calc(100vh - 15rem));
    }

    .app-section-header {
        align-items: flex-start;
    }

    .app-cameras-accordion.ui.styled.accordion > .title.app-cameras-accordion-title {
        gap: 0.5rem;
        padding: 0.72rem 0.78rem;
    }

    .app-cameras-accordion.ui.styled.accordion > .title.app-cameras-accordion-title .ui.header {
        min-width: 0;
        font-size: 0.92rem;
    }

    .app-cameras-title-actions {
        flex: 0 0 auto;
        gap: 0.45rem;
    }

    .app-cameras-summary {
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .app-cameras-title-actions .ui.button > .icon {
        margin: 0 !important;
    }

    .app-accordion-caret.icon {
        width: auto;
        margin: 0 !important;
    }

    .app-camera-form .fields {
        display: block;
    }

    .app-camera-list {
        margin-right: 0 !important;
        margin-left: 0 !important;
        margin-top: 0.75rem !important;
    }

    .app-delete-confirm-popup.ui.popup {
        width: min(210px, calc(100vw - 3rem));
    }

    .app-tariff-summary {
        flex-direction: column;
    }

    .app-tariff-card {
        min-width: 140px;
    }

    .app-shooting-card-actions {
        grid-template-columns: auto 1fr;
    }

    #shotsync-app .app-shooting-card-actions .app-shooting-action-primary.ui.button {
        font-size: 0.78rem !important;
        line-height: 1 !important;
        padding: 0.4rem 0.6rem !important;
        gap: 0.3rem;
    }

    #shotsync-app .app-shooting-card-actions .app-shooting-action-primary.ui.button > .icon {
        font-size: 0.9rem;
        margin: 0 !important;
    }
}

body.shotsync-theme-dark > .ui.dimmer,
body.shotsync-theme-dark > .ui.page.dimmer,
body.shotsync-theme-dark > .ui.modals.dimmer,
body.shotsync-theme-dark > .ui.dimmer.modals,
body.shotsync-theme-dark .ui.dimmer.modals.visible.active {
    background-color: rgba(0, 0, 0, 0.88) !important;
    background-image: none !important;
}

body.shotsync-theme-dark .ui.modal,
body.shotsync-theme-dark .ui.modal > .header,
body.shotsync-theme-dark .ui.modal > .content,
body.shotsync-theme-dark .ui.modal > .actions {
    background-color: transparent !important;
    background-image: none !important;
    color: #f4f4f5 !important;
}

body.shotsync-theme-dark .ui.modal.app-shooting-modal,
body.shotsync-theme-dark .ui.modal.app-guest-access-modal,
body.shotsync-theme-dark .ui.modal.app-embed-access-modal,
body.shotsync-theme-dark .ui.modal.app-download-modal {
    background: linear-gradient(180deg, #3a3a3a 0%, #2d2d2d 100%) !important;
    background-color: #2d2d2d !important;
    background-image: linear-gradient(180deg, #3a3a3a 0%, #2d2d2d 100%) !important;
    border: 1px solid #161616 !important;
    border-radius: 3px !important;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42) !important;
}

body.shotsync-theme-dark .ui.modal > .header,
body.shotsync-theme-dark .ui.modal > .actions {
    border-color: transparent !important;
}

body.shotsync-theme-dark .ui.modal .ui.form,
body.shotsync-theme-dark .ui.modal .field,
body.shotsync-theme-dark .ui.modal .field > label,
body.shotsync-theme-dark .ui.modal .content,
body.shotsync-theme-dark .ui.modal .header,
body.shotsync-theme-dark .ui.modal .description,
body.shotsync-theme-dark .ui.modal p {
    color: #f4f4f5 !important;
}

body.shotsync-theme-dark .ui.modal .ui.form input,
body.shotsync-theme-dark .ui.modal .ui.input input,
body.shotsync-theme-dark .ui.modal input[type="text"],
body.shotsync-theme-dark .ui.modal input[type="email"],
body.shotsync-theme-dark .ui.modal input[type="password"] {
    background: linear-gradient(180deg, #505050 0%, #444444 100%) !important;
    border-color: #1e1e1e !important;
    border-radius: 2px !important;
    color: #ececec !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body.shotsync-theme-dark .ui.modal .ui.form input:focus,
body.shotsync-theme-dark .ui.modal .ui.input input:focus,
body.shotsync-theme-dark .ui.modal input[type="text"]:focus,
body.shotsync-theme-dark .ui.modal input[type="email"]:focus,
body.shotsync-theme-dark .ui.modal input[type="password"]:focus {
    background: linear-gradient(180deg, #575757 0%, #494949 100%) !important;
    border-color: #8ab4f8 !important;
    color: #ffffff !important;
}

body.shotsync-theme-dark .ui.modal input::placeholder {
    color: #8b96a8 !important;
}

body.shotsync-theme-dark .ui.modal .ui.negative.message {
    background-color: #21161a !important;
    color: #ffd7df !important;
    box-shadow: 0 0 0 1px #5c2532 inset !important;
}

body.shotsync-theme-dark .ui.popup.app-avatar-picker-popup,
body.shotsync-theme-dark .ui.popup.app-avatar-crop-popup {
    background-color: #151515 !important;
    background-image: none !important;
    border-color: #2b2b2b !important;
    color: #f4f4f5 !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.46) !important;
}

body.shotsync-theme-dark .ui.popup.app-avatar-picker-popup *,
body.shotsync-theme-dark .ui.popup.app-avatar-crop-popup * {
    color: inherit;
}

body.shotsync-theme-dark .ui.popup.app-avatar-picker-popup .ui.loader::before,
body.shotsync-theme-dark .ui.popup.app-avatar-crop-popup .ui.loader::before {
    border-color: rgba(255, 255, 255, 0.16) !important;
}

body.shotsync-theme-dark .ui.popup.app-avatar-picker-popup .ui.loader::after,
body.shotsync-theme-dark .ui.popup.app-avatar-crop-popup .ui.loader::after {
    border-color: #ffffff transparent transparent !important;
}

body .ui.dimmer.app-dark-modal-dimmer,
body .ui.modals.dimmer.app-dark-modal-dimmer,
body .ui.page.dimmer.app-dark-modal-dimmer {
    background: rgba(0, 0, 0, 0.9) !important;
    background-color: rgba(0, 0, 0, 0.9) !important;
    background-image: none !important;
}

body .ui.modal.app-profile-modal,
body .ui.modal.app-profile-modal > .header,
body .ui.modal.app-profile-modal > .content,
body .ui.modal.app-profile-modal > .actions {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    color: #f4f4f5 !important;
}

body .ui.modal.app-profile-modal > .header,
body .ui.modal.app-profile-modal > .actions {
    border-color: transparent !important;
}

body .ui.modal.app-profile-modal .ui.form,
body .ui.modal.app-profile-modal .field,
body .ui.modal.app-profile-modal .field > label,
body .ui.modal.app-profile-modal label,
body .ui.modal.app-profile-modal .content,
body .ui.modal.app-profile-modal .header,
body .ui.modal.app-profile-modal .actions {
    color: #f4f4f5 !important;
}

body .ui.modal.app-profile-modal .ui.form input,
body .ui.modal.app-profile-modal .ui.form .field input,
body .ui.modal.app-profile-modal input[type="text"] {
    background: linear-gradient(180deg, #505050 0%, #444444 100%) !important;
    background-color: transparent !important;
    border-color: #1e1e1e !important;
    border-radius: 2px !important;
    color: #ececec !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body .ui.modal.app-profile-modal .ui.form input:focus,
body .ui.modal.app-profile-modal .ui.form .field input:focus,
body .ui.modal.app-profile-modal input[type="text"]:focus {
    background: linear-gradient(180deg, #575757 0%, #494949 100%) !important;
    background-color: transparent !important;
    border-color: #8ab4f8 !important;
    color: #ffffff !important;
}

body .ui.modal.app-profile-modal input::placeholder {
    color: #8b96a8 !important;
}

body .ui.modal.app-profile-modal .ui.cancel.button {
    background: #2b2b2b !important;
    color: #f4f4f5 !important;
}

body .ui.modal.app-profile-modal .ui.cancel.button:hover,
body .ui.modal.app-profile-modal .ui.cancel.button:focus {
    background: #3a3a3a !important;
    color: #ffffff !important;
}

.app-download-progress.ui.progress {
    margin: 0.5em 0;
    background: #2b2b2b;
    border-radius: 4px;
}

.app-download-progress.ui.progress .bar {
    background: var(--app-success);
    transition: width 0.3s ease;
}

.app-download-progress.ui.progress .label {
    color: #e0e0e0 !important;
    font-size: 0.85em;
    margin-top: 0.3em;
}

.app-download-progress.ui.progress .bar > .progress {
    color: #fff !important;
}

/* Photo pipeline modal — fullscreen
   (double class to out-specify Fomantic's `.ui.legacy.legacy.modal`) */
body.app-plugins-modal-open {
    overflow: hidden !important;
}

body .ui.modal.app-plugins-modal.app-plugins-modal {
    position: fixed !important;
    top: 0 !important;
    bottom: auto !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    transform: none !important;
    border-radius: 0;
    overflow: hidden;
}

body .ui.modal.app-plugins-modal.visible.active {
    display: flex !important;
    flex-direction: column;
}

body .ui.modal.app-plugins-modal > .header {
    flex: 0 0 auto;
    font-size: 1.05rem;
    padding: 0.85rem 1.25rem;
}

body .ui.modal.app-plugins-modal > .content {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    padding: 1rem 1.25rem;
}

.app-plugins-layout {
    display: grid;
    grid-template-columns: minmax(320px, 420px) 1fr;
    gap: 1.25rem;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
}

.app-plugins-config {
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.app-plugins-preview-col {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    border-left: 1px solid var(--app-border);
    padding-left: 1.25rem;
}

@media (max-width: 900px) {
    body .ui.modal.app-plugins-modal {
        height: 100% !important;
    }

    body .ui.modal.app-plugins-modal > .content {
        display: block;
        overflow-y: auto;
    }

    .app-plugins-layout {
        grid-template-columns: 1fr;
    }

    .app-plugins-config,
    .app-plugins-preview-col {
        overflow: visible;
    }

    .app-plugins-preview-col {
        border-left: 0;
        padding-left: 0;
        border-top: 1px solid var(--app-border);
        padding-top: 1rem;
    }
}

.app-plugins-section {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.app-plugins-section-title {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--app-muted);
}

.app-plugins-section-hint {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    opacity: 0.75;
    margin-left: 0.35rem;
}

.app-plugins-hint {
    color: var(--app-muted);
    font-size: 0.85rem;
}

/* Presets: apply-dropdown + save toggle */
.app-preset-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.app-preset-dropdown {
    position: relative;
}

.app-preset-apply-btn .dropdown.icon {
    margin: 0 0 0 0.35rem;
}

.app-preset-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 30;
    min-width: 220px;
    max-height: 240px;
    overflow-y: auto;
    background: var(--app-panel);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    padding: 0.3rem;
}

.app-preset-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    padding: 0.3rem 0.4rem;
    border-radius: 6px;
}

.app-preset-menu-item:hover {
    background: var(--app-panel-soft);
}

.app-preset-menu-name {
    flex: 1 1 auto;
    font-size: 0.88rem;
    color: #e4e6eb;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-preset-save {
    margin-top: 0.25rem;
}

/* Plugin blocks (one block = one plugin) */
.app-plugin-block {
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: var(--app-panel-soft);
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.app-plugin-block.collapsed {
    background: var(--app-panel-subtle);
}

.app-plugin-block-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    cursor: grab;
}

.app-plugin-drag {
    color: var(--app-muted);
    margin: 0;
    flex: 0 0 auto;
}

.app-plugin-collapse {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--app-muted);
    cursor: pointer;
    transition: color 0.12s ease, background-color 0.12s ease;
}

.app-plugin-collapse:hover {
    color: #e4e6eb;
    background: var(--app-panel-subtle);
}

.app-plugin-collapse .icon {
    margin: 0;
    font-size: 0.85rem;
}

.app-plugin-collapse.hidden {
    visibility: hidden;
}

.app-plugin-block-name {
    cursor: pointer;
    flex: 1 1 auto;
    color: #f4f4f5;
    font-weight: 600;
    font-size: 0.95rem;
}

.app-plugin-block.collapsed .app-plugin-block-name {
    color: #aab0bb;
    font-weight: 500;
}

.app-plugin-warn {
    color: #f0b429;
    margin: 0;
}

.app-plugin-block-head .ui.toggle.checkbox {
    flex: 0 0 auto;
}

.app-plugin-block-body {
    padding: 0.2rem 0.85rem 0.85rem;
    border-top: 1px solid var(--app-border);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.app-plugin-block-body .ui.form .field {
    margin-bottom: 0;
}

.app-plugin-block-body .ui.form .field > label {
    color: #cdd2da;
    font-size: 0.82rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.3rem;
}

.app-plugin-value {
    color: #8ba3ff;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.app-plugin-asset {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
    padding-top: 0.65rem;
}

.app-plugin-asset-row {
    flex: 1 1 auto;
    min-width: 0;
}

.app-plugin-asset-filename {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.app-plugin-asset-row > .app-plugins-hint {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-plugin-asset-name {
    color: #d7dbe2;
    font-size: 0.85rem;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.app-plugin-asset-name > .icon {
    flex: 0 0 auto;
    margin: 0;
}

.app-plugin-asset-actions {
    display: inline-flex;
    gap: 0.4rem;
    flex: 0 0 auto;
    margin-left: auto;
}

.app-plugin-asset-actions .button {
    white-space: nowrap;
}

.app-plugin-slider input[type="range"] {
    width: 100%;
}

/* Watermark: anchor grid + sliders side by side */
.app-plugin-watermark {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.app-plugin-watermark-sliders {
    flex: 1 1 160px;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.app-anchor-grid {
    display: grid;
    grid-template-columns: repeat(3, 30px);
    grid-template-rows: repeat(3, 30px);
    gap: 4px;
}

.app-anchor-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--app-border);
    background: var(--app-panel-subtle);
    border-radius: 3px;
    color: var(--app-muted);
    cursor: pointer;
    padding: 0;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.app-anchor-cell .icon {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1;
}

.app-anchor-cell:hover,
.app-anchor-cell.active {
    color: #fff;
}

.app-anchor-cell:hover {
    border-color: #7d5bed;
}

.app-anchor-cell.active {
    border-color: #7d5bed;
    background: rgba(125, 91, 237, 0.45);
}

.app-plugins-preview-col {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.app-plugin-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    flex: 0 0 auto;
    flex-wrap: wrap;
}

.app-plugin-preview-tools {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.app-plugin-preview-body {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
}

.app-plugin-preview-frame {
    position: relative;
    width: 100%;
    border-radius: 4px;
    background: transparent;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-plugin-preview-frame-main {
    flex: 1 1 auto;
    min-height: 260px;
}

.app-plugin-preview-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.app-plugin-preview-badge {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    pointer-events: none;
}

.app-plugin-preview-badge.app-plugin-preview-badge-toggle {
    border: 0;
    cursor: pointer;
    pointer-events: auto;
    transition: background-color 0.12s ease;
}

.app-plugin-preview-badge.app-plugin-preview-badge-toggle:hover {
    background: rgba(0, 0, 0, 0.8);
}

.app-plugin-preview-badge.app-plugin-preview-badge-toggle .icon {
    margin: 0;
    font-size: 0.8em;
    opacity: 0.85;
}

@media (max-width: 900px) {
    .app-plugin-preview-frame-main {
        min-height: 320px;
    }
}

.app-plugin-preview-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: var(--app-muted);
    font-size: 0.82rem;
    text-align: center;
    padding: 0.5rem;
}

.app-plugin-preview-empty i.icon {
    font-size: 1.6rem;
    opacity: 0.6;
    margin: 0;
}

/* --- Code Replacements modal --- */

body .ui.modal.app-code-replacements-modal {
    background: #1b1c1d !important;
    color: #e4e6eb !important;
    width: 700px !important;
}

body .ui.modal.app-code-replacements-modal > .header {
    background: #1b1c1d !important;
    color: #f4f4f5 !important;
    border-bottom: 1px solid var(--app-border);
}

body .ui.modal.app-code-replacements-modal > .content {
    background: #1b1c1d !important;
    color: #e4e6eb !important;
    padding: 1rem 1.2rem !important;
    overflow: visible !important;
}

body .ui.modal.app-code-replacements-modal > .actions {
    background: #1b1c1d !important;
    border-top: 1px solid var(--app-border);
}

body .ui.modal.app-code-replacements-modal .ui.cancel.button {
    background: #2b2b2b !important;
    color: #f4f4f5 !important;
}

body .ui.modal.app-code-replacements-modal .ui.cancel.button:hover {
    background: #3a3a3a !important;
}

/* toolbar row */
.app-code-sets-toolbar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: nowrap;
    margin-bottom: 0.75rem;
    height: 30px;
}

.app-code-sets-toolbar .ui.button {
    white-space: nowrap;
    flex-shrink: 0;
}

.app-code-sets-toolbar .ui.dropdown,
.app-code-sets-toolbar .ui.input,
.app-code-sets-toolbar .ui.button,
.app-code-sets-toolbar .app-code-set-actions .ui.button {
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    box-sizing: border-box !important;
}

.app-code-set-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
    flex-shrink: 0;
}

.app-code-btn-red:hover {
    color: #db2828 !important;
}

.app-code-import-btn.ui.icon.button {
    width: auto !important;
    padding-left: 0.6em !important;
    padding-right: 0.8em !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.3em !important;
}

.app-code-import-btn .icon {
    margin: 0 !important;
}

.app-code-set-dropdown {
    min-width: 140px !important;
    background: #2b2b2b !important;
    color: #e4e6eb !important;
    border-color: #444 !important;
}

.app-code-set-dropdown .menu {
    background: #2b2b2b !important;
    border-color: #444 !important;
}

.app-code-set-dropdown .menu > .item {
    color: #e4e6eb !important;
    border-top-color: #333 !important;
}

.app-code-set-dropdown .menu > .item:hover,
.app-code-set-dropdown .menu > .item.active {
    background: #3a3a3a !important;
    color: #fff !important;
}

.app-code-set-dropdown .text,
.app-code-set-dropdown .default.text {
    color: #e4e6eb !important;
}

.app-code-set-dropdown .dropdown.icon {
    color: #999 !important;
}

.app-code-set-new {
    display: flex !important;
    align-items: stretch;
    flex-shrink: 1;
    min-width: 80px;
}

.app-code-set-new input {
    background: #2b2b2b !important;
    color: #e4e6eb !important;
    border-color: #444 !important;
    width: 100px;
}

.app-code-import-status {
    font-size: 0.8125rem;
    color: var(--app-muted);
    margin-bottom: 0.5rem;
}

.app-code-table {
    background: #222 !important;
    font-size: 0.875rem !important;
}

.app-code-table thead th {
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: var(--app-muted) !important;
    padding: 0.55em 0.65em !important;
}

.app-code-table tbody td {
    padding: 0.4em 0.65em !important;
    vertical-align: middle !important;
    font-size: 0.8125rem !important;
    line-height: 1.4 !important;
}

.app-code-table code {
    background: #333;
    padding: 0.15em 0.45em;
    border-radius: 3px;
    font-size: 0.85em;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.app-code-table .ui.mini.input input {
    font-size: 0.8125rem !important;
    padding: 0.4em 0.55em !important;
}

.app-code-cell {
    cursor: text;
    min-height: 1.8em;
}

.app-code-cell:hover {
    background: rgba(255, 255, 255, 0.04);
}

.app-code-cell-text {
    display: inline-block;
    min-height: 1.2em;
    min-width: 2em;
}

.app-code-actions {
    white-space: nowrap;
    text-align: right !important;
}

.app-code-actions .ui.button {
    font-size: 0.75rem !important;
    padding: 0.4em 0.5em !important;
    margin: 0 0.1em !important;
}

.app-code-new-row td {
    padding-top: 0.55em !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.app-code-new-row .ui.button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    font-size: 0.8125rem !important;
    padding: 0.4em 0.55em !important;
}

.app-code-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--app-muted);
    font-size: 0.875rem;
    line-height: 1.6;
}

.app-code-empty code {
    background: #333;
    padding: 0.15em 0.5em;
    border-radius: 3px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

/* Yandex Disk modal */
.app-yandex-modal .app-yandex-hint {
    color: var(--app-muted);
    line-height: 1.55;
    margin: 0 0 1.25rem;
}
.app-yandex-connect {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.5rem 0.5rem 0.75rem;
}
.app-yandex-modal .app-yandex-connect .app-yandex-hint {
    max-width: 22rem;
}
.app-yandex-modal .app-yandex-connect > .ui.button {
    margin: 0;
}
.app-yandex-modal .app-yandex-connect > .ui.button.app-yandex-connect-btn {
    background: linear-gradient(180deg, #4a4320 0%, #3a3418 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 1px #5c5228 inset !important;
}
.app-yandex-modal .app-yandex-connect > .ui.button.app-yandex-connect-btn:hover,
.app-yandex-modal .app-yandex-connect > .ui.button.app-yandex-connect-btn:focus {
    background: linear-gradient(180deg, #574e26 0%, #453e1e 100%) !important;
    color: #ffffff !important;
}
.app-yandex-modal .app-yandex-connect-btn > i.yandex.icon {
    color: inherit;
}
.app-yandex-account {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--app-text);
    font-size: 0.95rem;
}
.app-yandex-modal .app-yandex-account .app-yandex-disconnect.ui.button {
    margin: 0 0 0 auto;
    flex: 0 0 auto;
}
.app-yandex-account .app-yandex-ok {
    color: var(--app-success);
    font-size: 1.15rem;
    margin: 0;
}
.app-yandex-folder-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0;
}
.app-yandex-folder-label {
    min-width: 0;
}
.app-yandex-folder-caption {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--app-muted);
    margin-bottom: 0.2rem;
}
.app-yandex-folder-value {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.92rem;
    color: var(--app-text);
    word-break: break-all;
}
.app-yandex-folder-note {
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--app-muted);
    margin-top: 0.35rem;
}
.app-yandex-modal .app-yandex-folder-row > .ui.button {
    flex: 0 0 auto;
    white-space: nowrap;
    margin: 0;
}
.app-yandex-picker {
    margin-top: 1.1rem;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    padding: 0.85rem;
    background: rgba(0, 0, 0, 0.22);
}
.app-yandex-picker-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}
.app-yandex-modal .app-yandex-picker-head > .ui.button {
    margin: 0;
    flex: 0 0 auto;
}
.app-yandex-picker-path {
    flex: 1 1 auto;
    min-width: 0;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85rem;
    color: var(--app-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.app-yandex-modal .app-yandex-picker-head > .app-yandex-create-btn {
    margin-left: auto;
}
.app-yandex-picker-list {
    height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0.15rem;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.18);
}
.app-yandex-modal .app-yandex-picker-list > .ui.loader {
    margin-top: 1.5rem;
}
.app-yandex-picker-newitem {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
}
.app-yandex-picker-newitem > i.icon {
    color: var(--app-highlight);
    margin: 0;
    opacity: 0.85;
    flex: 0 0 auto;
}
.app-yandex-picker-newitem > input {
    flex: 1 1 auto;
    min-width: 0;
    background: var(--app-input-bg, #1a1a1a);
    border: 1px solid var(--app-border);
    border-radius: 5px;
    color: var(--app-text);
    font-size: 0.9rem;
    padding: 0.3rem 0.5rem;
}
.app-yandex-picker-newitem > input:focus {
    outline: none;
    border-color: var(--app-highlight);
}
.app-yandex-modal .app-yandex-picker-newitem > .ui.button {
    margin: 0;
    flex: 0 0 auto;
}
.app-yandex-picker-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: var(--app-text);
    font-size: 0.92rem;
    padding: 0.5rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.12s ease;
}
.app-yandex-picker-item i.icon {
    color: var(--app-highlight);
    margin: 0;
    opacity: 0.85;
}
.app-yandex-picker-item:hover {
    background: rgba(255, 255, 255, 0.06);
}
.app-yandex-picker-empty {
    color: var(--app-muted);
    font-size: 0.88rem;
    padding: 0.85rem 0.6rem;
    text-align: center;
}
.app-yandex-picker-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.85rem;
}
.app-yandex-modal .app-yandex-picker-actions > .ui.button {
    margin: 0;
}
