/* ============================================================
   TurningPoint Portal - Site Styles
   ============================================================ */

/* --- Base & Typography --- */
html {
    position: relative;
    min-height: 100%;
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 15px;
    }
}

body {
    margin-bottom: 60px;
    background-color: #f4f6f9;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a {
    color: #0366d6;
}

a:hover {
    color: #024ea4;
}

/* --- Navbar --- */
.navbar {
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

a.navbar-brand {
    white-space: normal;
    text-align: center;
    word-break: break-all;
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
}

.navbar .nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
}

.navbar .dropdown-item {
    font-size: 0.875rem;
    padding: 0.4rem 1.25rem;
}

.navbar .btn.nav-link {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    font-size: 0.85rem;
    padding: 0.3rem 0.75rem;
    font-weight: 500;
}

.navbar .btn.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* --- Buttons --- */
.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn-primary:hover {
    background-color: #155a9e;
    border-color: #134f8a;
}

.btn {
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 4px;
    padding: 0.4rem 1rem;
    transition: all 0.15s ease-in-out;
}

.btn-warning {
    color: #fff;
}

.btn-warning:hover {
    color: #fff;
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

/* --- Brand Header --- */
.brand-header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 0.75rem 0;
    margin-bottom: 1.5rem;
}

.brand-header img {
    max-height: 50px;
    width: auto;
}

/* --- Cards & Panels --- */
.card {
    border: none;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.25rem;
    color: #495057;
}

.card-body {
    padding: 1.25rem;
}

/* --- Page Headers --- */
.page-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #1b6ec2;
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0;
}

/* --- Search Panels --- */
.search-panel {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.search-panel .form-control {
    font-size: 0.875rem;
}

.search-panel select.form-control {
    font-size: 0.875rem;
}

/* --- Tables / DataTables --- */
.table {
    font-size: 0.85rem;
    background: #fff;
}

.table thead th {
    background-color: #2c3e50;
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: none;
    padding: 0.6rem 0.75rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 0.5rem 0.75rem;
    vertical-align: middle;
    border-color: #eee;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #f8f9fa;
}

.table-hover tbody tr:hover {
    background-color: #e8f0fe;
}

.dataTables_wrapper {
    font-size: 0.85rem;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    padding: 0.5rem 0;
}

.dataTables_wrapper .dataTables_filter input {
    border-radius: 4px;
    border: 1px solid #ced4da;
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
}

/* --- Tabs --- */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6c757d;
    border: none;
    padding: 0.6rem 1.25rem;
    margin-right: 2px;
    border-radius: 4px 4px 0 0;
    transition: all 0.15s ease-in-out;
}

.nav-tabs .nav-link:hover {
    color: #1b6ec2;
    background-color: #f0f4f8;
    border: none;
}

.nav-tabs .nav-link.active {
    font-weight: 600;
    color: #1b6ec2;
    background-color: #fff;
    border: 2px solid #dee2e6;
    border-bottom-color: #fff;
    margin-bottom: -2px;
}

.tab-content {
    background: #fff;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 6px 6px;
    padding: 1.5rem;
}

.tab-content .badge-primary {
    background-color: #1b6ec2;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
}

/* --- Forms --- */
.form-control {
    border-radius: 4px;
    border: 1px solid #ced4da;
    font-size: 0.875rem;
    padding: 0.4rem 0.75rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #80b3e0;
    box-shadow: 0 0 0 0.15rem rgba(27, 110, 194, 0.2);
}

label.control-label,
label.text-primary {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0.25rem;
}

/* --- Badges --- */
.badge {
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-primary {
    background-color: #1b6ec2;
}

/* --- Alerts & Messages --- */
#errorMsg {
    font-size: 0.875rem;
}

/* --- Footer --- */
.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    line-height: 50px;
    background-color: #2c3e50;
    color: #adb5bd;
    font-size: 0.8rem;
}

.footer a {
    color: #74b9ff;
}

.footer a:hover {
    color: #fff;
}

.footer .container {
    text-align: center;
}

/* --- Loader / Spinner --- */
.loader {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 9999;
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    border: 4px solid #e9ecef;
    border-radius: 50%;
    border-top: 4px solid #1b6ec2;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Login / Auth Pages --- */
.auth-card {
    max-width: 420px;
    margin: 2rem auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
}

.auth-card h1,
.auth-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-card .btn-success {
    padding: 0.5rem;
    font-size: 1rem;
}

.auth-card .form-group {
    margin-bottom: 1rem;
}

.auth-card .auth-links {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.auth-card .auth-links a {
    color: #6c757d;
}

.auth-card .auth-links a:hover {
    color: #1b6ec2;
}

/* --- Home / Dashboard --- */
.dashboard-welcome {
    margin-bottom: 2rem;
}

.dashboard-welcome h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #2c3e50;
}

/* --- Utility --- */
.hash-form-sm {
    width: 90px;
}

.text-small {
    font-size: 0.8em;
}

/* Override for form-control-plaintext status fields */
.form-control-plaintext {
    font-weight: 600;
    font-size: 0.9rem;
}
