/* 메인 웹 패널 스타일 */

:root {
    --font-sans: "Pretendard Variable", "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    --font-display: "Oxanium", "Pretendard Variable", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    /* 고가독성 보안 테마 팔레트 */
    --primary-color: #22D3EE;
    --primary-dark: #0EA5B7;
    --primary-light: #7DD3FC;

    --secondary-color: #0B1226;

    --background-color: #0B0F1B;
    --background-gradient: linear-gradient(180deg, #0B0F1B 0%, #0F1A34 55%, #0B0F1B 100%);

    --card-background: rgba(17, 24, 39, 0.7);
    --card-background-hover: rgba(20, 28, 46, 0.82);

    --text-color: #F5F7FF;
    --text-muted: rgba(245, 247, 255, 0.72);

    --border-color: rgba(255, 255, 255, 0.12);
    --border-color-strong: rgba(255, 255, 255, 0.22);

    --surface-1: rgba(16, 23, 38, 0.72);
    --surface-2: rgba(255, 255, 255, 0.06);
    --surface-3: rgba(255, 255, 255, 0.12);
    --glow-teal: 0 0 28px rgba(34, 211, 238, 0.22);
    --glow-blue: 0 0 34px rgba(59, 130, 246, 0.22);

    --success-color: #22C55E;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --info-color: #3B82F6;

    --sidebar-width: 260px;

    /* Unified header sizing (dashboard top header + sidebar header) */
    --cordlook-header-height: 110.8px;
    --cordlook-header-pad-x: 1.5rem;

    /* Neon accent (Invite Bot button) */
    --cordlook-neon-green: #39FF14;
    --cordlook-neon-green-2: #00FFA8;

  /* Gradients */
    --gradient-primary: linear-gradient(135deg, #22D3EE 0%, #3B82F6 45%, #14B8A6 100%);
    --gradient-success: linear-gradient(135deg, rgba(34, 197, 94, 0.28) 0%, rgba(34, 197, 94, 0.12) 100%);
    --gradient-danger: linear-gradient(135deg, rgba(239, 68, 68, 0.28) 0%, rgba(239, 68, 68, 0.12) 100%);

    /* Shape */
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 22px;

    /* Elevation (legacy-compatible) */
    --shadow-sm: 0 6px 16px rgba(6, 10, 24, 0.45);
    --shadow-md: 0 12px 32px rgba(6, 10, 24, 0.55);
    --shadow-lg: 0 18px 50px rgba(6, 10, 24, 0.62);
    --shadow-xl: 0 28px 90px rgba(6, 10, 24, 0.75);
    --shadow-glow: 0 0 0 1px rgba(34, 211, 238, 0.16), 0 0 32px rgba(59, 130, 246, 0.18);

    --focus-ring: 0 0 0 3px rgba(34, 211, 238, 0.35);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 공통 레이아웃 안전 가드 (모바일/축소 모드 오버플로우 방지) */
img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
    height: auto;
}

button,
input,
select,
textarea {
    max-width: 100%;
}

.container,
.main-content,
.card,
.config-item,
.form-group,
.table-wrapper {
    min-width: 0;
}

p,
li,
td,
th,
.nav-text,
.config-item-desc,
.alert {
    overflow-wrap: anywhere;
    word-break: keep-all;
}

pre,
code {
    white-space: pre-wrap;
    word-break: break-word;
}

body {
    font-family: var(--font-sans);
    background:
        radial-gradient(1200px 820px at 12% 12%, rgba(34, 211, 238, 0.2), transparent 55%),
        radial-gradient(1000px 780px at 88% 18%, rgba(109, 124, 255, 0.2), transparent 60%),
        radial-gradient(1100px 820px at 50% 92%, rgba(16, 185, 129, 0.12), transparent 60%),
        var(--background-gradient);
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    padding-top: 0;
    transition: padding-top 0.3s ease;
    isolation: isolate;
    scrollbar-width: thin;
    scrollbar-color: rgba(88, 101, 242, 0.85) rgba(255, 255, 255, 0.06);

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.5;
    background:
        linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        radial-gradient(900px 520px at 50% 0%, rgba(255, 255, 255, 0.06), transparent 65%);
    background-size: 46px 46px, 46px 46px, 100% 100%;
    -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 38%, transparent 80%);
    mask-image: radial-gradient(circle at 50% 30%, #000 38%, transparent 80%);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    letter-spacing: -0.01em;
}

/* 배너 비활성 시 추가 상단 패딩이 생기지 않도록 유지 */
/* body.has-header의 80px 패딩은 기본 헤더용이며 배너용이 아님 */

/* 스태프 배너 */
.staff-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: linear-gradient(135deg, rgba(59, 130, 246, 1) 0%, rgba(168, 85, 247, 1) 100%);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.5s ease-out;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateY(0);
    opacity: 1;
}

.staff-banner.hidden {
    transform: translateY(-100%);
    opacity: 0;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.staff-banner-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.staff-banner-icon {
    font-size: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

.staff-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: white;
    font-size: 0.95rem;
}

.staff-banner-text strong {
    font-size: 1.1rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.staff-banner-text span {
    opacity: 0.95;
    line-height: 1.5;
}

.staff-banner-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    font-weight: bold;
    line-height: 1;
    padding: 0;
}

.staff-banner-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Ajustar el contenido principal cuando hay banner */
.main-content.with-sidebar {
    padding-top: 0;
}

.top-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 2rem 1.5rem;
  margin-bottom: 1.25rem;
  background: rgba(16, 23, 38, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
}
/* Responsive */
@media (max-width: 768px) {
    body {
        padding-top: 0; /* Banner desactivado - sin padding adicional */
    }
    
    .staff-banner-content {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }
    
    .staff-banner-icon {
        font-size: 1.5rem;
    }
    
    .staff-banner-text {
        font-size: 0.85rem;
    }
    
    .staff-banner-text strong {
        font-size: 1rem;
    }
    
    .staff-banner-close {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
    }
    
    /* 모바일에서는 footer의 좌측 여백 제거 */
    .main-footer {
        margin-left: 0 !important;
    }
}

@media (max-width: 768px) {
    .btn-group,
    .action-buttons,
    .form-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .btn-group > *,
    .action-buttons > *,
    .form-actions > * {
        flex: 1 1 180px;
        min-width: 0;
    }
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(88, 101, 242, 0.95), rgba(147, 51, 234, 0.8));
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 12px rgba(88, 101, 242, 0.25);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(125, 211, 252, 0.95), rgba(88, 101, 242, 0.9));
    box-shadow: 0 0 16px rgba(125, 211, 252, 0.3);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Header */
.top-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 2rem 1.5rem;
  margin-bottom: 1.25rem;
  background: rgba(17, 19, 24, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.top-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 1) 0%, rgba(168, 85, 247, 1) 100%);
    opacity: 0.5;
}

.top-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
}

.sidebar-toggle {
    background: none;
    border: 1px solid rgba(34, 211, 238, 0.35);
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    display: none;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
    background: rgba(12, 18, 34, 0.7);
    box-shadow: 0 12px 26px rgba(6, 10, 24, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0;
    box-sizing: border-box;
    line-height: 0;
}

.sidebar-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 16px 34px rgba(6, 10, 24, 0.55), 0 0 22px rgba(34, 211, 238, 0.18);
}

.sidebar-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.95), rgba(59, 130, 246, 0.9));
    box-shadow: 0 0 6px rgba(34, 211, 238, 0.35);
    transition: transform 0.18s ease, opacity 0.18s ease;
    margin: 0;
    flex: 0 0 auto;
}

.sidebar-toggle span + span {
    margin-top: 6px;
}


/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease-out;
}

.page-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.page-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    perspective: 1000px;
}

.stat-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.06) 0%, rgba(16, 23, 38, 0.78) 100%);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out backwards;
    box-shadow: var(--shadow-lg);
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-8px) rotateX(4deg) scale(1.02);
    box-shadow: var(--shadow-xl), var(--glow-teal);
    border-color: var(--border-color-strong);
}

.stat-icon {
    font-size: 3.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: float 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

.stat-card:nth-child(1) .stat-icon { animation-delay: 0s; }
.stat-card:nth-child(2) .stat-icon { animation-delay: 0s; }
.stat-card:nth-child(3) .stat-icon { animation-delay: 0s; }
.stat-card:nth-child(4) .stat-icon { animation-delay: 0s; }

.stat-info {
    position: relative;
    z-index: 1;
}

.stat-info h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    text-shadow: 0 0 28px rgba(34, 211, 238, 0.35);
}

.stat-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform-style: preserve-3d;
}

.btn::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.16) 45%, transparent 70%);
    opacity: 0;
    transform: translateX(-120%);
    transition: transform 0.6s ease, opacity 0.2s ease;
}

.btn:hover::before {
    opacity: 1;
    transform: translateX(120%);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl), var(--glow-teal);
}

.btn-secondary {
    background: var(--surface-1);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(26, 35, 54, 0.88);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--glow-blue);
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(237, 66, 69, 0.4);
}

.btn:focus-visible {
    outline: none;
    box-shadow: var(--shadow-md), var(--focus-ring);
}

.btn:active {
    transform: translateY(0);
    transform: translateY(0) scale(0.985);
    filter: brightness(0.99);
    box-shadow: var(--shadow-sm) inset, var(--shadow-md);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Cards */
.dashboard-card,
.server-card-large,
.detail-card {
    background: linear-gradient(165deg, rgba(18, 28, 54, 0.92) 0%, rgba(12, 18, 34, 0.72) 100%);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid rgba(125, 211, 252, 0.2);
    margin-bottom: 1.5rem;
    box-shadow: 0 20px 55px rgba(6, 10, 24, 0.6);
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
}

.dashboard-card::before,
.server-card-large::before,
.detail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.4s;
}

.dashboard-card:hover::before,
.server-card-large:hover::before,
.detail-card:hover::before {
    transform: scaleX(1);
}

.dashboard-card:hover,
.server-card-large:hover,
.detail-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl), var(--glow-blue);
    border-color: var(--border-color-strong);
}

.dashboard-card h3,
.server-card-large h3,
.detail-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* Alerts */
.alert {
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out;
    box-shadow: var(--shadow-md);
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: currentColor;
}

.alert-success {
    background: linear-gradient(135deg, rgba(87, 242, 135, 0.15) 0%, rgba(67, 181, 129, 0.15) 100%);
    border-color: var(--success-color);
    color: var(--success-color);
    box-shadow: 0 0 20px rgba(87, 242, 135, 0.2);
}

.alert-error {
    background: linear-gradient(135deg, rgba(237, 66, 69, 0.15) 0%, rgba(192, 53, 55, 0.15) 100%);
    border-color: var(--danger-color);
    color: var(--danger-color);
    box-shadow: 0 0 20px rgba(237, 66, 69, 0.2);
}

.alert-info {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.15) 0%, rgba(71, 82, 196, 0.15) 100%);
    border-color: var(--info-color);
    color: var(--info-color);
    box-shadow: 0 0 20px rgba(88, 101, 242, 0.2);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(44, 47, 51, 0.6);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-color);
    font-size: 1rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    outline: none;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.25), 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
    background: var(--surface-1);
}

.form-group input[type="text"]:hover,
.form-group input[type="number"]:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: rgba(34, 211, 238, 0.5);
    background: rgba(26, 35, 54, 0.7);
}

.form-group input[type="text"]::placeholder,
.form-group input[type="number"]::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.form-group input[type="checkbox"] {
    margin-right: 0.5rem;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.config-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.config-section:last-child {
    border-bottom: none;
}

.config-section h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--surface-1);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.data-table thead {
    background-color: rgba(15, 23, 42, 0.9);
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr:hover {
    background-color: rgba(34, 211, 238, 0.06);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.85rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.status-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.status-badge:hover::before {
    left: 100%;
}

.status-badge.active {
    background: var(--gradient-success);
    color: white;
    box-shadow: 0 0 15px rgba(87, 242, 135, 0.4);
}

.status-badge.active:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(87, 242, 135, 0.6);
}

.status-badge.inactive {
    background: var(--gradient-danger);
    color: white;
    box-shadow: 0 0 15px rgba(237, 66, 69, 0.4);
}

.status-badge.inactive:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(237, 66, 69, 0.6);
}

.event-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.event-type-raid {
    background-color: rgba(237, 66, 69, 0.2);
    color: var(--danger-color);
}

.event-type-raid_quarantined {
    background-color: rgba(255, 165, 0, 0.2);
    color: #ffa500;
    border: 1px solid rgba(255, 165, 0, 0.4);
}

.event-type-spam {
    background-color: rgba(254, 231, 92, 0.2);
    color: var(--warning-color);
}

.event-type-ban,
.event-type-kick {
    background-color: rgba(88, 101, 242, 0.2);
    color: var(--info-color);
}

/* No Data */
.no-data {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar-toggle {
        display: block;
    }
    
    .container {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        font-size: 0.85rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    height: 100vh;
    background: linear-gradient(135deg, var(--background-color) 0%, var(--secondary-color) 100%);
    margin: 0;
    padding: 0;
}

.login-box {
    background-color: var(--card-background);
    border-radius: var(--radius-sm);
    padding: 3rem;
    max-width: 400px;
    width: 100%;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-muted);
}

.login-content {
    margin-bottom: 2rem;
}

.login-content p {
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

.discord-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.discord-login-btn:hover {
    background-color: var(--primary-dark);
}

.login-footer {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 2rem;
    padding: 3rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

.welcome-section h2 {
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.welcome-section p {
    color: var(--text-muted);
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.quick-actions h3 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    perspective: 1000px;
}

.action-card {
    background: linear-gradient(135deg, rgba(44, 47, 51, 0.8) 0%, rgba(30, 33, 36, 0.8) 100%);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: block;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    animation: fadeInUp 0.6s ease-out backwards;
}

.action-card:nth-child(1) { animation-delay: 0.1s; }
.action-card:nth-child(2) { animation-delay: 0.2s; }
.action-card:nth-child(3) { animation-delay: 0.3s; }
.action-card:nth-child(4) { animation-delay: 0.4s; }

.action-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.action-card:hover::after {
    width: 300px;
    height: 300px;
}

.action-card:hover {
    transform: translateY(-12px) rotateX(5deg) scale(1.05);
    box-shadow: var(--shadow-xl), 0 0 30px rgba(102, 126, 234, 0.4);
    border-color: var(--border-color-strong);
}

.action-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s;
    position: relative;
    z-index: 1;
}

.action-card:hover .action-icon {
    transform: scale(1.2) rotate(5deg);
}

.action-card h4 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.action-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* Servers List */
.recent-servers {
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.recent-servers h3 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.servers-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.server-card {
    background: linear-gradient(135deg, rgba(44, 47, 51, 0.8) 0%, rgba(30, 33, 36, 0.8) 100%);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    animation: slideInRight 0.6s ease-out backwards;
}

.server-card:nth-child(1) { animation-delay: 0.1s; }
.server-card:nth-child(2) { animation-delay: 0.2s; }
.server-card:nth-child(3) { animation-delay: 0.3s; }
.server-card:nth-child(4) { animation-delay: 0.4s; }
.server-card:nth-child(5) { animation-delay: 0.5s; }

.server-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    transform: scaleY(0);
    transition: transform 0.4s;
}

.server-card:hover::before {
    transform: scaleY(1);
}

.server-card:hover {
    transform: translateX(10px) scale(1.02);
    box-shadow: var(--shadow-xl), 0 0 20px rgba(102, 126, 234, 0.3);
    border-color: var(--border-color-strong);
}

.server-info h4 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.server-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.server-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(102, 126, 234, 0.1);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    position: relative;
    z-index: 1;
}

.server-link:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

/* Servers Grid */
.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.server-card-large .server-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.server-body {
    margin-bottom: 1rem;
}

.server-detail {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.server-detail:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-muted);
}

.detail-value {
    font-weight: 500;
}

.server-footer {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Events List */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--background-color);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.event-icon {
    font-size: 1.5rem;
}

.event-info h4 {
    margin-bottom: 0.25rem;
}

.event-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.event-time {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

/* 모바일/좁은 화면에서는 1열 */
@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

/* grid 안에서는 margin-bottom이 겹쳐서 간격이 이상해질 수 있으므로 제거 */
.dashboard-grid .dashboard-card {
    margin-bottom: 0;
    min-width: 0;
}

/* Detail List */
.detail-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-item:last-child {
    border-bottom: none;
}

/* Inline Form */
.inline-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
    padding: 1.5rem;
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-md);
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: var(--shadow-md);
}

.inline-form input[type="text"],
.inline-form input[type="number"] {
    flex: 1;
    min-width: 200px;
    padding: 1rem 1.25rem;
    background: rgba(44, 47, 51, 0.7);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-color);
    font-size: 1rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.inline-form input[type="text"]:focus,
.inline-form input[type="number"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.25), 
                0 8px 24px rgba(0, 0, 0, 0.3),
                0 0 20px rgba(88, 101, 242, 0.1);
    transform: translateY(-2px);
    background: rgba(44, 47, 51, 0.9);
}

.inline-form input[type="text"]:hover,
.inline-form input[type="number"]:hover {
    border-color: rgba(88, 101, 242, 0.6);
    background: rgba(44, 47, 51, 0.8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.inline-form input[type="text"]::placeholder,
.inline-form input[type="number"]::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
    font-weight: 400;
}

.inline-form button {
    padding: 1rem 2rem;
    white-space: nowrap;
}

/* Events by Type */
.events-by-type {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.event-type-stat {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background-color: var(--card-background);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.event-type-name {
    font-weight: 500;
}

.event-type-count {
    color: var(--primary-color);
    font-weight: 600;
}

/* Server Detail Grid */
.server-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Recent Events Section */
.recent-events-section {
    margin-top: 2rem;
}

/* Config Header */
.config-header {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--card-background);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.config-header h3 {
    margin-bottom: 0.5rem;
}

.config-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Servers Selector */
.servers-selector {
    margin-top: 1.5rem;
}

.servers-selector h3 {
    margin-bottom: 1rem;
}

.recent-events-section h3 {
    margin-bottom: 1rem;
}

/* Servers Section Modern */
.servers-section {
    margin-top: 2rem;
    animation: fadeInUp 0.8s ease-out 0.3s backwards;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.servers-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    perspective: 1000px;
}

.server-card-modern {
    background: linear-gradient(165deg, rgba(17, 28, 54, 0.92) 0%, rgba(12, 18, 34, 0.72) 100%);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2rem;
    border: 2px solid rgba(125, 211, 252, 0.45);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 22px 60px rgba(6, 10, 24, 0.6);
    animation: fadeInUp 0.6s ease-out backwards;
}

.server-card-modern:nth-child(1) { animation-delay: 0.1s; }
.server-card-modern:nth-child(2) { animation-delay: 0.2s; }
.server-card-modern:nth-child(3) { animation-delay: 0.3s; }
.server-card-modern:nth-child(4) { animation-delay: 0.4s; }
.server-card-modern:nth-child(5) { animation-delay: 0.5s; }
.server-card-modern:nth-child(6) { animation-delay: 0.6s; }
.server-card-modern:nth-child(7) { animation-delay: 0.7s; }
.server-card-modern:nth-child(8) { animation-delay: 0.8s; }

.server-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.6s;
}

.server-card-modern:hover::before {
    left: 100%;
}

.server-card-modern:hover {
    transform: translateY(-8px) rotateX(2deg) scale(1.02);
    box-shadow: var(--shadow-xl), var(--glow-blue);
    border-color: rgba(34, 211, 238, 0.55);
}

.server-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.server-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    border: 2px solid rgba(34, 211, 238, 0.35);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    flex-shrink: 0;
}

.server-card-modern:hover .server-icon {
    transform: scale(1.1) rotate(5deg);
    border-color: var(--border-color-strong);
    box-shadow: 0 6px 22px rgba(34, 211, 238, 0.35);
}

.server-icon-fallback {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    border: 2px solid rgba(34, 211, 238, 0.35);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    flex-shrink: 0;
}

.server-card-modern:hover .server-icon-fallback {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 22px rgba(34, 211, 238, 0.35);
}

.server-title-info {
    flex: 1;
    min-width: 0;
}

.server-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.server-id {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.server-card-body {
    position: relative;
    z-index: 1;
}

.server-members {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.server-details-mini {
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(10, 15, 28, 0.45);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.server-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.server-detail-item:last-child {
    border-bottom: none;
}

.server-detail-item .detail-label {
    color: var(--text-muted);
    font-weight: 500;
}

.server-detail-item .detail-value {
    color: var(--text-color);
    font-weight: 600;
}

.server-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.server-status-badge.active {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.18) 0%, rgba(34, 197, 94, 0.08) 100%);
    color: var(--success-color);
    border: 1px solid rgba(34, 197, 94, 0.3);
    box-shadow: var(--shadow-sm);
}

.server-status-badge.inactive {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.18) 0%, rgba(34, 197, 94, 0.08) 100%);
    color: var(--success-color);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.server-status-badge.no-bot {
    background: linear-gradient(135deg, rgba(237, 66, 69, 0.2) 0%, rgba(192, 53, 55, 0.2) 100%);
    color: var(--danger-color);
    border: 1px solid rgba(237, 66, 69, 0.3);
}

.badge-icon {
    font-size: 1.2rem;
}

.badge-text {
    font-weight: 600;
}

.server-threshold {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.server-invite-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.server-card-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn-manage,
.btn-invite {
    flex: 1;
    text-align: center;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    display: block;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.btn-invite {
    width: 100%;
}

.btn-manage {
    background: var(--gradient-primary);
    color: white;
    font-size: 1rem;
    padding: 1rem 1.75rem;
    letter-spacing: 0.2px;
}

.btn-manage:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow), 0 0 26px rgba(77, 163, 255, 0.22);
    filter: brightness(1.03);
}

@media (max-width: 1024px) {
    .sidebar-toggle {
        display: inline-flex;
    }

    body.has-sidebar .main-footer,
    .main-content.with-sidebar + .main-footer {
        margin-left: 0 !important;
        width: 100% !important;
    }
}


.btn-success {
    background: var(--gradient-success);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 25px rgba(87, 242, 135, 0.4);
}

/* ============================================
   CONFIGURACIÓN MODERNA CON PESTAÑAS
   ============================================ */

/* Config Header Moderno */
.config-header-modern {
    background: var(--gradient-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s ease-out;
}

.config-header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.config-header-icon {
    font-size: 3rem;
    filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.3));
    animation: float 3s ease-in-out infinite;
}

.config-header-info h3 {
    font-size: 1.75rem;
    margin: 0.35rem 0 0.6rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.config-header-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: block;
    text-align: left;
    line-height: 1.6;
    margin: 0;
}

.beta-notice-text {
    line-height: 1.6;
    word-break: keep-all;
}

.config-form-modern {
    background: var(--card-background);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.8s ease-out;
}

/* Sistema de Pestañas */
/* Contenedor de pestañas con navegación */
.settings-tabs-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.settings-tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    flex: 1;
    /* Scrollbar visible y estilizada para PC */
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.5) transparent;
    -ms-overflow-style: -ms-autohiding-scrollbar;
}

/* Estilizar scrollbar para Webkit (Chrome, Safari, Edge) */
.settings-tabs::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.settings-tabs::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
}

.settings-tabs::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(109,124,255,0.70), rgba(50,211,255,0.55));
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.06);
}

.settings-tabs::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(109,124,255,0.95), rgba(168,85,247,0.70));
}

/* Ocultar scrollbar en móviles (pantallas pequeñas) */
@media (max-width: 768px) {
    .settings-tabs {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .settings-tabs::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
    
    .tab-nav-button {
        display: none !important;
    }
    
    .tab-scroll-hint {
        display: none !important;
    }
}

/* Botones de navegación */
.tab-nav-button {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: var(--primary-light);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    flex-shrink: 0;
    padding: 0;
}

.tab-nav-button:hover:not(:disabled) {
    background: rgba(102, 126, 234, 0.2);
    border-color: var(--primary-light);
    transform: scale(1.1);
}

.tab-nav-button:active:not(:disabled) {
    transform: scale(0.95);
}

.tab-nav-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.tab-nav-button span {
    display: block;
    line-height: 1;
}

/* Hint de scroll */
.tab-scroll-hint {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.tab-scroll-hint small {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .tab-scroll-hint {
        display: none;
    }
}

.settings-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    position: relative;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    font-family: inherit;
}

.settings-tab:hover {
    color: var(--text-color);
    background: rgba(102, 126, 234, 0.1);
}

.settings-tab.active {
    color: var(--primary-light);
    border-bottom-color: var(--primary-light);
}

.settings-tab.active .tab-icon {
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px rgba(102, 126, 234, 0.5));
}

.tab-icon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.tab-text {
    font-weight: 600;
}

/* Contenido de Pestañas */
.settings-tab-content {
    min-height: 400px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-pane.active {
    display: block;
    width: 100%;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Secciones Modernas */
.config-section-modern {
    padding: 0;
}

.section-header-modern {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.section-header-modern h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Form Groups Modernos */
.form-group-modern {
    margin-bottom: 2rem;
}

.input-label-modern {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 1rem;
}

.label-icon {
    font-size: 1.25rem;
}

.label-text {
    flex: 1;
}

.input-wrapper-modern {
    position: relative;
    display: flex;
    align-items: center;
}

.input-modern {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-color);
    font-size: 1rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    font-family: inherit;
}

.input-modern:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: rgba(0, 0, 0, 0.4);
}

.input-modern:hover {
    border-color: var(--border-color-strong);
}

.input-suffix {
    position: absolute;
    right: 1.25rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.input-hint {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Checkboxes Modernos Mejorados */
.checkbox-wrapper-modern {
    position: relative;
}

.checkbox-modern {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-label-modern {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    position: relative;
    overflow: hidden;
}

.checkbox-label-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.checkbox-label-modern:hover {
    border-color: var(--primary-light);
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.checkbox-label-modern:hover::before {
    opacity: 0.05;
}

.checkbox-custom {
    position: relative;
    width: 24px;
    height: 24px;
    min-width: 24px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.checkbox-custom::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 16px;
    font-weight: bold;
    opacity: 0;
    transform: scale(0) rotate(-180deg);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.checkbox-modern:checked ~ .checkbox-label-modern {
    border-color: var(--primary-light);
    background: rgba(102, 126, 234, 0.15);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), var(--shadow-md);
}

.checkbox-modern:checked ~ .checkbox-label-modern .checkbox-custom {
    background: var(--gradient-primary);
    border-color: var(--primary-light);
    box-shadow: 0 0 12px rgba(102, 126, 234, 0.4);
    transform: scale(1.1);
}

.checkbox-modern:checked ~ .checkbox-label-modern .checkbox-custom::after {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.checkbox-text {
    flex: 1;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.checkbox-title {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1rem;
}

.checkbox-description {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Botones Modernos */
.form-actions-modern {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.btn-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-modern:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary-modern {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary-modern {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary-modern:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 1.1rem;
    z-index: 1;
    position: relative;
}



.btn-text {
    z-index: 1;
    position: relative;
}



/* Accessibility */
:where(a, button, input, select, textarea, .btn):focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}


/* If only one action button exists, make it full width and premium */
.server-card-actions a.btn-manage {
    width: 100%;
}


/* =========================================================
   FINAL UI PATCH (2026-01-14)
   - Header height alignment (top-header + sidebar-header)
   - Footer visibility + stronger separation
   - Invite Bot neon green call-to-action
   ========================================================= */

/* Responsive tweak: slightly shorter headers on mobile */
@media (max-width: 768px) {
  :root {
    --cordlook-header-height: 92px;
  }
}

/* Top header: fixed height + consistent padding */
.top-header {
  height: var(--cordlook-header-height);
  min-height: var(--cordlook-header-height);
  padding: 0 var(--cordlook-header-pad-x);
  position: relative;
  box-sizing: border-box;
}

/* Ensure header title doesn't force taller layouts */
.top-header h1 {
  margin: 0;                 /* 브라우저 기본 margin 제거 */
  line-height: 1.1;
  white-space: nowrap;       /* 줄바꿈 방지 -> 높이 변동 방지 */
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Keep underline aligned with new padding */
.top-header::after {
  left: var(--cordlook-header-pad-x);
  width: calc(100% - (var(--cordlook-header-pad-x) * 2));
}

/* Invite Bot button: high-visibility neon green */
.btn-invite,
.btn.btn-success.btn-invite {
  background: linear-gradient(135deg, var(--cordlook-neon-green) 0%, var(--cordlook-neon-green-2) 100%) !important;
  color: #07110C !important;
  border: 1px solid rgba(57, 255, 20, 0.6) !important;
  box-shadow:
    0 18px 50px rgba(57, 255, 20, 0.22),
    0 0 18px rgba(0, 255, 168, 0.14),
    0 0 0 1px rgba(57, 255, 20, 0.18) inset !important;
  font-weight: 800 !important;
  transform: none !important;
  letter-spacing: 0.2px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-invite:hover,
.btn.btn-success.btn-invite:hover {
  filter: brightness(1.06) saturate(1.05);
  transform: translateY(-1px);
  box-shadow:
    0 22px 70px rgba(57, 255, 20, 0.28),
    0 0 26px rgba(0, 255, 168, 0.18),
    0 0 0 1px rgba(57, 255, 20, 0.22) inset !important;
}

.btn-invite:active,
.btn.btn-success.btn-invite:active {
  filter: brightness(1.02);
}

/* Footer: fix hidden text, add clear boundary, and differentiate pattern */
.main-footer {
  color: rgba(242, 246, 255, 0.86);
  background: linear-gradient(180deg, rgba(12, 15, 28, 0.35) 0%, rgba(12, 15, 28, 0.78) 55%, rgba(12, 15, 28, 0.92) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 -18px 55px rgba(0, 0, 0, 0.48);
  position: relative;
  overflow: visible;
  isolation: isolate;
  padding: 0 2rem;
  box-sizing: border-box;
}

.main-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 8, 18, 0.55) 0%, rgba(6, 8, 18, 0.35) 40%, rgba(6, 8, 18, 0.75) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.main-footer::after {
  content: "";
  position: absolute;
  inset: -2px;
  /* override previous grid so sections don't blend */
  background-image:
    radial-gradient(circle at 20% 0%, rgba(137, 180, 250, 0.12), transparent 45%),
    radial-gradient(circle at 80% 35%, rgba(166, 227, 161, 0.08), transparent 55%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 14px);
  opacity: 0.35;
}

.main-footer::before,
.main-footer::after {
  z-index: 0;
  pointer-events: none;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.main-footer > * {
  position: relative;
  z-index: 1;
}

.main-footer p,
.main-footer a {
  opacity: 1;
}

/* Sidebar가 있는 페이지에서는 footer도 오른쪽으로 밀어서 사이드바에 가리지 않게 */
body.has-sidebar .main-footer,
.main-content.with-sidebar + .main-footer {
  margin-left: var(--sidebar-width, 320px) !important;
  width: calc(100% - var(--sidebar-width, 320px)) !important;
  box-sizing: border-box;
}

/* 모바일에서는 사이드바가 오버레이 형태라 footer를 다시 100%로 */
@media (max-width: 768px) {
  body.has-sidebar .main-footer,
  .main-content.with-sidebar + .main-footer {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .main-footer {
    padding: 0 1.25rem;
  }
}

@media (max-width: 1024px) {
  body {
    background-attachment: scroll;
  }

  .stat-card,
  .server-card-modern,
  .dashboard-card,
  .server-card-large,
  .detail-card {
    box-shadow: var(--shadow-md);
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stat-card,
  .server-card-modern,
  .dashboard-card,
  .server-card-large,
  .detail-card,
  .stat-icon,
  .btn::before,
  .btn-hero::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== Dashboard custom tweaks ===== */

/* 6개 통계 카드: 데스크톱에서 3개/3개로 고정 */
.stats-grid.stats-grid-3col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
    .stats-grid.stats-grid-3col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .stats-grid.stats-grid-3col {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

/* dashboard-card 제목 아래 구분선(설정 페이지의 config-item-title 느낌) */
.dashboard-card-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0 0 1rem 0;
    padding: 0 0 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-card-title h3 {
    margin: 0; /* 기존 .dashboard-card h3의 margin-bottom 제거 */
}

/* 오늘 가입자 수 카드 내부 */
.join-today-metric {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background-color: var(--card-background);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.join-today-number {
    font-size: 2.2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.join-today-desc {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* 대시보드 4개 카드: 항상 2열 유지 (옆으로 늘려도 1줄로 합쳐지지 않게) */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

/* 그리드 카드에서 불필요한 하단 마진/오버플로 방지 */
.dashboard-grid .dashboard-card {
    margin-bottom: 0;
    min-width: 0;
}

/* "서버 설정" 값이 양끝으로 벌어지지 않게 (dashboard에서만 적용) */
.dashboard-grid .detail-item {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 1rem;
    justify-content: start;
    align-items: center;
}

.dashboard-grid .detail-value {
    text-align: left;
    word-break: break-word;
}

/* =========================================================
   FIX: 전 페이지 이중 스크롤(스크롤바 2개) 방지
   - html(문서)만 스크롤 컨테이너로 사용
   - body(=body.notranslate 포함)는 절대 스크롤 컨테이너가 되지 않게 강제
   ========================================================= */
html {
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

body,
body.notranslate {
  overflow-y: hidden !important; /* body 스크롤 금지: 내부 스크롤바 제거 */
  overflow-x: hidden !important;
  height: auto !important;
  max-height: none !important;
}

/* =========================================================
   모바일 성능 최적화: backdrop-filter/blur GPU 부하 감소
   - 모바일에서 blur 값을 줄여 렌더링 성능 향상
   - will-change 힌트로 GPU 레이어 최적화
   ========================================================= */
@media (max-width: 768px) {
    .sidebar,
    .top-header,
    .dashboard-card,
    .modal-content,
    .stat-card,
    .server-card,
    .toast-notification {
        backdrop-filter: blur(4px) !important;
        -webkit-backdrop-filter: blur(4px) !important;
    }
}

/* GPU 레이어 힌트: 자주 변경되는 요소 */
.sidebar, .top-header {
    will-change: transform;
}

/* =========================================================
   접근성 + 배터리 최적화: 모션 감소 설정 시 애니메이션 제거
   - 사용자가 시스템에서 "모션 줄이기"를 설정한 경우
   - 무한 반복 애니메이션(pulse, float 등) 정지
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================================================
   반응형 안정화 가드
   - 긴 텍스트 줄바꿈 보정
   - 카드/컨테이너 오버플로우 방지
   - 모바일에서 버튼/테이블 깨짐 방지
   ========================================================= */
:where(
    .main-content,
    .main-content.with-sidebar,
    .top-header,
    .dashboard-content,
    .dashboard-card,
    .server-card,
    .admin-card,
    .admin-section,
    .config-item,
    .content-section,
    .tab-content,
    .tabs-content
) {
    min-width: 0;
}

:where(
    p,
    li,
    span,
    a,
    button,
    label,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    .nav-text,
    .section-subtitle,
    .detail-value,
    .badge-text,
    .server-name
) {
    overflow-wrap: anywhere;
}

img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .top-header {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .top-header > * {
        min-width: 0;
    }

    .main-content,
    .admin-container,
    .content-wrapper {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .btn,
    .btn-primary,
    .btn-secondary,
    .btn-admin {
        white-space: normal;
        line-height: 1.35;
    }
}
