/* =========================================================
   EDU-COMPETENCE
   Global stylesheet
   ========================================================= */

:root {
    --primary: #155e8a;
    --primary-dark: #102a43;
    --secondary: #0f766e;
    --success: #198754;
    --info: #0dcaf0;
    --warning: #f59e0b;
    --danger: #dc3545;

    --bg: #f4f7fb;
    --card: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e5eaf0;

    --sidebar-width: 260px;

    --radius: 16px;
    --shadow: 0 5px 20px rgba(15, 23, 42, 0.07);
}


/* =========================================================
   RESET
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;

    font-family: "Inter", "Segoe UI", Arial, sans-serif;

    background: var(--bg);
    color: var(--text);

    min-height: 100vh;
}

a {
    text-decoration: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;

    position: fixed;
    left: 0;
    top: 0;

    background:
        linear-gradient(
            180deg,
            #102a43 0%,
            #174a6e 55%,
            #155e8a 100%
        );

    color: white;

    padding-bottom: 30px;

    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);

    z-index: 1000;

    overflow-y: auto;
}


/* Logo */

.sidebar-logo {
    padding: 28px 20px 20px;
    text-align: center;
}

.sidebar-logo h3 {
    color: white;
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 6px;
}

.sidebar-logo p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 10px;
    margin: 0;
}


/* User */

.sidebar-user {
    margin: 10px 18px 20px;

    padding: 15px;

    background: rgba(255, 255, 255, 0.10);

    border-radius: 14px;
}

.sidebar-avatar {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: white;
    color: var(--primary);

    border-radius: 50%;

    flex-shrink: 0;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.sidebar-user-role {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 2px;
}


/* Menu */

.sidebar-menu {
    padding: 0 12px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;

    gap: 13px;

    color: #dceaf5;

    padding: 13px 15px;

    margin: 4px 0;

    border-radius: 10px;

    font-size: 13px;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.sidebar-menu a i {
    width: 20px;
    text-align: center;
    font-size: 14px;
}

.sidebar-menu a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.12);

    transform: translateX(2px);
}

.sidebar-menu a.active {
    color: white;

    background: rgba(255, 255, 255, 0.16);

    box-shadow:
        inset 3px 0 0 white;
}


/* =========================================================
   MAIN CONTENT
   ========================================================= */

.content {
    margin-left: var(--sidebar-width);

    min-height: 100vh;

    padding: 28px;

    background: var(--bg);
}

.main {
    margin-left: var(--sidebar-width);

    min-height: 100vh;

    padding: 28px;

    background: var(--bg);
}


/* =========================================================
   PAGE HEADER
   ========================================================= */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 24px;
}

.page-title h2 {
    margin: 0;

    font-size: 25px;
    font-weight: 800;

    color: var(--text);
}

.page-title p {
    margin: 5px 0 0;

    font-size: 12px;
    color: var(--muted);
}


/* =========================================================
   STATISTICS CARDS
   ========================================================= */

.stat-card {
    background: var(--card);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 22px;

    margin-bottom: 20px;

    box-shadow: var(--shadow);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.10);
}

.stat-card h2,
.stat-card h3 {
    margin: 0 0 7px;

    color: var(--primary);

    font-size: 28px;
    font-weight: 800;
}

.stat-card p {
    margin: 0;

    color: var(--muted);

    font-size: 12px;
    font-weight: 500;
}


/* =========================================================
   CARDS
   ========================================================= */

.card {
    border: 1px solid var(--border) !important;

    border-radius: var(--radius) !important;

    box-shadow: var(--shadow) !important;

    overflow: hidden;
}

.card-header {
    font-size: 13px;

    font-weight: 600;

    padding: 15px 18px;

    border: none;
}

.card-body {
    padding: 20px;
}


/* Custom card */

.card-custom {
    background: white;

    border: 1px solid var(--border);

    border-radius: 17px;

    overflow: hidden;

    box-shadow: var(--shadow);
}

.card-header-custom {
    padding: 17px 20px;

    border-bottom: 1px solid #edf2f7;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header-custom h5 {
    margin: 0;

    font-size: 15px;

    font-weight: 700;
}

.card-body-custom {
    padding: 20px;
}


/* =========================================================
   TABLE
   ========================================================= */

.table {
    margin-bottom: 0;

    font-size: 12px;

    vertical-align: middle;
}

.table thead th {
    color: #475569;

    font-size: 11px;

    font-weight: 700;

    background: #f8fafc;

    border-bottom: 1px solid var(--border);
}

.table tbody td {
    color: #475569;

    padding-top: 13px;
    padding-bottom: 13px;
}

.table-hover tbody tr:hover {
    background: #f8fafc;
}


/* =========================================================
   BADGES
   ========================================================= */

.badge {
    font-weight: 600;

    font-size: 10px;

    padding: 6px 9px;

    border-radius: 8px;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
    border-radius: 9px;

    font-size: 12px;

    font-weight: 600;

    padding: 9px 15px;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary);

    border-color: var(--primary);
}

.btn-primary:hover {
    background: #104e73;

    border-color: #104e73;

    box-shadow:
        0 5px 15px rgba(21, 94, 138, 0.20);
}

.btn-success {
    background: var(--success);

    border-color: var(--success);
}

.btn-warning {
    color: #212529;
}


/* =========================================================
   FORM
   ========================================================= */

.form-control,
.form-select {
    border: 1px solid #dce4ec;

    border-radius: 10px;

    padding: 10px 12px;

    font-size: 12px;

    color: var(--text);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(21, 94, 138, 0.08);
}

.form-label {
    font-size: 12px;

    font-weight: 600;

    color: #475569;
}


/* =========================================================
   TEXTAREA
   ========================================================= */

textarea {
    width: 100%;

    min-height: 140px;

    border: 1px solid #dce4ec;

    border-radius: 12px;

    padding: 14px;

    resize: vertical;

    font-size: 12px;

    color: var(--text);

    background: white;
}

textarea:focus {
    outline: none;

    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(21, 94, 138, 0.08);
}


/* =========================================================
   LIST GROUP
   ========================================================= */

.list-group-item {
    border-color: #edf2f7;

    font-size: 12px;

    color: #475569;

    padding: 13px 15px;
}

.list-group-item:hover {
    background: #f8fafc;
}


/* =========================================================
   DASHBOARD WELCOME
   ========================================================= */

.welcome-card {
    position: relative;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--secondary)
        );

    color: white;

    border-radius: 20px;

    padding: 30px;

    margin-bottom: 24px;
}

.welcome-card h1 {
    font-size: 27px;

    font-weight: 800;

    margin-bottom: 10px;
}

.welcome-card p {
    max-width: 800px;

    font-size: 13px;

    line-height: 1.7;

    opacity: 0.9;

    margin: 0;
}

.welcome-badge {
    display: inline-block;

    padding: 6px 12px;

    background: rgba(255, 255, 255, 0.15);

    border-radius: 20px;

    font-size: 10px;

    margin-bottom: 12px;
}


/* =========================================================
   IMAR
   ========================================================= */

.imar-container {
    background: white;

    border: 1px solid var(--border);

    border-radius: 18px;

    padding: 18px;

    box-shadow: var(--shadow);
}

.imar {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 10px;
}

.imar-stage {
    padding: 13px 8px;

    text-align: center;

    background: #f8fafc;

    border: 1px solid #e2e8f0;

    border-radius: 12px;

    transition: 0.2s ease;
}

.imar-stage:hover {
    transform: translateY(-2px);
}

.imar-stage.active {
    background: #eaf6f5;

    border-color: #58a6a0;
}

.imar-stage.done {
    background: #eff8f1;

    border-color: #86c997;
}

.imar-letter {
    width: 35px;
    height: 35px;

    margin: 0 auto 7px;

    border-radius: 50%;

    display: flex;

    align-items: center;
    justify-content: center;

    background: var(--primary);

    color: white;

    font-size: 13px;

    font-weight: 800;
}

.imar-stage h6 {
    font-size: 11px;

    font-weight: 700;

    margin: 0;
}

.imar-stage p {
    font-size: 9px;

    color: var(--muted);

    margin: 4px 0 0;
}


/* =========================================================
   COMPETENCY
   ========================================================= */

.competency-card {
    background: white;

    border: 1px solid var(--border);

    border-radius: 17px;

    padding: 20px;

    box-shadow: var(--shadow);
}

.competency-title {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 18px;
}

.competency-title h5 {
    margin: 0;

    font-size: 14px;

    font-weight: 700;
}

.competency-item {
    margin-bottom: 16px;
}

.competency-label {
    display: flex;

    justify-content: space-between;

    font-size: 11px;

    font-weight: 600;

    margin-bottom: 6px;
}

.competency-progress {
    height: 8px;

    background: #edf2f7;

    border-radius: 20px;

    overflow: hidden;
}

.competency-progress-bar {
    height: 100%;

    background:
        linear-gradient(
            90deg,
            var(--primary),
            var(--secondary)
        );

    border-radius: 20px;
}


/* =========================================================
   COURSE CARD
   ========================================================= */

.course-card {
    background: white;

    border: 1px solid var(--border);

    border-radius: 16px;

    padding: 20px;

    height: 100%;

    box-shadow: var(--shadow);

    transition: 0.2s ease;
}

.course-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 10px 28px rgba(15, 23, 42, 0.10);
}

.course-icon {
    width: 48px;
    height: 48px;

    border-radius: 12px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #eef6fb;

    color: var(--primary);

    font-size: 20px;

    margin-bottom: 15px;
}

.course-card h5 {
    font-size: 14px;

    font-weight: 700;

    margin-bottom: 7px;
}

.course-card p {
    font-size: 11px;

    color: var(--muted);

    line-height: 1.6;
}


/* =========================================================
   ACTIVITY
   ========================================================= */

.activity-item {
    display: flex;

    align-items: flex-start;

    gap: 12px;

    padding: 14px 0;

    border-bottom: 1px solid #edf2f7;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 34px;
    height: 34px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #eef6fb;

    color: var(--primary);

    font-size: 12px;
}

.activity-item p {
    margin: 0;

    font-size: 11px;

    color: #475569;

    line-height: 1.6;
}


/* =========================================================
   LOGIN PAGE
   ========================================================= */

.login-page {
    min-height: 100vh;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            135deg,
            #102a43,
            #155e8a,
            #0f766e
        );

    padding: 20px;
}

.login-wrapper {
    width: 100%;

    max-width: 420px;
}

.login-card {
    background: white;

    border-radius: 22px;

    padding: 35px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.18);
}

.login-logo {
    width: 65px;
    height: 65px;

    margin: 0 auto 18px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 18px;

    background: #eef6fb;

    color: var(--primary);

    font-size: 28px;
}

.login-card h2 {
    text-align: center;

    font-size: 22px;

    font-weight: 800;

    margin-bottom: 7px;
}

.login-card .subtitle {
    text-align: center;

    color: var(--muted);

    font-size: 11px;

    margin-bottom: 25px;
}

.login-footer {
    text-align: center;

    color: var(--muted);

    font-size: 10px;

    margin-top: 20px;
}


/* =========================================================
   DASHBOARD TOPBAR
   ========================================================= */

.topbar {
    background: white;

    border: 1px solid var(--border);

    border-radius: 15px;

    padding: 12px 18px;

    margin-bottom: 22px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    box-shadow: var(--shadow);
}

.topbar-left {
    display: flex;

    align-items: center;

    gap: 12px;
}

.topbar-logo {
    width: 38px;
    height: 38px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #eef6fb;

    color: var(--primary);

    border-radius: 10px;
}

.topbar-title {
    font-size: 14px;

    font-weight: 700;
}

.topbar-subtitle {
    font-size: 10px;

    color: var(--muted);
}


/* =========================================================
   SEARCH
   ========================================================= */

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;

    left: 12px;
    top: 50%;

    transform: translateY(-50%);

    color: #94a3b8;

    font-size: 12px;
}

.search-box input {
    padding-left: 35px;

    height: 38px;

    border: 1px solid var(--border);

    border-radius: 10px;

    font-size: 11px;
}


/* =========================================================
   NOTIFICATION
   ========================================================= */

.notification {
    position: relative;

    width: 38px;
    height: 38px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #f8fafc;

    border-radius: 10px;

    color: #64748b;

    cursor: pointer;
}

.notification-badge {
    position: absolute;

    right: 5px;
    top: 4px;

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--danger);

    border: 1px solid white;
}


/* =========================================================
   HERO / IMAR RESEARCH
   ========================================================= */

.hero {
    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--secondary)
        );

    color: white;

    border-radius: 20px;

    padding: 30px;

    margin-bottom: 22px;
}

.hero h1 {
    font-size: 27px;

    font-weight: 800;

    margin-bottom: 10px;
}

.hero p {
    font-size: 13px;

    line-height: 1.7;

    max-width: 850px;

    margin: 0;

    opacity: 0.92;
}

.hero-badge {
    display: inline-block;

    padding: 6px 12px;

    background: rgba(255, 255, 255, 0.15);

    border-radius: 20px;

    font-size: 11px;

    margin-bottom: 12px;
}


/* =========================================================
   PROBLEM BOX
   ========================================================= */

.problem-box {
    background: #f8fafc;

    border-left: 4px solid var(--primary);

    padding: 18px;

    border-radius: 0 12px 12px 0;

    margin-bottom: 18px;
}

.problem-box h6 {
    font-size: 13px;

    font-weight: 700;
}

.problem-box p {
    font-size: 12px;

    line-height: 1.7;

    color: #475569;

    margin: 0;
}


/* =========================================================
   QUESTION
   ========================================================= */

.question {
    padding: 15px;

    border: 1px solid var(--border);

    border-radius: 12px;

    margin-bottom: 12px;

    background: white;
}

.question-number {
    width: 27px;
    height: 27px;

    flex-shrink: 0;

    border-radius: 50%;

    background: #eef6fb;

    color: var(--primary);

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 11px;

    font-weight: 700;
}

.question p {
    font-size: 12px;

    font-weight: 600;

    margin: 0;
}


/* =========================================================
   CASCADE
   ========================================================= */

.cascade {
    display: flex;

    flex-direction: column;

    gap: 9px;
}

.cascade-item {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 12px;

    border: 1px solid var(--border);

    border-radius: 11px;

    background: white;
}

.cascade-number {
    width: 30px;
    height: 30px;

    flex-shrink: 0;

    border-radius: 50%;

    background: var(--primary);

    color: white;

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 11px;

    font-weight: 700;
}

.cascade-item h6 {
    margin: 0;

    font-size: 11px;

    font-weight: 700;
}

.cascade-item p {
    margin: 3px 0 0;

    font-size: 9px;

    color: var(--muted);
}


/* =========================================================
   CONCEPT MAP
   ========================================================= */

.map-area {
    min-height: 270px;

    background: #f8fafc;

    border: 1px dashed #cbd5e1;

    border-radius: 14px;

    position: relative;

    padding: 20px;
}

.map-center {
    position: absolute;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    background: var(--primary);

    color: white;

    padding: 14px 20px;

    border-radius: 12px;

    font-size: 12px;

    font-weight: 700;

    box-shadow:
        0 8px 20px rgba(21, 94, 138, 0.18);
}

.map-node {
    position: absolute;

    background: white;

    border: 1px solid #dce4ec;

    padding: 10px 13px;

    border-radius: 10px;

    font-size: 10px;

    font-weight: 600;

    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.05);
}


/* =========================================================
   PROGRESS
   ========================================================= */

.progress {
    height: 8px;

    background: #edf2f7;

    border-radius: 20px;
}

.progress-bar {
    border-radius: 20px;

    background:
        linear-gradient(
            90deg,
            var(--primary),
            var(--secondary)
        );
}


/* =========================================================
   FOOTER ACTION
   ========================================================= */

.bottom-action {
    margin-top: 22px;

    background: white;

    border: 1px solid var(--border);

    border-radius: 17px;

    padding: 18px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    box-shadow: var(--shadow);
}

.bottom-action p {
    margin: 0;

    color: var(--muted);

    font-size: 11px;
}


/* =========================================================
   SCROLLBAR
   ========================================================= */

::-webkit-scrollbar {
    width: 7px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;

    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 992px) {

    :root {
        --sidebar-width: 80px;
    }

    .sidebar {
        width: 80px;
    }

    .sidebar-logo h3 {
        font-size: 0;
    }

    .sidebar-logo h3::before {
        content: "🎓";
        font-size: 25px;
    }

    .sidebar-logo p {
        display: none;
    }

    .sidebar-user {
        margin: 10px;

        padding: 10px;

        display: flex;

        justify-content: center;
    }

    .sidebar-user-name,
    .sidebar-user-role {
        display: none;
    }

    .sidebar-menu a {
        justify-content: center;

        padding: 13px 5px;
    }

    .sidebar-menu a span {
        display: none;
    }

    .content,
    .main {
        margin-left: 80px;

        padding: 20px;
    }

    .imar {
        grid-template-columns: repeat(2, 1fr);
    }
}


@media (max-width: 768px) {

    .content,
    .main {
        padding: 15px;
    }

    .page-header,
    .topbar {
        flex-direction: column;

        align-items: flex-start;

        gap: 12px;
    }

    .welcome-card,
    .hero {
        padding: 22px;
    }

    .welcome-card h1,
    .hero h1 {
        font-size: 22px;
    }

    .stat-card {
        padding: 18px;
    }

    .bottom-action {
        flex-direction: column;

        align-items: stretch;

        gap: 15px;
    }

    .bottom-action .btn {
        width: 100%;
    }
}


@media (max-width: 576px) {

    .sidebar {
        width: 65px;
    }

    .content,
    .main {
        margin-left: 65px;

        padding: 12px;
    }

    .imar {
        grid-template-columns: 1fr 1fr;

        gap: 7px;
    }

    .imar-stage {
        padding: 10px 5px;
    }

    .imar-letter {
        width: 30px;
        height: 30px;
    }

    .map-area {
        min-height: 330px;
    }

    .map-center {
        font-size: 10px;

        padding: 11px 14px;
    }

    .map-node {
        font-size: 9px;
    }
}


/* =========================================================
   UTILITY CLASSES
   ========================================================= */

.text-primary-custom {
    color: var(--primary) !important;
}

.text-muted-custom {
    color: var(--muted) !important;
}

.bg-primary-custom {
    background: var(--primary) !important;
}

.bg-secondary-custom {
    background: var(--secondary) !important;
}

.shadow-soft {
    box-shadow: var(--shadow) !important;
}

.rounded-custom {
    border-radius: var(--radius) !important;
}