:root {
    --primary: #2e2d88;
    --primary-dark: #252471;
    --primary-light: #4a47a3;
    --secondary: #6c757d;
    --secondary-dark: #5a6268;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --light: #f8f9fa;
    --dark: #343a40;
    --white: #ffffff;
    --border: #e1e5e9;
    --text: #333333;
    --text-muted: #6c757d;
    --shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: var(--light);
    display: flex;
flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* ===== REGISTER/LOGIN WRAPPER ===== */
.register-wrapper,
.login-wrapper,
.forgot-wrapper,
.reset-wrapper {
    display: flex;
    width: 100%;
    max-width: 900px;
    background: var(--white);
    border-radius: var(--radius);

    /* ===== DOCUMENTS PAGE STYLES ===== */
    .documents-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
        margin-bottom: 10px;
    }

    .document-section {
        background: #fbfdff;
        border: 1px solid var(--border);
        padding: 18px;
        border-radius: 10px;
    }

    .document-section h3 {
        margin-bottom: 14px;
        color: var(--primary-dark);
        font-size: 1.05rem;
    }

    .document-row {
        display: flex;
        gap: 12px;
        margin-bottom: 12px;
        flex-wrap: wrap;
    }

    .document-item {
        flex: 1 1 calc(50% - 12px);
        background: #fff;
        border: 1px solid var(--border);
        padding: 12px;
        border-radius: 8px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        min-width: 220px;
    }

    .document-item.full-width {
        flex: 1 1 100%;
    }

    .document-item label {
        font-weight: 700;
        font-size: 0.95rem;
        color: var(--text);
    }

    .document-item input[type="file"] {
        border: 1px dashed var(--border);
        padding: 10px;
        border-radius: 6px;
        background: linear-gradient(180deg, #ffffff, #fbfbfd);
    }

    .document-item small {
        color: var(--text-muted);
        font-size: 0.85rem;
    }

    .existing-file {
        margin-top: 6px;
        background: #f1f9f5;
        padding: 8px 10px;
        border-radius: 6px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        border: 1px solid rgba(40,167,69,0.08);
        color: #155724;
        font-size: 0.9rem;
    }

    .existing-file .view-link {
        background: transparent;
        color: var(--primary);
        text-decoration: none;
        font-weight: 600;
        border: none;
    }

    .view-link:hover { text-decoration: underline; }

    #documentsErrorBox {
        margin-bottom: 18px;
        text-align: left;
    }

    .form-actions {
        display: flex;
        gap: 12px;
        align-items: center;
    }

    .form-actions > a.btn-secondary,
    .form-actions > button.btn-primary {
        flex: 1 1 0;
        padding: 12px 18px;
    }

    @media (max-width: 768px) {
        .documents-grid { grid-template-columns: 1fr; }
        .document-item { flex: 1 1 100%; }
    }

    /* ===== CUSTOM FILE CHOOSER ===== */
    .custom-file {
        position: relative;
        display: flex;
        gap: 10px;
        align-items: center;
    }

    .custom-file input[type="file"] {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        cursor: pointer;
    }

    .custom-file-button {
        background: linear-gradient(135deg, var(--primary), var(--primary-light));
        color: var(--white);
        border: none;
        padding: 8px 12px;
        border-radius: 6px;
        font-weight: 700;
        cursor: pointer;
        font-size: 0.95rem;
    }

    .custom-file-name {
        flex: 1 1 auto;
        font-size: 0.9rem;
        color: var(--text-muted);
        padding: 8px 10px;
        border-radius: 6px;
        background: #f7f9fb;
        border: 1px solid var(--border);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .custom-file-clear {
        background: transparent;
        border: none;
        color: var(--danger);
        font-weight: 700;
        cursor: pointer;
        padding: 6px 8px;
    }

    .custom-file.drag-over {
        outline: 2px dashed rgba(46,45,136,0.25);
        background: linear-gradient(180deg, #ffffff, #fbfbff);
    }

    @media (max-width: 480px) {
        .custom-file { flex-direction: column; align-items: stretch; }
        .custom-file-button { width: 100%; }
        .custom-file-name { width: 100%; }
    }


    box-shadow: var(--shadow);
    overflow: hidden;
    min-height: 600px;
}

.register-left,
.login-left,
.forgot-left,
.reset-left {
    flex: 1;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.left-content {
    text-align: center;
}

.left-content h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.left-content p {
    font-size: 1rem;
    opacity: 0.9;
}

.register-card,
.login-card,
.forgot-card,
.reset-card {
    flex: 1;
    max-width: 500px;
}

.card-body {
    padding: 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 30px;
    text-align: center;
}

/* ===== FORM STYLES ===== */
.form-row {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
select {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    transition: var(--transition);
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 45, 136, 0.1);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232e2d88' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* ===== BUTTON STYLES ===== */
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 45, 136, 0.3);
}

/* ===== LINK STYLES ===== */
.login-link,
.register-link,
.back-login {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: var(--text-muted);
}

.login-link a,
.register-link a,
.back-login a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
    transition: var(--transition);
}

.login-link a:hover,
.register-link a:hover,
.back-login a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.forgot-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* ===== ALERT STYLES ===== */
.alert {
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
    border: 1px solid transparent;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* ===== PERSONAL DETAILS STYLES ===== */
.personal-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: var(--light);
}

.personal-card {
    width: 100%;
    max-width: 900px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: none;
}

.personal-card .card-body {
    padding: 40px;
}

.personal-card h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 30px;
    text-align: center;
}

/* ===== QUALIFICATION SECTION STYLES ===== */
.qualification-section {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 25px;
    background: var(--white);
    transition: var(--transition);
    position: relative;
}

.qualification-section.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 45, 136, 0.1);
}

.qualification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.qualification-title {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.qualification-title i {
    font-size: 1.1em;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn-remove, .btn-add {
    background: var(--danger);
    color: var(--white);
    border: none;
    padding: 8px 15px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.btn-add {
    background: var(--success);
}

.btn-remove:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.btn-add:hover {
    background: #218838;
    transform: translateY(-1px);
}

/* ===== FORM STYLES ===== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.form-row {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

label.required::after {
    content: '*';
    color: var(--danger);
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
select {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    transition: var(--transition);
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 45, 136, 0.1);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232e2d88' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* ===== PROGRESS BAR ===== */
.progress-container {
    margin-bottom: 30px;
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 10px;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border);
    transform: translateY(-50%);
    z-index: 1;
}

.progress-step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    position: relative;
    z-index: 2;
}

.progress-step.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.progress-step.completed {
    background: var(--success);
    border-color: var(--success);
    color: var(--white);
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.progress-labels span {
    text-align: center;
    width: 80px;
}

/* ===== BUTTON STYLES ===== */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    padding: 14px 25px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 45, 136, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    color: var(--white);
    border: none;
    padding: 12px 25px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: var(--transition);
    flex: 1;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #1565c0, #0d47a1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(25, 118, 210, 0.3);
}

/* ===== FORM ACTIONS ===== */
.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
}

/* Make Previous and Save areas equal width and buttons inside take full half */
.form-actions > .btn-secondary {
    flex: 1 1 0;
}
.form-actions > div {
    flex: 1 1 0;
    display: flex;
    gap: 12px;
}

.form-actions > div .btn-primary,
.form-actions > div .btn-secondary {
    flex: 1 1 0;
}

/* Override Save button color inside the form actions to a green gradient */
.form-actions .btn-primary {
    background: linear-gradient(135deg, #2e7d32, #388e3c);
    border: none;
}
.form-actions .btn-primary:hover {
    background: linear-gradient(135deg, #276c2b, #2f7a33);
}

/* ===== ALERT STYLES ===== */
.alert {
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
    border: 1px solid transparent;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .personal-card {
        max-width: 100%;
    }
    
    .personal-card .card-body {
        padding: 30px 25px;
    }
    
    h2 {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .progress-labels {
        display: none;
    }
    
    .progress-bar {
        justify-content: center;
        gap: 40px;
    }
    
    .qualification-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }
    
    .personal-card .card-body {
        padding: 25px 20px;
    }
    
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    select {
        padding: 10px 12px;
    }
    
    .btn-primary, .btn-secondary {
        padding: 12px;
        font-size: 14px;
    }
    
    .progress-bar {
        gap: 30px;
    }
    
    .progress-step {
        width: 25px;
        height: 25px;
        font-size: 0.7rem;
    }
    
    .qualification-section {
        padding: 15px;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 360px) {
    .personal-card .card-body {
        padding: 20px 15px;
    }
    
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    select {
        padding: 8px 10px;
    }
    
    .btn-primary, .btn-secondary {
        padding: 10px;
    }
    
    .qualification-title {
        font-size: 1.1rem;
    }
}

/* Form Grid Layout */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-row.full-width {
    grid-column: 1 / -1;
}

/* Radio Button Styles */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 5px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 0;
}

.radio-label input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--primary);
}

.compact-radio {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.compact-radio .radio-label {
    font-size: 13px;
    gap: 6px;
    margin-top: 5px;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 30px;
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 10px;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border);
    transform: translateY(-50%);
    z-index: 1;
}

.progress-step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    position: relative;
    z-index: 2;
}

.progress-step.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.progress-step.completed {
    background: var(--success);
    border-color: var(--success);
    color: var(--white);
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.progress-labels span {
    text-align: center;
    width: 80px;
}

/* Required field indicator */
.required::after {
    content: " *";
    color: var(--danger);
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 20px;
}

.btn-secondary {
    background: var(--secondary);
    color: var(--white);
    border: none;
    padding: 12px 25px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: var(--transition);
    flex: 1;
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    transform: translateY(-1px);
}

/* Compact / small button variants for Previous / Upload / Next / Edit */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 6px;
    min-height: 36px;
    line-height: 1;
}

.btn-primary.btn-sm {
    padding: 9px 14px;
    font-size: 14px;
}

.btn-secondary.btn-sm {
    padding: 8px 12px;
    font-size: 13px;
    box-shadow: none;
}

.btn-upload {
    padding: 7px 10px;
    font-size: 13px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    border: none;
}

.btn-previous {
    background: #e9ecef;
    color: var(--text);
    border: 1px solid var(--border);
}

.form-actions { gap: 12px; }

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .register-wrapper,
    .login-wrapper,
    .forgot-wrapper,
    .reset-wrapper {
        flex-direction: column;
        max-width: 450px;
        min-height: auto;
    }
    
    .register-left,
    .login-left,
    .forgot-left,
    .reset-left {
        padding: 30px 20px;
        min-height: 120px;
    }
    
    .left-content h1 {
        font-size: 1.5rem;
    }
    
    .left-content p {
        font-size: 0.9rem;
    }
    
    .card-body {
        padding: 30px 25px;
    }
    
    h2 {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .progress-labels {
        display: none;
    }
    
    .progress-bar {
        justify-content: center;
        gap: 40px;
    }
    
    .radio-group {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }
    
    .card-body {
        padding: 25px 20px;
    }
    
    .register-left,
    .login-left,
    .forgot-left,
    .reset-left {
        padding: 25px 15px;
        min-height: 100px;
    }
    
    .left-content h1 {
        font-size: 1.3rem;
    }
    
    .left-content p {
        font-size: 0.8rem;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    select {
        padding: 10px 12px;
    }
    
    .btn-primary {
        padding: 12px;
        font-size: 14px;
    }
    
    .progress-bar {
        gap: 30px;
    }
    
    .progress-step {
        width: 25px;
        height: 25px;
        font-size: 0.7rem;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 360px) {
    .card-body {
        padding: 20px 15px;
    }
    
    .register-left,
    .login-left,
    .forgot-left,
    .reset-left {
        padding: 20px 15px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    select {
        padding: 8px 10px;
    }
    
    .btn-primary {
        padding: 10px;
    }
}

/* Left-side logout button */
.logout-btn-left {
    position: fixed;
    left: 12px;
    top: 18px;
    z-index: 1050;
    background: linear-gradient(135deg, #e23a3a, #c62828);
    color: #fff !important;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.logout-btn-left:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.16);
}

@media (max-width: 480px) {
    .logout-btn-left { left: 8px; top: 12px; padding: 7px 10px; }
}

/* ===== SIDEBAR / ASIDE (application views) ===== */
.app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 220px;
    background: #fff;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    padding: 20px 12px 12px 12px;
    z-index: 1040;
    font-family: Arial, Helvetica, sans-serif;
    overflow: auto;
}

.sidebar-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-nav .sidebar-item {
    display: block;
}

.sidebar-nav .sidebar-item a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    border: 1px solid transparent;
    background: transparent;
}

.sidebar-nav .sidebar-item a:hover {
    background: rgba(46,45,136,0.06);
    border-color: rgba(46,45,136,0.06);
}

.sidebar-nav .sidebar-item.active a {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white) !important;
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(46,45,136,0.12);
}

@media (max-width: 991px) {
    .app-sidebar { width: 100%; }
}

.app-sidebar .aside-photo {
    width: 120px;
    height: 140px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
    display: block;
    margin: 0 0 12px 0; /* left-align: no auto-centering */
}

.app-sidebar .aside-header {
    text-align: left;
    padding: 0;
}

/* ===== Dashboard layout tweaks ===== */
.dashboard-header h4 { margin-bottom: 0; }
.dashboard-header p { margin-bottom: 0; }
.dashboard-row { align-items: stretch; }
.dashboard-row > .col-md-3 { display: block; }
/* offset the main content when sidebar is fixed */
.dashboard-main { margin-left: 240px; }

@media (max-width: 991px) {
    /* revert to stacked layout on smaller screens */
    .app-sidebar { position: static; width: 100%; height: auto; border-radius: 10px; box-shadow: var(--shadow); }
    .dashboard-main { margin-left: 0; }
}

