/* ==========================================================================
   GLOBAL RESET MECHANICS & REDDIT SANS FONT ENFORCEMENT
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Reddit Sans', sans-serif; 
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: #fcfcff;
}

/* ==========================================================================
   SIDEBAR DIMENSIONS (RETAINED EXACT ORIGINAL MEASUREMENTS)
   ========================================================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    min-height: 100vh;
    width: 92px;
    background-color: #5848CB;
    padding: .4rem .8rem;
    transition: all 0.5s ease;
    z-index: 999;
}

.sidebar.active {
    width: 250px;
}

/* ==========================================================================
   MAIN CONTENT DYNAMIC SHIFT CONTROLLERS
   ========================================================================== */
.main-content {
    position: relative;
    background-color: #f8f9fd; /* Subtly tinted modern background tone */
    min-height: 100vh;
    top: 0;
    left: 92px;
    transition: all 0.5s ease;
    width: calc(100% - 92px);
    padding: 3rem;
}

.sidebar.active ~ .main-content {
    left: 250px;
    width: calc(100% - 250px);
}

/* ==========================================================================
   SIDEBAR CORE COMPONENTS
   ========================================================================== */
.sidebar #btn {
    position: absolute;
    color: #fff;
    top: 0.8rem;
    left: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transform: translateX(-50%);
    cursor: pointer;
    transition: all 0.4s ease;
    margin-bottom: 30px;
}

.sidebar.active #btn {
    left: 50%;
    transform: translateX(-50%);
}

.sidebar .top .logo {
    width: 100%;
    opacity: 1;
    margin-top: 70px;
    margin-bottom: 35px;
    transition: all 0.4s ease;
    display: flex;
    justify-content: center;
}

.logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
}

.logo-link img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    transition: all 0.4s ease;
}

.sidebar.active .logo-link img {
    width: 65px;
    height: 65px;
}

.logo-link span {
    font-size: 1.4rem;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.sidebar:not(.active) .logo-link span {
    opacity: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

.sidebar.active .logo-link span {
    opacity: 1;
    width: auto;
}

.top .logo i {
    font-size: 2rem;
    margin-right: 5px;
}

.nav-list {
    margin-top: 35px;
}

.sidebar ul li {
    position: relative;
    list-style-type: none;
    margin: 12px 0;
    line-height: 50px;
    display: flex;
    justify-content: center;
}

.sidebar ul li a {
    color: #fff;
    display: flex;
    align-items: center;
    width: 100%;
    text-decoration: none;
    border-radius: 0.8rem;
    padding-left: 10px;
}

.sidebar ul li a:hover {
    background-color: #fff;
    color: #5848CB;
}

.sidebar ul li a i {
    min-width: 50px;
    text-align: center;
    height: 50px;
    border-radius: 12px;
    line-height: 50px;
    font-size: 1.4rem;
}

.sidebar .nav-item {
    opacity: 0;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.sidebar.active .nav-item {
    opacity: 1;
}

.sidebar ul li .tooltip {
    position: absolute;
    left: 125px;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0.5rem 1rem rgba(88, 72, 203, 0.15);
    border-radius: .6rem;
    padding: .4rem 1.2rem;
    line-height: 1.8rem;
    z-index: 20;
    opacity: 0;
    background: white;
    color: #5848CB;
    font-weight: 600;
    pointer-events: none;
    transition: all 0.2s ease;
}

.sidebar:not(.active) ul li:hover .tooltip {
    opacity: 1;
}

.sidebar.active ul li .tooltip {
    display: none;
}

.sidebar:not(.active) .logo-link {
    transform: translateX(6px);
}

.sidebar.active .top .logo {
    display: flex;
    justify-content: flex-start;
    padding-left: 22px;
}

/* ==========================================================================
   SETTINGS WRAPPER & VISUAL ENHANCEMENTS
   ========================================================================== */
.settings-container {
    max-width: 950px;
    margin: 0 auto;
}

.settings-title {
    color: #1e1b3d;
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 28px;
    letter-spacing: -0.5px;
}

/* Modern Rounded Tab Controls */
.settings-tabs {
    display: flex;
    gap: 6px;
    background-color: #f0f2f9;
    padding: 6px;
    border-radius: 40px;
    width: fit-content;
    margin-bottom: 35px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: #6c7293;
    padding: 12px 26px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 35px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn:hover {
    color: #5848CB;
}

.tab-btn.active {
    background-color: #5848CB;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(88, 72, 203, 0.25);
}

/* Container Dashboard Card Box */
.tab-content-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(165, 173, 201, 0.1);
    border: 1px solid rgba(235, 237, 247, 0.8);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-heading {
    color: #1e1b3d;
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.section-subheading {
    color: #787f95;
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.section-divider {
    border: 0;
    height: 1px;
    background-color: #ebeef5;
    margin-bottom: 35px;
}

/* ==========================================================================
   AVATAR SECTION (PREVENTS SQUISHING SYSTEMWIDE)
   ========================================================================== */
.photo-upload-group {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-bottom: 40px;
}

.avatar-wrapper {
    position: relative;
    /* Strict dimensions lock standard box models */
    width: 110px;
    height: 110px;
    min-width: 110px;
    min-height: 110px;
}

.profile-avatar {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 15px rgba(88, 72, 203, 0.15);
    background-color: #f4f5fa;
    display: block;
}

.camera-badge {
    position: absolute;
    bottom: 0px;
    right: 0px;
    background-color: #ffffff;
    color: #5848CB;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    border: 1px solid #eef0f8;
    transition: all 0.2s ease;
}

.camera-badge:hover {
    background-color: #5848CB;
    color: #ffffff;
    transform: scale(1.05);
}

.photo-actions {
    display: flex;
    gap: 12px;
}

.btn-upload {
    background-color: #5848CB;
    color: #ffffff;
    border: none;
    padding: 12px 22px;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-upload:hover {
    background-color: #4536b3;
}

.btn-upload:active {
    transform: scale(0.98);
}

.btn-remove {
    background-color: #ffffff;
    color: #6c7293;
    border: 1px solid #e2e5f1;
    padding: 12px 22px;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-remove:hover {
    background-color: #fff5f5;
    color: #ff4d4d;
    border-color: #ffcccc;
}

/* ==========================================================================
   INPUT STYLING & STRUCTURES
   ========================================================================== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 32px;
    margin-bottom: 45px;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-group label {
    color: #1e1b3d;
    font-size: 0.95rem;
    font-weight: 700;
}

.input-group input[type="text"],
.input-group input[type="email"],
.input-group input[type="tel"] {
    width: 100%;
    padding: 14px 20px;
    font-size: 0.95rem;
    color: #1e1b3d;
    background-color: #ffffff;
    border: 1.5px solid #e1e4ed;
    border-radius: 14px;
    outline: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.input-group input::placeholder {
    color: #a0a6c0;
}

.input-group input:focus {
    border-color: #5848CB;
    box-shadow: 0 0 0 4px rgba(88, 72, 203, 0.1);
}

/* Selector Flags */
.phone-input-wrapper {
    display: flex;
    gap: 12px;
}

.country-select {
    padding: 0 16px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #4c5270;
    background-color: #ffffff;
    border: 1.5px solid #e1e4ed;
    border-radius: 14px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.country-select:focus {
    border-color: #5848CB;
}

/* Bottom Action Groups */
.form-actions {
    display: flex;
    gap: 16px;
    border-top: 1px solid #ebeef5;
    padding-top: 30px;
}

.btn-save {
    background-color: #5848CB;
    color: #ffffff;
    border: none;
    padding: 15px 36px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 14px;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.btn-save:hover {
    background-color: #4536b3;
    box-shadow: 0 4px 15px rgba(88, 72, 203, 0.3);
}

.btn-cancel {
    background-color: #ffffff;
    color: #6c7293;
    border: 1px solid #e1e4ed;
    padding: 15px 36px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background-color: #f5f6fa;
    color: #1e1b3d;
    border-color: #cbd0e1;
}

.coming-soon-text {
    color: #787f95;
    font-style: italic;
    font-size: 0.95rem;
}