/* ========================================
   ADMIN DASHBOARD PREMIUM
   ABDHOUL EVENT
======================================== */

:root{
    --primary:#C8A45D;
    --primary-dark:#a67c3d;

    --dark:#0F172A;
    --dark-card:#111827;
    --dark-light:#1F2937;

    --white:#FFFFFF;
    --gray:#94A3B8;
    --border:#273449;

    --success:#22C55E;
    --danger:#EF4444;

    --shadow:0 15px 40px rgba(0,0,0,.25);
    --radius:16px;
}

/* ========================================
   RESET
======================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:'Poppins',sans-serif;
    background:var(--dark);
    color:var(--white);
    min-height:100vh;
}

/* ========================================
   SCROLLBAR
======================================== */

::-webkit-scrollbar{
    width:10px;
}

::-webkit-scrollbar-track{
    background:#0b1220;
}

::-webkit-scrollbar-thumb{
    background:var(--primary);
    border-radius:10px;
}

/* ========================================
   HEADER
======================================== */

.admin-header{
    position:sticky;
    top:0;
    z-index:1000;

    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:20px 40px;

    background:rgba(15,23,42,.95);
    backdrop-filter:blur(15px);

    border-bottom:1px solid var(--border);
}

.header-left{
    display:flex;
    align-items:center;
    gap:15px;
}

.logo-admin{
    width:60px;
    height:60px;

    border-radius:50%;

    display:flex;
    align-items:center;
    justify-content:center;

    background:linear-gradient(
        135deg,
        var(--primary),
        #e4c27e
    );

    color:#000;
    font-size:1.5rem;
}

.admin-header h1{
    font-size:1.4rem;
    font-weight:700;
}

.admin-header p{
    font-size:.9rem;
    color:var(--gray);
}

.logout-btn{
    border:none;
    cursor:pointer;

    padding:12px 20px;

    border-radius:10px;

    background:var(--danger);
    color:white;

    font-weight:600;
    transition:.3s;
}

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

/* ========================================
   CONTAINER
======================================== */

.admin-container{
    max-width:1500px;
    margin:auto;
    padding:30px;
}

/* ========================================
   STATS
======================================== */

.stats-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:20px;

    margin-bottom:30px;
}

.stat-card{
    background:var(--dark-card);

    border:1px solid var(--border);

    border-radius:var(--radius);

    padding:25px;

    display:flex;
    align-items:center;
    gap:20px;

    box-shadow:var(--shadow);

    transition:.3s;
}

.stat-card:hover{
    transform:translateY(-6px);
}

.stat-card i{
    font-size:2rem;
    color:var(--primary);
}

.stat-card h3{
    font-size:.95rem;
    color:var(--gray);
    margin-bottom:5px;
}

.stat-card p{
    font-size:1.8rem;
    font-weight:700;
}

/* ========================================
   FORM GRID
======================================== */

.forms-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(350px,1fr));
    gap:25px;

    margin-bottom:25px;
}

/* ========================================
   CARD
======================================== */

.card{
    background:var(--dark-card);

    border:1px solid var(--border);

    border-radius:var(--radius);

    padding:25px;

    margin-bottom:25px;

    box-shadow:var(--shadow);
}

.card h2{
    display:flex;
    align-items:center;
    gap:10px;

    color:var(--primary);

    margin-bottom:20px;

    font-size:1.15rem;
}

/* ========================================
   INPUTS
======================================== */

input,
select,
textarea{
    width:100%;

    background:var(--dark-light);

    border:1px solid transparent;

    color:white;

    padding:14px;

    margin-bottom:15px;

    border-radius:10px;

    font-family:'Poppins',sans-serif;
    font-size:.95rem;

    transition:.3s;
}

input:focus,
select:focus,
textarea:focus{
    outline:none;
    border-color:var(--primary);
}

textarea{
    resize:none;
    min-height:120px;
}

/* ========================================
   FILE INPUT
======================================== */

input[type="file"]{
    cursor:pointer;
}

input[type="file"]::file-selector-button{

    border:none;

    padding:10px 15px;

    border-radius:8px;

    background:var(--primary);

    color:black;

    font-weight:600;

    cursor:pointer;

    margin-right:10px;
}

/* ========================================
   IMAGE PREVIEW
======================================== */

.preview-image{
    width:120px;
    height:120px;

    object-fit:cover;

    border-radius:15px;

    display:none;

    margin-bottom:15px;

    border:3px solid var(--primary);
}

/* ========================================
   BUTTONS
======================================== */

button{
    width:100%;

    border:none;

    padding:14px;

    border-radius:10px;

    background:var(--primary);

    color:black;

    font-weight:700;

    cursor:pointer;

    transition:.3s;
}

button:hover{
    background:var(--primary-dark);
    transform:translateY(-2px);
}

/* ========================================
   SECURITY
======================================== */

.security-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:15px;
}

.security-item{
    background:rgba(34,197,94,.1);

    border:1px solid rgba(34,197,94,.3);

    color:#86efac;

    padding:15px;

    border-radius:12px;

    font-weight:500;
}

/* ========================================
   RESULTS
======================================== */

#resultsContainer{
    display:flex;
    flex-direction:column;
    gap:20px;
}

.result-card{

    background:var(--dark-light);

    border-radius:12px;

    padding:20px;
}

.result-card h3{
    color:var(--primary);
    margin-bottom:15px;
}

.result-item{
    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:10px 0;

    border-bottom:1px solid rgba(255,255,255,.05);
}

/* ========================================
   TABLES
======================================== */

.table-responsive{
    overflow-x:auto;
}

table{
    width:100%;
    border-collapse:collapse;
    min-width:800px;
}

thead{
    background:var(--dark-light);
}

th{
    text-align:left;
    padding:15px;

    color:var(--primary);

    font-size:.9rem;

    font-weight:600;
}

td{
    padding:15px;
    border-bottom:1px solid rgba(255,255,255,.05);
}

tbody tr:hover{
    background:rgba(255,255,255,.02);
}

/* ========================================
   TABLE IMAGE
======================================== */

.table-image{
    width:55px;
    height:55px;

    border-radius:10px;

    object-fit:cover;
}

/* ========================================
   ACTION BUTTONS
======================================== */

.actions{
    display:flex;
    gap:8px;
}

.btn-edit{
    background:#3B82F6;
    color:white;
    width:auto;
    padding:8px 12px;
}

.btn-edit:hover{
    background:#2563EB;
}

.btn-delete{
    background:#EF4444;
    color:white;
    width:auto;
    padding:8px 12px;
}

.btn-delete:hover{
    background:#DC2626;
}

/* ========================================
   STATUS BADGES
======================================== */

.badge{
    display:inline-block;

    padding:6px 12px;

    border-radius:50px;

    font-size:.8rem;
    font-weight:600;
}

.badge-success{
    background:rgba(34,197,94,.15);
    color:#86efac;
}

.badge-danger{
    background:rgba(239,68,68,.15);
    color:#fca5a5;
}

/* =========================
   TOAST NOTIFICATION
========================= */

#toastContainer{
    position:fixed;
    top:20px;
    right:20px;
    z-index:99999;
    display:flex;
    flex-direction:column;
    gap:10px;
}

.toast{
    min-width:320px;
    padding:15px 20px;
    border-radius:12px;
    color:#fff;
    font-weight:500;
    animation:slideIn .4s ease;
    box-shadow:0 10px 25px rgba(0,0,0,.2);
}

.toast.success{
    background:#16a34a;
}

.toast.error{
    background:#dc2626;
}

.toast.warning{
    background:#f59e0b;
}

@keyframes slideIn{

    from{
        transform:translateX(100%);
        opacity:0;
    }

    to{
        transform:translateX(0);
        opacity:1;
    }
}

/* =========================
   MODAL CONFIRMATION
========================= */

.confirm-modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.5);
    display:none;
    justify-content:center;
    align-items:center;
    z-index:999999;
}

.confirm-box{
    background:#fff;
    width:420px;
    max-width:95%;
    border-radius:20px;
    padding:30px;
    text-align:center;
}

.confirm-icon{
    font-size:50px;
    color:#2563eb;
    margin-bottom:15px;
}

.confirm-box h3{
    margin-bottom:10px;
}

.confirm-box p{
    color:#666;
    margin-bottom:25px;
}

.confirm-actions{
    display:flex;
    gap:10px;
    justify-content:center;
}

.btn-cancel{
    border:none;
    background:#e5e7eb;
    padding:12px 20px;
    border-radius:10px;
    cursor:pointer;
}

.btn-confirm{
    border:none;
    background:#dc2626;
    color:white;
    padding:12px 20px;
    border-radius:10px;
    cursor:pointer;
}

/* ========================================
   RESPONSIVE
======================================== */

@media(max-width:1200px){

    .forms-grid{
        grid-template-columns:1fr;
    }

}

@media(max-width:992px){

    .admin-header{
        padding:20px;
    }

    .admin-container{
        padding:20px;
    }

}

@media(max-width:768px){

    .admin-header{
        flex-direction:column;
        gap:15px;
        text-align:center;
    }

    .header-left{
        flex-direction:column;
    }

    .stats-grid{
        grid-template-columns:1fr;
    }

    .security-grid{
        grid-template-columns:1fr;
    }

    .card{
        padding:20px;
    }

    table{
        min-width:700px;
    }

}

@media(max-width:576px){

    .admin-container{
        padding:15px;
    }

    .logo-admin{
        width:50px;
        height:50px;
        font-size:1.2rem;
    }

    .admin-header h1{
        font-size:1.1rem;
    }

    .stat-card{
        flex-direction:column;
        text-align:center;
    }

    .stat-card p{
        font-size:1.5rem;
    }

    .card h2{
        font-size:1rem;
    }

    input,
    select,
    textarea,
    button{
        font-size:.9rem;
    }

}

/* WordPress integration additions — visual system remains the original dark/gold admin design. */
.ae-login-shell{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:28px;background:var(--dark,#0F172A);color:var(--white,#fff);font-family:'Poppins',sans-serif}
.ae-login-box{width:min(520px,100%);padding:36px;background:var(--dark-card,#111827);border:1px solid var(--border,#273449);border-radius:var(--radius,16px);box-shadow:var(--shadow,0 15px 40px rgba(0,0,0,.25));text-align:center}
.ae-login-box h1{color:#fff;margin:18px 0 10px}.ae-login-box>p{color:var(--gray,#94A3B8);margin-bottom:20px}
.ae-login-box #ae-loginform{text-align:left;margin-top:24px}.ae-login-box #ae-loginform label{display:block;color:#e5e7eb;margin:12px 0 6px}
.ae-login-box #ae-loginform input[type=text],.ae-login-box #ae-loginform input[type=password]{width:100%;padding:13px;border:1px solid #273449;border-radius:9px;background:#0b1220;color:#fff}
.ae-login-box #ae-loginform .login-remember label{display:flex;align-items:center;gap:8px;font-size:.9rem}
.ae-login-box #ae-loginform .button-primary{display:block;width:100%;padding:10px 16px;background:var(--primary,#C8A45D);border:0;border-radius:9px;color:#111827;font-weight:700;cursor:pointer}
.ae-login-back a{color:var(--primary,#C8A45D)}
.ae-open-site,.ae-portal-toolbar a{display:inline-flex;align-items:center;gap:8px;color:var(--primary,#C8A45D);text-decoration:none;font-weight:600;margin-right:16px}
.ae-portal-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;color:#e5e7eb;margin:0 0 22px}
.ae-portal-toolbar p{margin:0}.ae-portal-toolbar div{display:flex;gap:16px;flex-wrap:wrap}
.ae-portal-notice{margin:0 0 20px;padding:15px 18px;border-radius:10px;color:#fff}.ae-portal-notice.success{background:#14532d;border:1px solid #22c55e}.ae-portal-notice.error{background:#7f1d1d;border:1px solid #ef4444}
.ae-admin-thumb{width:52px;height:52px;object-fit:cover;border-radius:8px;display:block}
.ae-inline-form{display:inline-block;margin:0}.ae-inline-form .delete-btn{border:0;padding:9px 12px;border-radius:8px;background:#ef4444;color:white;cursor:pointer;font-family:inherit;font-weight:600}
.ae-inline-form .delete-btn:hover{background:#dc2626}
.ae-result-category{border:1px solid var(--border,#273449);border-radius:12px;padding:16px;margin:12px 0;background:rgba(15,23,42,.45)}
.ae-result-category h3{font-size:1rem;color:#fff;margin:0 0 12px}.ae-result-category h3 small{font-weight:400;color:var(--gray,#94A3B8)}
.ae-result-category ol{margin:0;padding-left:24px}.ae-result-category li{display:flex;justify-content:space-between;gap:16px;padding:9px 0;color:#e5e7eb;border-bottom:1px solid rgba(148,163,184,.12)}
.ae-security-note{color:var(--gray,#94A3B8);font-size:.85rem;line-height:1.6;margin-top:14px}
.admin-header .header-right{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.admin-header .ae-open-site{color:#e5c278;margin:0 10px}
#adminBody .ae-portal-notice{color:#fff}
@media(max-width:700px){.ae-portal-toolbar{align-items:flex-start;flex-direction:column}.ae-portal-toolbar div{flex-direction:column;gap:10px}.ae-result-category li{flex-direction:column;gap:5px}.ae-login-box{padding:24px}}
