/* ========================== */
/* FIBEM Dashboard - Improved */
/* ========================== */

/* === General Reset & Fonts === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body.wp-admin .fibem-sidebar {
    width:220px;
    position:fixed;
    top:32px;
    left:0;
    bottom:0;
    background:#0b78b3;
    color:#fff;
    padding-top:20px;
    font-family:Arial,Helvetica,sans-serif;
}
.fibem-sidebar a {
    display:block;
    color:#fff;
    text-decoration:none;
    padding:10px 20px;
    margin:2px 0;
    border-left:4px solid transparent;
    transition:0.3s;
}
.fibem-sidebar a:hover, .fibem-sidebar a.active { border-left:4px solid #fff; background:#095a8c;}
.fibem-main {margin-left:240px; padding:20px; background:#f9f9f9; min-height:calc(100vh - 32px);}
.fibem-stats {display:flex;gap:15px;margin-bottom:20px;}
.stat-card{flex:1;background:#fff;text-align:center;padding:15px;border-radius:6px;box-shadow:0 2px 5px rgba(0,0,0,0.1);}
button.button{background:#0b78b3;color:#fff;border:none;padding:6px 12px;border-radius:4px;cursor:pointer;}
button.button:hover{background:#095a8c;}
table{width:100%;border-collapse:collapse;margin-top:15px;}
table th, table td{border:1px solid #ddd;padding:8px;text-align:left;}
.fibem-delete{color:#e74a3b;cursor:pointer;}
.fibem-modal{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.5);justify-content:center;align-items:center;}
.fibem-modal .modal-content{background:#fff;padding:20px;border-radius:8px;width:400px;position:relative;}
.close-modal{position:absolute;top:10px;right:15px;font-size:18px;cursor:pointer;}

body, html {
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    background: #f5f5f5;
    color: #333;
}

/* === Auth & Cards === */
.fibem-auth-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}
.fibem-card {
    width: 100%;
    max-width: 560px;
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.fibem-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.12);
}

/* === Tabs === */
.fibem-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.fibem-tabs .active {
    background: #0b78b3;
    color: #fff;
    padding: 10px 15px;
    border-radius: 6px;
    font-weight: 500;
}

/* === Buttons === */
.fibem-btn,
button.button,
.fibem-content .button {
    background: #0b78b3;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: 0.3s;
}
.fibem-btn:hover,
button.button:hover,
.fibem-content .button:hover {
    background: #055a8c;
}

/* === Notices === */
.notice-error {
    background: #ffe6e6;
    color: #a00;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
}
.notice-success {
    background: #e6ffed;
    color: #070;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
}

/* === Form Inputs === */
input, select, textarea {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: border 0.3s ease, box-shadow 0.3s ease;
}
input:focus, select:focus, textarea:focus {
    border-color: #0b78b3;
    box-shadow: 0 0 5px rgba(11,120,179,0.3);
    outline: none;
}

/* === Dashboard Layout === */
.fibem-dashboard-wrap {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.fibem-sidebar {
    width: 240px;
    background: #0b78b3;
    color: #fff;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
}
.fibem-logo {
    padding: 25px 20px;
    text-align: center;
}
.fibem-logo img {
    max-width: 140px;
    height: auto;
}
.fibem-sidebar ul {
    list-style: none;
    flex-grow: 1;
}
.fibem-sidebar ul li {
    border-top: 1px solid rgba(255,255,255,0.2);
}
.fibem-sidebar ul li a {
    display: block;
    padding: 14px 20px;
    color: #fff;
    text-decoration: none;
    transition: 0.3s;
}
.fibem-sidebar ul li a.active,
.fibem-sidebar ul li a:hover {
    background: #055a8c;
    padding-left: 25px;
}

/* Content */
.fibem-content {
    flex-grow: 1;
    padding: 30px 40px;
    background: #f5f5f5;
}

/* Headings */
.fibem-content h1,
.fibem-content h2 {
    color: #0b78b3;
    margin-bottom: 20px;
}

/* Stats Cards */
.fibem-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
}
.fibem-stats .card {
    flex: 1 1 180px;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-align: center;
    font-weight: 600;
    color: #333;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.fibem-stats .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* Charts */
.fibem-charts {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.chart-card {
    background: #fff;
    flex: 1 1 400px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Tables */
.fibem-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
}
.fibem-content table th,
.fibem-content table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}
.fibem-content table th {
    background: #0b78b3;
    color: #fff;
}

/* Delete & Action Buttons */
.fibem-delete {
    color: #e74a3b;
    cursor: pointer;
    transition: 0.3s;
}
.fibem-delete:hover {
    color: #c0392b;
}

/* === Modal === */
.fibem-modal {
    display: none;
    position: fixed;
    top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.fibem-modal .modal-content {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    max-width: 500px;
    width: 95%;
    position: relative;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}
.fibem-modal .close-modal {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
    color: #333;
}

/* === Responsive === */
@media (max-width: 1024px) {
    .fibem-dashboard-wrap { flex-direction: column; }
    .fibem-sidebar { width: 100%; display: flex; flex-direction: row; overflow-x: auto; }
    .fibem-sidebar ul { display: flex; flex-direction: row; }
    .fibem-sidebar ul li { border-top: none; border-right: 1px solid rgba(255,255,255,0.2); }
    .fibem-sidebar ul li a { padding: 10px 15px; }
    .fibem-stats { flex-direction: column; }
}
