/* ===== Header / Logo ===== */
.logo-text {
    font-size: 24px;
    font-weight: 900;
    font-style: italic;
    color: var(--primary);
    letter-spacing: -1px;
}

.logo-sub {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-left: 4px;
}

/* ===== Buttons ===== */
.btn-action {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    box-sizing: border-box;
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-action-dark {
    background-color: var(--btn-dark);
    color: var(--neutral-0);
    border: 1px solid transparent;
}

.btn-action-dark:hover {
    background-color: var(--btn-dark-hover);
    color: var(--neutral-0);
}

.btn-action-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--btn-outline-border);
}

.btn-action-outline:hover {
    background-color: var(--neutral-5);
    color: var(--text-primary);
}

.btn-action-outline-filled {
    background-color: var(--neutral-0);
}

/* outline 버튼이 회색(--bg-muted) 박스 안에 놓일 때 흰색 채움으로 강조 */
.account-card-footer .btn-action-outline,
.settlement-account-header .btn-action-outline,
.meate-summary-account-label .btn-action-outline,
.info-account-row .btn-action-outline,
.pw-action-row .btn-action-outline {
    background: var(--neutral-0);
}

/* Green tinted button (used on genba cards and info pages) */
.btn-action-green {
    gap: 4px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-bg-light);
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
}

.btn-action-green:hover {
    background: var(--primary-bg-hover);
    color: var(--primary);
}

/* Red / danger button */
.btn-action-red {
    background-color: var(--red-50);
    color: var(--neutral-0);
    border: 1px solid transparent;
}

.btn-action-red:hover {
    background-color: var(--red-70);
    color: var(--neutral-0);
}

.btn-icon {
    width: 14px;
    height: 14px;
}

/* Default avatar fallback — scale up to absorb the PNG's built-in padding.
   Effective when the image sits inside a container with overflow: hidden. */
.avatar-placeholder {
    transform: scale(1.8);
}

/* Small variant */
.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 5px;
}

/* Add / Delete entry buttons */
.btn-add-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 28px 12px;
    width: 100%;
    font-size: 14px;
    font-weight: 500;
    background: transparent;
    color: var(--text-tertiary);
    border: 1px dashed var(--neutral-20);
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.btn-add-entry:hover {
    background: var(--neutral-5);
    border-color: var(--neutral-30);
}

.btn-add-entry::before {
    content: '+';
    font-size: 24px;
    font-weight: 300;
    color: var(--neutral-30);
}

.btn-delete-entry {
    width: 28px;
    height: 28px;
    border: 1px solid var(--neutral-15);
    border-radius: 4px;
    background: var(--neutral-0);
    cursor: pointer;
    font-size: 16px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-entry:hover {
    background: #FFF0F0;
    color: var(--red-50);
    border-color: var(--red-50);
}

.btn-add-genba {
    white-space: nowrap;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
}

/* ===== Badges ===== */
.badge-status {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    color: var(--neutral-0);
}

.badge-on-sale {
    background-color: var(--primary-bg-light);
    color: var(--primary);
}

.badge-closed {
    background-color: var(--neutral-60);
    color: var(--neutral-0);
}

.badge-meate {
    background-color: var(--btn-dark);
    color: var(--neutral-0);
}

.badge-dark {
    display: inline-block;
    padding: 3px 10px;
    background: var(--badge-default-bg);
    color: var(--neutral-0);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.info-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 600;
    background: var(--neutral-15);
    color: var(--text-secondary);
    border-radius: 5px;
}

.meate-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--neutral-15);
    border-radius: 4px;
    color: var(--text-primary);
    background: var(--neutral-5);
}

.meate-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ===== Tabs ===== */
.tab-nav {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    background: var(--neutral-0);
    border-radius: 50px;
    padding: 4px;
}

.tab-nav a {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    color: var(--tab-muted-color);
    background: transparent;
    transition: all 0.2s;
    flex: 1;
    text-align: center;
}

.tab-nav a.active {
    background-color: var(--tab-active-bg);
    color: var(--neutral-0);
}

.tab-nav a:hover:not(.active) {
    color: var(--text-primary);
}

.tab-nav-sub {
    background: transparent;
    padding: 0;
    gap: 8px;
    max-width: none;
    flex: none;
}

.tab-nav-sub a {
    flex: none;
    padding: 8px 16px;
    border-radius: 6px;
    background: var(--tab-sub-bg);
    color: var(--text-muted);
    font-size: 13px;
}

.tab-nav-sub a.active {
    background: var(--tab-active-bg);
    color: var(--neutral-0);
}

/* Tab content visibility */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===== Page Header (title + action row) ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.page-header .tab-nav {
    margin-bottom: 0;
    flex: 1;
    max-width: 720px;
}

.agency-request-btn-mobile {
    display: none;
}

/* ===== Section Title ===== */
.section-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px;
}

.section-title-divider {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--neutral-10);
}

/* ===== Info Card ===== */
.info-card {
    background: var(--bg-card);
    border: none;
    border-radius: 16px;
    padding: 0;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.info-card-body {
    padding: 28px;
    position: relative;
}

.info-card-header {
    display: none;
}

.info-card-top-actions {
    position: absolute;
    top: 24px;
    right: 24px;
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.info-card-top-actions .info-card-edit-btn {
    position: static;
}

.info-card-edit-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.info-card-edit-btn svg {
    width: 14px;
    height: 14px;
}

.info-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Profile within info card */
.info-profile {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 4px;
}

.info-profile-img {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--neutral-10);
    box-shadow: var(--shadow-profile);
    flex-shrink: 0;
}

.info-profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-profile-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.info-profile-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-profile-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.info-details {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 48px;
    font-size: 14px;
    color: var(--text-primary);
    padding-top: 8px;
}

.info-details + .info-details {
    padding-top: 4px;
}

.info-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-detail-item strong {
    color: var(--text-primary);
    font-weight: 400;
    font-size: 13px;
    opacity: 0.4;
}

.info-detail-item span {
    font-weight: 600;
    color: var(--text-dark);
}

/* Account / bank info row inside info card */
.info-account-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding: 14px 20px;
    margin: 8px 20px 20px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-muted);
    border-radius: 10px;
}

.info-account-row .info-detail-item {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.info-account-row .info-detail-item strong {
    color: var(--text-primary);
    font-weight: 400;
    font-size: 14px;
    opacity: 0.4;
}

.info-account-row .info-detail-item span {
    font-weight: 600;
    color: var(--text-dark);
}

.info-account-data {
    display: flex;
    align-items: center;
    gap: 8px 24px;
    flex: 1;
    min-width: 0;
}

.info-account-data .info-detail-item + .info-detail-item {
    padding-left: 24px;
    border-left: 1px solid var(--neutral-20);
}

.info-account-btn {
    flex-shrink: 0;
    white-space: nowrap;
    margin-left: auto;
}

/* ===== Page Card (white rounded container) ===== */
.page-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-card);
}

.page-card .ticket-summary-row {
    margin-bottom: 0;
    border-bottom: 1px solid var(--neutral-10);
    padding-bottom: 16px;
}

.page-card .data-table-wrapper {
    margin-top: 16px;
}

/* ===== Detail Page Header ===== */
.detail-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.detail-header .back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-right: -2px;
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    background: transparent;
    border: none;
    transition: all 0.2s;
    flex-shrink: 0;
}

.detail-header .back-link svg {
    width: 20px;
    height: 20px;
    display: block;
}

.detail-header .back-link:hover {
    background: var(--neutral-5);
    color: var(--primary-dark);
}

.detail-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.detail-title-sub {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

.detail-title-divider {
    color: var(--text-secondary);
}

.detail-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.detail-actions.genba-detail-cta {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.detail-save-icon {
    display: none;
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    margin-left: auto;
}

.detail-save-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.export-save-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.export-save-modal-actions .btn-action {
    width: 100%;
    padding: 12px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .modal-azito.modal-export-save .modal-dialog {
        margin: auto;
        min-height: calc(100% - 1rem);
        display: flex;
        align-items: center;
    }

    .modal-azito.modal-export-save .modal-body {
        padding: 20px;
    }
}

/* Detail header row (with export actions on right) */
.detail-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.detail-header-row .detail-header {
    margin-bottom: 0;
}

.detail-header-row .detail-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .detail-header-row .detail-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .detail-header .detail-title {
        flex: 1 1 100%;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .detail-header .detail-title-text {
        display: inline-block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* ===== Home Page ===== */
.home-greeting {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.home-shortcut-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.home-shortcut-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--neutral-10);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.home-shortcut-card:hover {
    border-color: var(--neutral-20);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.home-shortcut-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.home-shortcut-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px;
}

.home-shortcut-card p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* ===== Responsive ===== */
@media (max-width: 576px) {
    .info-card-body {
        padding: 20px 16px;
        position: relative;
    }

    .info-details {
        flex-direction: column;
        gap: 12px;
    }

    .info-account-row {
        flex-direction: column;
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px 16px;
        margin: 8px 12px 12px;
        align-items: flex-start;
    }

    .info-account-row .info-detail-item {
        flex-direction: row;
        align-items: baseline;
        flex-wrap: wrap;
        gap: 4px 8px;
    }

    .info-account-data {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .info-account-data .info-detail-item + .info-detail-item {
        padding-left: 0;
        border-left: none;
    }

    .info-account-data .account-footer-divider {
        display: none;
    }

    .info-account-data .info-detail-item {
        width: 100%;
        align-items: flex-start;
    }

    .info-account-data .info-detail-item strong {
        flex-shrink: 0;
        min-width: 60px;
    }

    .info-account-data .info-detail-item span {
        flex: 1;
        min-width: 0;
        word-break: keep-all;
    }

    .info-account-row .btn-action {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }

    .tab-nav {
        border-radius: 50px;
        padding: 3px;
        gap: 4px;
    }

    .tab-nav a {
        padding: 8px 12px;
        font-size: 12px;
    }

    .page-header {
        flex-wrap: wrap;
        gap: 12px;
    }

    .page-header .tab-nav {
        max-width: 100%;
        flex: 1;
        min-width: 0;
    }

    .page-header > .btn-action {
        width: 100%;
        text-align: center;
        order: -1;
    }

    .agency-request-btn-desktop {
        display: none;
    }

    .agency-request-btn-mobile {
        display: block;
        width: 100%;
        text-align: center;
        margin-top: 16px;
    }

    .page-header .detail-actions {
        width: 100%;
        order: -1;
        justify-content: flex-end;
    }

    .detail-header {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        row-gap: 0;
        column-gap: 6px;
    }

    .detail-header .back-link {
        order: 0;
        width: 28px;
        height: 28px;
        margin-right: 0;
    }

    .detail-header .detail-title {
        order: 1;
        flex: 1;
        min-width: 0;
        font-size: 15px;
        line-height: 1.2;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .detail-header .detail-title-text {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: inline-block;
        max-width: 100%;
    }

    .detail-header .badge-status {
        display: none;
    }

    .detail-header .detail-save-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        order: 2;
        flex-shrink: 0;
        margin-left: 0;
    }

    .detail-header-row > .detail-actions {
        display: none;
    }

    .detail-header .detail-title-sub {
        order: 3;
        flex-basis: 100%;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 4px;
        padding-left: 34px;
        font-size: 12px;
        line-height: 1.2;
    }

    .detail-actions {
        margin-left: 0;
        width: 100%;
        gap: 8px;
    }

    .detail-actions .btn-action {
        flex: 1;
    }

    .detail-header-row {
        flex-direction: column;
    }

    .mobile-cta-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        padding: 12px 16px;
        background: var(--bg-card, #ffffff);
        border-top: 1px solid var(--neutral-10, #e5e7eb);
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
        z-index: var(--z-mobile-cta);
    }

    .mobile-cta-actions .btn-action {
        flex: 1;
        text-align: center;
    }

    body:has(.mobile-cta-actions) {
        padding-bottom: 76px;
    }

    .detail-actions.genba-detail-cta {
        grid-template-columns: 1fr;
    }

    body:has(.genba-detail-cta) {
        padding-bottom: 120px;
    }
}

.genba-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.genba-filter-bar .filter-keyword {
    flex: 1;
    min-width: 200px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-6);
}

.pagination .pagination-status {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}
