:root {
    --bg: #f3f6f6;
    --card: #ffffff;
    --accent: #f97316;
    --muted: #6b7280;
    --shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
    --radius: 12px;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

* {
    box-sizing: border-box
}

html,
body,
#root {
    height: 100%
}

body {
    margin: 0;
    background: linear-gradient(180deg, #e9efee 0%, #f3f6f6 100%);
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* Layout */
.app {
    display: flex;
    gap: 24px;
    padding: 24px;
    align-items: stretch
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--card);
    border-radius: 16px;
    padding: 18px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 48px);
    min-height: 560px;
    position: sticky;
    top: 24px;
}

.brand .logo {
    font-weight: 700;
    color: #0f5132;
    font-size: 20px;
    margin-bottom: 12px;
}

.brand .logo span {
    color: var(--accent)
}

.nav {
    flex: 1;
    overflow: auto;
    padding-right: 6px
}

.nav ul {
    list-style: none;
    padding: 0;
    margin: 0
}

.nav-item button,
.nav-item a {
    padding: 10px 8px;
    border-radius: 8px;
    color: #374151;
    font-size: 14px;
    margin: 6px 0;
    cursor: pointer;
    border: none;
    background-color: transparent;
    text-decoration: none;
}

.nav-item:hover {
    background: #f1f5f4
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f1f5f4;
}

.user-mini {
    display: flex;
    gap: 10px;
    align-items: center
}

.avatar-small img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover
}

.mini-info .mini-name {
    font-weight: 600
}

.mini-info .mini-role {
    font-size: 12px;
    color: var(--muted)
}

/* Main area */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0
}

.topbar {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.search input {
    width: 420px;
    max-width: 60vw;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid #e6eef0;
    background: #f8fafb;
}

.top-right {
    display: flex;
    gap: 14px;
    align-items: center;
    color: var(--muted)
}

/* Content */
.content {
    padding: 8px 0
}

.page-title {
    font-size: 18px;
    color: #0f172a;
    margin: 10px 0 20px
}

/* Cards */
.card {
    background: var(--card);
    border-radius: 12px;
    padding: 18px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

/* Profile summary */
.profile-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.profile-left {
    display: flex;
    gap: 16px;
    align-items: center
}

.avatar-wrap {
    position: relative;
    width: 92px;
    height: 92px
}

.avatar-wrap img {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid rgba(243, 243, 247, 0.8)
}

.camera-btn {
    position: absolute;
    right: 2px;
    bottom: 2px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.18)
}

.camera-btn svg {
    display: block
}

.profile-info #name {
    font-weight: 700
}

.profile-info #role {
    font-size: 13px;
    color: var(--muted);
    margin-top: 6px
}

.profile-actions {
    display: flex;
    gap: 10px;
    align-items: center
}

/* Buttons */
.btn {
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: none;
}

.btn.orange {
    background: var(--accent);
    color: #fff
}

.btn.orange:hover {
    filter: brightness(.95)
}

.btn.outline {
    background: transparent;
    border: 1px solid #e6eef0;
    color: var(--muted)
}

.small-btn {
    background: transparent;
    border: 1px solid #e6eef0;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer
}

.small-btn:hover {
    background: #fff7ed
}

/* Info card grid */
.info-card .card-body.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 12px;
    align-content: center;
    /* text-align: center; */
}

.info-card .card-body.gridCourse {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* gap: 200px; */
    margin-top: 12px;
    align-content: space-between;
    width: 100%;
    margin-bottom: 50px;

}

.label {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
    border-bottom: 1px solid var(--accent);
    width: fit-content;
}

.value {
    font-weight: 600;
    color: #0f172a
}

/* Card header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.card-header h3 {
    margin: 0;
    font-size: 15px
}

.card-body {
    padding-top: 8px
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(11, 15, 19, 0.35);
    z-index: 50;
}

.modal.hidden {
    display: none
}

.modal-content {
    width: 520px;
    max-width: calc(100% - 40px);
    background: var(--card);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.12);
    position: relative;
}

.modal-content h3 {
    margin-top: 0
}

.close {
    position: absolute;
    right: 12px;
    top: 10px;
    border: none;
    background: transparent;
    font-size: 16px;
    cursor: pointer
}

/* Form */
.form-row {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column
}

.form-row label {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px
}

.form-row input,
.form-row select {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e6eef0;
    background: #fbfcfe;
    outline: none;
}

.form-row.actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px
}

/* Toast */
.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    background: #081c15;
    color: #bff3d3;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(6, 95, 70, 0.12)
}

.toast.hidden {
    display: none
}

.input-field.success {
    border-bottom: 2px solid green !important;
}

/* input في حالة خطأ */
.input-field.input-error {
    border-bottom: 2px solid red !important;
}

/* رسائل الخطأ */
.error {
    font-size: 14px;
    color: red;
    margin-top: 5px;
    /* display: none; */
}

.burger {
    display: none;
    font-size: 26px;
    background: transparent;
    border: none;
    cursor: pointer;
    margin: 10px 10px 0px 10px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    /* لو اللغة عربية وعايزة النافذة يمين خليه right بدل left */
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}


/* Responsive */
@media(max-width:900px) {
    .app {
        flex-direction: column;
        padding: 12px;
        gap: 10px;
    }

    .burger {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 260px;
        height: 100%;

        flex-direction: column;
        padding: 18px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar.hidden {
        display: none;
    }

    .nav ul {
        display: flex;
        flex-direction: column;
    }

    .nav ul li {
        width: 100%;
    }

    .main {
        order: 1
    }

    .profile-summary {
        flex-direction: column;
        align-items: flex-start
    }

    .info-card .card-body.grid {
        grid-template-columns: repeat(1, 1fr)
    }

    .info-card .card-body.gridCourse {
        grid-template-columns: repeat(1, 1fr);
        gap: 20px
    }

    .topbar {
        height: 40px;
        margin-bottom: 0px;
    }
}