/* ═══════════════════════════════════════════
   HR Events — Shared Stylesheet
   Purple theme: rgb(184,137,253) → rgb(130,80,215)
   ═══════════════════════════════════════════ */

/* ── Base ── */
body { padding-top: 0; background: #f5f3ff; }
.container { background: transparent !important; }

/* ── Split Layout ── */
.split-layout {
    display: flex;
    min-height: calc(100vh - 60px);
}

/* ── Left Panel ── */
.left-panel {
    width: 360px;
    min-width: 360px;
    background:
        linear-gradient(160deg, rgba(184,137,253,0.7) 0%, rgba(100,50,185,0.8) 100%),
        url('../../allScript/img/happy.jpg') center/cover no-repeat;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 36px;
}
.left-panel::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    pointer-events: none;
}
.left-panel::after {
    content: '';
    position: absolute;
    bottom: -40px; left: -40px;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    pointer-events: none;
}
.lp-badge {
    display: inline-flex; align-items: center; gap: 7px;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    border-radius: 50px;
    padding: 5px 14px;
    font-size: 0.78rem;
    margin-bottom: 22px;
    width: fit-content;
    position: relative; z-index: 1;
}
.lp-title {
    font-size: 2.4rem; font-weight: 700;
    color: #fff; line-height: 1.2;
    margin-bottom: 14px;
    position: relative; z-index: 1;
}
.lp-title span {
    display: block;
    color: #ffe082;
}
.lp-title-sm {
    font-size: 1.5rem; font-weight: 700;
    color: #fff; line-height: 1.3;
    margin-bottom: 10px;
    position: relative; z-index: 1;
    display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3;
    -webkit-box-orient: vertical; overflow: hidden;
}
.lp-desc {
    color: rgba(255,255,255,0.82);
    font-size: 0.88rem; line-height: 1.75;
    margin-bottom: 30px;
    position: relative; z-index: 1;
}
.lp-stats {
    display: flex; align-items: center; gap: 0;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 28px;
    position: relative; z-index: 1;
}
.lp-stat { flex: 1; text-align: center; }
.lp-stat-num {
    display: block;
    font-size: 1.9rem; font-weight: 700; color: #fff; line-height: 1;
    margin-bottom: 4px;
}
.lp-stat-label {
    font-size: 0.73rem; color: rgba(255,255,255,0.65);
    letter-spacing: .4px; text-transform: uppercase;
}
.lp-stat-div {
    width: 1px; height: 40px;
    background: rgba(255,255,255,0.25);
    margin: 0 4px;
}
.lp-info-list {
    list-style: none; padding: 0; margin: 0 0 24px;
    position: relative; z-index: 1;
}
.lp-info-list li {
    display: flex; align-items: flex-start; gap: 10px;
    color: rgba(255,255,255,0.85);
    font-size: 0.83rem; line-height: 1.6;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.10);
}
.lp-info-list li:last-child { border-bottom: none; }
.lp-info-list li i { color: #ffe082; width: 16px; flex-shrink: 0; margin-top: 3px; }
.lp-info-list .lp-info-label {
    font-size: 0.73rem; color: rgba(255,255,255,0.55);
    text-transform: uppercase; letter-spacing: .4px;
    display: block; margin-bottom: 1px;
}

/* ── Buttons on left panel ── */
.btn-all-events {
    display: inline-flex; align-items: center; gap: 8px;
    background: #fff;
    color: rgb(130,80,215) !important;
    border: none; border-radius: 50px;
    padding: 11px 24px; font-size: 0.88rem; font-weight: 700;
    text-decoration: none; cursor: pointer;
    transition: opacity .2s, transform .2s;
    position: relative; z-index: 1;
    width: fit-content;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.btn-all-events:hover { opacity: 0.92; transform: translateY(-2px); color: rgb(130,80,215) !important; }

.btn-back {
    display: inline-flex; align-items: center; gap: 7px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.28);
    color: #fff !important;
    border-radius: 50px;
    padding: 8px 18px; font-size: 0.82rem; font-weight: 600;
    text-decoration: none; cursor: pointer;
    transition: background .2s;
    position: relative; z-index: 1;
    width: fit-content;
    margin-bottom: 20px;
}
.btn-back:hover { background: rgba(255,255,255,0.25); color: #fff !important; }

/* ── Right Panel ── */
.right-panel {
    flex: 1;
    padding: 40px 48px;
    overflow-y: auto;
}
.rp-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px;
}
.rp-header h2 {
    font-size: 1.1rem; font-weight: 600; color: #4c1d95;
    border-left: 3px solid rgb(157,110,235);
    padding-left: 12px; margin: 0;
}
.rp-header .rp-count {
    font-size: 0.8rem; color: #78716c;
    background: #ede9fe;
    border-radius: 50px; padding: 4px 12px;
}

/* ── Cards Grid ── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 8px;
    padding: 0 4.5%;
}
@media (max-width: 1200px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Event Cards (Vertical) ── */
.hcard {
    background: #fff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #ede9fe;
    box-shadow: 0 1px 6px rgba(124,58,237,0.04);
    transition: transform .28s, box-shadow .28s;
}
.hcard:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(124,58,237,0.12);
}
.hcard-img {
    width: 100%;
    height: 130px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.hcard-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .4s;
}
.hcard:hover .hcard-img img { transform: scale(1.05); }
.hcard-img .hstatus {
    position: absolute; top: 10px; left: 10px;
    border-radius: 50px; padding: 3px 10px;
    font-size: 0.68rem; font-weight: 600;
}
.status-open   { background: #dcfce7; color: #166534; }
.status-closed { background: #fee2e2; color: #991b1b; }
.hcard-body {
    padding: 12px 14px;
    display: flex; flex-direction: column;
    flex: 1;
    min-width: 0;
}
.hcard-meta {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
    font-size: 0.71rem; color: #78716c;
    margin-bottom: 5px;
}
.hcard-meta i { color: rgb(157,110,235); }
.hcard-title {
    font-size: 0.84rem; font-weight: 600; color: #1e1b4b;
    line-height: 1.45; margin-bottom: 10px; flex: 1;
    text-decoration: none; display: -webkit-box;
    -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hcard-title:hover { color: rgb(130,80,215); }
.hcard-footer {
    display: flex; align-items: center; justify-content: space-between;
    gap: 6px; border-top: 1px solid #f5f3ff; padding-top: 8px; margin-top: auto;
}
.hcard-attendees {
    font-size: 0.71rem; color: #78716c;
    display: flex; align-items: center; gap: 4px;
    background: #f5f3ff; border-radius: 50px; padding: 3px 8px;
}
.hcard-attendees i { color: rgb(157,110,235); }

/* ── Buttons ── */
.btn-register {
    display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, rgb(184, 137, 253) 0%, #ffc107 100%);
    color: #fff !important;
    border: none; border-radius: 50px; padding: 5px 12px;
    font-size: 0.72rem; font-weight: 600;
    text-decoration: none;
    transition: opacity .2s, transform .2s;
    cursor: pointer;
}
.btn-register:hover { opacity: 0.88; transform: scale(1.03); color: #fff !important; }
.btn-detail {
    display: inline-flex; align-items: center; gap: 6px;
    background: transparent;
    color: rgb(130,80,215) !important;
    border: 1.5px solid rgb(184,137,253); border-radius: 50px; padding: 5px 14px;
    font-size: 0.76rem; font-weight: 600;
    text-decoration: none;
    transition: background .2s, color .2s;
}
.btn-detail:hover { background: rgb(184,137,253); color: #fff !important; }
.btn-purple {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, rgb(184,137,253) 0%, rgb(130,80,215) 100%);
    color: #fff !important;
    border: none; border-radius: 50px;
    padding: 10px 26px; font-size: 0.88rem; font-weight: 600;
    text-decoration: none; cursor: pointer;
    transition: opacity .2s, transform .2s;
    box-shadow: 0 4px 14px rgba(130,80,215,0.25);
}
.btn-purple:hover { opacity: 0.9; transform: translateY(-2px); color: #fff !important; }

/* ── Detail Card (project page) ── */
.detail-section {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #ede9fe;
    margin-bottom: 18px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(124,58,237,0.04);
}
.detail-section-header {
    background: #f5f3ff;
    border-bottom: 1px solid #ede9fe;
    padding: 12px 20px;
    display: flex; align-items: center; gap: 8px;
    font-size: 0.78rem; font-weight: 700; color: #7c3aed;
    text-transform: uppercase; letter-spacing: .5px;
}
.detail-section-header i { font-size: 0.82rem; }
.detail-table {
    width: 100%; border-collapse: collapse;
}
.detail-table tr { border-bottom: 1px solid #f5f3ff; }
.detail-table tr:last-child { border-bottom: none; }
.detail-table th {
    padding: 11px 20px;
    font-size: 0.78rem; font-weight: 600; color: #6b7280;
    background: transparent; width: 38%;
    text-align: left; vertical-align: top;
}
.detail-table td {
    padding: 11px 20px;
    font-size: 0.85rem; color: #1e1b4b;
    vertical-align: top;
}

/* ── Attendee / Project Tables ── */
#register.table,
#table.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    font-size: 0.82rem;
    color: #1e1b4b;
}
/* remove outside border from table-bordered */
#register.table-bordered,
#register.table-bordered td,
#register.table-bordered th,
#table.table-bordered,
#table.table-bordered td,
#table.table-bordered th {
    border: none !important;
}
/* row bottom divider only */
#register tbody tr td,
#table tbody tr td {
    border-bottom: 1px solid #f3f0ff !important;
    padding: 10px 14px;
    vertical-align: middle;
}
/* header */
#register thead th,
#table thead th {
    background: linear-gradient(90deg, #ede9fe, #f5f3ff) !important;
    color: #241e2c !important;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    padding: 10px 14px;
    border-bottom: 2px solid #ddd6fe !important;
}
/* zebra subtle */
#register tbody tr:nth-child(even) td,
#table tbody tr:nth-child(even) td { background: #faf9fc; }
#register tbody tr:hover td,
#table tbody tr:hover td {
    background: #f3f0ff !important;
    transition: background .15s;
}

/* ── DataTables UI overrides ── */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #ddd6fe !important;
    border-radius: 8px !important;
    padding: 4px 10px !important;
    font-size: 0.8rem;
    outline: none;
    color: #1e1b4b;
}
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: rgb(157,110,235) !important;
    box-shadow: 0 0 0 3px rgba(157,110,235,0.12);
}
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    font-size: 0.78rem;
    color: #78716c;
    margin-top: 10px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: linear-gradient(135deg, rgb(184,137,253), rgb(130,80,215)) !important;
    border: none !important;
    color: #fff !important;
    border-radius: 6px !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #f3f0ff !important;
    border: 1px solid #ddd6fe !important;
    color: #5b21b6 !important;
    border-radius: 6px !important;
}

/* ── Footer ── */
.site-footer {
    background: #fff;
    border-top: 1px solid #ede9fe;
    padding: 14px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.site-footer .footer-copy {
    font-size: 0.78rem;
    color: #78716c;
}
.site-footer .footer-copy span {
    color: rgb(157,110,235);
    font-weight: 600;
}
.btn-login {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, rgb(184,137,253) 0%, rgb(130,80,215) 100%);
    color: #fff !important;
    border: none; border-radius: 50px;
    padding: 9px 22px; font-size: 0.84rem; font-weight: 600;
    text-decoration: none; cursor: pointer;
    transition: opacity .2s, transform .2s;
    box-shadow: 0 4px 14px rgba(130,80,215,0.25);
}
.btn-login:hover { opacity: 0.9; transform: translateY(-2px); color: #fff !important; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .split-layout { flex-direction: column; }
    .left-panel {
        width: 100%; min-width: unset;
        height: auto; position: static;
        padding: 36px 24px;
    }
    .right-panel { padding: 24px 16px; }
    .cards-grid { grid-template-columns: 1fr; }
}
@media (max-width: 576px) {
    .cards-grid { grid-template-columns: 1fr; }
    .hcard-img { height: 160px; }
}
