/* =====================================================
   CENTR Permissions Manager — App Styles
   Matches CENTR design system from agendas.centr.org
   ===================================================== */

/* ---- Layout ---- */
body {
    background-color: #f5f6f8;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 3.5rem;
}

.container-fluid.mt-3 {
    flex: 1;
}

/* ---- Navbar ---- */
.navbar {
    background-color: #3e5262 !important;
    margin-bottom: 20px;
}

.brand-container {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-title {
    font-size: 1.15rem;
    font-weight: bold;
}

/* ---- Footer ---- */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: #3e5262;
    color: rgba(255,255,255,0.5);
    padding: 0.6rem 0;
    font-size: 0.82rem;
}
.site-footer .footer-brand {
    color: rgba(255,255,255,0.75);
    font-weight: 600;
}
.site-footer .footer-sep {
    margin: 0 0.5rem;
    color: rgba(255,255,255,0.25);
}
.site-footer .footer-text {
    color: rgba(255,255,255,0.4);
}
.site-footer .footer-links a {
    color: rgba(255,255,255,0.5) !important;
    text-decoration: none;
    transition: color 0.2s;
}
.site-footer .footer-links a:hover {
    color: #e54c59 !important;
}

/* ---- Buttons ---- */
.btn-primary {
    background-color: #e54c59 !important;
    border-color: #e54c59 !important;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: #d43f4c !important;
    border-color: #d43f4c !important;
}

.btn-outline-primary {
    color: #e54c59 !important;
    border-color: #e54c59 !important;
}
.btn-outline-primary:hover, .btn-outline-primary:active, .btn-outline-primary.active {
    background-color: #e54c59 !important;
    border-color: #e54c59 !important;
    color: #fff !important;
}

/* ---- Links ---- */
a:not(.btn):not(.nav-link):not(.navbar-brand):not(.dropdown-item) {
    color: #1a3a4a;
}
a:not(.btn):not(.nav-link):not(.navbar-brand):not(.dropdown-item):hover {
    color: #e54c59;
}

/* ---- Cards ---- */
.card-header {
    background-color: #e8eef1 !important;
    color: #0d1f2d !important;
    border-bottom: 2px solid #d0dce2 !important;
    font-weight: 600;
}
.card-header strong, .card-header .fw-bold, .card-header .fw-semibold {
    color: #0d1f2d;
}
.card-header .text-muted {
    color: #6c8a9a !important;
}
.card-header .btn-outline-secondary {
    color: #1a3a4a !important;
    border-color: #b0c4ce !important;
}
.card-header .btn-outline-secondary:hover {
    background-color: #d0dce2 !important;
    color: #0d1f2d !important;
}
.card-header .btn-outline-primary {
    color: #e54c59 !important;
    border-color: #e54c59 !important;
}
.card-header .btn-outline-primary:hover {
    background-color: #e54c59 !important;
    color: #fff !important;
}

/* ---- Tables ---- */
.table-light th {
    background-color: #3e5262 !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ---- Admin sidebar ---- */
.admin-sidebar {
    background-color: #fff;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    padding: 1rem 0.5rem;
    position: sticky;
    top: 1rem;
}

.admin-sidebar .sidebar-heading {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: #6c757d;
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
}

.admin-sidebar .nav-link {
    color: #1a3a4a;
    padding: 0.4rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.admin-sidebar .nav-link:hover {
    background-color: #f0f4f7;
    color: #e54c59;
}

.admin-sidebar .nav-link.active {
    background-color: #e8eef1;
    color: #0d1f2d;
    font-weight: 600;
}

/* ---- Section tabs (permissions page) ---- */
.section-tabs .nav-link {
    color: #3e5262;
    border-color: transparent;
    font-size: 0.9rem;
}

.section-tabs .nav-link:hover {
    color: #e54c59;
    border-color: #dee2e6 #dee2e6 transparent;
}

.section-tabs .nav-link.active {
    color: #0d1f2d;
    font-weight: 600;
    border-top: 3px solid #e54c59;
}

.section-tab-content {
    border: 1px solid #dee2e6;
    border-top: none;
    background: #fff;
}

.section-pane-inner {
    padding: 1.25rem;
}

.section-meta-bar {
    border-bottom: 1px solid #e8eef1;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

/* ---- Permission table ---- */
.permission-table th.data-category-col {
    width: 28%;
}
.permission-table th.permission-col {
    min-width: 100px;
}

/* ---- Tooltip icon ---- */
.tooltip-icon {
    display: inline-block;
    color: #6c757d;
    font-size: 0.75rem;
    cursor: help;
    vertical-align: super;
    margin-left: 2px;
}
.tooltip-icon:hover {
    color: #1a3a4a;
}

/* ---- Contacts panel ---- */
#contacts-panel .card-header {
    cursor: pointer;
    user-select: none;
}
#contacts-panel .card-header:hover {
    background-color: #dde6ee !important;
}
.contacts-chevron {
    display: inline-block;
    font-size: 1rem;
    transition: transform 0.2s ease;
}

/* ---- Section tab role badges ---- */
.badge-edit {
    background-color: #198754;
    color: #fff;
    font-weight: 500;
    font-size: 0.65rem;
}
.badge-view {
    background-color: #6c757d;
    color: #fff;
    font-weight: 500;
    font-size: 0.65rem;
}

/* ---- Approved orgs sub-panel ---- */
.approved-orgs-header {
    background-color: #eef2ff;
    border-top: 1px solid #c7d6fc;
    cursor: pointer;
    user-select: none;
}
.approved-orgs-header:hover {
    background-color: #dde6ff;
}
.approved-chevron {
    display: inline-block;
    font-size: 1rem;
    transition: transform 0.2s ease;
}
.approved-orgs-subpanel {
    background-color: #f0f4ff;
    border-top: 1px solid #b8cdf8;
}

/* ---- Diff / pending changes ---- */
.diff-row-changed {
    background-color: #fff8e1 !important;
}
.diff-changed-indicator {
    color: #e54c59;
    font-size: 0.75rem;
    margin-right: 4px;
}
.diff-value-new {
    background-color: #e8f4e8;
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 0.85rem;
    color: #1a3a4a;
}

/* ---- Action column widths ---- */
.col-actions-sm  { width: 90px; }
.col-actions-md  { width: 140px; }
.col-actions-xl  { width: 200px; }

/* ---- TLD switcher ---- */
.tld-switcher .form-select {
    border-color: #b0c4ce;
    color: #1a3a4a;
    min-width: 160px;
}

/* ---- URL fields ---- */
.url-fields .url-field-row {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}
.url-fields .url-field-row:last-child {
    border-bottom: none;
}

/* ---- Intro panel ---- */
#intro-panel {
    border-color: #3e5262 !important;
}
#intro-panel .card-body {
    background-color: #f0f4f7;
    border-radius: 0.375rem;
}
