/* Admin-specific styles (shared layout in theme.css) */

.section-panel.hidden { display: none; }

.card-flush {
    padding: 0;
    overflow: hidden;
}

.card-flush .table-wrap {
    margin: 0;
}

.card-flush .empty {
    padding: 48px 24px;
}

.card .hint code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
}

.sub-cell {
    display: flex;
    gap: 6px;
    align-items: center;
    max-width: 320px;
}

.sub-input {
    flex: 1;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    background: #fafafa;
    color: var(--text-secondary);
}

.invite-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    color: var(--text-secondary);
}

#add-user-btn.hidden,
#add-invite-btn.hidden {
    display: none;
}

@media (max-width: 768px) {
    .sub-cell {
        flex-direction: column;
        align-items: stretch;
        max-width: none;
    }
}
/* Portal-specific styles (shared layout in theme.css) */

.section-panel.hidden { display: none; }

.password-field {
    position: relative;
    width: 100%;
}

.password-field input {
    width: 100%;
    padding-right: 52px;
}

.password-toggle {
    position: absolute;
    right: 33px;
    top: 50%;
    transform: translateY(-50%);
    padding: 4px 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
}

.password-toggle:hover {
    color: var(--primary);
}

.password-toggle:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.welcome-banner {
    position: relative;
    background: linear-gradient(135deg, #434343 0%, #262626 100%);
    border-radius: var(--radius);
    padding: 28px 32px;
    margin-bottom: 20px;
    color: #fff;
    overflow: hidden;
}

.welcome-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 50%);
    pointer-events: none;
}

.welcome-badge {
    display: inline-block;
    background: #ff4d4f;
    color: #fff;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.welcome-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 6px;
}

.welcome-date {
    font-size: 13px;
    opacity: 0.75;
}

.welcome-banner.has-unread {
    cursor: pointer;
    animation: notice-flash 1.2s ease-in-out infinite;
}

.welcome-banner.has-unread .welcome-badge {
    animation: notice-badge-pulse 1.2s ease-in-out infinite;
}

.welcome-banner[role="button"]:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

@keyframes notice-flash {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 77, 79, 0); }
    50%      { box-shadow: 0 0 0 4px rgba(255, 77, 79, 0.55); }
}

@keyframes notice-badge-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.65; }
}

.announcement-modal-card {
    max-width: 480px;
}

.announcement-meta {
    font-size: 13px;
    color: var(--text-muted, #888);
    margin: -12px 0 16px;
}

.announcement-body {
    white-space: pre-wrap;
    line-height: 1.6;
    margin-bottom: 20px;
    max-height: 240px;
    overflow-y: auto;
}

.announcement-history-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-muted, #888);
}

.announcement-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 160px;
    overflow-y: auto;
    border: 1px solid var(--border, #e8e8e8);
    border-radius: var(--radius, 8px);
}

.announcement-history-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border, #e8e8e8);
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.announcement-history-item:last-child {
    border-bottom: none;
}

.announcement-history-item:hover {
    background: var(--bg-hover, #fafafa);
}

.announcement-history-item.active {
    background: var(--primary-light, #fff1f0);
    font-weight: 500;
}

.announcement-history-item.unread .announcement-history-label {
    font-weight: 600;
}

.announcement-unread-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4d4f;
}

.rate-row {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.quota-meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.quota-resets {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.sub-url-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.sub-url-row input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 13px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    background: #fafafa;
}

.sub-url-row input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.section-label {
    margin: 20px 0 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.qrcode-toggle-btn {
    margin-top: 16px;
}

#qrcode-wrap {
    margin-top: 16px;
}

#qrcode {
    display: flex;
    justify-content: center;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    min-height: 0;
}

#qrcode img { image-rendering: pixelated; }

.shortcut-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 0;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background 0.15s;
}

.shortcut-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.shortcut-item:first-of-type { padding-top: 0; }

.shortcut-item:hover {
    background: #fafafa;
    margin: 0 -12px;
    padding-left: 12px;
    padding-right: 12px;
    border-radius: 6px;
}

.shortcut-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
}

.shortcut-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.shortcut-arrow {
    font-size: 20px;
    color: var(--text-secondary);
    line-height: 1;
}

.status-enabled { color: var(--success); font-weight: 600; }
.status-disabled { color: var(--danger); font-weight: 600; }

.rate-cell {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    white-space: nowrap;
}
