/* =========================================================
   PROFILE PAGE
========================================================= */

.profile-page {
    width: 100%;
}

/* =========================================================
   ALERT
========================================================= */

.profile-alert {
    display: flex;

    align-items: flex-start;

    gap: 10px;

    margin-bottom: 20px;

    padding: 13px 15px;

    border-radius: 11px;

    font-size: 0.82rem;

    line-height: 1.5;
}

.profile-alert-success {
    border: 1px solid #d7eadf;

    background: #f1faf5;

    color: #276749;
}

.profile-alert-danger {
    border: 1px solid #f0d3d0;

    background: #fdf4f3;

    color: #9f3028;
}

.profile-alert i {
    margin-top: 2px;

    font-size: 0.95rem;
}

/* =========================================================
   PROFILE GRID
========================================================= */

.profile-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.1fr)
        minmax(0, 0.9fr);

    gap: 20px;

    align-items: start;
}

/* =========================================================
   PROFILE CARD
========================================================= */

.profile-card {
    overflow: hidden;

    background: #ffffff;

    border: 1px solid var(--layout-border);

    border-radius: var(--layout-radius);

    box-shadow: 0 2px 10px rgba(45, 35, 28, 0.025);
}

.profile-card-header {
    display: flex;

    align-items: flex-start;

    gap: 13px;

    padding: 20px 22px;

    border-bottom: 1px solid var(--layout-border);
}

.profile-card-icon {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: var(--layout-primary-soft);

    color: var(--layout-primary);

    font-size: 1rem;
}

.profile-card-icon-security {
    background: #f4f0e9;

    color: #765c3e;
}

.profile-card-header h2 {
    margin: 0;

    color: var(--layout-text);

    font-size: 0.95rem;

    font-weight: 700;
}

.profile-card-header p {
    margin: 4px 0 0;

    color: var(--layout-muted);

    font-size: 0.75rem;

    line-height: 1.5;
}

/* =========================================================
   CARD BODY
========================================================= */

.profile-card-body {
    padding: 22px;
}

/* =========================================================
   FORM FIELD
========================================================= */

.profile-field {
    margin-bottom: 18px;
}

.profile-label {
    display: block;

    margin-bottom: 7px;

    color: #514840;

    font-size: 0.77rem;

    font-weight: 650;
}

.profile-input {
    width: 100%;

    min-height: 43px;

    padding: 9px 12px;

    border: 1px solid #ddd7d1;

    border-radius: 9px;

    outline: none;

    background: #ffffff;

    color: var(--layout-text);

    font-size: 0.82rem;

    transition:
        border-color var(--layout-transition),
        box-shadow var(--layout-transition),
        background-color var(--layout-transition);
}

.profile-input::placeholder {
    color: #aaa29a;
}

.profile-input:hover {
    border-color: #cfc5bd;
}

.profile-input:focus {
    border-color: var(--layout-primary);

    box-shadow: 0 0 0 3px rgba(111, 78, 55, 0.09);
}

.profile-input.is-invalid {
    border-color: var(--layout-danger);

    background: #fffafa;
}

.profile-help {
    display: block;

    margin-top: 6px;

    color: #989088;

    font-size: 0.68rem;

    line-height: 1.5;
}

.profile-error {
    margin-top: 6px;

    color: var(--layout-danger);

    font-size: 0.7rem;
}

/* =========================================================
   READONLY ROLE
========================================================= */

.profile-readonly {
    min-height: 43px;

    display: flex;

    align-items: center;

    gap: 9px;

    padding: 8px 11px;

    border: 1px solid #e5dfda;

    border-radius: 9px;

    background: #f8f6f4;

    color: #5d554e;

    font-size: 0.8rem;
}

.profile-readonly-icon {
    color: var(--layout-primary);

    font-size: 0.9rem;
}

.profile-readonly-badge {
    margin-left: auto;

    padding: 4px 7px;

    border-radius: 6px;

    background: #ece7e2;

    color: #84796f;

    font-size: 0.62rem;

    font-weight: 600;
}

/* =========================================================
   PASSWORD INPUT
========================================================= */

.profile-password-wrapper {
    position: relative;
}

.profile-password-wrapper .profile-input {
    padding-right: 43px;
}

.profile-password-toggle {
    position: absolute;

    top: 50%;
    right: 5px;

    width: 34px;
    height: 34px;

    display: flex;

    align-items: center;
    justify-content: center;

    transform: translateY(-50%);

    border: 0;

    border-radius: 7px;

    background: transparent;

    color: #8e857d;

    font-size: 0.9rem;

    cursor: pointer;

    transition:
        background-color var(--layout-transition),
        color var(--layout-transition);
}

.profile-password-toggle:hover {
    background: #f5f1ee;

    color: var(--layout-primary);
}

/* =========================================================
   SECURITY NOTE
========================================================= */

.profile-security-note {
    display: flex;

    align-items: flex-start;

    gap: 9px;

    margin-top: 4px;

    padding: 11px 12px;

    border: 1px solid #e9e0d4;

    border-radius: 9px;

    background: #faf7f2;

    color: #75685b;

    font-size: 0.69rem;

    line-height: 1.55;
}

.profile-security-note i {
    margin-top: 1px;

    color: var(--layout-primary);

    font-size: 0.85rem;
}

/* =========================================================
   CARD FOOTER
========================================================= */

.profile-card-footer {
    display: flex;

    justify-content: flex-end;

    padding-top: 5px;
}

/* =========================================================
   PRIMARY BUTTON
========================================================= */

.profile-primary-button {
    min-height: 40px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 7px;

    padding: 8px 14px;

    border: 0;

    border-radius: 9px;

    background: var(--layout-primary);

    color: #ffffff;

    font-size: 0.77rem;

    font-weight: 600;

    cursor: pointer;

    transition:
        background-color var(--layout-transition),
        transform var(--layout-transition),
        box-shadow var(--layout-transition);
}

.profile-primary-button:hover {
    background: var(--layout-primary-dark);

    color: #ffffff;

    transform: translateY(-1px);

    box-shadow: 0 5px 12px rgba(111, 78, 55, 0.16);
}

.profile-primary-button:active {
    transform: translateY(0);
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 991.98px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 575.98px) {
    .profile-card-header {
        padding: 17px;
    }

    .profile-card-body {
        padding: 17px;
    }

    .profile-card-footer {
        justify-content: stretch;
    }

    .profile-primary-button {
        width: 100%;
    }

    .profile-readonly-badge {
        display: none;
    }
}
