/* =============================================================
   MBM Framework - Global Styles (Grey / Light-Green Theme)
   ============================================================= */

/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}
a { color: #4a9e6e; text-decoration: none; transition: color 0.2s; }
a:hover { color: #357a50; }

/* ===== Typography ===== */
h1 { color: #2d3a2e; margin-bottom: 20px; font-size: 1.6rem; font-weight: 600; }
h2 { color: #2d3a2e; margin-bottom: 16px; font-size: 1.3rem; font-weight: 600; }
h3 { color: #3a4a3b; margin-bottom: 12px; font-size: 1.1rem; font-weight: 500; }

/* ===== Reusable Layout ===== */
.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.content-wrapper { padding: 24px; }
.card {
    background: #fff;
    border: 1px solid #dde2d8;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8ebe5;
}

/* ===== Reusable Spacing ===== */
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.p-16 { padding: 16px; }
.p-24 { padding: 24px; }

/* ===== Reusable Flex ===== */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-gap-8 { gap: 8px; }
.flex-gap-12 { gap: 12px; }

/* ===== Reusable Text ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: #888; }
.text-success { color: #4a9e6e; }
.text-danger { color: #c0392b; }
.text-small { font-size: 0.85rem; }
.text-bold { font-weight: 600; }

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 8px 18px;
    border: none;
    border-radius: 5px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s, box-shadow 0.2s;
    line-height: 1.5;
}
.btn:hover { box-shadow: 0 2px 6px rgba(0,0,0,0.12); }
.btn-primary { background: #4a9e6e; color: #fff; }
.btn-primary:hover { background: #3d8a5e; color: #fff; }
.btn-secondary { background: #6c757d; color: #fff; }
.btn-secondary:hover { background: #5a6268; color: #fff; }
.btn-danger { background: #c0392b; color: #fff; }
.btn-danger:hover { background: #a5301f; color: #fff; }
.btn-warning { background: #e67e22; color: #fff; }
.btn-warning:hover { background: #cf6d17; color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 0.8rem; }
.btn-outline {
    background: transparent;
    border: 1px solid #4a9e6e;
    color: #4a9e6e;
}
.btn-outline:hover { background: #4a9e6e; color: #fff; }

/* ===== Alerts ===== */
.alert {
    padding: 12px 16px;
    border-radius: 5px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* ===== Forms ===== */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #2d3a2e;
    font-size: 0.9rem;
}
.form-control {
    width: 100%;
    padding: 9px 14px;
    border: 1px solid #c8cec5;
    border-radius: 5px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}
.form-control:focus {
    outline: none;
    border-color: #4a9e6e;
    box-shadow: 0 0 0 3px rgba(74, 158, 110, 0.15);
}
select.form-control { appearance: auto; }
textarea.form-control { resize: vertical; min-height: 80px; }

/* ===== Tables ===== */
.table-wrapper { overflow-x: auto; }
.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}
.table th, .table td {
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid #e8ebe5;
    font-size: 0.9rem;
}
.table th {
    background: #3a4a3b;
    color: #fff;
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.table tbody tr:hover { background: #f4f7f2; }
.table .actions { white-space: nowrap; }
.table .actions a, .table .actions button { margin-right: 6px; }

/* ===== Badges ===== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 500;
}
.badge-active { background: #d4edda; color: #155724; }
.badge-inactive { background: #e2e3e5; color: #6c757d; }
.badge-role { background: #d1ecf1; color: #0c5460; }

/* ===== Code ===== */
code { background: #eef; padding: 2px 6px; border-radius: 3px; font-size: 0.9rem; }

/* ===== Tabs ===== */
.tabs {
    display: flex;
    border-bottom: 2px solid #e8ebe5;
    margin-bottom: 20px;
}
.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s;
}
.tab-btn:hover {
    color: #4a9e6e;
}
.tab-btn.active {
    color: #4a9e6e;
    border-bottom-color: #4a9e6e;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}
