/* ===============================
   Global Reset & Base
================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f4f6fb;
    color: #2d3748;
    line-height: 1.6;
}

/* Better default links */
a {
    color: #2563eb;
    text-decoration: none;
}
a:hover,
a:focus {
    text-decoration: underline;
}

/* Utility to center main content if needed */
.main-wrapper {
    min-height: calc(100vh - 80px);
    padding: 80px 16px 40px;
}

/* ===============================
   Navbar
================================= */
.navbar {
    border-radius: 0;
    border: none;
    min-height: 60px;
    margin-bottom: 0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.navbar-default {
    background: #ffffff;
    border-color: transparent;
}

.navbar-brand {
    padding: 10px 15px;
}

.navbar-brand h3 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand img {
    border-radius: 50%;
    object-fit: cover;
}

/* Fix the container fluid spacing if needed */
.container-fluid {
    padding-left: 16px;
    padding-right: 16px;
}

/* ===============================
   Headings & Text
================================= */
h1, h2, h3, h4, h5 {
    font-weight: 600;
    color: #111827;
}

.text-center {
    text-align: center;
}

/* ===============================
   Panels / Well / Cards
================================= */
.well {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    padding: 20px 24px;
    margin-bottom: 24px;
}

/* If you have two columns like col-md-6 well side by side */
.col-md-6.well {
    margin-top: 12px;
}

/* ===============================
   Forms
================================= */
.form-group label {
    font-weight: 500;
    margin-bottom: 4px;
    display: block;
    color: #374151;
}

.form-control {
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 8px 12px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: none;
}

.form-control:focus {
    border-color: #2563eb;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

/* Inline form on desktop, stacked on mobile */
.form-inline .form-group {
    margin-right: 12px;
    margin-bottom: 8px;
}

/* Input group spacing */
.input-group.col-md-6 {
    padding-left: 0;
    padding-right: 0;
}

/* ===============================
   Buttons
================================= */
.btn {
    border-radius: 9999px;
    padding: 8px 18px;
    font-size: 0.95rem;
    font-weight: 500;
    border-width: 1px;
    transition: background-color 0.2s ease, border-color 0.2s ease,
        color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background-color: #2563eb;
    border-color: #1d4ed8;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #1d4ed8;
    border-color: #1e40af;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.btn-danger {
    background-color: #dc2626;
    border-color: #b91c1c;
}

.btn-danger:hover,
.btn-danger:focus {
    background-color: #b91c1c;
    border-color: #991b1b;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.35);
}

/* Remove default glyphicon margin if any */
.glyphicon {
    margin-right: 4px;
}

/* ===============================
   Modal
================================= */
.modal-dialog {
    margin-top: 60px;
}

.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
}

.modal-header,
.modal-footer {
    border-color: #e5e7eb;
}

.modal-body {
    padding: 20px 24px;
}

/* ===============================
   Footer
================================= */
.footer {
    background: #111827;
    color: #e5e7eb;
    padding: 14px 16px;
    font-size: 0.85rem;
    width: 100%;
}

.footer p {
    margin: 0;
    text-align: center;
}

.footer i {
    color: #9ca3af;
}

/* ===============================
   Spacing Tweaks
================================= */
section,
.main-section {
    margin-top: 24px;
    margin-bottom: 24px;
}

.br-spacer {
    margin-top: 16px;
    margin-bottom: 16px;
}

/* Clean up excessive <br> spacing if any:
   you can wrap content in .main-wrapper instead of many <br> tags */

/* ===============================
   Responsive Styles
================================= */

/* Tablets and below (≤ 991px) */
@media (max-width: 991px) {
    .navbar-brand h3 {
        font-size: 1.15rem;
    }

    .navbar-brand img {
        width: 40px;
        height: 40px;
    }

    .well {
        padding: 16px 18px;
    }
}

/* Mobile (≤ 767px) */
@media (max-width: 767px) {
    body {
        font-size: 0.95rem;
    }

    .navbar {
        padding-left: 8px;
        padding-right: 8px;
    }

    .navbar-brand h3 {
        font-size: 1rem;
        text-align: left;
    }

    .main-wrapper {
        padding: 72px 12px 32px;
    }

    /* Stack form elements nicely */
    .form-inline .form-group,
    .form-inline .btn {
        display: block;
        width: 100%;
        margin-right: 0;
    }

    .form-inline .btn {
        margin-top: 8px;
    }

    .col-md-2,
    .col-md-3,
    .col-md-6,
    .col-md-8,
    .col-md-10 {
        margin-bottom: 16px;
    }

    .footer {
        font-size: 0.8rem;
        padding: 10px 8px;
    }
}

/* Very small phones (≤ 400px) */
@media (max-width: 400px) {
    .navbar-brand h3 {
        font-size: 0.95rem;
    }

    .navbar-brand img {
        width: 32px;
        height: 32px;
    }
}

/* =========================================
   BASE RESET & GLOBAL STYLES
========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f4f6fb;
    color: #1f2933;
    line-height: 1.6;
}

/* Links */
a {
    color: #2563eb;
    text-decoration: none;
}
a:hover,
a:focus {
    text-decoration: underline;
}

/* Page wrapper to center content */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 24px 16px;
}

/* =========================================
   MAIN CONTAINER / CARD
========================================= */
.profile-container {
    width: 100%;
    max-width: 900px;
    background: #ffffff;
    border-radius: 14px;
    padding: 24px 24px 28px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

/* Header / Title */
.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 12px;
}

.profile-header h1,
.profile-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: #111827;
}

.profile-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
}

/* =========================================
   GRID LAYOUT (INFO + FORM / ETC.)
========================================= */
.profile-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
}

.profile-section {
    margin-bottom: 16px;
}

/* Section titles */
.profile-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #111827;
}

/* =========================================
   PROFILE INFO LIST
========================================= */
.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed #e5e7eb;
    font-size: 0.95rem;
}

.info-label {
    font-weight: 500;
    color: #4b5563;
}

.info-value {
    text-align: right;
    color: #111827;
    word-break: break-word;
}

/* =========================================
   FORMS
========================================= */

form {
    margin-top: 4px;
}

/* Label + input structure */
.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 4px;
    color: #374151;
}

.input-control,
select,
textarea {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 8px 10px;
    font-size: 0.95rem;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-control:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

/* Inline form rows (for small filters/search) */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.form-row .form-group {
    flex: 1 1 160px;
}

/* =========================================
   BUTTONS
========================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 8px 18px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease,
        color 0.2s ease, box-shadow 0.2s ease, transform 0.05s ease;
}

.btn:active {
    transform: translateY(1px);
}

/* Primary */
.btn-primary {
    background-color: #2563eb;
    border-color: #1d4ed8;
    color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #1d4ed8;
    border-color: #1e40af;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

/* Secondary / outline */
.btn-secondary {
    background-color: #ffffff;
    border-color: #d1d5db;
    color: #374151;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

/* Danger (if you have delete/reset actions) */
.btn-danger {
    background-color: #dc2626;
    border-color: #b91c1c;
    color: #ffffff;
}
.btn-danger:hover,
.btn-danger:focus {
    background-color: #b91c1c;
    border-color: #991b1b;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.3);
}

/* Full-width button helper */
.btn-block {
    width: 100%;
}

/* =========================================
   TABLE (FOR PROFILE LISTS, LOGS, ETC.)
========================================= */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 8px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* allows horizontal scroll on small screens */
    font-size: 0.9rem;
}

thead {
    background: #f9fafb;
}

thead th {
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    color: #4b5563;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

tbody tr:nth-child(even) {
    background: #f9fafb;
}

tbody tr:hover {
    background: #eff6ff;
}

tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

/* Optional small tag for status */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #b91c1c;
}

/* =========================================
   FOOTER
========================================= */

.page-footer {
    margin-top: 16px;
    font-size: 0.8rem;
    color: #9ca3af;
    text-align: center;
}

/* =========================================
   RESPONSIVE BREAKPOINTS
========================================= */

/* Medium screens (tablet and small laptop) */
@media (max-width: 992px) {
    .profile-content {
        grid-template-columns: 1fr;
    }

    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .profile-container {
        padding: 20px 18px 22px;
    }
}

/* Small screens (phones) */
@media (max-width: 768px) {
    body {
        font-size: 0.95rem;
    }

    .page-wrapper {
        padding: 16px 10px;
    }

    .profile-container {
        border-radius: 10px;
        padding: 18px 14px 20px;
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    }

    .profile-header h1,
    .profile-header h2 {
        font-size: 1.2rem;
    }

    .info-list li {
        flex-direction: column;
        align-items: flex-start;
    }

    .info-value {
        text-align: left;
    }

    /* Buttons full width on small screens if desired */
    .btn-responsive {
        width: 100%;
        justify-content: center;
    }

    table {
        min-width: 500px;
    }
}

/* Extra small phones */
@media (max-width: 480px) {
    .profile-header h1,
    .profile-header h2 {
        font-size: 1.05rem;
    }

    table {
        min-width: 420px;
    }
}

