/* ================= PAGE ================= */
.main{
    padding:25px;
    background:#f4f6f9;
    min-height:100vh;
    margin-top:60px;
}

/* ================= HEADER ================= */
.pageHead{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
}

.pageHead h2{
    margin:0;
    font-size:20px;
    font-weight:600;
    color:#111827;
}

.sub{
    font-size:13px;
    color:#6b7280;
}

/* ================= CREATE BUTTON ================= */
.createBtn{
    background:linear-gradient(135deg,#7c3aed,#5b2c83);
    color:#fff;
    border:none;
    padding:10px 16px;
    border-radius:10px;
    font-size:13px;
    font-weight:600;
    cursor:pointer;
    box-shadow:0 6px 15px rgba(124,58,237,0.3);
    transition:0.25s;
}

.createBtn:hover{
    transform:translateY(-2px);
}

/* ================= GRID ================= */
.eventGrid{
    display:grid;
    grid-template-columns:repeat(4, minmax(0,1fr));
    gap:20px;
}

/* ================= CARD ================= */
.eventCard{
    background:#ffffff;
    border-radius:16px;
    padding:20px;
    border:1px solid #e5e7eb;
    box-shadow:0 10px 25px rgba(0,0,0,0.05);
    transition:0.25s;
    position:relative;
    display:flex;
    flex-direction:column;
}

.eventCard:hover{
    transform:translateY(-4px);
    box-shadow:0 15px 35px rgba(0,0,0,0.08);
}

.cardTop h4{
    font-size:14px;
    font-weight:600;
    margin:0;
    line-height:1.3;
    min-height:38px;

    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

/* ================= THUMB ================= */
.eventThumbWrap{
    width:100%;
    height:140px;
    border-radius:12px;
    overflow:hidden;
    margin-bottom:12px;
    cursor:pointer;
    background:#f3f4f6;
    position:relative;
}

.eventThumb{
    width:100%;
    height:100%;
    object-fit:cover;
    transition:transform 0.25s ease;
}

.eventThumbWrap:hover .eventThumb{
    transform:scale(1.08);
}

.eventThumbWrap.noImage{
    display:flex;
    align-items:center;
    justify-content:center;
    color:#9ca3af;
    font-size:13px;
}

/* ================= TITLE ================= */
.titleRow{
    display:flex;
    justify-content:space-between;
    align-items:center;
    font-size:16px;
    font-weight:600;
    margin-bottom:auto;
}

/* ================= BADGE ================= */
.badge{
    font-size:12px;
    padding:4px 10px;
    border-radius:999px;
    background:#fde7dc;
    color:#ea580c;
    font-weight:600;
}

/* ================= INFO ================= */
.infoContainer{
    margin-top:10px;
    flex:1;
    display:flex;
    flex-direction:column;
}

.infoRow{
    display:flex;
    align-items:flex-start;
    gap:8px;
    font-size:13px;
    color:#374151;
    margin:8px 0;
    line-height:1.4;
}

/* ICON */
.icon{
    width:28px;
    height:28px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:8px;
    font-size:13px;
    flex-shrink:0;
    box-shadow:0 2px 6px rgba(0,0,0,0.06);
}

/* COLORS */
.calendar{ background:#eef2ff; color:#6366f1; }
.location{ background:#ecfdf5; color:#10b981; }
.linkIcon{ background:#fef3c7; color:#f59e0b; }
.users{ background:#f0f9ff; color:#0284c7; }
.money{ background:#f5f3ff; color:#7c3aed; }

/* ================= BUTTONS ================= */
.btnRow{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:10px;
    margin-top:auto;
}

.btn{
    height:36px;
    min-width:36px;
    padding:0 14px;
    border:none;
    border-radius:10px;
    font-size:13px;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    transition:0.2s;
}

/* ICON BUTTON */
.pillBtn{
    background:#ffffff;
    border:1px solid #e5e7eb;
    box-shadow:0 2px 6px rgba(0,0,0,0.06);
}

.pillBtn:hover{
    background:#fafafa;
    box-shadow:0 6px 14px rgba(0,0,0,0.10);
    transform:translateY(-1px);
}

/* DELETE */
.deleteBtn{
    background:#ffe5e5;
    color:#d60000;
    border:1px solid #ffcccc;
}

.deleteBtn:hover{
    background:#ffd6d6;
}

/* ================= IMAGE MODAL ================= */
.imageModal{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.75);
    z-index:9999;
    justify-content:center;
    align-items:center;
    backdrop-filter:blur(5px);
}

.imageModal.show{
    display:flex;
}

.imageModalBox{
    position:relative;
    max-width:90%;
    max-height:90%;
}

.imageModalBox img{
    width:100%;
    max-height:85vh;
    border-radius:12px;
    object-fit:contain;
}

.imageClose{
    position:absolute;
    top:-12px;
    right:-12px;
    width:36px;
    height:36px;
    border-radius:50%;
    background:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:20px;
    cursor:pointer;
    box-shadow:0 5px 15px rgba(0,0,0,0.2);
    transition:0.2s;
    z-index:10;
}

.imageClose:hover{
    transform:scale(1.1);
    background:#7c3aed;
    color:#fff;
}

/* ================= MODALS ================= */
.messageBox{
    width:600px;
    max-width:95%;
}

.msgHistory{
    max-height:350px;
    overflow:auto;
    padding:15px;
    background:#f8fafc;
    border-radius:12px;
    margin-bottom:15px;
}

/* ================= FIX: INPUT ================= */
#msgText{
    width:100%;
    height:100px;
    padding:12px;
    border-radius:10px;
    resize:none;
}

/* ================= RESPONSIVE ================= */
@media (max-width:600px){
    .eventGrid{
        grid-template-columns:1fr;
    }
}

/* ================= IMPORTANT FIX: MODAL + TOAST Z-INDEX ================= */

/* MODAL BACKDROP */
.modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.6);
    z-index:1000;
}

/* MODAL BOX */
.modalBox{
    position:relative;
    z-index:1001;
}

/* TOAST / NOTIFICATION (FIX FOR YOUR ISSUE) */
.toast,
.notification,
#toast,
#notification{
    position:fixed;
    top:20px;
    right:20px;
    z-index:99999 !important;
}