/* ==============================
   ADMIN LAYOUT
============================== */

body {
    overflow-x: hidden;
}


.admin-layout {
    background: #f5f6f8;
    color: #222;
}

.admin-inner-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.admin-col-main {
    padding-right: 10px;
}

.admin-col-side {
    padding-left: 10px;
}

.admin-col-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.content-section {
    max-width: 1100px;
    margin: 0 auto;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    text-align: center;
}

/* ======== CARDS ============= */

.admin-card {
    background: #ffffff;
    border: 1px solid #c9a227;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;

    position: relative;
}

/* ===== METRIC STYLE ======== */
.admin-metric {
    font-size: 28px;
    font-weight: bold;
    margin-top: 10px;
}

.admin-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.small-card {
    text-align: center;
    padding: 15px;
}

.card-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.card-metric {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.summary-card {
    text-align: center;
    padding: 18px;
}

.summary-title {
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}

.summary-value {
    font-size: 26px;
    font-weight: 600;
}

/* ==============================
   ACTIVITY FEED
============================== */
.admin-activity {
    list-style: none;
    padding: 0;
    margin: 0;
}
.activity-row {
    padding: 10px 12px;
    margin-bottom: 6px;
    border-radius: 4px;
}

.admin-activity li {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.activity-success {
    background: #edf7ed; /* soft green */
}

.activity-danger {
    background: #fdecea; /* soft red */
}

.activity-warning {
    background: #fff8e5; /* soft amber */
}

.activity-neutral {
    background: #f5f5f5; /* light gray */
}

.activity-link {
    text-decoration: none;
    color: #222;
    display: block;
}

.activity-row:hover {
    background: #eaeaea;
}

.activity-time {
    font-size: 13px;
    color: #666;
}

/* ==== CONTENT SECTIONS ====== */
.content-section h1,
.content-section h2 {
    color: #111;
    text-align: center;
}

.page-top {
    text-align: center;
}

/* ====== DIVIDER ============= */
.section-divider {
    width: 120px;
    height: 2px;
    margin: 10px auto 20px auto;

    background: linear-gradient(
        to right,
        transparent,
        #c9a227,
        #e0c36f,
        #c9a227,
        transparent
    );
}

/* ======== FORMS ============= */
.admin-form {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.form-row label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 10px;

    border: 1px solid #ccc;
    border-radius: 4px;

    background: #fff;
    color: #111;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: #c9a227;
    box-shadow: 0 0 0 2px rgba(201,162,39,0.15);
}

.admin-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.inline-form {
    display: inline;
}

.admin-form-footer {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

/* ======= BUTTONS ============ */
.admin-btn {
    display: inline-block;
    padding: 10px 16px;

    background: #111;
    color: #fff;

    border: none;
    border-radius: 4px;

    text-decoration: none;
    cursor: pointer;
}

.admin-btn:hover {
    background: #333;
}

.admin-btn.secondary {
    background: #ddd;
    color: #111;
}

.admin-btn.small {
    padding: 6px 10px;
    font-size: 13px;
}

.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.admin-search {
    display: flex;
    gap: 10px;
}

.admin-search input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.admin-btn.success {
    background: #e6f4ea;
    color: #1e7e34;
    border: 1px solid #b7dfc8;
}

.admin-toolbar-actions {
    display: flex;
    gap: 10px;
}

.admin-user-results {
    list-style: none;
    padding: 0;
    margin: 0;
}

.user-row {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 12px;
    border-bottom: 1px solid #eee;
}

.user-main {
    display: flex;
    flex-direction: column;
}

.user-email {
    font-size: 13px;
    color: #666;
}

.user-meta {
    font-size: 13px;
    color: #555;
}

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

.content-section h1,
.content-section h2,
.admin-card h2,
.admin-card h3 {
    text-align: center;
    margin-top: 0;
}

.admin-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.admin-filter-grid > div {
    display: flex;
    flex-direction: column;
}

.admin-filter-grid label {
    margin-bottom: 4px;
}

.admin-filter-grid input,
.admin-filter-grid select {
    width: 100%;
}

.admin-filter-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}



/* ==============================
   ADMIN DANGER ZONE
============================== */
.admin-card-danger {
    background: rgba(120, 0, 0, 0.15);
    border: 1px solid rgba(200, 50, 50, 0.5);
    border-radius: 6px;
    padding: 15px;

    box-shadow: 
        0 0 8px rgba(200, 50, 50, 0.4),
        inset 0 0 6px rgba(200, 50, 50, 0.2);

    transition: 0.2s ease;
}

.admin-card-danger h3 {
    color: #ff6b6b;
    text-align: center;
}

.danger-actions {
    text-align: center;
    margin-top: 15px;
}

/* Center divider */
.admin-card-danger .section-divider {
    margin: 10px auto 15px auto;
}

/* Subtle hover intensifies glow */
.admin-card-danger:hover {
    box-shadow: 
        0 0 12px rgba(255, 60, 60, 0.6),
        inset 0 0 8px rgba(255, 60, 60, 0.3);
}

.danger-confirm input {
    text-align: center;
}

/* Danger */
.admin-btn.danger {
    background: #a94442;
    color: #fff;
}

.admin-btn.danger:hover {
    background: #c9302c;
}

.admin-btn + .admin-btn {
    margin-left: 8px;
}

/* ========= TABLES =========== */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.admin-table tr:hover {
    background: #f9f9f9;
}

.activity-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* CREATE */
.activity-badge.user_created {
    background: #e6f4ea;
    color: #1e7e34;
}

/* UPDATE */
.activity-badge.user_updated {
    background: #e7f1ff;
    color: #084298;
}

/* DELETE */
.activity-badge.user_deleted {
    background: #fdecea;
    color: #b02a37;
}

/* RESTORE */
.activity-badge.user_restored {
    background: #e6f4ea;
    color: #1e7e34;
}

/* SUCCESS */
.activity-badge.login_success,
.activity-badge.mfa_success {
    background: #e6f4ea;
    color: #1e7e34;
}

/* WARNING */
.activity-badge.password_reset {
    background: #fff3cd;
    color: #856404;
}

/* INFO */
.activity-badge.profile_updated {
    background: #e7f1ff;
    color: #084298;
}





/* ==============================
   AUDIT WARNING COLORS
============================== */
.audit-row {
    transition: background 0.2s ease;
}

.audit-success { background: #edf7ed; }
.audit-danger { background: #fdecea; }
.audit-warning { background: #fff8e5; }
.audit-neutral { background: #f9f9f9; }

.audit-row:hover {
    filter: brightness(0.97);
}

.admin-alert {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.alert-high { background: #fdecea; }
.alert-medium { background: #fff8e5; }
.alert-low { background: #edf7ed; }

/* ==============================
   USER ACTIVITY STATUS COLORS
============================== */
.status.login_success { background:#1e4620; color:#8fd19e; }
.status.mfa_success { background:#1f3a4a; color:#8ecae6; }
.status.password_reset { background:#4a3f1a; color:#f0e6c0; }
.status.profile_updated { background:#2f323a; color:#ccc; }
.status.user_created { background:#1e4620; color:#8fd19e; }
.status.user_updated { background:#2f323a; color:#ccc; }
.status.user_deleted { background:#4a1f1f; color:#ffb3b3; }
.status.user_restored { background:#1f3a4a; color:#8ecae6; }
.status.password_reset { background:#4a3f1a; color:#f0e6c0; }

