/* ================================================================
   ORGANIZER PAGES STYLESHEET (v4.2 - Final Alignment Fix)
   ================================================================ */

/* ----- Layout & Sidebar ----- */
.organizer-layout { display: grid; grid-template-columns: 280px 1fr; gap: 2.5rem; padding: 2rem 0; align-items: flex-start; }
.organizer-sidebar { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 2rem; }
.sidebar-nav ul { list-style: none; display: flex; flex-direction: column; }
.sidebar-nav a { display: flex; align-items: center; gap: 1rem; padding: 1rem; border-radius: 8px; color: var(--text-muted); font-weight: 500; transition: background-color 0.2s, color 0.2s; }
.sidebar-nav a:hover { background-color: var(--card-bg); color: var(--text-light); }
.sidebar-nav a.active { background-color: var(--primary-purple); color: var(--text-light); }
.organizer-main-content { background-color: var(--card-bg); padding: 2.5rem; border-radius: 16px; border: 1px solid var(--border-color); }
.organizer-title { font-size: 2rem; margin-bottom: 0.5rem; }
.organizer-subtitle { color: var(--text-muted); margin-bottom: 2.5rem; max-width: 600px; }

/* ----- Type Selection & Success Notification ----- */
.organizer-type-selection { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.type-card { border: 1px solid var(--border-color); border-radius: 12px; padding: 2rem; text-align: center; cursor: pointer; transition: all 0.3s ease; }
.type-card:hover { border-color: var(--primary-purple); transform: translateY(-5px); box-shadow: 0 8px 25px rgba(143, 0, 255, 0.2); }
.type-card i { font-size: 2.5rem; color: var(--primary-purple); margin-bottom: 1.5rem; }
.success-notification-card { background-color: #111; border: 1px solid var(--border-color); box-shadow: 0 10px 40px rgba(0,0,0,0.4); border-radius: 16px; padding: 3rem; text-align: center; max-width: 600px; margin: 4rem auto; position: relative; }
.success-notification-card h1 { font-size: 1.8rem; }
.success-notification-card .close-modal { position: absolute; top: 1rem; right: 1.5rem; font-size: 2rem; background: none; border: none; color: var(--text-muted); cursor: pointer; }

/* OTP Step Centering */
#step-3 .organizer-title, #step-3 .organizer-subtitle { text-align: center; }
#step-3 .form-group { max-width: 400px; margin-left: auto; margin-right: auto; }
#step-3 .step-nav { justify-content: center; }

/* ----- Stepper ----- */
.organizer-stepper { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 3rem; overflow-x: auto; padding-bottom: 1rem; }
.step-item { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; color: var(--text-muted); transition: color 0.3s; flex-shrink: 0; position: relative; min-width: 80px; }
.step-item.navigable { cursor: pointer; }
.step-item span { display: flex; justify-content: center; align-items: center; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--border-color); background-color: var(--dark-bg); font-weight: 600; transition: all 0.3s; }
.step-item p { font-size: 0.85rem; font-weight: 500; margin: 0; text-align: center; }
.step-item.completed span { border-color: var(--primary-purple); color: var(--primary-purple); }
.step-item.active span { background-color: var(--primary-purple); border-color: var(--primary-purple); color: var(--text-light); }
.step-item.active p, .step-item.completed p { color: var(--text-light); }
.step-line { flex-grow: 1; height: 2px; background-color: var(--border-color); margin: 16px -10px; }

/* ----- General Form Styles ----- */
.main-event-form h2 { font-size: 1.5rem; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-color); }
.form-grid, .form-grid-organizer, .form-grid-pro { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 2rem; align-items: start; }
.form-group { margin-bottom: 1rem; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label { display: block; margin-bottom: 0.75rem; color: var(--text-muted); font-weight: 500; }
.form-group input, .form-group select, .form-group textarea, .form-control-file { width: 100%; padding: 0.85rem 1rem; background: var(--input-bg); border: 1px solid var(--border-color); border-radius: 8px; color: var(--text-light); font-size: 1rem; font-family: 'Inter', sans-serif; transition: all 0.2s ease; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary-purple); box-shadow: 0 0 0 3px rgba(143, 0, 255, 0.2); }
.rich-text-editor { min-height: 150px; }
.radio-toggle.inline { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; background-color: transparent; padding: 0; }
.radio-toggle.inline label { display: flex; align-items: center; gap: 0.75rem; background: var(--input-bg); padding: 0.75rem 1.25rem; border-radius: 8px; border: 1px solid var(--border-color); cursor: pointer; }
.radio-toggle.inline input { display: none; }
.radio-toggle.inline input:checked + span { color: var(--primary-purple); font-weight: 600; }
.radio-toggle.inline label:has(input:checked) { border-color: var(--primary-purple); }

/* ----- Upload Dropzone ----- */
.upload-dropzone { border: 2px dashed var(--border-color); border-radius: 12px; padding: 2rem; text-align: center; cursor: pointer; transition: all 0.2s ease; background-color: var(--input-bg); }
.upload-dropzone:hover { border-color: var(--primary-purple); background-color: var(--card-bg); }
.upload-dropzone i { font-size: 2rem; color: var(--text-muted); margin-bottom: 1rem; }
.upload-dropzone p { color: var(--text-muted); margin: 0; }
.upload-dropzone.small { padding: 0; min-height: 52px; display: flex; justify-content: center; align-items: center; }
.file-upload-wrapper { display: block; }
.file-upload-wrapper input[type="file"] { display: none; }

/* ----- Ticket Config & Gift Section ----- */
.ticket-type-card { background: var(--dark-bg); padding: 1.5rem; border-radius: 12px; margin-bottom: 1.5rem; border: 1px solid var(--border-color); }
.gift-section { background-color: rgba(255, 255, 255, 0.03); padding: 1.5rem; border-radius: 8px; margin-top: 1.5rem; }
.gift-config { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-color); }
.gift-rate-item { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.gift-rate-item .form-group { flex-grow: 1; margin: 0; }
.tag-select-container { position: relative; }
.tag-container { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.5rem; background-color: var(--input-bg); border: 1px solid var(--border-color); border-radius: 8px; margin-bottom: 0.5rem; min-height: 48px; }
.tag { display: flex; align-items: center; gap: 0.5rem; background-color: var(--primary-purple); color: white; padding: 0.25rem 0.75rem; border-radius: 6px; font-size: 0.9rem; }

/* ----- Settings & Advanced ----- */
.setting-section { padding-top: 1.5rem; margin-top: 1.5rem; border-top: 1px solid var(--border-color); }
.setting-section:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.setting-section h4 { font-size: 1.1rem; margin-bottom: 1rem; color: var(--text-light); }
.checkbox-group { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; }
.checkbox-group input { width: 18px; height: 18px; accent-color: var(--primary-purple); }
.tooltip-trigger { cursor: pointer; color: var(--secondary-blue); }
.tooltip { position: absolute; background-color: #333; color: #fff; padding: 0.5rem 1rem; border-radius: 6px; font-size: 0.9rem; z-index: 100; max-width: 250px; }
.dynamic-row { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.dynamic-row .form-group { margin-bottom: 0; flex-grow: 1; }
.approval-method-content { margin-top: 1.5rem; }

/* ----- Nav buttons & Others ----- */
.step-nav { display: flex; justify-content: center; gap: 1rem; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--border-color); }
.step-nav.main-nav { justify-content: flex-end; }
.btn.btn-outline { background: transparent; border: 1px solid var(--border-color); color: var(--text-muted); }
.btn.btn-outline:hover { background: var(--btn-secondary-bg); color: var(--text-light); }
.organizer-display { display: flex; align-items: center; gap: 1rem; background: var(--input-bg); padding: 1rem; border-radius: 8px; margin: 1.5rem 0; }
.organizer-display img { width: 50px; height: 50px; border-radius: 50%; }

/* ================================================================
   STYLES FOR MANAGE EVENTS PAGE
   ================================================================ */
.page-subheader { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 1rem; }
.page-subheader .organizer-title { margin-bottom: 0; flex-grow: 1; }
.page-subheader .header-actions { display: flex; gap: 10px; }
.btn-back { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; margin-right: 1rem; padding: 0.5rem; }
.tabs { display: flex; gap: 10px; border-bottom: 1px solid var(--border-color); margin-bottom: 20px; }
.tab-btn { padding: 10px 20px; background: none; border: none; color: var(--text-muted); font-size: 1rem; cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.2s ease; }
.tab-btn.active { color: var(--primary-purple); border-bottom-color: var(--primary-purple); font-weight: 600; }
.card { background: rgba(0,0,0,0.2); padding: 20px; border-radius: 12px; margin-bottom: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.dashboard-cards .card { text-align: center; }
.dashboard-cards .card h4 { font-size: 14px; color: var(--text-muted); margin-bottom: 10px; }
.dashboard-cards .card p { font-size: 28px; font-weight: 700; margin: 0; }
.event-item-card { background: rgba(0,0,0,0.2); padding: 20px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; cursor: pointer; border: 1px solid transparent; transition: background-color 0.2s, border-color 0.2s; }
.event-item-card:hover { background-color: var(--card-bg); border-color: var(--primary-purple); }
.event-item-card h4 { margin: 0; }
.event-item-card p { margin: 5px 0 0; font-size: 14px; color: var(--text-muted); }
.status-chip { padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.status-chip.success { background-color: rgba(0, 204, 102, 0.2); color: var(--green); }
.status-chip.error { background-color: rgba(255, 45, 149, 0.2); color: var(--pink); }
.status-chip.upcoming { background-color: rgba(59, 130, 246, 0.2); color: var(--secondary-blue); }
.status-chip.past { background-color: rgba(209, 213, 219, 0.2); color: var(--text-muted); }
.status-chip.pending { background-color: rgba(255, 215, 0, 0.2); color: var(--gold); }
.status-chip.draft { background-color: rgba(107, 114, 128, 0.2); color: var(--text-muted); }
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 15px; text-align: left; }
thead { border-bottom: 1px solid var(--border-color); }
tbody tr { border-bottom: 1px solid rgba(255,255,255,0.05); }
tbody tr:last-child { border-bottom: none; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.toolbar input { max-width: 300px; }
.chart-container { height: 250px; }
.bar-chart { display: flex; height: 100%; align-items: flex-end; justify-content: space-around; gap: 15px; }
.bar { width: 50px; background-color: var(--primary-purple); border-radius: 4px 4px 0 0; position: relative; text-align: center; }
.bar label { position: absolute; bottom: -25px; width: 100%; font-size: 12px; }

/* ----- Responsive ----- */
@media (max-width: 1024px) { .organizer-layout { grid-template-columns: 1fr; } .organizer-sidebar { position: static; flex-direction: row; overflow-x: auto; } .sidebar-nav ul { flex-direction: row; } }
@media (max-width: 767px) { .form-grid, .form-grid-organizer, .form-grid-pro, .organizer-type-selection { grid-template-columns: 1fr; } }
/* ================================================================
   ORGANIZER PAGES STYLESHEET (v4.2 - Final Alignment Fix)
   ================================================================ */

/* ----- Layout & Sidebar ----- */
.organizer-layout { display: grid; grid-template-columns: 280px 1fr; gap: 2.5rem; padding: 2rem 0; align-items: flex-start; }
.organizer-sidebar { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 2rem; }
.sidebar-nav ul { list-style: none; display: flex; flex-direction: column; }
.sidebar-nav a { display: flex; align-items: center; gap: 1rem; padding: 1rem; border-radius: 8px; color: var(--text-muted); font-weight: 500; transition: background-color 0.2s, color 0.2s; }
.sidebar-nav a:hover { background-color: var(--card-bg); color: var(--text-light); }
.sidebar-nav a.active { background-color: var(--primary-purple); color: var(--text-light); }
.organizer-main-content { background-color: var(--card-bg); padding: 2.5rem; border-radius: 16px; border: 1px solid var(--border-color); }
.organizer-title { font-size: 2rem; margin-bottom: 0.5rem; }
.organizer-subtitle { color: var(--text-muted); margin-bottom: 2.5rem; max-width: 600px; }

/* ... Các style cho luồng tạo sự kiện và quản lý sự kiện đã có ở đây ... */
/* ... (Phần này không thay đổi so với phiên bản trước) ... */

/* ================================================================
   NEW STYLES FOR MANAGE GIFTS PAGE
   ================================================================ */
.organizer-main-content .form-group span {
    color: var(--pink);
}
.organizer-main-content td.description-cell {
    white-space: normal;
    min-width: 200px;
}
.type-chip {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}
.type-chip.type-digital { background-color: rgba(59, 130, 246, 0.2); color: var(--secondary-blue); }
.type-chip.type-physical { background-color: rgba(255, 215, 0, 0.2); color: var(--gold); }
.type-chip.type-experience { background-color: rgba(0, 204, 102, 0.2); color: var(--green); }

.form-actions {
    text-align: right;
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.file-link-group {
    display: flex;
    align-items: center;
    gap: 15px;
}
.file-link-group input[type="url"] {
    flex-grow: 1;
}
.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: var(--input-bg);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}
.file-upload-label:hover {
    border-color: var(--primary-purple);
    color: var(--primary-purple);
}
.file-input-hidden {
    display: none;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    margin: 0 5px;
    padding: 5px;
}
.action-btn:hover {
    color: var(--primary-purple);
}
/* ================================================================
   ORGANIZER PAGES STYLESHEET (v4.2 - Final Alignment Fix)
   ================================================================ */

/* ... (toàn bộ các style đã có ở các bước trước) ... */

/* ================================================================
   NEW STYLES FOR REPORTS PAGE
   ================================================================ */

.report-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.report-filters .filter-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.report-filters label {
    font-weight: 500;
    color: var(--text-muted);
}
.report-filters input[type="date"],
.report-filters select {
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    padding: 0.5rem 1rem;
}

.report-export {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}
/* ================================================================
   ORGANIZER PAGES STYLESHEET (v4.2 - Final Alignment Fix)
   ================================================================ */

/* ... (toàn bộ các style đã có ở các bước trước) ... */

/* ================================================================
   NEW STYLES FOR TERMS PAGE
   ================================================================ */

.terms-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 700px;
    margin: 2rem auto 0 auto;
}

.term-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.term-item:hover {
    border-color: var(--primary-purple);
    background-color: var(--card-bg);
    transform: translateY(-2px);
}

.term-item i {
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.term-item:hover i {
    transform: translateX(5px);
}

.detail-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

#detail-title {
    margin: 0;
}

.detail-content {
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    line-height: 1.7;
    color: var(--text-muted);
}

.detail-content h3, .detail-content h4 {
    color: var(--text-light);
    margin-top: 1.5rem;
}

.detail-content ul {
    padding-left: 20px;
}

.detail-content li {
    margin-bottom: 10px;
}
/* ================================================================
   ORGANIZER PAGES STYLESHEET (v4.2 - Final Alignment Fix)
   ================================================================ */

/* ... (toàn bộ các style đã có ở các bước trước) ... */

/* ================================================================
   STYLES FOR TERMS PAGE (v2 - Standalone Layout)
   ================================================================ */

/* UPDATED: Styles for the standalone page layout */
.standalone-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
}

.standalone-back-link {
    position: absolute;
    top: 40px;
    left: 40px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}
.standalone-back-link:hover {
    color: var(--text-light);
}

.terms-standalone-container {
    width: 100%;
    max-width: 800px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
}
/* END UPDATED STYLES */

.terms-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 2rem;
}

.term-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.term-item:hover {
    border-color: var(--primary-purple);
    background-color: var(--card-bg);
    transform: translateY(-2px);
}

.term-item i {
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.term-item:hover i {
    transform: translateX(5px);
}

.detail-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

#detail-title {
    margin: 0;
}

.detail-content {
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    line-height: 1.7;
    color: var(--text-muted);
}

.detail-content h3, .detail-content h4 {
    color: var(--text-light);
    margin-top: 1.5rem;
}

.detail-content ul {
    padding-left: 20px;
}

.detail-content li {
    margin-bottom: 10px;
}