/* TriaView V2 Common Styles */

:root {
    --bg-main: #0a0a0c;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #a0a0ab;
    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;
    --status-open: #10b981;
    --status-closed: #f43f5e;
    --status-draft: #f59e0b;
    --status-full: #8b5cf6;
    --glass-blur: blur(12px);
}

.v2-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* --- V2 List UI System --- */

/* Search & Filter Section */
.v2-header-controls {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    align-items: stretch;
}

.v2-search-wrapper {
    position: relative;
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.v2-search-wrapper i {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.v2-search-wrapper input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 100%;
    height: 48px;
    outline: none;
    font-size: 1rem;
}

.v2-filter-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.v2-filter-wrapper:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: var(--bg-card-hover);
}

/* --- Custom Dropdown System --- */
.v2-dropdown {
    position: relative;
    display: inline-block;
}
.v2-dropdown-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    height: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.v2-dropdown-btn::after {
    content: "";
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='rgba(255,255,255,0.5)' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.7;
    transition: transform 0.2s;
}
.v2-dropdown.active .v2-dropdown-btn::after {
    transform: rotate(180deg);
}

.v2-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: -16px;
    background: rgba(26, 26, 28, 0.95);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    list-style: none;
    padding: 8px;
    min-width: 160px;
    display: none;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}
.v2-dropdown-menu.show {
    display: flex;
    animation: v2-dropdown-fade 0.2s ease;
}
@keyframes v2-dropdown-fade {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.v2-dropdown-menu li {
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.v2-dropdown-menu li:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}
.v2-dropdown-menu li.active {
    color: white;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.05);
}
.v2-dropdown-menu li.active::after {
    content: "✓";
    font-size: 0.8rem;
    color: var(--accent-blue);
}

/* List Header */
.v2-list-header {
    display: grid;
    padding: 12px 24px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
    text-align: center;
    opacity: 0.8;
}

.v2-list-header div:first-child {
    text-align: left;
}

/* List Row Card */
.v2-list-row {
    display: grid;
    align-items: center;
    padding: 18px 24px;
    cursor: pointer;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    text-align: center;
}

.v2-list-row:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

/* Item Info Group */
.v2-col-info {
    text-align: left;
}

.v2-item-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.v2-item-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Values & Highlights */
.v2-stat-val {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.v2-txt-highlight {
    color: var(--accent-blue);
    font-weight: 800;
    font-size: 1rem;
}

/* Status Badges */
.v2-status-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.v2-status-open {
    background: rgba(16, 185, 129, 0.1);
    color: var(--status-open);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.v2-status-closed {
    background: rgba(244, 63, 94, 0.1);
    color: var(--status-closed);
    border: 1px solid rgba(244, 63, 94, 0.2);
}

.v2-status-draft {
    background: rgba(245, 158, 11, 0.1);
    color: var(--status-draft);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.v2-status-full {
    background: rgba(139, 92, 246, 0.1);
    color: var(--status-full);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* Breadcrumbs */
.v2-breadcrumb {
    margin-bottom: 24px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.v2-breadcrumb a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.v2-breadcrumb a:hover {
    color: var(--text-primary);
}

.v2-breadcrumb i {
    margin: 0 8px;
    font-size: 0.7rem;
}

.v2-breadcrumb .current { color: var(--text-primary); font-weight: 700; }

/* --- Score Color System --- */
.txt-score-100 { color: #059669 !important; } /* 100: Deep Green */
.txt-score-90  { color: #a3e635 !important; } /* 90s: Lime / Light Green */
.txt-score-80  { color: #fde047 !important; } /* 80s: Yellow */
.txt-score-70  { color: #fb923c !important; } /* 70s: Orange */
.txt-score-60  { color: #ff6b6b !important; } /* 60s: Vermilion / Coral */
.txt-score-fail { color: #ef4444 !important; } /* <60: Red */

/* 커스텀 크레딧 부족 알림 모달 */
.credit-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.credit-modal-overlay.active {
    opacity: 1;
}
.credit-modal-card {
    background: #141416;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    width: 90%;
    max-width: 440px;
    padding: 32px 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.credit-modal-overlay.active .credit-modal-card {
    transform: scale(1);
}
.credit-modal-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}
.credit-modal-icon i {
    font-size: 2rem;
    color: #ffd700;
}
.credit-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}
.credit-modal-desc {
    font-size: 0.95rem;
    color: #a0a0ab;
    line-height: 1.6;
    margin-bottom: 28px;
}
.credit-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.credit-modal-btn {
    flex: 1;
    height: 48px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.credit-modal-btn-close {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.credit-modal-btn-close:hover {
    background: rgba(255, 255, 255, 0.1);
}
.credit-modal-btn-charge {
    background: linear-gradient(135deg, #ffd700, #fbbf24);
    color: #111;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}
.credit-modal-btn-charge:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    transform: translateY(-1px);
}

/* 범용 커스텀 얼럿 / 컨펌 모달 */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.custom-modal-overlay.active {
    opacity: 1;
}
.custom-modal-card {
    background: #141416;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    padding: 28px 24px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6);
    text-align: center;
    transform: scale(0.92);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.custom-modal-overlay.active .custom-modal-card {
    transform: scale(1);
}
.custom-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 18px;
    font-size: 1.6rem;
}
.custom-modal-icon-alert {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.custom-modal-icon-confirm {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}
.custom-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}
.custom-modal-message {
    font-size: 0.92rem;
    color: #a0a0ab;
    line-height: 1.6;
    margin-bottom: 24px;
    word-break: keep-all;
    white-space: pre-line;
}
.custom-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.custom-modal-btn {
    flex: 1;
    height: 44px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.custom-modal-btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.custom-modal-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.08);
}
.custom-modal-btn-confirm {
    background: linear-gradient(135deg, #ffd700, #fbbf24);
    color: #111;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
}
.custom-modal-btn-confirm:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    transform: translateY(-1px);
}

/* 프리미엄 커스텀 셀렉트 (드롭다운) */
.custom-select {
    position: relative;
    width: 100%;
}
.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    height: 48px;
    padding: 0 16px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}
.custom-select-trigger:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}
.custom-select.active .custom-select-trigger {
    border-color: #ffd700;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.15);
}
.custom-select-trigger i {
    font-size: 0.8rem;
    color: #a0a0ab;
    transition: transform 0.25s ease;
}
.custom-select.active .custom-select-trigger i {
    transform: rotate(180deg);
    color: #ffd700;
}
.custom-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: rgba(20, 20, 22, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    list-style: none;
    padding: 6px;
    margin: 0;
    z-index: 999;
    display: none;
    max-height: 240px;
    overflow-y: auto;
}
.custom-select.active .custom-options {
    display: block;
    animation: custom-select-fade 0.2s ease;
}
@keyframes custom-select-fade {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.custom-option {
    padding: 10px 14px;
    color: #a0a0ab;
    font-size: 0.92rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.custom-option:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}
.custom-option.selected {
    color: #ffd700;
    font-weight: 700;
    background: rgba(255, 215, 0, 0.05);
}

/* 프리미엄 커스텀 달력 선택기 (DatePicker) */
.custom-datepicker-wrapper {
    position: relative;
    width: 100%;
}
.custom-datepicker-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    height: 48px;
    padding: 0 16px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    width: 100%;
    text-align: left;
    box-sizing: border-box;
}
.custom-datepicker-trigger:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}
.custom-datepicker-trigger i {
    color: #a0a0ab;
}
.custom-datepicker-calendar {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 290px;
    background: #141416;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(16px);
    padding: 16px;
    z-index: 1000;
    display: none;
    animation: custom-calendar-fade 0.2s ease;
}
.custom-datepicker-wrapper.active .custom-datepicker-calendar {
    display: block;
}
@keyframes custom-calendar-fade {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.custom-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.custom-cal-month-year {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}
.custom-cal-btn {
    background: transparent;
    border: none;
    color: #a0a0ab;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}
.custom-cal-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.custom-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.72rem;
    color: #6e6e73;
    font-weight: 700;
    margin-bottom: 6px;
    text-transform: uppercase;
}
.custom-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    row-gap: 4px;
}
.custom-cal-day {
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.85rem;
    color: #a0a0ab;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 500;
}
.custom-cal-day:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.custom-cal-day.active-selected {
    background: #ffd700;
    color: #111;
    font-weight: 700;
}
.custom-cal-day.disabled {
    color: #3a3a3c;
    cursor: not-allowed;
}
.custom-cal-day.empty {
    cursor: default;
}

/* 옵션 영역 내부의 커스텀 UI 정렬 및 너비 보정 */
.opt-content .custom-select,
.opt-content .custom-datepicker-wrapper {
    width: 100%;
    max-width: 320px;
}

/* 커스텀 달력 상단 우측 X 닫기 버튼 */
.custom-cal-close-btn {
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6e6e73;
    font-size: 1.35rem;
    cursor: pointer;
    padding: 2px 6px;
    transition: color 0.2s;
    line-height: 1;
}
.custom-cal-close-btn:hover {
    color: #fff;
}