body {
    background-color: #f8f9fa;
    font-family: 'IRANSans', Tahoma, sans-serif;
    direction: rtl;
}

a {
    font-family: inherit;
}

button.logout-link {
    font-family: 'IRANSans';
}

.dashboard-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    padding-bottom: 120px;
    font-family: 'IRANSans';
}

.profile-header {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.cover-photo {
    background-image: url('https://via.placeholder.com/1200x200');
    height: 200px;
    background-size: cover;
    background-position: center;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.profile-info {
    display: flex;
    align-items: center;
    padding: 20px;
    margin-top: 10px;
}

.profile-picture img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid #fff;
    margin-top: -75px;
}

.profile-details {
    margin-right: 20px;
}

.profile-details h2 {
    margin: 0;
    font-size: 24px;
}

.profile-details p {
    margin: 0;
    color: #6c757d;
}

.profile-actions {
    margin-left: auto;
}

.profile-actions button {
    background-color: #fff;
    border: 1px solid #008c95;
    color: #008c95;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Page back link - button style for returning to dashboard */
.page-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4b5563;
    background-color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-family: 'IRANSans', sans-serif;
    padding: 9px 14px;
    margin-bottom: 16px;
    border-radius: 9px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(28, 43, 65, 0.04);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.page-back-link::before {
    content: "→";
    font-size: 18px;
    line-height: 1;
}
.page-back-link:hover {
    background-color: var(--primary-soft);
    border-color: rgba(0, 140, 149, 0.3);
    color: var(--primary);
    box-shadow: none;
}

/* Tabs Styles */
.tabs-container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.tabs-nav {
    display: none;
}

.tab-btn {
    padding: 10px 20px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: 'IRANSans', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.tab-text {
    display: inline;
}

.tab-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.tab-btn.active {
    background-color: #008c95;
    color: #fff;
    border-color: #008c95;
}

.tabs-content {
    padding: 20px;
    flex: 1;
}

/* Mobile Navigation Bar */
.mobile-nav-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent;
    pointer-events: none;
}

.mobile-nav-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #fff;
    border-radius: 50px;
    padding: 6px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    max-width: calc(100% - 24px);
    width: fit-content;
    flex-wrap: nowrap;
}

.mobile-nav-btn {
    width: 30px;
    height: 38px;
    min-width: 38px;
    flex-shrink: 0;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    position: relative;
}

.mobile-nav-btn .tab-icon {
    width: 32px;
    height: 32px;
    stroke: #000;
    stroke-width: 2;
    fill: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mobile-nav-btn:first-child .tab-icon {
    width: 32px;
    height: 32px;
}

.mobile-nav-btn.active {
    background-color: #008C95;
}

.mobile-nav-btn.active .tab-icon {
    stroke: #fff;
}

.mobile-nav-btn:hover:not(.active) {
    background-color: #f3f4f6;
}

/* Responsive adjustments for smaller mobile screens */
@media (max-width: 480px) {
    .mobile-nav-bar {
        padding: 10px;
    }

    .mobile-nav-container {
        gap: 6px;
        padding: 5px 10px;
        max-width: calc(100% - 20px);
    }

    .mobile-nav-btn {
        width: 34px;
        height: 34px;
        min-width: 34px;
    }

    .mobile-nav-btn .tab-icon {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 360px) {
    .mobile-nav-bar {
        padding: 8px;
    }

    .mobile-nav-container {
        gap: 4px;
        padding: 4px 8px;
        max-width: calc(100% - 16px);
    }

    .mobile-nav-btn {
        width: 30px;
        height: 30px;
        min-width: 30px;
    }

    .mobile-nav-btn .tab-icon {
        width: 16px;
        height: 16px;
    }
}

/* Desktop Sidebar Navigation */
@media (min-width: 1024px) {
    .tabs-container {
        display: flex;
        flex-direction: row;
        background-color: transparent;
        box-shadow: none;
        gap: 0;
        position: relative;
    }

    .tabs-nav {
        display: flex;
        flex-direction: column;
        width: 80px;
        min-width: 80px;
        padding: 0;
        background-image: url('../assets/sidebar-bg.png');
        background-size: 100% 100%;
        background-position: center;
        background-repeat: no-repeat;
        border-bottom: none;
        border-radius: 0;
        position: fixed;
        right: 0;
        top: 0;
        bottom: 0;
        height: 100vh;
        overflow: hidden;
        align-items: center;
        justify-content: center;
        gap: 20px;
        padding: 40px 0;
        margin-right: 0;
        z-index: 15;
        box-shadow: none;
    }

    .mobile-nav-bar {
        display: none;
    }

    /* Light blue line on right edge */
    .tabs-nav::before {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        background: #60A5FA;
    }

    .tab-btn {
        width: 50px;
        height: 50px;
        padding: 0;
        background: transparent;
        border: none;
        border-radius: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        flex-direction: column;
        gap: 4px;
    }

    .tab-icon {
        width: 50px;
        height: 40px;
        stroke: white;
        stroke-width: 2;
        fill: none;
        transition: all 0.3s ease;
    }

    .tab-text {
        display: none;
    }

    .tab-tooltip {
        position: absolute;
        right: 100%;
        margin-right: 15px;
        padding: 8px 12px;
        background-color: rgba(0, 0, 0, 0.85);
        color: white;
        border-radius: 6px;
        font-size: 12px;
        white-space: nowrap;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: all 0.3s ease;
        font-family: 'IRANSans', sans-serif;
        z-index: 1000;
    }

    .tab-tooltip::after {
        content: '';
        position: absolute;
        left: 100%;
        top: 50%;
        transform: translateY(-50%);
        border: 6px solid transparent;
        border-left-color: rgba(0, 0, 0, 0.85);
    }

    .tab-btn:hover {
        background: transparent;
        border: none;
    }

    .tab-btn:hover .tab-icon {
        stroke: rgba(255, 255, 255, 0.9);
        transform: scale(1.1);
    }

    .tab-btn:hover .tab-tooltip {
        opacity: 1;
        visibility: visible;
    }

    .tab-btn.active {
        background: transparent;
        border: none;
    }

    .tab-btn.active .tab-icon {
        stroke: white;
        stroke-width: 2.5;
    }

    .tabs-content {
        flex: 1;
        background-color: #fff;
        border-radius: 10px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        padding: 20px;
        margin-right: 0;
        width: 100%;
    }

    .dashboard-container {
        padding-right: 100px;
        padding-bottom: 20px;
    }
}

/* Inner Tabs Styles */
.inner-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 15px;
    background-color: rgba(248, 249, 250, 0);
    border-radius: 0;
    margin-bottom: 20px;
    border: none;
    border-bottom: 1px solid #e0e7ff;
    justify-content: center;
}

.inner-tab-btn {
    padding: 16px 12px;
    background-color: #e9ecef;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: 'IRANSans', sans-serif;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 90px;
    min-height: 100px;
}

/* Mobile styles for inner tabs */
@media (max-width: 1023px) {
    .inner-tabs-nav {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 15px;
        justify-content: stretch;
    }
    
    .inner-tab-btn {
        width: 100%;
        min-width: 0;
        flex: 1;
        padding: 12px 8px;
        min-height: 90px;
    }
    
    .inner-tab-icon {
        width: 32px;
        height: 32px;
    }
    
    .inner-tab-text {
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    .inner-tabs-nav {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 12px;
    }
    
    .inner-tab-btn {
        min-height: 85px;
        padding: 10px 6px;
    }
    
    .inner-tab-icon {
        width: 28px;
        height: 28px;
    }
    
    .inner-tab-text {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .inner-tabs-nav {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 10px;
    }
    
    .inner-tab-btn {
        min-height: 80px;
        padding: 8px 4px;
    }
    
    .inner-tab-icon {
        width: 24px;
        height: 24px;
    }
    
    .inner-tab-text {
        font-size: 9px;
    }
}

.inner-tab-icon {
    width: 40px;
    height: 40px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    transition: all 0.3s ease;
}

.inner-tab-text {
    font-size: 12px;
    display: block;
    text-align: center;
    line-height: 1.3;
}

.inner-tab-btn:hover {
    background-color: #dee2e6;
    transform: translateY(-2px);
}

.inner-tab-btn.active {
    background-color: #008C95;
    color: #fff;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.inner-tab-btn.active .inner-tab-icon {
    stroke: #fff;
}

.inner-tabs-content {
    position: relative;
}

.inner-tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.inner-tab-pane.active {
    display: block;
}

/* Inner Tab Detail Page */
.inner-tab-detail-page {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    z-index: 1000;
    overflow-y: auto;
    animation: slideInRight 0.3s ease;
}

.inner-tab-detail-page.active {
    display: block;
}

.inner-tab-detail-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    background-color: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.inner-tab-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background-color: transparent;
    border-radius: 50%;
    cursor: pointer;
    margin-left: 12px;
    transition: all 0.3s ease;
    color: #495057;
}

.inner-tab-back-btn:hover {
    background-color: #f3f4f6;
    color: #008C95;
}

.inner-tab-back-btn svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
}

.inner-tab-detail-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    font-family: 'IRANSans', sans-serif;
}

.inner-tab-detail-content {
    padding: 20px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    background-color: #fff;
    border: 1px solid #e9eef3;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 6px 18px rgba(28, 43, 65, 0.05);
}

.card-header {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h3 {
    margin: 0;
    font-size: 18px;
}

.card-header .icon {
    margin-left: 10px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.info-row:last-child {
    border-bottom: none;
}

.card-body h4 {
    margin-top: 20px;
    font-size: 16px;
}

.card-body ul {
    list-style: none;
    padding: 0;
}

.card-body ul li {
    padding: 5px 0;
}

.card-body input,
.card-body select,
.card-body button {
    font-family: 'IRANSans', sans-serif;
}

.btn-edit {
    min-height: 42px;
    padding: 9px 18px;
    background-color: #008c95;
    color: #fff;
    text-decoration: none;
    border-radius: 9px;
    font-size: 14px;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    font-family: 'IRANSans', sans-serif;
    border-color: rgba(0, 0, 0, 0);
    border-width: 0px;
    border-style: none;
    border-image: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1.5;
}

.btn-edit:hover {
    background-color: var(--primary-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(0, 140, 149, 0.18);
}

.btn-edit:disabled,
.btn-view:disabled,
.btn-cancel:disabled,
button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
    box-shadow: none;
}

/* Shared form and action system */
.form-group,
.mb-3 {
    margin-bottom: 18px;
}

.form-group label,
.form-label,
.form-grid > label,
.family-form label {
    display: block;
    margin-bottom: 7px;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
}

.form-control,
.form-group input,
.form-group select,
.form-group textarea,
.form-grid input:not([type="checkbox"]):not([type="radio"]),
.form-grid select,
.form-grid textarea,
.family-form input:not([type="checkbox"]):not([type="radio"]),
.family-form select,
.family-form textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
    direction: rtl;
    text-align: right;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

textarea.form-control,
.form-group textarea,
.form-grid textarea,
.family-form textarea {
    min-height: 108px;
    resize: vertical;
    line-height: 1.8;
}

.form-control:hover,
.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #b7c3cf;
}

.form-control:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.family-form input:focus,
.family-form select:focus,
.family-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 140, 149, 0.12);
}

.form-control:disabled,
.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
    color: #8b95a6;
    background: #f3f5f7;
    cursor: not-allowed;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.btn-view,
.btn-cancel {
    min-height: 38px;
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-view {
    color: var(--primary);
    background: var(--primary-soft);
    border-color: rgba(0, 140, 149, 0.18);
}

.btn-view:hover {
    color: var(--primary-hover);
    background: #d8f1f2;
}

.btn-cancel {
    color: #b4232f;
    background: #fff5f5;
    border-color: #f3c9cd;
}

.btn-cancel:hover {
    color: #8f1721;
    background: #fee8ea;
}

.card-header > .page-back-link {
    margin: 0;
}

@media (max-width: 640px) {
    .dashboard-container {
        margin-top: 12px;
        padding: 12px;
        padding-bottom: 100px;
    }

    .card {
        padding: 16px;
        border-radius: 12px;
    }

    .card-header {
        align-items: flex-start;
        gap: 12px;
    }

    .form-actions > .btn-edit,
    .form-actions > .btn-cancel {
        flex: 1 1 140px;
    }
}

.text-content {
    line-height: 1.8;
    color: #495057;
    padding: 10px 0;
}

.text-muted {
    color: #6c757d;
    font-style: italic;
}

/* Skills page (inner tab detail) */
.skills-detail-card {
    margin-bottom: 24px;
}

.skills-detail-card:last-child {
    margin-bottom: 0;
}

.skills-section-block {
    margin-bottom: 24px;
}

.skills-section-block:last-child {
    margin-bottom: 0;
}

.skills-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
    font-family: 'IRANSans', sans-serif;
}

.skills-section-content {
    line-height: 1.7;
    color: #4b5563;
    font-size: 14px;
    padding: 4px 0;
}

.skills-section-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 20px 0;
    border: none;
}

.skills-proficiency-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-top: 12px;
}

.skills-proficiency-label {
    font-size: 14px;
    color: #6b7280;
}

.skills-proficiency-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'IRANSans', sans-serif;
}

.skills-proficiency-badge.excellent {
    background-color: #d1fae5;
    color: #065f46;
}

.skills-proficiency-badge.intermediate {
    background-color: #fef3c7;
    color: #92400e;
}

.skills-proficiency-badge.weak {
    background-color: #e5e7eb;
    color: #374151;
}

.skills-hint {
    font-size: 13px;
    color: #6b7280;
    font-style: italic;
    margin-bottom: 16px;
    line-height: 1.5;
}

.skills-languages-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.skills-language-card {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-right: 4px solid #008c95;
    border-radius: 10px;
    padding: 16px 18px;
    transition: box-shadow 0.2s ease;
}

.skills-language-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.skills-language-name {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.skills-language-name-icon {
    font-size: 20px;
}

.skills-language-proficiency-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.skills-language-proficiency-label {
    font-size: 13px;
    color: #6b7280;
}

.skills-empty-state {
    text-align: center;
    padding: 36px 20px;
    color: #6b7280;
}

.skills-empty-state-icon {
    font-size: 42px;
    margin-bottom: 12px;
    opacity: 0.8;
}

.skills-empty-state-title {
    margin: 0 0 6px 0;
    font-size: 15px;
}

.skills-empty-state-hint {
    margin: 0;
    font-size: 13px;
    color: #9ca3af;
}
