@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

.admin-page {
    max-width: 1400px;
    margin: 1.5rem auto 0;
    padding: 0 1rem;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

.admin-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.admin-approval-button {
    border: none;
    border-radius: 0.9rem;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    background: #111827;
    color: #ffffff;
    cursor: pointer;
}

.admin-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1f2937;
    letter-spacing: -0.02em;
}

.admin-title span {
    color: #ff5a00;
}

.admin-subtitle {
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.admin-search {
    position: relative;
    width: 100%;
    max-width: 320px;
}

.admin-search input {
    width: 100%;
    padding: 0.6rem 0.75rem 0.6rem 2.2rem;
    border-radius: 0.9rem;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-search input:focus {
    border-color: #ff5a00;
    box-shadow: 0 0 0 3px rgba(255, 90, 0, 0.12);
}

.admin-search i {
    position: absolute;
    left: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.85rem;
}

.admin-sort {
    border: none;
    background: #f1f5f9;
    color: #475569;
    padding: 0.55rem 0.9rem;
    border-radius: 0.8rem;
    font-weight: 700;
    font-size: 0.85rem;
}

.admin-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: #64748b;
}

.admin-summary strong {
    color: #0f172a;
}

.admin-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 1.8rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.admin-table-wrapper {
    overflow-x: auto;
}

.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem 1.2rem 1.4rem;
    font-size: 0.85rem;
    color: #64748b;
}

.admin-pagination button {
    border: none;
    background: #f1f5f9;
    color: #475569;
    padding: 0.4rem 0.9rem;
    border-radius: 0.8rem;
    font-weight: 700;
}

.admin-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    min-width: 1200px;
}

.admin-table td:first-child {
    width: 280px;
}

.admin-table thead {
    background: #f8fafc;
}

.admin-table th:last-child,
.admin-table td:last-child {
    width: 360px;
}

.admin-table td:last-child {
    overflow: visible;
}

.admin-table th:nth-child(2),
.admin-table td:nth-child(2) {
    width: 180px;
}

.admin-table th:nth-child(3),
.admin-table td:nth-child(3) {
    width: 140px;
}

.admin-table th:nth-child(4),
.admin-table td:nth-child(4) {
    width: 220px;
}

.admin-table th:nth-child(5),
.admin-table td:nth-child(5) {
    width: 140px;
}

.admin-table th {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: #94a3b8;
    padding: 1rem 1.25rem;
}

.admin-table td {
    padding: 1rem 1.25rem;
    border-top: 1px solid #f1f5f9;
    overflow: hidden;
}

.admin-table tr:hover {
    background: rgba(248, 250, 252, 0.7);
}

.admin-table .center {
    text-align: center;
    white-space: nowrap;
}

.admin-table .right {
    text-align: right;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.user-cell > div {
    min-width: 0;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff3e6;
    color: #ff7a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.user-name {
    font-weight: 700;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mono {
    font-family: "JetBrains Mono", "Courier New", monospace;
    font-size: 0.85rem;
    color: #64748b;
    word-break: break-all;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-right: 0.35rem;
    white-space: nowrap;
}

.role-admin {
    background: #fee2e2;
    color: #ef4444;
    border: 1px solid #fecaca;
}

.role-user {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.role-pending {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fde68a;
}

.role-suspended {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.role-toggle {
    display: inline-flex;
    background: #f1f5f9;
    padding: 0.25rem;
    border-radius: 0.9rem;
    margin-right: 0.5rem;
}

.role-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.rank-select {
    border: 1px solid #e2e8f0;
    border-radius: 0.7rem;
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
    background: #ffffff;
}

.role-toggle button {
    border: none;
    background: transparent;
    padding: 0.3rem 0.7rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    border-radius: 0.6rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 48px;
}

.role-toggle button.active {
    background: #ffffff;
    color: #1f2937;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
}

.approve-button,
.superadmin-button {
    border: none;
    border-radius: 0.7rem;
    padding: 0.35rem 0.7rem;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.suspend-button,
.resume-button {
    border: none;
    border-radius: 0.7rem;
    padding: 0.35rem 0.7rem;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.suspend-button {
    background: #ef4444;
    color: #ffffff;
}

.resume-button {
    background: #10b981;
    color: #ffffff;
}

.approve-button {
    background: #10b981;
    color: #ffffff;
}

.superadmin-button {
    background: #f97316;
    color: #ffffff;
}

.admin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 300;
}

.admin-modal {
    width: min(520px, 90vw);
    background: #ffffff;
    border-radius: 1.4rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-modal-body {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.admin-modal-body label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
}

.admin-modal-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border-radius: 0.9rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.admin-modal-alert {
    background: #fef3c7;
    color: #b45309;
    padding: 0.6rem 0.8rem;
    border-radius: 0.9rem;
    font-size: 0.8rem;
}

.admin-modal-actions {
    display: flex;
    gap: 0.6rem;
}

.admin-modal-cancel,
.admin-modal-save {
    border: none;
    border-radius: 0.9rem;
    padding: 0.6rem 0.9rem;
    font-weight: 700;
}

.admin-modal-cancel {
    background: #e2e8f0;
    color: #475569;
}

.admin-modal-save {
    background: #111827;
    color: #ffffff;
}

.admin-modal-header h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
}

.nickname-button {
    border: none;
    border-radius: 0.7rem;
    padding: 0.35rem 0.7rem;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    background: #0ea5e9;
    color: #ffffff;
}

.admin-modal-close {
    border: none;
    background: transparent;
    font-size: 1.1rem;
    color: #64748b;
    cursor: pointer;
}

.admin-modal-empty {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.admin-modal-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-modal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-radius: 1rem;
}

.admin-modal-name {
    font-weight: 700;
    color: #1f2937;
}

.admin-modal-meta {
    font-size: 0.8rem;
    color: #94a3b8;
}
