.main-content {
    background: transparent;
    min-height: calc(100vh - 120px);
}

body.mypage-page {
    --mp-header: 64px;
    --mp-nav: 260px;
    --mp-gap: 16px;
    --mp-pad: 20px;
    --mp-pad-x: 24px;
    --mp-radius: 8px;
    --mp-border: #e7ebf0;
    --mp-muted: #f4f6f8;
}

body.mypage-page .app-layout {
    min-height: 100vh;
}

.main-content.mypage-main {
    padding: 24px 20px 40px;
    margin-top: var(--mp-header);
    min-height: calc(100vh - var(--mp-header));
    display: flex;
    flex-direction: column;
    background: transparent;
    background-image: none;
}

.content-container.mypage-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: 20px;
}

.mypage-login-required {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 48px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.login-card i {
    font-size: 64px;
    color: var(--text-light);
    margin-bottom: 24px;
}

.login-card h3 {
    margin-bottom: 16px;
    color: var(--text-dark);
}

.login-card p {
    color: var(--text-gray);
    margin-bottom: 32px;
}

.mypage-shell {
    --mp-gap: 16px;
    --mp-pad: 20px;
    --mp-pad-x: 24px;
    --mp-radius: 8px;
    --mp-border: #e7ebf0;
    --mp-muted: #f4f6f8;
    display: grid;
    grid-template-columns: var(--mp-nav, 240px) minmax(0, 1fr);
    align-items: stretch;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(31, 41, 51, 0.07);
    width: 100%;
    flex: 0 1 auto;
    min-height: 0;
    position: relative;
}

.mypage-nav {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    height: auto;
    max-height: none;
    box-sizing: border-box;
    border-right: 1px solid var(--mp-border, #e7ebf0);
    background: rgba(255, 255, 255, 0.55);
    padding: 18px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 1;
    scrollbar-width: thin;
}

.mypage-nav-profile {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 10px 14px;
    margin: 0;
    border-bottom: 1px solid #eef1f4;
}

.mypage-nav-profile-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.mypage-nav .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #3d5a73;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1;
}

.mypage-nav .user-avatar i {
    font-size: 20px;
    line-height: 1;
}

.mypage-nav .user-details {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.mypage-nav .user-details h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.25;
    word-break: break-word;
}

.mypage-nav .role-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
}

.mypage-nav .role-badge.role-free {
    background: #eef1f4;
    color: #5c6570;
}

.mypage-nav .role-badge.role-paid {
    background: #eef2f5;
    color: #c45a1a;
}

.mypage-nav .role-badge.role-classic {
    background: #0d6efd;
    color: #fff;
}

.mypage-nav .role-badge.role-master {
    background: #ffe566;
    color: #5c4b00;
}

.mypage-nav .role-badge.role-admin {
    background: #dc3545;
    color: #fff;
}

.mypage-nav .role-badge.role-expired {
    background: #f1f3f5;
    color: #868e96;
}

.mypage-nav .search-limit-info {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border-radius: 6px;
    background: #f7f8fa;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
}

.mypage-nav .search-limit-info i {
    color: #3d5a73;
    font-size: 13px;
    flex-shrink: 0;
}

.mypage-nav .search-limit-info strong {
    color: #3d5a73;
    font-weight: 700;
}

.mypage-nav .mypage-tabs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    list-style: none;
    padding: 4px 0 0;
    margin: 0;
    flex: 1 1 auto;
    min-height: 0;
}

.mypage-nav-footer {
    margin-top: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 2px 2px;
    border-top: 1px solid #eef1f4;
}

.mypage-nav-footer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    box-sizing: border-box;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.mypage-nav-footer-btn i {
    font-size: 16px;
    line-height: 1;
}

.mypage-nav-footer-home {
    border: 1px solid #e5e9ee;
    background: #fff;
    color: #374151;
}

.mypage-nav-footer-home:hover {
    background: #f3f5f7;
    color: #111827;
    border-color: #d5dbe3;
}

.mypage-nav-footer-kakao {
    border: 1px solid #fee500;
    background: #fee500;
    color: #191919;
}

.mypage-nav-footer-kakao:hover {
    background: #f5dc00;
    border-color: #f5dc00;
    color: #191919;
}

.mypage-mobile-actions {
    display: none;
}

.mypage-nav .mypage-tabs li {
    margin: 0;
    padding: 0;
}

.mypage-nav .tab-button {
    background: transparent;
    border: 0;
    border-radius: 8px;
    padding: 0 12px;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    text-decoration: none;
    color: #4b5563;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    min-height: 50px;
    position: relative;
}

.mypage-nav .tab-button:hover {
    background: #f3f5f7;
    color: #1f2937;
}

.mypage-nav .tab-button.active {
    background: #eef2f5;
    color: #d95720;
    font-weight: 700;
}

.mypage-nav .tab-button i {
    font-size: 18px;
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    color: inherit;
    margin: 0;
    flex-shrink: 0;
}

.mypage-nav .tab-button > span:not(.mypage-nav-badge) {
    font-size: 16px;
    font-weight: inherit;
    display: block;
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.02em;
}

.mypage-nav .mypage-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: auto;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    line-height: 1;
    flex-shrink: 0;
}

.mypage-nav .mypage-nav-badge[hidden] {
    display: none !important;
}

.info-card .role-badge,
#userRole .role-badge,
.role-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
}

.role-badge.role-free {
    background: #e9ecef;
    color: #495057;
}

.role-badge.role-paid {
    background: #eef2f5;
    color: #c45a1a;
}

.role-badge.role-classic {
    background: #0d6efd;
    color: #fff;
}

.role-badge.role-master {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
}

.role-badge.role-admin {
    background: #dc3545;
    color: #fff;
}

.role-badge.role-expired {
    background: #f1f3f5;
    color: #868e96;
}

.mypage-content.tab-content {
    margin-left: 0;
    min-width: 0;
    min-height: 0;
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.mypage-views {
    flex: 1 0 auto;
    min-height: 0;
    padding: 22px 24px 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}


.mypage-page-title {
    margin: 0;
    font-size: 18px;
    font-weight: 750;
    color: #22272e;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.mypage-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.mp-dash {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.mp-dash-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.mp-dash-eyebrow {
    font-size: 12px;
    font-weight: 700;
    color: #9aa3ad;
    margin-bottom: 4px;
}

.mp-dash-title {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 800;
    color: #1f2937;
    letter-spacing: -0.03em;
    line-height: 1.25;
}

.mp-dash-sub {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

.mp-dash-head-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mp-dash-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #e5e9ee;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.mp-dash-btn:hover {
    background: #f3f5f7;
}

.mp-dash-btn-primary {
    border-color: #3d5a73;
    background: #3d5a73;
    color: #fff;
}

.mp-dash-btn-primary:hover {
    background: #e9630c;
    border-color: #e9630c;
    color: #fff;
}

.mp-dash-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.mp-dash-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 16px;
    border: 1px solid #e9edf2;
    border-radius: 10px;
    background: #f8f9fb;
    text-align: left;
    cursor: default;
    font: inherit;
}

.mp-dash-card.is-warn {
    border-color: #f5d0a9;
    background: #eef2f5;
}

.mp-dash-card-label {
    font-size: 12px;
    font-weight: 700;
    color: #8b949e;
}

.mp-dash-card-value {
    font-size: 24px;
    font-weight: 800;
    color: #1f2937;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.mp-dash-card-meta {
    font-size: 12px;
    color: #6b7280;
}

.mp-dash-panel {
    border: 1px solid #e9edf2;
    border-radius: 10px;
    background: #f8f9fb;
    padding: 16px 18px;
}

.mp-dash-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.mp-dash-panel-head h4 {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 750;
    color: #22272e;
}

.mp-dash-panel-head h4 i {
    color: #3d5a73;
}

.mp-dash-link {
    border: 0;
    background: transparent;
    color: #d95720;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.mp-dash-usage {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mp-dash-usage-row.is-low .mp-dash-usage-bar i {
    background: #ef4444;
}

.mp-dash-usage-top,
.mp-dash-usage-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    color: #4b5563;
}

.mp-dash-usage-top strong {
    color: #1f2937;
    font-weight: 750;
}

.mp-dash-usage-bar {
    height: 8px;
    margin: 8px 0;
    border-radius: 999px;
    background: #e8ecf1;
    overflow: hidden;
}

.mp-dash-usage-bar i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: #3d5a73;
}

.mp-dash-subgrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.mp-dash-subitem {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e9edf2;
}

.mp-dash-subitem span {
    font-size: 12px;
    font-weight: 700;
    color: #8b949e;
}

.mp-dash-subitem strong {
    font-size: 16px;
    font-weight: 800;
    color: #1f2937;
}

.mp-dash-subitem em {
    font-style: normal;
    font-size: 12px;
    color: #6b7280;
}

.mp-dash-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #eef6ff;
    border: 1px solid #cfe2ff;
    color: #1e3a5f;
}

.mp-dash-alert.is-warn {
    background: #f3f5f7;
    border-color: #fed7aa;
    color: #9a3412;
}

.mp-dash-alert i {
    font-size: 18px;
    flex-shrink: 0;
}

.mp-dash-alert div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.mp-dash-alert strong {
    font-size: 13px;
}

.mp-dash-alert span {
    font-size: 12px;
    opacity: 0.9;
}

.mp-dash-alert[hidden] {
    display: none !important;
}

.mp-dash-split {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 16px;
}

.mp-dash-dl {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mp-dash-dl > div {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #eef1f4;
}

.mp-dash-dl > div:last-child {
    border-bottom: 0;
}

.mp-dash-dl dt {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
}

.mp-dash-dl dd {
    margin: 0;
    font-size: 13px;
    color: #1f2937;
    font-weight: 700;
    word-break: break-all;
}

.mp-dash-shortcuts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.mp-dash-shortcut {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #e5e9ee;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
}

.mp-dash-shortcut:hover {
    border-color: #c5d0da;
    color: #d95720;
}

.mp-dash-shortcut i {
    color: #3d5a73;
}

.mp-dash-shortcut-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    font-style: normal;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mp-dash-shortcut-badge[hidden] {
    display: none !important;
}

.mp-dash-activity {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mp-dash-activity li {
    border-bottom: 1px solid #eef1f4;
}

.mp-dash-activity li:last-child {
    border-bottom: 0;
}

.mp-dash-activity-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 4px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.mp-dash-activity-btn:hover .activity-keyword {
    color: #d95720;
}

.mp-dash-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 28px 16px;
    color: #8b949e;
    text-align: center;
}

.mp-dash-empty p {
    margin: 0;
    font-size: 13px;
}

@media (max-width: 1100px) {
    .mp-dash-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .mp-dash-subgrid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mp-dash-title {
        font-size: 18px;
    }
    .mp-dash-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .mp-dash-card {
        padding: 14px 12px;
    }
    .mp-dash-card-value {
        font-size: 20px;
    }
    .mp-dash-split,
    .mp-dash-shortcuts {
        grid-template-columns: 1fr;
    }
    .mp-dash-alert {
        flex-wrap: wrap;
    }
}

.tab-pane {
    display: none;
    width: 100%;
}

.tab-pane.active {
    display: flex;
    flex-direction: column;
    gap: var(--mp-gap);
    flex: 1 0 auto;
}

.mypage-panel,
.mypage-views .info-card,
.mypage-views .msg-inbox-card,
#subscription .mypage-billing-card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    background: #f8f9fb;
    border: 1px solid #e9edf2;
    border-radius: var(--mp-radius);
    box-shadow: none;
}

.mypage-panel {
    padding: 16px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--mp-gap);
    width: 100%;
    margin: 0;
}

.info-card {
    background: #f8f9fb;
    padding: 16px 18px;
    border-radius: var(--mp-radius);
    border: 1px solid #e9edf2;
}

.info-card-wide {
    grid-column: 1 / -1;
}

.info-card h5 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    color: #22272e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-card h5 i {
    color: var(--primary);
    font-size: 15px;
}

.info-card table {
    width: 100%;
}

.info-card table tr {
    border-bottom: 1px solid #eef1f4;
}

.info-card table tr:last-child {
    border-bottom: none;
}

.info-card table td {
    padding: 10px 0;
    font-size: 13px;
    vertical-align: middle;
}

.info-card table td:first-child {
    color: #6b7280;
    font-weight: 500;
    width: 42%;
    padding-right: 12px;
}

.info-card table td:last-child {
    color: #1f2937;
    font-weight: 600;
}

.jobs-status-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.jobs-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    color: #4b5563;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.jobs-chip em {
    font-style: normal;
    color: #9ca3af;
    font-weight: 700;
}

.jobs-chip:hover {
    border-color: #fdba74;
    color: #ea580c;
}

.jobs-chip.active {
    border-color: #3d5a73;
    background: #f3f5f7;
    color: #c2410c;
}

.jobs-chip.active em {
    color: #ea580c;
}

.jobs-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.jobs-filter .form-control {
    flex: 1;
    min-width: 120px;
    max-width: 200px;
}

.jobs-filter .btn-primary,
.jobs-filter .btn-outline,
.jobs-filter .job-delete-all-button {
    flex: 0 0 auto;
    min-height: 42px;
}

.jobs-filter .btn-outline.active {
    border-color: #3d5a73;
    color: #ea580c;
    background: #f3f5f7;
}

.jobs-advanced-filter {
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid #eef1f4;
    border-radius: 8px;
    background: #fafbfc;
}

.jobs-advanced-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.jobs-advanced-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}

.jobs-advanced-grid .form-control {
    width: 100%;
    max-width: none;
}

.jobs-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.jobs-check-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #4b5563;
    font-weight: 600;
    cursor: pointer;
}

.jobs-result-meta {
    margin-left: auto;
    font-size: 12px;
    color: #9ca3af;
}

.jobs-col-check {
    width: 36px;
    text-align: center;
}

.jobs-keyword {
    font-weight: 600;
    color: #111827;
}

.jobs-filter-summary {
    font-size: 12px;
    color: var(--text-gray);
    max-width: 280px;
}

.jobs-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.jobs-progress-track {
    display: block;
    width: 120px;
    height: 6px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.jobs-progress-track i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #3d5a73, #5a7a94);
}

.jobs-progress em {
    font-style: normal;
    font-size: 11px;
    color: #9ca3af;
    white-space: nowrap;
}

.jobs-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.jobs-actions .btn-sm {
    min-height: 30px;
    padding: 4px 10px;
    font-size: 12px;
}

.jobs-empty {
    text-align: center;
    padding: 40px !important;
    color: var(--text-gray);
}

.job-delete-all-button,
.job-delete-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid #dc2626;
    border-radius: 8px;
    background: #fff;
    color: #dc2626;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.job-delete-all-button {
    min-height: 42px;
    padding: 10px 14px;
    white-space: nowrap;
}

.job-delete-button {
    padding: 7px 10px;
    font-size: 12px;
    white-space: nowrap;
}

.job-delete-all-button:hover:not(:disabled),
.job-delete-button:hover:not(:disabled) {
    background: #dc2626;
    color: #fff;
}

.job-delete-all-button:disabled,
.job-delete-button:disabled {
    border-color: #d1d5db;
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.75;
}

.job-delete-unavailable {
    color: var(--text-gray);
}

.job-delete-notice {
    margin-top: 8px;
    color: #dc2626;
    font-size: 13px;
}

.jobs-table-container {
    overflow-x: auto;
    margin: 0;
    border: 1px solid #eef1f4;
    border-radius: 6px;
}

.jobs-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.jobs-table thead {
    background: #f7f8fa;
}

.jobs-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: #6b7280;
    border-bottom: 1px solid var(--mp-border, #e7ebf0);
    white-space: nowrap;
}

.jobs-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #eef1f4;
    font-size: 13px;
}

.jobs-table tbody tr:last-child td {
    border-bottom: none;
}

.jobs-table tbody tr:hover {
    background: #fafbfc;
}

.jobs-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.jobs-footer .pagination {
    margin: 0;
    flex: 1 1 auto;
}

.jobs-footer .job-delete-all-button {
    margin-left: auto;
    flex: 0 0 auto;
}

#jobs .pagination {
    margin: 0;
}

/* ========== 마이페이지 쪽지함 PC ========== */
.msg-inbox-card {
    margin: 0;
    padding: 0;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #fff;
}
.msg-inbox-header {
    display: none;
}
.msg-inbox-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}
.msg-inbox-body {
    min-height: 180px;
    flex: 1;
}
.msg-inbox-empty,
.msg-inbox-error {
    text-align: center;
    padding: 24px;
    margin: 0;
}
.msg-inbox-empty {
    color: #6b7280;
}
.msg-inbox-error {
    color: #ef4444;
}
.msg-inbox-table-wrap {
    overflow-x: auto;
    margin: 0;
    width: 100%;
}
.msg-inbox-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background: #fff;
    font-size: 13px;
}
.msg-inbox-table thead {
    background: #f7f8fa;
}
.msg-inbox-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: #6b7280;
    border-bottom: 1px solid var(--mp-border, #e7ebf0);
    white-space: nowrap;
}
.msg-inbox-table .msg-col-num {
    width: 56px;
    text-align: center;
}
.msg-inbox-table th.msg-col-num,
.msg-inbox-table td.msg-col-num {
    width: 56px;
    max-width: 56px;
    box-sizing: border-box;
    text-align: center;
}
.msg-inbox-table .msg-col-status {
    width: 72px;
}
.msg-inbox-table .msg-col-type {
    width: 80px;
}
.msg-inbox-table .msg-col-title {
    min-width: 0;
    width: auto;
}
.msg-inbox-table .msg-col-date {
    width: 160px;
}
.msg-inbox-table .msg-col-actions {
    width: 148px;
    text-align: right;
}
.msg-inbox-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #eef1f4;
    vertical-align: middle;
}
.msg-inbox-table tbody tr:hover {
    background: var(--bg-gray);
}
.msg-title-cell-clickable {
    display: inline-block;
    max-width: 100%;
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.msg-title-cell-clickable:hover {
    color: var(--primary, #3d5a73);
    border-bottom-color: var(--primary, #3d5a73);
}
.msg-type-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
}
.msg-type-badge.msg-type-notice {
    color: #1e40af;
    background: #dbeafe;
}
.msg-type-badge.msg-type-payment {
    color: #166534;
    background: #d1fae5;
}
.msg-type-badge.msg-type-system {
    color: #374151;
    background: #f3f4f6;
}
.msg-type-badge.msg-type-private {
    color: #3d5a73;
    background: #ede9fe;
}
.msg-inbox-table .msg-col-num {
    color: #6b7280;
    font-weight: 500;
}
.msg-status-read {
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
}
.msg-status-unread {
    color: #2563eb;
    font-weight: 700;
    font-size: 14px;
}
.msg-inbox-table .msg-title-cell {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.msg-inbox-table .msg-title-cell:not(.msg-title-cell-clickable) {
    display: block;
}
.msg-inbox-table .msg-title-cell-clickable {
    display: inline-block;
    max-width: 100%;
}
.msg-inbox-table .msg-col-date {
    color: #6b7280;
    font-size: 13px;
}
.msg-inbox-table .msg-col-actions {
    white-space: nowrap;
}
.msg-inbox-table .msg-col-actions .btn-sm {
    margin: 0 0 0 6px;
    padding: 5px 10px;
    font-size: 12px;
    min-height: 30px;
}
.msg-inbox-table .msg-btn-del {
    color: #dc2626;
    border-color: #fecaca;
}
.msg-inbox-table .msg-btn-del:hover {
    background: #fef2f2;
    border-color: #dc2626;
}
.msg-unread-row {
    background: #f0f9ff;
}
.msg-unread-row .msg-title-cell {
    font-weight: 600;
    color: #1e40af;
}
.msg-inbox-pagination {
    margin: 0;
    padding: 12px 14px;
    border-top: 1px solid #eef1f4;
    background: #fafbfc;
}
.msg-inbox-pagination-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.msg-inbox-page-num {
    margin: 0 12px;
    font-size: 13px;
    color: #6b7280;
}
/* 쪽지 상세 모달 - 제목 / 내용·발신일·발신자 하단 고정 */
.msg-detail-modal .modal-box {
    max-width: 900px;
    width: 92vw;
    min-height: 75vh;
    max-height: 92vh;
}
.msg-detail-modal-box {
    max-width: 900px;
    width: 92vw;
    min-height: 75vh;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
}
.msg-detail-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.msg-detail-modal-heading {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
}
.msg-detail-modal-top {
    flex-shrink: 0;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.msg-detail-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary, #1f2937);
    line-height: 1.4;
    word-break: break-word;
}
.msg-detail-modal-bottom {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 16px 0 0 0;
    border-top: none;
    background: #fff;
}
.msg-detail-field {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 12px;
    font-size: 14px;
}
.msg-detail-field:last-child {
    margin-bottom: 0;
}
.msg-detail-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    margin-bottom: 0;
}
.msg-detail-meta-row .msg-detail-field {
    margin-bottom: 0;
}
.msg-detail-label {
    flex-shrink: 0;
    font-weight: 600;
    color: #374151;
}
.msg-detail-colon {
    flex-shrink: 0;
    margin-right: 4px;
    color: #6b7280;
}
.msg-detail-value {
    flex: 1;
    min-width: 0;
    color: var(--text-primary);
    word-break: break-word;
}
.msg-detail-field-content {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 14px;
    flex: 1;
    min-height: 0;
    display: flex;
}
.msg-detail-field-content .msg-detail-label {
    margin-bottom: 6px;
    flex-shrink: 0;
}
.msg-detail-field-content .msg-detail-colon {
    display: none;
}
.msg-detail-content-box {
    padding: 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
    min-height: 50vh;
    overflow-y: auto;
    flex: 1;
}
.msg-detail-content-box br {
    display: block;
    content: "";
    margin-top: 0.5em;
}
.msg-detail-modal-footer {
    flex-shrink: 0;
    margin-top: 0;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.running {
    background: #cfe2ff;
    color: #084298;
}

.status-badge.completed {
    background: #d1e7dd;
    color: #0f5132;
}

.status-badge.failed {
    background: #f8d7da;
    color: #842029;
}

.progress-bar-container {
    width: 100px;
    height: 8px;
    background: var(--bg-gray);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--mp-gap, 16px);
    margin: 0;
    width: 100%;
}

#stats .stat-card {
    position: relative;
    min-height: 108px;
    padding: 20px 20px 18px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    color: #111827;
    text-align: left;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

#stats .stat-card::before {
    content: '';
    position: absolute;
    top: 18px;
    bottom: 18px;
    left: 0;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #3d5a73;
}

#stats .stat-card h4 {
    margin: 0 0 9px;
    color: #111827;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
}

#stats .stat-card p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
    font-weight: 600;
}

.popular-keywords-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-keywords-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 4px;
    border-bottom: 1px solid #eef1f4;
    transition: background 0.2s;
}

.popular-keywords-list li:hover {
    background: var(--bg-gray);
}

.popular-keywords-list li:last-child {
    border-bottom: none;
}

.keyword-name {
    font-weight: 600;
    color: var(--text-dark);
}

.keyword-count {
    color: var(--primary);
    font-weight: 700;
    font-size: 16px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination button.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.loading-state {
    text-align: center;
    padding: 40px;
    color: var(--text-gray);
}

.subscription-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.subscription-info-item {
    padding: 16px;
    background: var(--bg-gray);
    border-radius: 8px;
}

.subscription-info-item label {
    display: block;
    font-size: 12px;
    color: var(--text-gray);
    margin-bottom: 4px;
}

.subscription-info-item .value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

.plan-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plan-benefits-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.plan-benefits-list li:last-child {
    border-bottom: none;
}

.plan-benefits-list li i {
    color: var(--primary);
    font-size: 18px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
}

.today-activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.today-activity-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.today-activity-list li:last-child {
    border-bottom: none;
}

.activity-keyword {
    font-weight: 600;
    color: var(--text-dark);
}

.activity-time {
    color: var(--text-gray);
    font-size: 13px;
}

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 960px) {
.main-content.mypage-main {
padding: 16px 12px 28px;
}
.mypage-shell {
display: flex;
flex-direction: column;
min-height: 0;
min-width: 0;
max-width: 100%;
overflow: hidden;
border-radius: 16px;
}
.mypage-nav {
position: relative;
top: auto;
left: auto;
width: 100%;
max-width: 100%;
min-width: 0;
height: auto;
max-height: none;
overflow: hidden;
border-right: 0;
border-bottom: 1px solid #eef1f4;
padding: 12px;
gap: 10px;
z-index: 1;
}
.mypage-content.tab-content {
margin-left: 0;
min-height: 0;
padding: 0;
background: transparent;
}
.mypage-views {
min-height: 0;
border-radius: 0;
}
.mypage-nav-profile {
padding: 0 2px 12px;
margin: 0;
}
.mypage-nav-footer {
display: none;
}
.mypage-mobile-actions {
display: flex;
align-items: stretch;
gap: 8px;
margin-top: auto;
padding: 14px 14px 16px;
border-top: 1px solid #eef1f4;
background: #fff;
box-sizing: border-box;
}
.mypage-mobile-actions .mypage-nav-footer-btn {
flex: 1 1 0;
min-height: 42px;
font-size: 13px;
}
.mypage-nav .mypage-tabs {
display: flex;
flex: 0 0 auto;
flex-direction: row;
flex-wrap: nowrap;
width: 100%;
max-width: 100%;
min-width: 0;
overflow-x: auto;
overflow-y: hidden;
scroll-snap-type: x proximity;
-webkit-overflow-scrolling: touch;
touch-action: pan-x;
overscroll-behavior-x: contain;
scrollbar-width: none;
gap: 6px;
}
.mypage-nav .mypage-tabs::-webkit-scrollbar {
display: none;
}
.mypage-nav .mypage-tabs li {
flex: 0 0 auto;
scroll-snap-align: start;
}
.mypage-nav .tab-button {
width: auto;
max-width: none;
padding: 0 12px;
border: 1px solid #e5e9ee;
background: #fff;
white-space: nowrap;
min-height: 36px;
}
.mypage-nav .tab-button.active {
border-color: #c5d0da;
}
.mypage-nav .tab-button i {
font-size: 14px;
}
.mypage-nav .tab-button > span:not(.mypage-nav-badge) {
font-size: 12px;
}
}

@media (max-width: 768px) {
html, body {
max-width: 100%;
overflow-x: hidden;
}
.app-layout,
.main-content,
.content-container,
.tab-content {
max-width: 100%;
overflow-x: hidden;
}
.main-content {
background-attachment: scroll;
min-height: auto;
}
.main-content.mypage-main {
padding: 0;
margin-top: var(--mp-header, 110px);
min-height: calc(100vh - var(--mp-header, 110px));
}
.content-container.mypage-container {
width: 100%;
min-height: 0;
}
.mypage-shell {
min-height: 0;
border-radius: 0;
}
.mypage-views {
min-height: 0;
padding: 16px 14px 18px;
}
.mypage-page-title {
font-size: 16px;
}
.mypage-page-head {
align-items: flex-start;
flex-wrap: wrap;
}
.info-grid {
grid-template-columns: 1fr;
}
.stats-grid {
grid-template-columns: 1fr 1fr;
}
.mypage-panel {
padding: 12px;
}
.info-card {
padding: 14px;
}
.jobs-filter .form-control {
max-width: none;
}
.jobs-filter {
flex-direction: column;
}
.jobs-filter .form-control,
.jobs-filter .btn-primary,
.jobs-filter .btn-outline {
width: 100%;
}
.jobs-toolbar {
flex-direction: column;
align-items: stretch;
}
.jobs-result-meta {
margin-left: 0;
}
.jobs-footer {
flex-direction: column;
align-items: stretch;
}
.jobs-footer .job-delete-all-button {
margin-left: 0;
width: 100%;
}
#jobDeleteSelectedBtn {
width: 100%;
}
.jobs-advanced-grid {
grid-template-columns: 1fr 1fr;
}
.jobs-actions {
justify-content: flex-start;
}
.jobs-table {
font-size: 12px;
}
.jobs-table th,
.jobs-table td {
padding: 8px;
}
.jobs-filter-summary {
max-width: 160px;
}
.mypage-payment-section {
margin-top: 24px;
padding-top: 20px;
border-top: 2px solid #e5e7eb;
}
#subscriptionInfo .mypage-payment-section {
margin-top: 24px;
padding-top: 20px;
border-top: 2px solid #e5e7eb;
}
.tab-content .mypage-payment-section {
margin-top: 24px;
padding-top: 20px;
border-top: 2px solid #e5e7eb;
}
.mypage-payment-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
flex-wrap: wrap;
gap: 12px;
}
.mypage-payment-header h6 {
margin: 0;
font-size: 15px;
font-weight: 700;
color: #1f2937;
display: flex;
align-items: center;
gap: 8px;
}
.mypage-payment-header h6 i {
color: #3d5a73;
}
.mypage-payment-header .btn-sm {
padding: 6px 12px;
font-size: 12px;
}
.mypage-payment-table-wrapper {
overflow-x: auto !important;
-webkit-overflow-scrolling: touch !important;
border-radius: 8px !important;
border: 1px solid #e5e7eb !important;
background: #fff !important;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
margin-top: 12px !important;
}
.mypage-payment-table {
width: 100% !important;
border-collapse: collapse !important;
font-size: 13px !important;
background: #fff !important;
margin: 0 !important;
border: none !important;
}
.mypage-payment-table thead {
background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
display: table-header-group !important;
}
.mypage-payment-table thead tr {
display: table-row !important;
}
.mypage-payment-table thead th {
padding: 10px 12px !important;
text-align: left !important;
font-weight: 600 !important;
font-size: 11px !important;
color: #fff !important;
text-transform: uppercase !important;
white-space: nowrap !important;
letter-spacing: 0.5px !important;
border: none !important;
background: transparent !important;
display: table-cell !important;
}
.mypage-payment-table tbody {
display: table-row-group !important;
}
.mypage-payment-table tbody tr {
display: table-row !important;
}
.mypage-payment-table tbody td {
padding: 12px !important;
border-bottom: 1px solid #e5e7eb !important;
vertical-align: middle !important;
border-left: none !important;
border-right: none !important;
border-top: none !important;
background: #fff !important;
display: table-cell !important;
}
.mypage-payment-table tbody tr:hover {
background: rgba(61,90,115, 0.03) !important;
}
.mypage-payment-table tbody tr:hover td {
background: rgba(61,90,115, 0.03) !important;
}
.mypage-payment-table tbody tr:last-child td {
border-bottom: none !important;
}
.mypage-payment-table .plan-cell strong {
color: #1f2937 !important;
font-weight: 600 !important;
}
.mypage-payment-table .period-cell {
color: #6b7280 !important;
font-size: 12px !important;
}
.mypage-payment-table .amount-cell {
color: #6b7280 !important;
font-size: 12px !important;
}
.mypage-payment-table .discount-cell .discount-value {
color: #10b981 !important;
font-weight: 600 !important;
}
.mypage-payment-table .final-cell strong {
color: #3d5a73 !important;
font-weight: 700 !important;
font-size: 14px !important;
}
.mypage-status-badge {
display: inline-block !important;
padding: 4px 10px !important;
border-radius: 12px !important;
font-size: 11px !important;
font-weight: 600 !important;
white-space: nowrap !important;
border: none !important;
}
.mypage-status-badge.status-pending {
background: #fef3c7 !important;
color: #92400e !important;
}
.mypage-status-badge.status-approved {
background: #d1fae5 !important;
color: #065f46 !important;
}
.mypage-status-badge.status-rejected {
background: #fee2e2 !important;
color: #991b1b !important;
}
.mypage-status-badge.status-cancelled {
background: #f3f4f6 !important;
color: #6b7280 !important;
}
.mypage-payment-empty {
padding: 40px;
text-align: center;
background: #f8fafc;
border-radius: 12px;
}
.mypage-payment-empty i {
font-size: 40px;
color: #cbd5e1;
display: block;
margin-bottom: 12px;
}
.mypage-payment-empty p {
margin: 0;
color: #94a3b8;
font-size: 14px;
}
#settings .settings-grid {
display: grid !important;
grid-template-columns: 1fr 1fr !important;
gap: var(--mp-gap, 16px) !important;
width: 100%;
margin: 0;
}
#settings .settings-grid .info-card {
display: block !important;
margin: 0;
}
@media (max-width: 768px) {
#settings .settings-grid {
grid-template-columns: 1fr !important;
}
}
.telegram-status {
margin-bottom: 20px;
padding: 20px;
background: #f8fafc;
border-radius: 12px;
border: 2px solid #e5e7eb;
transition: all 0.3s ease;
}
.telegram-status.connected {
background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
border-color: #10b981;
color: #065f46;
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}
.telegram-status.disconnected {
background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
border-color: #ef4444;
color: #991b1b;
box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}
.telegram-status i {
font-size: 24px;
margin-right: 8px;
vertical-align: middle;
}
.telegram-status strong {
font-size: 16px;
display: block;
margin-bottom: 8px;
}
.telegram-status small {
font-size: 13px;
opacity: 0.9;
display: block;
margin-top: 4px;
}
.telegram-code-section {
margin-top: 24px;
padding: 24px;
background: linear-gradient(135deg, #f3f5f7 0%, #e8eef3 100%);
border-radius: 12px;
border: 2px solid #3d5a73;
box-shadow: 0 4px 16px rgba(61,90,115, 0.2);
}
.code-display-container {
display: flex;
align-items: center;
justify-content: center;
gap: 16px;
margin-bottom: 16px;
padding: 8px;
}
.code-display {
font-size: 36px;
font-weight: 700;
letter-spacing: 6px;
color: #3d5a73;
font-family: 'Courier New', monospace;
padding: 20px 24px;
background: #ffffff;
border-radius: 10px;
border: 3px dashed #3d5a73;
text-align: center;
flex: 1;
box-shadow: inset 0 2px 8px rgba(61,90,115, 0.1);
min-width: 200px;
}
.code-display-container .btn-outline {
padding: 12px 20px;
font-size: 14px;
white-space: nowrap;
}
.code-expires {
text-align: center;
color: #6b7280;
font-size: 14px;
margin-bottom: 20px;
font-weight: 500;
padding: 8px;
background: rgba(255, 255, 255, 0.6);
border-radius: 6px;
}
.telegram-guide {
padding: 24px;
background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
border-radius: 12px;
margin-bottom: 20px;
border: 2px solid #3b82f6;
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}
.telegram-steps {
display: flex;
flex-direction: column;
gap: 16px;
margin-bottom: 20px;
}
.step-item {
display: flex;
align-items: flex-start;
gap: 16px;
padding: 16px;
background: #ffffff;
border-radius: 10px;
border: 1px solid #dbeafe;
box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
transition: all 0.3s ease;
}
.step-item:hover {
transform: translateX(4px);
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}
.step-number {
flex-shrink: 0;
width: 36px;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
color: #fff;
border-radius: 50%;
font-weight: 700;
font-size: 16px;
box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}
.step-content {
flex: 1;
}
.step-content strong {
display: block;
color: #1e40af;
font-size: 15px;
font-weight: 700;
margin-bottom: 6px;
}
.step-content p {
margin: 0;
color: #475569;
font-size: 13px;
line-height: 1.6;
}
.step-content .bot-name {
display: inline-block;
padding: 2px 8px;
background: #dbeafe;
color: #1e40af;
border-radius: 4px;
font-weight: 600;
font-family: 'Courier New', monospace;
font-size: 13px;
}
.bot-link-wrapper {
text-align: center;
margin-top: 20px;
padding-top: 20px;
border-top: 2px solid #bfdbfe;
}
.btn-telegram-bot {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 14px 24px;
background: linear-gradient(135deg, #0088cc 0%, #0066aa 100%);
color: #fff;
border-radius: 10px;
font-weight: 600;
font-size: 15px;
text-decoration: none;
box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
transition: all 0.3s ease;
}
.btn-telegram-bot:hover {
transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(0, 136, 204, 0.4);
color: #fff;
}
.btn-telegram-bot i {
font-size: 18px;
}
.verification-status {
text-align: center;
padding: 16px;
background: rgba(255, 255, 255, 0.8);
border-radius: 8px;
margin-top: 12px;
}
.status-waiting {
color: #f59e0b;
font-weight: 600;
font-size: 14px;
}
.status-waiting i {
font-size: 18px;
margin-right: 6px;
animation: pulse 2s infinite;
}
.status-verified {
color: #10b981;
font-weight: 600;
font-size: 14px;
}
.status-verified i {
font-size: 18px;
margin-right: 6px;
}
.status-expired {
color: #ef4444;
font-weight: 600;
font-size: 14px;
}
.status-expired i {
font-size: 18px;
margin-right: 6px;
}
@keyframes pulse {
0%, 100% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}
.telegram-actions {
display: flex;
gap: 10px;
margin-top: 24px;
flex-wrap: wrap;
}
#settings .telegram-actions button {
flex: 1 !important;
min-width: 120px !important;
padding: 12px 20px !important;
font-size: 14px !important;
font-weight: 600 !important;
border-radius: 8px !important;
transition: all 0.3s ease !important;
cursor: pointer !important;
}
#settings .telegram-actions .btn-primary {
background: linear-gradient(135deg, #3d5a73 0%, #3d5a73 100%) !important;
border: none !important;
color: #fff !important;
box-shadow: 0 4px 12px rgba(61,90,115, 0.3) !important;
}
#settings .telegram-actions .btn-primary:hover {
transform: translateY(-2px) !important;
box-shadow: 0 6px 16px rgba(61,90,115, 0.4) !important;
}
#settings .telegram-actions .btn-outline {
border: 2px solid #e5e7eb !important;
background: #fff !important;
color: #374151 !important;
}
#settings .telegram-actions .btn-outline:hover {
background: #f9fafb !important;
border-color: #d1d5db !important;
transform: translateY(-2px) !important;
}
#settings .telegram-actions .btn-danger {
background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
border: none !important;
color: #fff !important;
box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
}
#settings .telegram-actions .btn-danger:hover {
transform: translateY(-2px) !important;
box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4) !important;
}
#settings .telegram-actions .btn-warning {
background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
border: none !important;
color: #fff !important;
box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
}
#settings .telegram-actions .btn-warning:hover {
transform: translateY(-2px) !important;
box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4) !important;
}
.payment-requests-table-wrapper {
margin-left: 0;
margin-right: 0;
padding-left: 0;
padding-right: 0;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
.payment-requests-table {
font-size: 11px;
min-width: 100%;
}
.payment-requests-table th {
padding: 8px 6px;
font-size: 10px;
white-space: nowrap;
}
.payment-requests-table td {
padding: 8px 6px;
white-space: normal;
}
.payment-status-badge {
padding: 4px 8px;
font-size: 10px;
}
.subscription-info-grid {
grid-template-columns: 1fr;
gap: 12px;
margin-left: 0;
margin-right: 0;
}
.subscription-info-item {
padding: 12px;
}
.mypage-payment-section {
margin-top: 16px;
padding-top: 16px;
border-top: 2px solid #e5e7eb;
}
.mypage-payment-header {
flex-direction: column;
align-items: flex-start;
gap: 10px;
}
.mypage-payment-header h6 {
font-size: 14px;
color: #1f2937;
}
.mypage-payment-header .btn-sm {
width: 100%;
text-align: center;
justify-content: center;
}
.mypage-payment-table-wrapper {
margin: 0 -4px;
border-radius: 4px;
border: 1px solid #e5e7eb;
}
.mypage-payment-table {
font-size: 11px;
min-width: 100%;
}
.mypage-payment-table th {
padding: 8px 6px;
font-size: 9px;
letter-spacing: 0;
color: #fff;
}
.mypage-payment-table th:nth-child(1) {
width: 10% !important;
}
.mypage-payment-table th:nth-child(2),
.mypage-payment-table th:nth-child(3),
.mypage-payment-table th:nth-child(4),
.mypage-payment-table th:nth-child(5) {
width: 15% !important;
}
.mypage-payment-table th:nth-child(6) {
width: 12% !important;
}
.mypage-payment-table th:nth-child(7) {
width: 18% !important;
}
.mypage-payment-table td {
padding: 8px 6px;
font-size: 11px;
border-bottom: 1px solid #e5e7eb;
}
.mypage-payment-table td:nth-child(1) {
width: 10% !important;
}
.mypage-payment-table td:nth-child(2),
.mypage-payment-table td:nth-child(3),
.mypage-payment-table td:nth-child(4),
.mypage-payment-table td:nth-child(5) {
width: 15% !important;
}
.mypage-payment-table td:nth-child(6) {
width: 12% !important;
}
.mypage-payment-table td:nth-child(7) {
width: 18% !important;
}
.mypage-status-badge {
padding: 3px 6px;
font-size: 9px;
}
.mypage-payment-empty {
padding: 24px;
background: #f8fafc;
border-radius: 8px;
}
.mypage-payment-empty i {
font-size: 32px;
color: #cbd5e1;
}
.mypage-payment-empty p {
font-size: 12px;
color: #94a3b8;
}
.telegram-guide {
padding: 16px;
}
.telegram-steps {
gap: 12px;
}
.step-item {
padding: 12px;
gap: 12px;
flex-direction: column;
text-align: center;
}
.step-number {
width: 32px;
height: 32px;
font-size: 14px;
margin: 0 auto;
}
.step-content {
text-align: center;
}
.step-content strong {
font-size: 14px;
}
.step-content p {
font-size: 12px;
}
.btn-telegram-bot {
padding: 12px 20px;
font-size: 14px;
width: 100%;
justify-content: center;
}

/* ========== 마이페이지 쪽지함 모바일 ========== */
@media (max-width: 768px) {
.msg-inbox-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}
.msg-inbox-title {
    font-size: 1rem;
}
.msg-inbox-table-wrap {
    margin-left: -12px;
    margin-right: -12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.msg-inbox-table {
    font-size: 12px;
    min-width: 560px;
}
.msg-inbox-table th,
.msg-inbox-table td {
    padding: 10px 8px;
}
.msg-inbox-table th.msg-col-num,
.msg-inbox-table td.msg-col-num {
    width: 42px;
    max-width: 42px;
    min-width: 42px;
}
.msg-inbox-table .msg-col-status {
    width: 56px;
}
.msg-inbox-table .msg-col-type {
    width: 52px;
}
.msg-inbox-table .msg-col-type .msg-type-badge {
    font-size: 10px;
    padding: 1px 6px;
}
.msg-inbox-table .msg-col-title {
    min-width: 0;
    width: auto;
    max-width: 36%;
}
.msg-inbox-table .msg-col-date {
    width: 115px;
    font-size: 11px;
}
.msg-inbox-table .msg-col-actions {
    width: 90px;
}
.msg-inbox-table .msg-col-actions .btn-sm {
    padding: 4px 8px;
    font-size: 11px;
    margin: 1px 0;
}
.msg-inbox-pagination {
    margin-top: 16px;
}
.msg-inbox-page-num {
    font-size: 12px;
}
.msg-detail-modal-box {
    max-width: 96vw;
    width: 96vw;
    margin: 12px;
    min-height: 80vh;
    max-height: 92vh;
}
.msg-detail-modal-top {
    padding: 10px 0;
}
.msg-detail-title {
    font-size: 18px;
    font-weight: 700;
}
.msg-detail-modal-bottom {
    padding: 12px 0 0 0;
}
.msg-detail-field {
    font-size: 13px;
}
.msg-detail-content-box {
    font-size: 14px;
    min-height: 40vh;
}
.msg-detail-modal-footer {
    flex-wrap: wrap;
}
.msg-detail-modal-footer .btn-sm {
    flex: 1;
    min-width: 80px;
}
}


}

/* 결제 및 구독: 서비스별 신청 영역 */
#subscription .mypage-billing-card {
    padding: 0 !important;
    overflow: hidden;
    border-radius: var(--mp-radius, 8px);
    background: #f8f9fb;
    margin: 0;
    width: 100%;
}

#subscription .mypage-billing-header {
    display: none;
}

.mypage-billing-header {
    padding: 16px 18px 14px;
    border-bottom: 1px solid #e8ebef;
}

.mypage-billing-header h5 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #20242a;
    font-size: 17px;
    font-weight: 700;
}

.mypage-billing-header h5 i {
    color: #e95f20;
}

.mypage-billing-tabs {
    display: flex;
    min-height: 46px;
    padding: 0 16px;
    overflow-x: auto;
    border-bottom: 1px solid #e8ebef;
    background: #fafbfc;
    scrollbar-width: thin;
}

.mypage-withdraw-desc {
    color: #666;
    font-size: 13px;
    margin: 0 0 12px;
    line-height: 1.5;
}

.mypage-billing-tab {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 48px;
    padding: 0 18px;
    border: 0;
    background: transparent;
    color: #737a84;
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
}

.mypage-billing-tab::after {
    position: absolute;
    right: 14px;
    bottom: 0;
    left: 14px;
    height: 2px;
    background: transparent;
    content: '';
}

.mypage-billing-tab:hover {
    color: #30353c;
}

.mypage-billing-tab.active {
    color: #d9531c;
}

.mypage-billing-tab.active::after {
    background: #ed641f;
}

.mypage-billing-tab:focus-visible {
    outline: 2px solid #f08a55;
    outline-offset: -3px;
}

.mypage-billing-panel {
    display: none;
    padding: 16px 18px;
}

.mypage-billing-panel.active {
    display: block;
}

.mypage-billing-panel[hidden] {
    display: none !important;
}

.mypage-billing-stack {
    display: grid;
    gap: 20px;
}

.mypage-billing-section {
    min-width: 0;
}

.mypage-billing-section + .mypage-billing-section {
    padding-top: 20px;
    border-top: 1px solid #e8ebef;
}

.mypage-billing-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 34px;
    margin-bottom: 14px;
}

.mypage-billing-section-header:last-child {
    margin-bottom: 0;
}

.mypage-billing-section-header h6,
.mypage-billing-benefit-block h6 {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    gap: 7px;
    min-width: 0;
    margin: 0;
    color: #30353b;
    font-size: 14px;
    font-weight: 700;
}

.mypage-billing-section-header h6 {
    white-space: nowrap;
}

.mypage-billing-section-header h6 i,
.mypage-billing-benefit-block h6 i {
    color: #e35c20;
}

.mypage-billing-apply,
.mypage-billing-action-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    gap: 5px;
    width: auto !important;
    min-height: 32px;
    padding: 0 12px !important;
    border: 1px solid #e15e25 !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: #d9531c !important;
    font: inherit;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: none !important;
}

.mypage-billing-action-btn:hover:not(:disabled) {
    background: #fff7f2 !important;
    border-color: #d14d16 !important;
    color: #c44712 !important;
}

.mypage-billing-action-btn:disabled,
.mypage-billing-action-btn[aria-disabled="true"] {
    border-color: #e5e7eb !important;
    background: #f3f4f6 !important;
    color: #9ca3af !important;
    cursor: not-allowed;
}

.mypage-billing-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.mypage-billing-summary > div {
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid #e1e5ea;
    border-radius: 6px;
    background: #fff;
}

.mypage-billing-summary span {
    display: block;
    margin-bottom: 5px;
    color: #7a818a;
    font-size: 11px;
}

.mypage-billing-summary strong {
    display: block;
    overflow: hidden;
    color: #20252b;
    font-size: 15px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mypage-billing-benefit-block {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #e7eaee;
    border-radius: 6px;
    background: #f8fafb;
}

.mypage-billing-benefits {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.mypage-billing-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    min-width: 0;
    color: #555d66;
    font-size: 12px;
    line-height: 1.45;
}

.mypage-billing-benefits li i {
    flex: 0 0 auto;
    margin-top: 1px;
    color: #21845a;
}

.mypage-billing-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #f0d89a;
    border-radius: 6px;
    background: #fffaf0;
    color: #785b16;
    font-size: 12px;
    line-height: 1.5;
}

.mypage-billing-notice i {
    flex: 0 0 auto;
    margin-top: 1px;
}

.mypage-billing-table-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid #e1e5ea;
    border-radius: 6px;
    background: #fff;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

#subscription .mypage-billing-stack,
#subscription .mypage-billing-section,
#subscription .mypage-billing-panel {
    min-width: 0;
    max-width: 100%;
}

#subscription .mypage-billing-table {
    width: 100%;
    min-width: 100%;
    margin: 0 !important;
    border: 0 !important;
    border-collapse: collapse;
    table-layout: auto;
    background: #fff !important;
    font-size: 12px;
}

#subscription .mypage-billing-table-direct,
#subscription .mypage-billing-table-ticket,
#subscription .mypage-billing-table-ticket-usage {
    width: 100%;
    min-width: 100%;
}

#subscription .mypage-billing-table-ticket td.is-wrap {
    white-space: normal;
    min-width: 160px;
    max-width: 320px;
}

#subscription .mypage-billing-table thead,
#subscription .mypage-billing-table thead tr {
    background: #f4f6f8 !important;
}

#subscription .mypage-billing-table th {
    padding: 10px 11px !important;
    border: 0 !important;
    border-bottom: 1px solid #dfe3e8 !important;
    background: #f4f6f8 !important;
    color: #666e78 !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    text-align: left !important;
    text-transform: none !important;
    white-space: nowrap;
}

#subscription .mypage-billing-table td {
    padding: 11px !important;
    border: 0 !important;
    border-bottom: 1px solid #edf0f3 !important;
    background: #fff !important;
    color: #606872;
    font-size: 12px !important;
    vertical-align: middle;
    white-space: nowrap;
}

#subscription .mypage-billing-table tbody tr:last-child td {
    border-bottom: 0 !important;
}

#subscription .mypage-billing-table tbody tr:hover td {
    background: #fffaf7 !important;
}

#subscription .mypage-billing-table td strong {
    color: #30353b;
    font-weight: 700;
}

#subscription .mypage-billing-table .mypage-billing-amount {
    color: #dc551c;
    font-weight: 700;
}

.mypage-billing-status {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.mypage-billing-status.status-pending {
    background: #fff3d6;
    color: #8a6212;
}

.mypage-billing-status.status-approved {
    background: #e8f7ef;
    color: #167148;
}

.mypage-billing-status.status-rejected {
    background: #fdecec;
    color: #aa3939;
}

.mypage-billing-status.status-cancelled,
.mypage-billing-status.status-default {
    background: #eef1f4;
    color: #666f79;
}

.mypage-billing-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 28px;
    padding: 4px 8px;
    border: 1px solid #e15e25;
    border-radius: 5px;
    background: #fff;
    color: #d95720;
    font: inherit;
    font-size: 11px;
    font-weight: 650;
    cursor: pointer;
}

.mypage-billing-empty,
.mypage-billing-error {
    display: flex;
    min-height: 116px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    border: 1px solid #e4e8ec;
    border-radius: 6px;
    background: #f9fafb;
    color: #808791;
    text-align: center;
}

.mypage-billing-empty i,
.mypage-billing-error i {
    color: #a6adb6;
    font-size: 24px;
}

.mypage-billing-empty p,
.mypage-billing-error span {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
}

.mypage-billing-error {
    min-height: 88px;
    border-color: #f0caca;
    background: #fff8f8;
    color: #a44141;
}

@media (max-width: 900px) {
    .mypage-billing-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .mypage-billing-header {
        padding: 16px 16px 13px;
    }

    .mypage-billing-header h5 {
        font-size: 16px;
    }

    .mypage-billing-tabs {
        min-height: 46px;
        padding: 0 8px;
    }

    .mypage-billing-tab {
        min-height: 46px;
        padding: 0 12px;
        font-size: 12px;
    }

    .mypage-billing-tab::after {
        right: 9px;
        left: 9px;
    }

    .mypage-billing-panel {
        padding: 16px;
        overflow-x: hidden;
    }

    .mypage-billing-stack {
        gap: 16px;
        min-width: 0;
    }

    .mypage-billing-table-wrap {
        margin: 0;
        max-width: 100%;
    }

    #subscription .mypage-billing-table th,
    #subscription .mypage-billing-table td {
        padding: 9px 8px !important;
        font-size: 11px !important;
    }

    #subscription .mypage-billing-table {
        width: max-content;
        min-width: 100%;
    }

    #subscription .mypage-billing-table.billing-nation-history-table {
        min-width: 640px;
    }

    #subscription .mypage-billing-table-direct,
    #subscription .mypage-billing-table-ticket {
        min-width: 460px;
    }

    #subscription .mypage-billing-table-ticket-usage {
        min-width: 360px;
    }

    .mypage-billing-section + .mypage-billing-section {
        padding-top: 16px;
    }

    .mypage-billing-section-header {
        align-items: center;
        flex-wrap: nowrap;
        margin-bottom: 12px;
    }

    .mypage-billing-action-btn {
        padding: 0 10px !important;
        font-size: 11px !important;
    }

    .mypage-billing-summary {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .mypage-billing-summary > div {
        padding: 11px 12px;
    }

    .mypage-billing-summary strong {
        font-size: 14px;
    }

    .mypage-billing-benefit-block {
        margin-top: 12px;
        padding: 12px;
    }

    .mypage-billing-benefits {
        grid-template-columns: 1fr;
        gap: 7px;
    }

}

@media (max-width: 420px) {
    .mypage-billing-tab {
        gap: 5px;
        padding: 0 10px;
    }

    .mypage-billing-summary {
        grid-template-columns: 1fr;
    }

    .mypage-billing-section-header {
        flex-wrap: nowrap;
        gap: 8px;
    }

    .mypage-billing-action-btn {
        padding: 0 8px !important;
    }
}

.stats-period-chips,
.messages-status-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.stats-period-chip,
.messages-chip {
    min-height: 36px;
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    color: #4b5563;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.stats-period-chip:hover,
.messages-chip:hover,
.stats-period-chip.active,
.messages-chip.active {
    border-color: #3d5a73;
    background: #f3f5f7;
    color: #c2410c;
}

.stats-custom-period {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: -4px 0 14px;
    padding: 12px;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    background: #fffaf5;
}

.stats-custom-period label {
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
}

.stats-custom-period .form-control {
    width: 150px;
}

.stats-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: var(--mp-gap, 16px);
    margin-top: 16px;
}

.stats-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.stats-card-head h5 {
    margin: 0;
}

.stats-card-head > span {
    color: #9ca3af;
    font-size: 12px;
}

.stats-daily-chart {
    min-height: 230px;
    overflow-x: auto;
}

.stats-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    min-width: 420px;
    height: 230px;
    padding: 20px 0 0;
}

.stats-bar-item {
    display: flex;
    flex: 1 1 0;
    min-width: 30px;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.stats-bar-item strong {
    color: #374151;
    font-size: 11px;
}

.stats-bar-track {
    display: flex;
    align-items: flex-end;
    width: 100%;
    height: 160px;
    border-radius: 6px 6px 2px 2px;
    background: #fff1e7;
    overflow: hidden;
}

.stats-bar-track i {
    display: block;
    width: 100%;
    min-height: 2px;
    border-radius: inherit;
    background: linear-gradient(180deg, #5a7a94, #3d5a73);
}

.stats-bar-item em {
    color: #9ca3af;
    font-size: 11px;
    font-style: normal;
    white-space: nowrap;
}

.stats-status-list {
    display: grid;
    gap: 8px;
}

.stats-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid #eef1f4;
    border-radius: 8px;
    font-size: 13px;
}

.stats-status-row > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #4b5563;
}

.stats-status-row > strong {
    color: #111827;
}

.stats-status-row em {
    margin-left: 4px;
    color: #9ca3af;
    font-size: 11px;
    font-style: normal;
}

.stats-status-row.is-completed i {
    color: #16a34a;
}

.stats-status-row.is-failed i {
    color: #dc2626;
}

.stats-status-row.is-running i {
    color: #2563eb;
}

.stats-status-row.is-pending i {
    color: #d97706;
}

.stats-empty {
    padding: 36px 16px;
    margin: 0;
    color: #9ca3af;
    text-align: center;
}

.stats-keyword-button {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    padding: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.stats-keyword-button:hover .keyword-name {
    color: #ea580c;
}

.messages-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.messages-filter .messages-status-chips {
    margin: 0 auto 0 0;
}

.messages-filter .form-control {
    flex: 0 1 150px;
    min-width: 130px;
}

.messages-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid #eef1f4;
    background: #fafbfc;
}

.messages-check-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #4b5563;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.messages-result-meta {
    margin-left: auto;
    color: #9ca3af;
    font-size: 12px;
}

.msg-inbox-table .msg-col-check {
    width: 40px;
    text-align: center;
}

.settings-password-field {
    position: relative;
}

.settings-password-field .form-control {
    padding-right: 44px;
}

.settings-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
}

.settings-password-toggle:hover {
    background: #f3f4f6;
    color: #374151;
}

.settings-form-help {
    margin: -4px 0 14px;
    color: #9ca3af;
    font-size: 12px;
}

.telegram-status-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.telegram-status-title i {
    font-size: 18px;
}

.telegram-status.connected .telegram-status-title i {
    color: #16a34a;
}

.telegram-status.disconnected .telegram-status-title i {
    color: #dc2626;
}

.telegram-status p {
    margin: 8px 0 0;
    color: #6b7280;
    font-size: 13px;
}

.telegram-enabled-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    color: #166534;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.telegram-code-highlight {
    color: #3d5a73;
}

.code-expires.is-expired {
    color: #dc2626;
}

.withdraw-password-field {
    margin-top: 12px;
}

.withdraw-password-field label {
    display: block;
    margin-bottom: 6px;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .stats-content-grid {
        grid-template-columns: 1fr;
    }

    .stats-card-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .stats-custom-period {
        align-items: stretch;
        flex-direction: column;
    }

    .stats-custom-period .form-control,
    .stats-custom-period .btn-primary {
        width: 100%;
    }

    .messages-filter {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
        gap: 8px;
        margin-bottom: 12px;
    }

    .messages-filter .messages-status-chips {
        grid-column: 1 / -1;
        display: flex;
        flex-wrap: nowrap;
        gap: 6px;
        margin: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .messages-filter .messages-status-chips::-webkit-scrollbar {
        display: none;
    }

    .messages-filter .messages-chip {
        flex: 0 0 auto;
        min-height: 34px;
        padding: 5px 12px;
        font-size: 12px;
    }

    .messages-filter .form-control {
        width: 100%;
        min-width: 0;
        min-height: 40px;
        padding: 8px 10px;
        border: 1px solid #e5e9ee;
        border-radius: 8px;
        background: #fff;
        color: #374151;
        font-size: 13px;
        line-height: 1.3;
        box-sizing: border-box;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1.4.6L6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 10px 7px;
        padding-right: 30px;
    }

    .messages-filter .btn-outline {
        grid-column: 1 / -1;
        width: 100%;
        min-height: 40px;
        border-radius: 8px;
        font-size: 13px;
    }

    .messages-toolbar {
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .messages-result-meta {
        margin-left: 0;
        width: 100%;
        font-size: 12px;
    }

    #deleteSelectedMessagesBtn {
        width: auto;
    }
}

#settings .settings-page-description {
    margin: -8px 0 18px;
    color: #6b7280;
    font-size: 14px;
}

#settings .settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--mp-gap, 16px);
    align-items: start;
}

#settings .settings-column {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: var(--mp-gap, 16px);
}

#settings .settings-grid {
    align-items: start;
}

#settings .settings-card {
    padding: 22px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

#settings .settings-card-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 22px;
}

#settings .settings-card-icon {
    display: inline-flex;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 18px;
}

#settings .settings-card-icon.is-security {
    background: #eff6ff;
    color: #2563eb;
}

#settings .settings-card-icon.is-telegram {
    background: #e0f2fe;
    color: #0284c7;
}

#settings .settings-card-icon.is-danger {
    background: #fef2f2;
    color: #dc2626;
}

#settings .settings-card-head h5 {
    margin: 1px 0 4px;
    color: #111827;
    font-size: 16px;
    font-weight: 700;
}

#settings .settings-card-head p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.55;
}

#settings .settings-card .form-group {
    margin-bottom: 16px;
}

#settings .settings-card .form-group > label {
    display: block;
    margin-bottom: 7px;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
}

#settings .settings-password-field .form-control {
    min-height: 44px;
    border-color: #d1d5db;
    border-radius: 8px;
}

#settings .settings-password-field .form-control:focus {
    border-color: #3d5a73;
    box-shadow: 0 0 0 3px rgba(61,90,115, 0.12);
}

#settings .settings-password-toggle {
    width: 34px;
    height: 34px;
    color: #9ca3af;
}

#settings .settings-field-feedback {
    min-height: 18px;
    margin: 6px 0 0;
    color: #9ca3af;
    font-size: 12px;
}

#settings .settings-field-feedback.is-valid {
    color: #16a34a;
}

#settings .settings-field-feedback.is-error {
    color: #dc2626;
}

#settings .settings-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 4px;
}

#settings .settings-card-footer > span {
    max-width: 220px;
    color: #9ca3af;
    font-size: 12px;
    line-height: 1.45;
}

#settings .settings-card-footer .btn-primary {
    min-height: 42px;
    white-space: nowrap;
}

#settings .telegram-status {
    margin-bottom: 14px;
    padding: 15px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
    box-shadow: none;
}

#settings .telegram-status.connected {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
    box-shadow: none;
}

#settings .telegram-status.disconnected {
    border-color: #dbeafe;
    background: #f8fbff;
    color: #1e40af;
    box-shadow: none;
}

#settings .telegram-status-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

#settings .telegram-status-title > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

#settings .telegram-status-title i {
    margin: 0;
    font-size: 17px;
}

#settings .telegram-status-title strong {
    display: inline;
    margin: 0;
    color: inherit;
    font-size: 14px;
}

#settings .telegram-status-title em {
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    color: inherit;
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
}

#settings .telegram-status p {
    margin: 8px 0 0;
    color: #6b7280;
    font-size: 12px;
}

#settings .telegram-enabled-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
}

#settings .telegram-enabled-toggle input {
    width: 38px;
    height: 20px;
    accent-color: #16a34a;
    cursor: pointer;
}

#settings .telegram-code-section {
    margin: 14px 0;
    padding: 16px;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    background: #fffaf5;
    box-shadow: none;
}

#settings .telegram-code-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
}

#settings .telegram-code-heading em {
    color: #6b7280;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
}

#settings .telegram-code-heading em.is-expired {
    color: #dc2626;
}

#settings .code-display-container {
    gap: 8px;
    margin-bottom: 12px;
    padding: 0;
}

#settings .code-display {
    min-width: 0;
    padding: 13px 16px;
    border: 1px dashed #5a7a94;
    border-radius: 8px;
    box-shadow: none;
    font-size: 28px;
    letter-spacing: 5px;
}

#settings .code-display-container .btn-outline {
    min-height: 44px;
    padding: 8px 12px;
}

#settings .telegram-guide {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

#settings .telegram-steps {
    gap: 8px;
    margin-bottom: 12px;
}

#settings .step-item {
    gap: 10px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: none;
}

#settings .step-item:hover {
    transform: none;
    box-shadow: none;
}

#settings .step-number {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #eff6ff;
    color: #2563eb;
    box-shadow: none;
    font-size: 12px;
}

#settings .step-content strong {
    margin-bottom: 2px;
    color: #374151;
    font-size: 13px;
}

#settings .step-content p {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.45;
}

#settings .bot-link-wrapper {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    text-align: left;
}

#settings .btn-telegram-bot {
    padding: 10px 14px;
    border-radius: 8px;
    box-shadow: none;
    font-size: 13px;
}

#settings .btn-telegram-bot:hover {
    transform: none;
    box-shadow: none;
}

#settings .verification-status {
    margin-top: 12px;
    padding: 9px;
    border: 1px solid #fde68a;
    border-radius: 8px;
    background: #fffbeb;
}

#settings .status-waiting {
    font-size: 12px;
}

#settings .telegram-actions {
    display: flex;
    gap: 8px;
    margin-top: 0;
}

#settings .telegram-actions button {
    min-width: 0 !important;
    min-height: 40px;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    font-size: 13px !important;
}

#settings .telegram-actions .btn-primary {
    flex: 1 1 100%;
    transform: none !important;
}

#settings .telegram-actions .btn-outline {
    flex: 1 1 auto;
    border: 1px solid #d1d5db !important;
}

#settings .telegram-actions .btn-danger {
    background: #fff !important;
    border-color: #fecaca !important;
    color: #dc2626 !important;
}

#settings .telegram-actions .btn-warning {
    background: #fff !important;
    border-color: #fde68a !important;
    color: #a16207 !important;
}

#settings .telegram-actions .btn-primary:hover,
#settings .telegram-actions .btn-outline:hover,
#settings .telegram-actions .btn-danger:hover,
#settings .telegram-actions .btn-warning:hover {
    transform: none !important;
    box-shadow: none !important;
}

#settings .settings-danger-card {
    grid-column: auto;
    align-self: start;
    border-color: #fecaca;
    background: #fffafa;
}

#settings .settings-danger-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

#settings .settings-danger-body p {
    max-width: 620px;
    margin: 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.6;
}

#settings .settings-danger-body .btn-danger {
    min-height: 40px;
    border-color: #fca5a5;
    color: #dc2626;
    white-space: nowrap;
}

@media (max-width: 768px) {
    #settings .settings-layout {
        grid-template-columns: 1fr;
    }

    #settings .settings-card {
        padding: 18px 16px;
    }

    #settings .settings-danger-card {
        grid-column: auto;
    }

    #settings .settings-card-footer,
    #settings .settings-danger-body {
        align-items: stretch;
        flex-direction: column;
    }

    #settings .settings-card-footer > span {
        max-width: none;
    }

    #settings .settings-card-footer .btn-primary,
    #settings .settings-danger-body .btn-danger,
    #settings .btn-telegram-bot {
        width: 100%;
        justify-content: center;
    }

    #settings .telegram-actions button {
        flex: 1 1 100%;
    }

    #settings .code-display-container {
        align-items: stretch;
        flex-direction: column;
    }
}

#subscription .billing-nation-current,
#subscription .billing-direct-current {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
}

#subscription .billing-nation-current-status,
#subscription .billing-direct-current-status {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

#subscription .billing-nation-current-status p,
#subscription .billing-direct-current-status p {
    flex: 1;
    margin: 2px 0 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
}

#subscription .billing-nation-status,
#subscription .billing-direct-status {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

#subscription .billing-nation-status-active,
#subscription .billing-direct-status-active {
    background: #eaf8f0;
    color: #18794e;
}

#subscription .billing-nation-status-expiring,
#subscription .billing-direct-status-expiring,
#subscription .billing-nation-status-unsubscribed,
#subscription .billing-direct-status-unsubscribed {
    background: #fff4de;
    color: #9a6511;
}

#subscription .billing-nation-status-expired,
#subscription .billing-direct-status-expired {
    background: #f3f4f6;
    color: #6b7280;
}

#subscription .billing-nation-summary,
#subscription .billing-direct-summary {
    margin-top: 0;
}

#subscription .billing-nation-pending-section,
#subscription .billing-direct-pending-section {
    padding: 16px;
    border: 1px solid #f3cc78;
    border-radius: 10px;
    background: #fffdf7;
}

#subscription .billing-nation-pending-guide,
#subscription .billing-direct-pending-guide,
#subscription .billing-nation-history-guide {
    margin: -4px 0 12px;
    color: #786333;
    font-size: 12px;
    line-height: 1.5;
}

#subscription .billing-nation-pending-list,
#subscription .billing-direct-pending-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

#subscription .billing-nation-pending-card,
#subscription .billing-direct-pending-card {
    padding: 14px;
    border: 1px solid #f4d99f;
    border-radius: 8px;
    background: #fff;
}

#subscription .billing-nation-pending-card-header,
#subscription .billing-direct-pending-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

#subscription .billing-nation-pending-card-header strong,
#subscription .billing-direct-pending-card-header strong {
    overflow: hidden;
    color: #30353b;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#subscription .billing-nation-pending-badge,
#subscription .billing-direct-pending-badge {
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: 999px;
    background: #fff3d6;
    color: #8a6212;
    font-size: 11px;
    font-weight: 700;
}

#subscription .billing-nation-pending-details,
#subscription .billing-direct-pending-details {
    display: grid;
    gap: 7px;
    margin: 0;
}

#subscription .billing-nation-pending-details > div,
#subscription .billing-direct-pending-details > div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

#subscription .billing-nation-pending-details dt,
#subscription .billing-direct-pending-details dt {
    color: #7a818a;
    font-size: 12px;
}

#subscription .billing-nation-pending-details dd,
#subscription .billing-direct-pending-details dd {
    margin: 0;
    color: #30353b;
    font-size: 12px;
    font-weight: 700;
    text-align: right;
}

#subscription .billing-nation-pending-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

#subscription .billing-nation-account-button {
    min-height: 34px;
    border: 0 !important;
}

#subscription .billing-nation-apply,
#subscription .billing-direct-apply {
    flex: 0 0 auto;
}

#subscription .billing-nation-error,
#subscription .billing-direct-error {
    align-items: flex-start;
    flex-direction: row;
    justify-content: flex-start;
    min-height: auto;
    text-align: left;
}

#subscription .billing-nation-error-content,
#subscription .billing-direct-error-content {
    display: grid;
    gap: 5px;
}

#subscription .billing-nation-error-content strong,
#subscription .billing-direct-error-content strong {
    color: #9f3030;
    font-size: 13px;
}

#subscription .billing-nation-retry,
#subscription .billing-direct-retry {
    width: fit-content;
    margin-top: 4px;
}

#subscription .mypage-billing-loading {
    display: flex;
    min-height: 132px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    color: #7a818a;
    font-size: 13px;
}

#subscription .mypage-billing-loading i {
    color: #e35c20;
    font-size: 22px;
    animation: billing-spin 1s linear infinite;
}

#subscription .mypage-billing-loading p {
    margin: 0;
}

#subscription .billing-nation-table-caption,
#subscription .billing-direct-table-caption,
#subscription .billing-ticket-table-caption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

@keyframes billing-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    #subscription .billing-nation-current-status,
    #subscription .billing-direct-current-status {
        width: 100%;
    }

    #subscription .billing-nation-account-button {
        width: 100%;
        justify-content: center;
    }

    #subscription .billing-nation-apply,
    #subscription .billing-direct-apply,
    #subscription .mypage-billing-action-btn {
        width: auto !important;
        max-width: none;
        flex: 0 0 auto;
    }

    #subscription .billing-nation-pending-actions {
        justify-content: stretch;
    }
}

