/* =========================================================
   1. GLOBAL PAGE / BASE ELEMENTS
   Core page-level styling, typography, and default layout.
   ========================================================= */

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    overflow-y: scroll;
    background: #d9dde3;
}

h1 {
    font-size: 32px;
    font-weight: 300;
    margin-bottom: 10px;
}

textarea {
    width: 100%;
    max-width: 1000px;
}


/* =========================================================
   2. PAGE CONTAINERS / STRUCTURAL LAYOUT
   Main width constraints and flexible layout helpers.
   ========================================================= */

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.admin-layout-shell {
    max-width: 1000px;
    margin: 0 auto;
    background: #f5f6f8;
    padding: 10px 10px 30px 10px;
    min-height: 100vh;
    box-sizing: border-box;
}

.card-flex {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.admin-header-card {
    padding: 14px 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-nav-row {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
    padding-left: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.admin-content-card {
    padding: 10px;
    background: #fbfbfc;
}

.card.admin-content-card {
    background: #fbfbfc;
}


/* =========================================================
   2A. ADMIN DASHBOARD CARDS
   Admin dashboard summary cards for data-quality review.
   ========================================================= */

.admin-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.admin-dashboard-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 30px 16px 40px 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.admin-dashboard-card h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.admin-dashboard-card-divider {
    width: 100%;
    border: none;
    border-top: 1px solid #eeeeee;
    margin: 0 0 10px 0;
}

.admin-dashboard-card p {
    margin: 0 0 8px 0;
}

@media (max-width: 768px) {
    .admin-dashboard-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   3. CARD SYSTEM
   Shared card styling for boxed UI sections and card text.
   ========================================================= */

.card {
    border: 1px solid #eee;
    border-radius: 10px;
    background: #ffffff;
    padding: 20px;
    width: 100%;
    max-width: 1000px;
    box-sizing: border-box;
    margin: 0 auto 20px auto;
}

.card-header {
    font-size: 32px;
    font-weight: 300;
    margin: 0 auto 20px auto;
}

.card-muted {
    color: #666;
    font-size: 14px;
}

.page-header-title {
    font-size: 32px;
    font-weight: 300;
    margin: 0;
    line-height: 1.1;
}

.admin-login-shell {
    max-width: 860px;
    margin: 0 auto;
    background: #ffffff;
    padding: 20px;
    min-height: 100vh;
    box-sizing: border-box;
}

.admin-login-card {
    max-width: 420px;
    margin: 40px auto;
    padding: 20px;
}

/* =========================================================
   4. TAB SYSTEM
   Shared styling for tab containers, tab links, and panels.
   ========================================================= */

.tabs {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tabs a {
    display: inline-block;
    padding: 6px 10px;
    border: 1px solid #ebebeb;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    background: #f9f9f9;
    text-decoration: none;
    color: #686868;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tabs a.active {
    background: #ffffff;
    border-bottom: 1px solid #fdfdfd;
    color: #000;
}

.tab-panel {
    border: 1px solid #ebebeb;
    padding: 20px;
    border-radius: 0 8px 8px 8px;
    background: #fff;
    width: 100%;
    max-width: 1000px;
    box-sizing: border-box;
    margin: 0 auto 20px auto;
}

.tab-button {
    background: #e7e7e7;
    color: #333;
    border: 1px solid #cfcfcf;
    border-bottom: none;
    padding: 4px 6px;
    border-radius: 0;
    cursor: pointer;
    font: inherit;
    font-weight: 500;
    text-decoration: none;
}

.tab-button.active-tab {
    background: #ffffff;
    color: #111;
    position: relative;
    top: 0px;
    z-index: 2;
}

.tab-row {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}


/* =========================================================
   5. BUTTON SYSTEM
   Shared button styles for primary, navigation, and secondary actions.
   ========================================================= */

.action-button {
    display: inline-block;
    padding: 4px 6px;
    background: #7c3aed;
    color: #ffffff;
    border: 1px solid #7c3aed;
    border-radius: 0px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
}

.action-button:hover {
    background: #6d28d9;
    border-color: #6d28d9;
}

.action-button:focus {
    outline: 2px solid rgba(45, 108, 223, 0.25);
    outline-offset: 2px;
}

.nav-button {
    display: inline-block;
    padding: 4px 6px;
    background: #2d6cdf;
    color: #ffffff;
    border: 1px solid #2d6cdf;
    border-radius: 0px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
}

a.nav-button.active-tab,
.nav-button.active-tab {
    background: #2d6cdf;
    color: #ffffff !important;
    font-weight: 600;
    border: 1px solid #1f5fcc;
    box-shadow: inset 0 -3px 0 #0d3f99;
}

.nav-button:visited {
    color: #fff;
}

.nav-button:hover {
    background: #1b4ca1;
    border-color: #1b4ca1;
    color: #fff;
}

.nav-button:focus {
    outline: 2px solid rgba(45, 108, 223, 0.25);
    outline-offset: 2px;
}

.secondary-button {
    display: inline-block;
    padding: 4px 6px;
    background: #f1f1f1;
    color: #333;
    border: 1px solid #d5d5d5;
    border-radius: 0px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
}

.secondary-button:hover {
    background: #e5e5e5;
    border-color: #cfcfcf;
}

.secondary-button:focus {
    outline: 2px solid rgba(0, 0, 0, 0.15);
    outline-offset: 2px;
}

.current-nav-button {
    display: inline-block;
    padding: 4px 6px;
    background: #ffffff;
    color: #333;
    border: 1px solid #e4e4e4;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    cursor: default;
}

/* =========================================================
   6. FORM SYSTEM
   Inputs, labels, row layouts, and inline label helpers.
   ========================================================= */

.input-field {
    padding: 8px 10px;
    border: 1px solid #eee;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.2;
    height: 34px;
    box-sizing: border-box;
    background: #ffffff;
    flex: 1;
    max-width: 400px;
}

.form-row {
    margin: 10px 0;
    display: flex;
    align-items: center;
}

.form-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.form-group label {
    width: 160px;
    min-width: 160px;
    margin-right: 25px;
    font-weight: 500;
}

.label-inline {
    margin-right: 6px;
}


/* =========================================================
   7. LISTS / ROWS / COLLECTION VIEWS
   Shared list layouts for members, regions, and row text hierarchy.
   ========================================================= */

.member-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.member-list .card {
    margin-bottom: 0px;
}

.member-list .card:hover {
    background: #fffde6;
}

.member-list a:not(.nav-button):not(.action-button):not(.secondary-button) {
    color: #111;
    text-decoration: none;
}

.member-list a:focus {
    outline: none;
    color: #111;
}

.member-row {
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.region-row {
    padding: 6px 10px;
}

.admin-region-action-row {
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.region-count {
    font-size: 12px;
    color: #666;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 6px;
    white-space: nowrap;
}

.row-main-text {
    font-weight: 500;
}

.row-secondary-text {
    font-size: 14px;
    color: #a5a5a5;
}

.admin-executive-info {
    flex: 1;
    min-width: 220px;
}

.admin-executive-actions {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
}

.admin-account-group {
    margin-bottom: 25px;
}

.admin-section-title {
    margin: 5px 0 10px 0;
    font-size: 22px;
    font-weight: 300;
}


/* =========================================================
   8. HISTORY / CONTENT UTILITIES
   Reusable content separators and history-entry styling.
   ========================================================= */

.history-entry {
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #ddd;
}

.section-divider {
    margin: 14px 0;
    border: none;
    border-top: 1px solid #eee;
}


/* =========================================================
   9. STATUS / NOTICE MESSAGES
   Flash messages, alerts, and related animations.
   ========================================================= */

.success-box {
    background: #e6f4ea;
    color: #1e7e34;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    animation: fadeOut 4s ease forwards;
}

.error-box {
    background: #fdecea;
    color: #b00020;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    animation: fadeOut 10s ease forwards;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; display: none; }
}

.admin-notice-space {
    min-height: 38px;
    margin-top: 4px;
    margin-bottom: 6px;
}


/* =========================================================
   10. CONTEXT / TOP BAR INDICATORS
   Thin context bars to distinguish admin vs executive views.
   ========================================================= */

.top-bar {
    width: 100%;
    height: 4px;
}

.top-bar.admin {
    background: #dc4c4c; /* calm red */
}

.top-bar.user {
    background: #8abf8a; /* calm green */
}


/* =========================================================
   11. LINK / BUTTON COLOR SAFETY RULES
   Small overrides to keep button colors stable in link states.
   ========================================================= */

.nav-button:visited,
.nav-button:hover {
    color: #fff;
}


/* =========================================================
   PAGINATION FIX
   Prevent Laravel pagination SVG arrows from rendering oversized
   when Tailwind utility classes are not available.
   ========================================================= */

nav[role="navigation"] svg {
    width: 16px;
    height: 16px;
}


/* =========================================================
   12. RESPONSIVE RULES
   Shared breakpoint behavior for flexible stacking on smaller screens.
   ========================================================= */

@media (max-width: 768px) {
    .card-flex {
        flex-direction: column;
        align-items: flex-start;
    }
}

.admin-login-card .form-group {
    display: block;
}

.admin-login-card .form-group label {
    display: block;
    width: auto;
    min-width: 0;
    margin-right: 0;
    margin-bottom: 8px;
}

.admin-login-card .input-field {
    width: 100%;
    max-width: none;
}

.admin-login-title {
    margin-top: 0;
}

.admin-login-error-box {
    margin-bottom: 15px;
}

.admin-login-error-list {
    margin: 10px 0 0 20px;
}

.admin-login-password-row {
    margin-top: 12px;
}

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