@charset "UTF-8";

/*
 * Nofee Admin UI system
 * Original implementation informed by public interaction patterns from
 * Aceternity, 21st, HeroUI, Magic UI, Float UI, and Motion.
 */

:root {
    --admin-brand: #131fa0;
    --admin-brand-strong: #0e1780;
    --admin-brand-soft: #eef0ff;
    --admin-brand-tint: #f5f6ff;
    --admin-ink: #111827;
    --admin-ink-soft: #344054;
    --admin-muted: #667085;
    --admin-subtle: #667085;
    --admin-canvas: var(--admin-brand-tint);
    --admin-surface: #ffffff;
    --admin-surface-muted: #f8fafc;
    --admin-border: #e3e8ef;
    --admin-border-strong: #cbd5e1;
    --admin-primary: var(--admin-brand);
    --admin-primary-hover: var(--admin-brand-strong);
    --admin-primary-soft: var(--admin-brand-soft);
    --admin-success: #087443;
    --admin-success-soft: #ecfdf3;
    --admin-warning: #9a4f08;
    --admin-warning-soft: #fff8e7;
    --admin-danger: #b42318;
    --admin-danger-soft: #fff1f0;
    --admin-topbar: var(--admin-brand);
    --admin-sidebar: var(--admin-brand-strong);
    --admin-sidebar-soft: var(--admin-brand);
    --admin-radius-sm: 8px;
    --admin-radius-md: 12px;
    --admin-radius-lg: 16px;
    --admin-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
    --admin-shadow-md: 0 10px 28px rgba(16, 24, 40, 0.09);
    --admin-sidebar-width: 264px;
    --admin-topbar-height: 64px;
    --admin-motion-fast: 140ms;
    --admin-motion: 200ms;
    --admin-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --admin-z-sticky: 20;
    --admin-z-overlay: 40;
    --admin-z-modal: 50;
}

html {
    min-width: 320px;
    background: var(--admin-canvas);
    color: var(--admin-ink);
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

html,
body,
button,
input,
select,
textarea {
    font-family: "SUIT Variable", "SUIT", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--admin-canvas);
    color: var(--admin-ink);
    overflow-x: hidden;
}

body:not(.admin-login-page):not(.ops-auth) main .text-gray-500,
body:not(.admin-login-page):not(.ops-auth) main .text-gray-400 {
    color: var(--admin-muted) !important;
}

body:not(.admin-login-page):not(.ops-auth) main :where(.text-green-500, .text-green-600) {
    color: var(--admin-success) !important;
}

body:not(.admin-login-page):not(.ops-auth) main :where(.text-red-500, .text-red-600) {
    color: var(--admin-danger) !important;
}

body:not(.admin-login-page):not(.ops-auth) main :where(.text-blue-500, .text-blue-600) {
    color: var(--admin-primary) !important;
}

body:not(.admin-login-page):not(.ops-auth) main :where(.text-yellow-500, .text-yellow-600) {
    color: var(--admin-warning) !important;
}

body:not(.admin-login-page):not(.ops-auth) {
    padding-top: var(--admin-topbar-height);
}

::selection {
    background: var(--admin-brand-soft);
    color: var(--admin-brand-strong);
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid rgba(19, 31, 160, 0.34) !important;
    outline-offset: 2px !important;
}

.admin-topbar :where(a, button):focus-visible,
.admin-sidebar :where(a, button):focus-visible,
.admin-mobile-drawer__body :where(a, button):focus-visible {
    outline-color: rgba(255, 255, 255, 0.92) !important;
}

:where(a, button, input, select, textarea) {
    touch-action: manipulation;
}

:where(button, [role="button"], a[href], select, input[type="checkbox"], input[type="radio"]) {
    cursor: pointer;
}

.star[role="radio"] {
    width: 44px !important;
    height: 44px !important;
    padding: 6px;
    color: var(--admin-muted) !important;
}

.star[role="radio"].text-yellow-400,
.star[role="radio"][aria-checked="true"] {
    color: var(--admin-warning) !important;
}

:where(button, input, select, textarea):disabled {
    cursor: not-allowed !important;
    opacity: 0.48;
}

.admin-skip-link {
    position: fixed;
    top: 8px;
    left: 12px;
    z-index: 60;
    transform: translateY(-160%);
    border-radius: 8px;
    background: var(--admin-ink);
    color: #fff;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 700;
    transition: transform var(--admin-motion) var(--admin-ease), visibility 0s linear var(--admin-motion);
}

.admin-skip-link:focus {
    transform: translateY(0);
}

.admin-loading-overlay {
    z-index: 60;
}

/* Top bar */
.admin-topbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 30;
    height: var(--admin-topbar-height);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--admin-topbar);
    color: #fff;
}

.admin-topbar__inner {
    display: grid;
    grid-template-columns: var(--admin-sidebar-width) minmax(0, 1fr) auto;
    align-items: center;
    width: 100%;
    height: 100%;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    height: 100%;
    padding: 0 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
}

.admin-brand img {
    width: 86px;
    height: auto;
}

.admin-brand__label {
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.24);
    color: rgba(255, 255, 255, 0.76);
    font-size: 11px;
    font-weight: 750;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-topbar__center {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 16px;
    padding: 0 20px;
}

.admin-mobile-menu {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #fff;
}

.admin-mobile-menu:hover,
.admin-mobile-menu:active {
    background: rgba(255, 255, 255, 0.1);
}

.admin-location {
    min-width: 0;
}

.admin-location__eyebrow {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-location__title {
    display: block;
    overflow: hidden;
    margin-top: 3px;
    color: #f8fafc;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-command-trigger {
    display: inline-flex;
    min-width: 240px;
    max-width: 420px;
    height: 38px;
    flex: 1;
    align-items: center;
    gap: 9px;
    margin-left: auto;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    padding: 0 11px;
    text-align: left;
    transition: background var(--admin-motion-fast) ease, border-color var(--admin-motion-fast) ease;
}

.admin-command-trigger:hover {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
}

.admin-command-trigger span {
    overflow: hidden;
    flex: 1;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-command-trigger kbd {
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.08);
    color: #d0d5dd;
    padding: 1px 6px;
    font-family: inherit;
    font-size: 10px;
    line-height: 18px;
}

.admin-topbar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    padding: 0 16px 0 4px;
}

.admin-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #cbd5e1;
    transition: color var(--admin-motion-fast) ease, background var(--admin-motion-fast) ease;
}

.admin-icon-button:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
}

.admin-profile-trigger {
    display: flex;
    min-width: 0;
    height: 42px;
    align-items: center;
    gap: 9px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #fff;
    padding: 0 8px;
    transition: background var(--admin-motion-fast) ease;
}

.admin-profile-trigger:hover {
    background: rgba(255, 255, 255, 0.09);
}

.admin-avatar {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.admin-profile-trigger__copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
}

.admin-profile-trigger__copy strong {
    max-width: 132px;
    overflow: hidden;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-profile-trigger__copy small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    line-height: 1.2;
}

/* App shell and navigation */
body:not(.admin-login-page):not(.ops-auth) > .flex.flex-1 {
    min-height: calc(100dvh - var(--admin-topbar-height));
    align-items: stretch;
}

.admin-sidebar-fragment {
    position: sticky;
    top: var(--admin-topbar-height);
    z-index: 10;
    width: var(--admin-sidebar-width);
    height: calc(100dvh - var(--admin-topbar-height));
    flex: 0 0 var(--admin-sidebar-width);
    border-right: 0 !important;
    background: var(--admin-sidebar);
    color: #d0d5dd;
    transition: width var(--admin-motion) var(--admin-ease), flex-basis var(--admin-motion) var(--admin-ease);
}

.admin-sidebar {
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    background: var(--admin-sidebar);
}

.admin-sidebar__scroll {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px 12px 16px;
    scrollbar-color: #344054 transparent;
    scrollbar-width: thin;
}

.admin-nav-section {
    margin-top: 18px;
}

.admin-nav-section:first-child {
    margin-top: 0;
}

.admin-nav-section__label {
    display: block;
    padding: 0 10px 6px;
    color: #aeb5df;
    font-size: 10px;
    font-weight: 750;
    line-height: 1.4;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.admin-nav-item,
.admin-nav-toggle {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    gap: 10px;
    margin: 2px 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #d1d5f0;
    padding: 8px 10px;
    text-align: left;
    text-decoration: none;
    transition: color var(--admin-motion-fast) ease, background var(--admin-motion-fast) ease;
}

.admin-nav-item:hover,
.admin-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.admin-nav-item[aria-current="page"] {
    background: #fff;
    color: var(--admin-brand-strong);
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(5, 10, 68, 0.16);
}

.admin-nav-item svg,
.admin-nav-toggle svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    stroke-width: 1.8;
}

.admin-nav-item__label,
.admin-nav-toggle__label {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    font-size: 13px;
    font-weight: 620;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-nav-toggle__chevron {
    width: 14px !important;
    height: 14px !important;
    transition: transform var(--admin-motion) var(--admin-ease);
}

.admin-nav-toggle[aria-expanded="true"] .admin-nav-toggle__chevron {
    transform: rotate(180deg);
}

.admin-nav-children {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows var(--admin-motion) var(--admin-ease);
}

.admin-nav-children[data-open="true"] {
    grid-template-rows: 1fr;
}

.admin-nav-children__inner {
    min-height: 0;
    overflow: hidden;
}

.admin-nav-children .admin-nav-item {
    min-height: 38px;
    padding-left: 38px;
}

.admin-nav-children .admin-nav-item::before {
    position: absolute;
    left: 20px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    content: "";
    opacity: 0.56;
}

.admin-sidebar__footer {
    flex: 0 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px;
}

.admin-sidebar__footer a {
    color: #c4c9e8;
}

.admin-sidebar__footer a:hover {
    color: #fff;
}

.admin-mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--admin-z-overlay);
    display: none;
    background: rgba(15, 23, 42, 0.56);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--admin-motion) ease, visibility 0s linear var(--admin-motion);
}

.admin-mobile-drawer {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: var(--admin-z-modal);
    display: none;
    width: min(88vw, 320px);
    min-height: 100dvh;
    transform: translateX(-100%);
    visibility: hidden;
    pointer-events: none;
    background: var(--admin-sidebar);
    color: #fff;
    box-shadow: 20px 0 48px rgba(15, 23, 42, 0.22);
    transition: transform var(--admin-motion) var(--admin-ease);
}

.admin-mobile-drawer__header {
    display: flex;
    height: 64px;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px 0 20px;
    border-bottom: 1px solid var(--admin-border);
    background: #fff;
}

.admin-mobile-drawer__header img {
    width: 86px;
    height: auto;
}

.admin-mobile-drawer__header .admin-icon-button {
    color: var(--admin-brand-strong);
}

.admin-mobile-drawer__header .admin-icon-button:hover {
    background: var(--admin-brand-soft);
    color: var(--admin-brand-strong);
}

.admin-mobile-drawer__body {
    height: calc(100dvh - 64px);
    overflow-y: auto;
    padding: 14px 12px calc(24px + env(safe-area-inset-bottom));
}

.admin-mobile-dock {
    display: none;
}

/* Main content and generic page surfaces */
body:not(.admin-login-page):not(.ops-auth) main {
    min-width: 0;
    max-width: none;
    flex: 1 1 auto;
    overflow: visible;
    background: var(--admin-canvas) !important;
    padding: 24px 28px 40px !important;
}

body:not(.admin-login-page):not(.ops-auth) main > :first-child {
    max-width: 100%;
}

.admin-page {
    width: 100%;
    min-width: 0;
}

.admin-page-header {
    display: flex;
    min-height: 56px;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 20px;
}

.admin-page-header__copy {
    min-width: 0;
}

.admin-page-header__eyebrow {
    display: block;
    margin-bottom: 4px;
    color: var(--admin-muted);
    font-size: 11px;
    font-weight: 720;
    letter-spacing: 0.04em;
}

.admin-page-header h1,
.admin-page-header h2,
.admin-page-header h4 {
    margin: 0;
    color: var(--admin-ink) !important;
    font-size: 24px !important;
    font-weight: 760 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.025em !important;
}

.admin-page-header p {
    max-width: 720px;
    margin: 5px 0 0;
    color: var(--admin-muted);
    font-size: 13px;
    line-height: 1.5;
}

.admin-page-header__actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.admin-panel {
    overflow: hidden;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-md);
    background: var(--admin-surface);
    box-shadow: var(--admin-shadow-sm);
}

.admin-panel + .admin-panel {
    margin-top: 14px;
}

.admin-panel__header {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--admin-border);
    padding: 11px 16px;
}

.admin-panel__header h2,
.admin-panel__header h3 {
    margin: 0;
    color: var(--admin-ink);
    font-size: 15px !important;
    font-weight: 720 !important;
    line-height: 1.35 !important;
}

.admin-panel__body {
    padding: 16px;
}

.admin-toolbar {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-md);
    background: var(--admin-surface);
    padding: 12px 14px;
    box-shadow: var(--admin-shadow-sm);
}

.admin-toolbar > * {
    min-width: 0;
    max-width: 100%;
}

.admin-toolbar + .admin-table-wrap,
.admin-panel + .admin-toolbar,
.admin-toolbar + .admin-panel,
.admin-filter-grid + .admin-toolbar {
    margin-top: 12px;
}

.admin-filter-grid {
    display: grid;
    grid-template-columns: minmax(240px, 1.8fr) repeat(auto-fit, minmax(132px, 0.6fr));
    align-items: end;
    gap: 10px;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-md);
    background: var(--admin-surface);
    padding: 14px;
    box-shadow: var(--admin-shadow-sm);
}

.admin-filter-grid__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-table-wrap {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-md);
    background: var(--admin-surface);
    box-shadow: var(--admin-shadow-sm);
}

.admin-table-wrap table {
    border: 0 !important;
}

.admin-summary {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    color: var(--admin-muted);
    font-size: 12px;
}

.admin-summary strong {
    color: var(--admin-ink);
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.admin-section-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
}

.admin-back-link {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    gap: 6px;
    color: var(--admin-muted);
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
}

.admin-back-link:hover {
    color: var(--admin-primary);
}

.tab-button,
.tab-btn,
[role="tab"] {
    min-height: 44px;
    border-color: transparent !important;
    color: var(--admin-muted) !important;
    font-size: 13px !important;
    font-weight: 650 !important;
    transition: color var(--admin-motion-fast) ease, border-color var(--admin-motion-fast) ease, background var(--admin-motion-fast) ease;
}

.tab-button:hover,
.tab-btn:hover,
[role="tab"]:hover {
    color: var(--admin-ink) !important;
}

.tab-button.active,
.tab-btn.active,
.tab-button[aria-selected="true"],
.tab-btn[aria-selected="true"],
[role="tab"][aria-selected="true"] {
    border-color: var(--admin-primary) !important;
    color: var(--admin-primary) !important;
    font-weight: 750 !important;
}

.container-header {
    margin: -2px 0 20px;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
}

.container-header h6,
.container-header .admin-breadcrumb {
    margin: 0 0 4px;
    padding: 0 !important;
    color: var(--admin-muted);
}

.container-header h6 span,
.container-header .admin-breadcrumb span {
    color: var(--admin-muted) !important;
    font-size: 12px !important;
    font-weight: 650 !important;
}

.container-header h4,
.container-header h1 {
    margin: 0;
    color: var(--admin-ink) !important;
    font-size: 24px !important;
    font-weight: 760 !important;
    line-height: 1.3 !important;
    letter-spacing: -0.025em !important;
}

main > .container-header + div,
main .admin-panel,
main section.border,
main .bg-white.rounded-lg,
main .bg-white.rounded-xl {
    border-color: var(--admin-border) !important;
    box-shadow: var(--admin-shadow-sm) !important;
}

main section.border,
main .bg-white.rounded-lg,
main .bg-white.rounded-xl {
    border-radius: var(--admin-radius-md) !important;
}

.card,
.toss-card {
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-md) !important;
    background: var(--admin-surface);
    box-shadow: var(--admin-shadow-sm) !important;
}

/* Inputs and actions */
:where(main, .popup, .admin-dialog) :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) {
    min-height: 42px;
    border: 1px solid var(--admin-border-strong) !important;
    border-radius: var(--admin-radius-sm) !important;
    background-color: var(--admin-surface) !important;
    color: var(--admin-ink) !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    transition: border-color var(--admin-motion-fast) ease, box-shadow var(--admin-motion-fast) ease, background var(--admin-motion-fast) ease !important;
}

:where(main, .popup, .admin-dialog) :where(input, select, textarea):focus {
    border-color: var(--admin-primary) !important;
    box-shadow: 0 0 0 3px rgba(19, 31, 160, 0.12) !important;
    outline: none !important;
}

:where(main, .popup, .admin-dialog) input::placeholder,
:where(main, .popup, .admin-dialog) textarea::placeholder {
    color: #667085 !important;
}

:where(main, .popup, .admin-dialog) label {
    color: var(--admin-ink-soft);
    font-weight: 620;
}

:where(main, .popup, .admin-dialog) input[type="checkbox"],
:where(main, .popup, .admin-dialog) input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--admin-primary);
}

.search-btn,
.save-btn,
.regist-button,
.modify-button,
.check-button,
.add-button,
.btn-primary,
.confirm-button,
.bulk-complete-button,
.bulk-assign-button,
.assign-button,
button.bg-blue-600,
button.bg-interstellar,
a.bg-blue-600 {
    display: inline-flex !important;
    min-height: 42px !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--admin-primary) !important;
    border-radius: var(--admin-radius-sm) !important;
    background: var(--admin-primary) !important;
    color: #fff !important;
    padding: 0 16px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-decoration: none;
    box-shadow: none !important;
    transition: background var(--admin-motion-fast) ease, border-color var(--admin-motion-fast) ease, box-shadow var(--admin-motion-fast) ease !important;
}

.search-btn:hover,
.save-btn:hover,
.regist-button:hover,
.modify-button:hover,
.check-button:hover,
.add-button:hover,
.btn-primary:hover,
.confirm-button:hover,
.bulk-complete-button:hover,
.bulk-assign-button:hover,
.assign-button:hover,
button.bg-blue-600:hover,
button.bg-interstellar:hover,
a.bg-blue-600:hover {
    border-color: var(--admin-primary-hover) !important;
    background: var(--admin-primary-hover) !important;
    box-shadow: 0 3px 10px rgba(19, 31, 160, 0.18) !important;
}

.regist-button label,
.modify-button label,
.check-button label,
.add-button label,
.remove-button label {
    color: inherit !important;
    cursor: inherit;
    font: inherit !important;
}

.reset-btn,
.cancel-button,
.list-button,
.detail-button,
.close-button,
.bulk-responded-button,
.btn-secondary,
button.bg-gray-100,
a.bg-gray-100 {
    display: inline-flex !important;
    min-height: 42px !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--admin-border-strong) !important;
    border-radius: var(--admin-radius-sm) !important;
    background: #fff !important;
    color: var(--admin-ink-soft) !important;
    padding: 0 14px !important;
    font-size: 13px !important;
    font-weight: 650 !important;
    text-decoration: none;
    box-shadow: none !important;
    transition: background var(--admin-motion-fast) ease, border-color var(--admin-motion-fast) ease !important;
}

.reset-btn:hover,
.cancel-button:hover,
.list-button:hover,
.detail-button:hover,
.close-button:hover,
.bulk-responded-button:hover,
.btn-secondary:hover,
button.bg-gray-100:hover,
a.bg-gray-100:hover {
    border-color: #98a2b3 !important;
    background: var(--admin-surface-muted) !important;
}

.delete-btn,
.remove-btn,
.remove-button,
.bulk-reject-button,
.bulk-withdraw-btn,
.withdraw-btn,
button.bg-red-500,
button.bg-red-600,
a.bg-red-600 {
    border-color: #f3c4c0 !important;
    border-radius: var(--admin-radius-sm) !important;
    background: var(--admin-danger-soft) !important;
    color: var(--admin-danger) !important;
    box-shadow: none !important;
}

.delete-btn:hover,
.remove-btn:hover,
.remove-button:hover,
.bulk-reject-button:hover,
.bulk-withdraw-btn:hover,
.withdraw-btn:hover,
button.bg-red-500:hover,
button.bg-red-600:hover,
a.bg-red-600:hover {
    border-color: #e99b94 !important;
    background: #ffe4e1 !important;
}

.duplicate-id-btn,
.blacklist-btn,
.search-store-button {
    min-height: 42px !important;
    border: 1px solid #c7d7fe !important;
    border-radius: var(--admin-radius-sm) !important;
    background: var(--admin-primary-soft) !important;
    color: #263da8 !important;
    padding: 0 13px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}

.duplicate-id-btn:hover,
.blacklist-btn:hover,
.search-store-button:hover {
    border-color: #9fb5fa !important;
    background: #e2e8ff !important;
}

/* Search/filter regions */
.form-search,
main .search-container {
    align-items: end !important;
}

main .form-search,
main .form-search + div {
    min-width: 0;
}

main .form-search > * {
    min-width: 0;
}

/* Data tables and pagination */
.dataTables_wrapper,
div.dt-container {
    width: 100%;
    color: var(--admin-ink-soft);
}

.dataTables_wrapper .dataTables_scroll,
div.dt-container .dt-scroll {
    overflow: hidden;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-md);
    background: var(--admin-surface);
    box-shadow: var(--admin-shadow-sm);
}

.dataTables_wrapper .dataTables_scrollBody,
div.dt-container .dt-scroll-body,
.dataTables_wrapper > .overflow-x-auto,
main .relative.overflow-x-auto {
    overflow-x: auto !important;
    overscroll-behavior-x: contain;
    scrollbar-color: #b9c2cf #f1f5f9;
    scrollbar-width: thin;
}

table.dataTable,
table.list,
main table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    color: var(--admin-ink-soft);
    font-variant-numeric: tabular-nums;
}

table.dataTable thead th,
table.list thead th,
main table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    min-height: 42px;
    border-top: 0 !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--admin-border) !important;
    background: #f8fafc !important;
    color: #475467 !important;
    padding: 11px 12px !important;
    font-size: 11px !important;
    font-weight: 750 !important;
    line-height: 1.35 !important;
    letter-spacing: 0.02em;
    text-align: left;
    white-space: nowrap;
}

table.dataTable tbody td,
table.list tbody td,
main table tbody td {
    border-top: 0 !important;
    border-right: 0 !important;
    border-bottom: 1px solid #edf0f4 !important;
    background: #fff;
    color: var(--admin-ink-soft);
    padding: 12px !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
    vertical-align: middle;
}

table.dataTable tbody tr:last-child td,
table.list tbody tr:last-child td,
main table tbody tr:last-child td {
    border-bottom: 0 !important;
}

table.dataTable tbody tr:hover td,
table.list tbody tr:hover td,
main table tbody tr:hover td {
    background: #f8faff !important;
}

table.dataTable tbody tr:focus-within td,
table.list tbody tr:focus-within td {
    background: var(--admin-primary-soft) !important;
}

.dataTables_empty,
.dt-empty {
    height: 160px !important;
    color: var(--admin-muted) !important;
    text-align: center !important;
}

.dataTables_wrapper .dataTables_info,
div.dt-container .dt-info,
.total-records {
    color: var(--admin-muted) !important;
    font-size: 12px !important;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.dataTables_wrapper .dataTables_paginate,
div.dt-container .dt-paging {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    padding-top: 14px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button,
div.dt-container .dt-paging .dt-paging-button {
    display: inline-grid !important;
    min-width: 36px !important;
    height: 36px !important;
    place-items: center;
    margin: 0 !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: var(--admin-muted) !important;
    font-size: 12px !important;
    font-weight: 650 !important;
    box-shadow: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover,
div.dt-container .dt-paging .dt-paging-button:hover {
    border-color: var(--admin-border) !important;
    background: #fff !important;
    color: var(--admin-ink) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
div.dt-container .dt-paging .dt-paging-button.current {
    border-color: var(--admin-primary) !important;
    background: var(--admin-primary) !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
div.dt-container .dt-paging .dt-paging-button.disabled {
    opacity: 0.38;
}

.page-length {
    min-width: 108px !important;
}

/* Status language */
.admin-status {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--admin-border);
    border-radius: 999px;
    background: var(--admin-surface-muted);
    color: var(--admin-ink-soft);
    padding: 2px 9px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.admin-status::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #98a2b3;
    content: "";
}

.admin-status--success {
    border-color: #abefc6;
    background: var(--admin-success-soft);
    color: var(--admin-success);
}

.admin-status--success::before { background: #12b76a; }

.admin-status--warning {
    border-color: #fedf89;
    background: var(--admin-warning-soft);
    color: var(--admin-warning);
}

.admin-status--warning::before { background: #f79009; }

.admin-status--danger {
    border-color: #fecdca;
    background: var(--admin-danger-soft);
    color: var(--admin-danger);
}

.admin-status--danger::before { background: #f04438; }

.admin-status--info {
    border-color: #c7d7fe;
    background: var(--admin-primary-soft);
    color: #263da8;
}

.admin-status--info::before { background: var(--admin-primary); }

/* Dialogs, drawers and feedback */
.popup {
    z-index: var(--admin-z-modal) !important;
    padding: 16px;
    background: rgba(15, 23, 42, 0.56) !important;
    backdrop-filter: blur(3px);
}

.popup-container,
.admin-dialog {
    max-width: min(96vw, 680px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--admin-radius-lg) !important;
    background: #fff !important;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.24) !important;
}

.popup-header {
    border-bottom-color: var(--admin-border) !important;
    background: #fff !important;
    color: var(--admin-ink) !important;
}

.popup-header h2,
.popup-header h3,
.popup-header h4 {
    color: var(--admin-ink) !important;
    font-weight: 750 !important;
}

.popup-body {
    color: var(--admin-ink-soft) !important;
}

#toast-container {
    z-index: 60 !important;
    top: calc(var(--admin-topbar-height) + 12px) !important;
    right: 14px !important;
}

#toast-container > div {
    border-radius: 12px !important;
    box-shadow: var(--admin-shadow-md) !important;
}

#loading-overlay {
    z-index: 60 !important;
}

.admin-command {
    position: fixed;
    inset: 0;
    z-index: var(--admin-z-modal);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: max(84px, 12vh) 16px 16px;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(4px);
}

.admin-command[data-open="true"] {
    display: flex;
}

.admin-command__dialog {
    width: min(100%, 620px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.3);
}

.admin-command__search {
    position: relative;
    display: flex;
    min-height: 58px;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--admin-border);
    padding: 0 16px;
}

.admin-command__search input {
    width: 100%;
    height: 56px;
    border: 0 !important;
    background: transparent !important;
    color: var(--admin-ink);
    padding: 0 !important;
    font-size: 16px !important;
    box-shadow: none !important;
}

.admin-command__results {
    max-height: min(54vh, 440px);
    overflow-y: auto;
    padding: 8px;
}

.admin-command__group {
    padding: 7px 9px 4px;
    color: var(--admin-muted);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-command__item {
    display: flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    gap: 11px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--admin-ink-soft);
    padding: 8px 10px;
    text-align: left;
}

.admin-command__item:hover,
.admin-command__item[aria-selected="true"] {
    background: var(--admin-primary-soft);
    color: #1e3a8a;
}

.admin-command__item svg {
    width: 18px;
    height: 18px;
}

.admin-command__item span {
    flex: 1;
    font-size: 13px;
    font-weight: 650;
}

.admin-command__item small {
    color: var(--admin-muted);
    font-size: 11px;
}

.admin-command__empty {
    padding: 42px 20px;
    color: var(--admin-muted);
    text-align: center;
}

.admin-command__footer {
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid var(--admin-border);
    background: #f8fafc;
    color: var(--admin-muted);
    padding: 9px 14px;
    font-size: 10px;
}

.admin-command__footer kbd {
    border: 1px solid var(--admin-border-strong);
    border-radius: 4px;
    background: #fff;
    padding: 1px 5px;
    font-family: inherit;
}

.admin-empty-state {
    display: grid;
    min-height: 180px;
    place-items: center;
    color: var(--admin-muted);
    padding: 28px;
    text-align: center;
}

.admin-skeleton {
    border-radius: 6px;
    background: #e9edf3;
    animation: admin-pulse 1.25s ease-in-out infinite;
}

@keyframes admin-pulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

/* Login page primitives */
.admin-login-page {
    min-height: 100dvh;
    background: #eef1f6;
}

/* Mobile */
@media (max-width: 1023px) {
    :root { --admin-topbar-height: 60px; }

    body:not(.admin-login-page):not(.ops-auth) > .flex.flex-1 {
        display: block !important;
        min-height: calc(100dvh - var(--admin-topbar-height));
    }

    .admin-topbar__inner {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .admin-brand {
        display: none;
    }

    .admin-topbar__center {
        gap: 10px;
        padding: 0 10px;
    }

    .admin-mobile-menu {
        display: inline-flex;
        flex: 0 0 44px;
    }

    .admin-command-trigger {
        min-width: 44px;
        max-width: 44px;
        flex: 0 0 44px;
        justify-content: center;
        margin-left: auto;
        padding: 0;
    }

    .admin-command-trigger span,
    .admin-command-trigger kbd {
        display: none;
    }

    .admin-topbar__actions {
        padding: 0 8px 0 0;
    }

    .admin-profile-trigger__copy,
    .admin-topbar__actions .admin-icon-button {
        display: none;
    }

    .admin-profile-trigger {
        width: 44px;
        justify-content: center;
        padding: 0;
    }

    .admin-sidebar-fragment {
        position: static;
        width: 0;
        height: 0;
        flex: 0 0 0;
    }

    .admin-sidebar {
        display: none;
    }

    .admin-mobile-overlay,
    .admin-mobile-drawer {
        display: block;
    }

    .admin-mobile-drawer .admin-nav-item,
    .admin-mobile-drawer .admin-nav-toggle {
        min-height: 46px;
    }

    body.mobile-menu-open .admin-mobile-overlay {
        display: block;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition-delay: 0s;
    }

    body.mobile-menu-open .admin-mobile-drawer {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
        transition-delay: 0s;
    }

    body:not(.admin-login-page):not(.ops-auth) main {
        width: 100%;
        padding: 18px 16px calc(32px + env(safe-area-inset-bottom)) !important;
    }

    .container-header {
        margin-bottom: 16px;
    }

    .container-header h4,
    .container-header h1 {
        font-size: 21px !important;
    }

    .admin-page-header {
        min-height: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 16px;
    }

    .admin-page-header h1,
    .admin-page-header h2,
    .admin-page-header h4 {
        font-size: 21px !important;
    }

    .admin-page-header__actions {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .admin-toolbar {
        flex-wrap: wrap;
        align-items: stretch;
        padding: 12px;
    }

    .admin-toolbar > * {
        width: 100%;
    }

    .admin-filter-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        padding: 12px;
    }

    .admin-filter-grid > :first-child {
        grid-column: 1 / -1;
    }

    .admin-filter-grid__actions {
        grid-column: 1 / -1;
    }

    .admin-panel__header,
    .admin-panel__body {
        padding-right: 14px;
        padding-left: 14px;
    }

    main .form-search,
    main .form-search.flex,
    main .form-search > .flex,
    main .form-search + .flex {
        flex-wrap: wrap !important;
    }

    main .form-search > *,
    main .form-search > .w-24,
    main .form-search > .w-28,
    main .form-search > .w-32,
    main .form-search > .w-36,
    main .form-search > .min-w-80 {
        width: 100% !important;
        min-width: 0 !important;
    }

    :where(main, .popup, .admin-dialog) :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) {
        min-height: 46px;
        font-size: 16px !important;
    }

    :where(main, .popup, .admin-dialog) button,
    :where(main, .popup, .admin-dialog) a[class*="btn"],
    :where(main, .popup, .admin-dialog) .search-btn,
    :where(main, .popup, .admin-dialog) .reset-btn,
    :where(main, .popup, .admin-dialog) .regist-button {
        min-height: 44px !important;
    }

    .dataTables_wrapper .dataTables_paginate .paginate_button,
    div.dt-container .dt-paging .dt-paging-button {
        min-width: 44px !important;
        height: 44px !important;
    }

    .dataTables_wrapper .dataTables_paginate .paginate_button:not(.previous):not(.next):not(.current),
    div.dt-container .dt-paging .dt-paging-button:not(.previous):not(.next):not(.current) {
        display: none !important;
    }

    .popup {
        align-items: flex-end !important;
        padding: 0 !important;
    }

    .popup-container {
        width: 100% !important;
        max-width: 100% !important;
        max-height: min(90dvh, 820px) !important;
        border-width: 1px 0 0 !important;
        border-radius: 18px 18px 0 0 !important;
        padding-bottom: env(safe-area-inset-bottom);
    }

    #toast-container {
        right: 12px !important;
        left: 12px !important;
    }

    #toast-container > div {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }
}

@media (max-width: 639px) {
    .admin-location__eyebrow { display: none; }
    .admin-location__title { margin-top: 0; font-size: 14px; }

    body:not(.admin-login-page):not(.ops-auth) main {
        padding-right: 12px !important;
        padding-bottom: calc(94px + env(safe-area-inset-bottom)) !important;
        padding-left: 12px !important;
    }

    .admin-mobile-dock {
        position: fixed;
        inset: auto 0 0 0;
        z-index: 20;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        min-height: calc(64px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--admin-border);
        background: rgba(255, 255, 255, 0.96);
        padding: 5px 8px calc(5px + env(safe-area-inset-bottom));
        box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.07);
        backdrop-filter: saturate(140%) blur(12px);
    }

    .admin-mobile-dock__item {
        display: flex;
        min-width: 0;
        min-height: 52px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        border: 0;
        border-radius: 10px;
        background: transparent;
        color: #667085;
        text-decoration: none;
    }

    .admin-mobile-dock__item svg {
        width: 20px;
        height: 20px;
    }

    .admin-mobile-dock__item span {
        font-size: 10px;
        font-weight: 680;
        line-height: 1.2;
    }

    .admin-mobile-dock__item[aria-current="page"] {
        background: var(--admin-primary-soft);
        color: var(--admin-primary);
    }

    main .bg-white.rounded-lg > .p-4,
    main .bg-white.rounded-xl > .p-4,
    main section.border {
        padding: 14px !important;
    }

    .admin-filter-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-filter-grid > *,
    .admin-filter-grid > :first-child,
    .admin-filter-grid__actions {
        grid-column: 1;
        width: 100% !important;
    }

    .admin-filter-grid__actions > * {
        flex: 1;
    }

    .dataTables_wrapper .dataTables_info,
    div.dt-container .dt-info {
        display: block;
        width: 100%;
        padding: 10px 0 4px;
        text-align: center;
    }

    .dataTables_wrapper .dataTables_paginate,
    div.dt-container .dt-paging {
        justify-content: center;
    }

    .admin-command {
        align-items: flex-end;
        padding: 0;
    }

    .admin-command__dialog {
        width: 100%;
        border-width: 1px 0 0;
        border-radius: 18px 18px 0 0;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .admin-command__results {
        max-height: 58dvh;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media print {
    .admin-topbar,
    .admin-sidebar-fragment,
    .admin-command,
    #toast-container {
        display: none !important;
    }

    body:not(.admin-login-page):not(.ops-auth) {
        padding-top: 0;
        background: #fff;
    }

    body:not(.admin-login-page):not(.ops-auth) main {
        padding: 0 !important;
    }
}
