@import url("https://fonts.googleapis.com/css?family=Poppins:wght@400,500,600,700&display=swap");

/* CSS Variables
   Using RGB values for flexible opacity control
   ========================================================================== */
:root {
    /* Brand Colors - RGB format for opacity control */
    --logo-primary: 75, 150, 105;
    --logo-secondary: 74, 74, 74;
    --logo-secondary-transparent: rgba(74, 74, 74, 0.95);

    /* System Colors */
    --background-color: #ffffff;
    --text-color: #333333;
    --primary-color: rgb(var(--logo-primary));
    --secondary-color: rgb(var(--logo-secondary));

    /* UI Elements */
    --border-color: #dee2e6;
    --card-background: #ffffff;
    --card-shadow: 0px 10px 20px rgba(0, 0, 0, 0.1), 0px 6px 6px rgba(0, 0, 0, 0.08);
    --input-background: #ffffff;
    --input-border: #ced4da;
    --input-text: #495057;
    --button-hover: #E65600;
}

/* define navbar height */
:root {
    --navbar-height: 20px;
    /* Adjust as needed */
}

/* Base Elements
   ========================================================================== */
html {
    height: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    margin-top: var(--navbar-height);
    min-height: calc(100% - var(--navbar-height));
    display: flex;
    flex-direction: column;
}

/* prevent overflow in the x direction */
html,
body {
    max-width: 100vw;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Main content wrapper */
.app-container {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100%;
}

/* Add bottom padding to main content so action buttons are not hidden by the bottom navbar on mobile */
@media (max-width: 767.98px) {
    .app-container {
        padding-bottom: 70px !important;
        /* Height of bottom navbar + a little extra */
    }
}

/* ==========================================================================
Footer
========================================================================== */
.footer {
    text-align: center;
    font-size: 0.8rem;
}

/* ==========================================================================
   Layout Components
   ========================================================================== */

/* Form Card */
.form-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    /* margin-top: 1.2rem; */
    margin-top: calc(var(--navbar-height) + 0.5rem);
    padding: 2rem 1rem;
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    /* border: 2px solid red; */
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

/* ==========================================================================
   Logo Components
   ========================================================================== */
.logo-container {
    width: 100%;
    text-align: center;
    margin-bottom: 1rem;
}

.main-logo {
    width: 200px;
    height: auto;
    margin: 1rem auto;
    display: block;
}

.navbar-logo {
    width: 24px;
    /* Smaller logo */
    height: auto;
    margin-right: 0.75rem;
}

/* ==========================================================================
   Form Elements
   ========================================================================== */
.login-message {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.login-form {
    width: 100%;
}

.form-float-container {
    width: 100%;
    margin-bottom: 1.5rem;
}

.form-float {
    width: 100%;
    background-color: var(--input-background);
    border: 1px solid var(--input-border);
    color: var(--input-text);
    padding: 0.75rem;
    border-radius: 5px;
    transition: border-color 0.3s, background-color 0.3s;
}

.form-float:focus {
    border-color: var(--secondary-color);
    box-shadow: none;
}

/* ==========================================================================
   Button Styles
   ========================================================================== */
.login-button-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.form-button {
    width: 100px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    color: var(--primary-color);
    border: rgba(var(--logo-secondary), 0.5) 1px solid;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.form-button:hover {
    background-color: rgba(var(--logo-secondary), 0.9) !important;
    color: var(--primary-color);
    border: rgba(var(--logo-secondary), 0.5) 1px solid;
    box-shadow: none;
}

.form-button:focus {
    box-shadow: none;
}

/* ==========================================================================
   Messages and Links
   ========================================================================== */
.login-message-output {
    text-align: center;
    margin-top: 1rem;
    color: var(--primary-color);
    min-height: 24px;
}

.signup-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    gap: 0.5rem;
}

.signup-text {
    margin: 0;
    color: var(--text-color);
}

.form-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.form-link:hover {
    color: var(--button-hover);
}

.form-check-label {
    font-size: 0.9rem;
}

/* ==========================================================================
Navigation
========================================================================== */
.navbar {
    background-image: linear-gradient(to bottom, rgba(var(--logo-secondary), 0.95), rgba(var(--logo-secondary), 0.75));
    backdrop-filter: blur(8px);
    padding: 0.25rem 1rem !important;
    /* Reduce vertical padding */
    min-height: var(--navbar-height);
    /* Set minimum height */
}

.navbar .navbar-brand {
    padding: 0;
    display: flex;
    align-items: center;

}

.navbar .navbar-toggler {
    border: none;
    padding: 1px 5px;
}

.navbar .navbar-toggler:focus {
    box-shadow: inset 0 0 0 1px rgba(var(--logo-secondary), 0.5), 0 0 0 3px rgba(var(--logo-secondary), 0.2) !important;
}

/* ======================================================================= */
/* Base styles */
body {
    background-color: #f8fafc;
    /* slate-50 */
    font-family: 'Manrope', 'Noto Sans', sans-serif;
    min-height: 100vh;
    margin: 0;
}

/* Header */
.header-bar {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 1rem;
    padding-bottom: 0.75rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-title {
    flex: 1;
    text-align: center;
    font-size: 1.125rem;
    font-weight: 600;
    color: #0f172a;
}

/* Back button */
.back-button {
    display: flex;
    width: 2.5rem;
    height: 2.5rem;
    justify-content: center;
    align-items: center;
    border-radius: 9999px;
    color: #334155;
    /* slate-700 */
    transition: background-color 0.2s;
    /* border: 1px solid red; */
    padding: 0.5rem !important;
    border: none !important;
}

.back-button:hover {
    background-color: #f1f5f9;
    /* slate-100 */
    color: var(--text-color) !important;
}

/* Name and Role */
.name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    letter-spacing: -0.015em;
    margin-bottom: 0.25rem;
}

.role {
    font-size: 1rem;
    font-weight: 500;
    color: #64748b;
    /* slate-500 */
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Section Headings */
.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    padding-top: 0.5rem;
    padding-bottom: 0.75rem;
}

/* Personal Info Items */
.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
    /* slate-200 */
}

/* Info labels and values */
.info-label {
    /* font-size: 0.875rem; */
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.form-input {
    font-size: 0.9rem;
    color: var(--secondary-color);
    /* color: red; */
}

.info-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
    text-align: right;
}

/* QR Code container */
.qr-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: none;
}

.qr-box {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 20rem;
    background-color: var(--background-color);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    padding: 1rem 0;
}

.qr-code-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
    height: auto;
}

.qr-code {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    background: none;
    padding: 0;
}

/* Edit button */
.bottom-bar {
    /* position: sticky; */
    /* bottom: 0; */
    /* background-color: var(--background-color); */
    /* border-top: 1px solid var(--border-color); */
    padding: 1rem 1.5rem;
    box-shadow: var(--card-shadow);
    margin: 0 -1rem;
}

.edit-button {
    display: flex;
    justify-content: center;
    align-items: center;
    /* width: 100%;
    max-width: 30rem;
    height: 3rem;
    background-color: #007AFF;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.015em;
    border-radius: 0.75rem;
    transition: background-color 0.2s;
    border: none !important;
    min-height: 3rem;
    padding: 0.75rem !important; */
}

/* .edit-button:hover {
    background-color: #005ECB;
} */

.personal-details-section {
    padding: 0;
}

.info-list {
    padding: 0;
}

.list-item {
    padding: 0.5rem 0.5rem;
}

.profile-card {
    /* margin-top: 1.2rem; */
    margin-top: calc(var(--navbar-height) + 0.5rem);
}

/* Avatar */
.avatar {
    width: 8rem;
    height: 8rem;
    margin: 0 auto 1.5rem auto;
    object-fit: cover;
    border-radius: 9999px;
    box-shadow: var(--card-shadow);
    display: block;
}

/* Profile picture upload container - enhanced centering and overflow */
.profile-pic-upload-container {
    position: relative;
    display: block;
    margin: 0 auto 1.5rem auto;
    width: 120px;
    height: 120px;
    cursor: pointer;
    overflow: hidden;
    /* Ensures overlay and image are clipped to the circle */
}

/* Profile picture preview image */
.profile-pic-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* Badge-style edit icon overlay for profile picture - modern, black, semi-transparent */
.profile-pic-edit-btn {
    position: absolute;
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
    bottom: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    /* semi-transparent black */
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    z-index: 10;
    border: none;
    pointer-events: none;
    /* So the whole area triggers upload */
    user-select: none;
    transition: background 0.2s;
}

.tool-tip {
    font-size: 0.7rem;
}

.certificate-upload-rect-container {
    position: relative;
    width: 240px;
    /* Adjust as needed */
    height: 180px;
    /* Adjust as needed */
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.certificate-upload-preview-rect {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    background: #f8f9fa;
    display: block;
    border: 1px dotted var(--secondary-color);
}

/* Professional Information Field Card Styles */
.info-field-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    padding: 1.25rem 1rem;
    margin-bottom: 1.25rem;
}

.info-field-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    color: #6b7280;
    /* gray-500 */
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.info-field-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    /* gray-800 */
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (min-width: 768px) {
    .form-card {
        max-width: 400px;
        padding: 2.5rem;
    }

    .form-button {
        width: 125px;
    }

    .bottom-navbar {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .form-card {
        max-width: 450px;
    }
}

/* Bottom Navigation Bar Styles */
.bottom-navbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
    padding: 0.25rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    width: 100vw;
    max-width: 100vw;
}

.bottom-nav-row {
    width: 100%;
    margin: 0;
    border: none;
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
    height: 100%;
    width: 100%;
    transition: color 0.2s;
}

.bottom-nav-link:active,
.bottom-nav-link:focus,
.bottom-nav-link.active {
    color: #E65600;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.bottom-nav-icon {
    font-size: 1.5rem;
    margin-bottom: 0.15rem;
    color: #64748b;
    transition: color 0.2s;
}

.bottom-nav-link:active .bottom-nav-icon,
.bottom-nav-link:focus .bottom-nav-icon,
.bottom-nav-link.active .bottom-nav-icon {
    color: #E65600;
}

.bottom-nav-label {
    font-size: 0.65rem;
    margin-top: 0.1rem;
    color: #64748b;
}

/* Vertical info list for professional info page */
.info-list-vertical {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.5rem;
    list-style: none;
    margin: 0 0 0.5rem 0;
    padding: 0;
}

.info-list-vertical .info-value {
    display: inline-block;
    background: #f3f4f6;
    color: #1f2937;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 0.5rem;
    padding: 0.25em 0.9em;
    margin: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    border: 1px solid #e5e7eb;
    letter-spacing: 0.01em;
    transition: background 0.2s, color 0.2s;
}

/* Certificate Card Styles - Modern, Clean, Responsive */
.certificates-list {
    margin-top: 0.5rem;
}

.certificate-card {
    background: #fff;
    border: 1px solid #e7eaf3;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    padding: 1.1rem 1rem 1rem 1rem;
    display: flex;
    align-items: center;
    transition: box-shadow 0.2s;
    margin-bottom: 1.25rem;
}

.certificate-card-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.certificate-info {
    flex: 1 1 0%;
    min-width: 0;
}

.certificate-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.15rem;
    letter-spacing: -0.01em;
    word-break: break-word;
}

.certificate-issuer {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.certificate-id,
.certificate-issue-date,
.certificate-expiration-date {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.1rem;
    font-weight: 500;
}

.certificate-image {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 0.5rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    margin-left: 1rem;
    flex-shrink: 0;
    display: block;
}

.certificate-card-inner.clickable {
    cursor: pointer;
    transition: background 0.1s;
}

.certificate-card-inner.clickable:hover {
    background: #f5f5f5;
}

/* Modal styles */
#certificate-modal .modal-cert-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
}

.modal-certificate-image {
    width: 240px;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    background: #fafafa;
}

.modal-cert-details-list {
    margin-top: 1.2rem;
    width: 100%;
    text-align: center;
    font-size: 1.08rem;
    color: #222;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.modal-cert-details-list>div {
    margin-bottom: 0.5rem;
}

.modal-cert-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.2rem;
    letter-spacing: -0.01em;
}

.modal-cert-issuer {
    font-size: 1rem;
    color: #64748b;
    ;
    font-weight: 500;
    margin-bottom: 0.1rem;
}

.modal-cert-id {
    font-size: 0.98rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.modal-cert-date-row {
    font-size: 0.97rem;
    color: #444;
    margin-bottom: 0.1rem;
}

.modal-cert-label {
    color: #3f3f3f;
    font-weight: 500;
}

/* Hide modal form by default, shown via callback */
#modal-cert-form {
    width: 100%;
    margin-top: 1.5rem;
}

/* Modal buttons */
#certificate-modal .modal-footer .btn {
    min-width: 100px;
}

/* Responsive modal */
@media (max-width: 600px) {
    #certificate-modal .modal-dialog {
        max-width: 98vw;
        margin: 0.5rem auto;
    }
}

/* --- Certificate Upload (Rectangle) --- */
.certificate-upload-container {
    width: 100%;
    max-width: 340px;
    aspect-ratio: 4/3;
    position: relative;
    margin: 0 auto 1rem auto;
    border-radius: 12px;
    overflow: hidden;
    border: 2px dashed #d1d5db;
    background: #fafbfc;
    transition: border-color 0.2s;
}

.certificate-upload-container:hover,
.certificate-upload-dropzone:hover {
    border-color: #888;
}

.certificate-upload-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    background: #f3f4f6;
    display: block;
}

.certificate-upload-overlay {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.65);
    border-radius: 6px;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    cursor: pointer;
}

.certificate-upload-icon {
    color: #fff;
    font-size: 1.2rem;
}

.certificate-upload-text {
    text-align: center;
    color: #666;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.certificate-upload-dropzone {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 3;
}

/* --- Date Picker Consistency --- */
.date-picker-wrapper {
    position: relative;
    width: 100%;
    /* border: 1px solid red; */
    /* height: 30px; */
}

.certificate-date-picker {
    width: 100%;
    padding-right: 2.2rem;
    background: #fff;
    border-radius: 8px;

    font-size: 1rem;
    min-height: 44px;
    /* border: 2px solid blue !important; */
    border: 1px solid #d1d5db;
}

.SingleDatePicker,
.SingleDatePickerInput,
.DateInput,
.DateInput_input {
    border: none;
}


.DateInput_input {
    font-size: 1rem;
    height: 30px;
}


.date-picker-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 1.2rem;
    pointer-events: none;
    /* border: 1px solid green; */
}

/* --- General Consistency --- */
.info-label {
    font-weight: 500;
    color: #222;
    font-size: 1rem;
}

.form-input {
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 1rem;
    min-height: 44px;
    background: #fff;
    padding: 0.5rem 1rem;
}

/* for the text input when select other from dropdown */
.other-input {
    margin-top: 0.5rem;
    border: 2px solid red;
}


.modal-footer-center {
    display: flex !important;
    justify-content: center !important;
    /* gap: 0.75rem; */
}

.modal-cert-tabs{
    padding: 0;
    margin: 0;
    margin-bottom: 5px;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tab-item-image {
    padding-top: 0.1rem;
    padding-bottom: 0;
    font-size: small;
    border: none !important;
    color:gray !important;
}
.tab-item-image:active, .tab-item-image:focus,  .tab-item-image:hover, .tab-item-image.active {
    color: black !important;
    /* font-weight: 600 !important; */
    background-color: rgb(243, 242, 242) !important;
}

.notification-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    align-items: center;
    transition: box-shadow 0.2s;
    margin-bottom: 0.5rem;
}

.notification-unread-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    margin-right: 10px;
    vertical-align: middle;
}

.notification-unread-dot-read {
    display: none;
}

.notification-bage {
    background-color: rgb(var(--logo-primary)) !important;
}

.modal-notification-image {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.notification-image {
    max-width: 100%;
    max-height: 100px;
    /* height: auto; */
    object-fit: contain;
    border-radius: 8px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.notification-desc {
    /* color: red; */
    font-size: small;
}
/* Responsive for certificate upload */
@media (max-width: 600px) {
    .certificate-upload-container {
        max-width: 100%;
        aspect-ratio: 4/3;
    }
}