/* ==========================
   RESET
========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    min-height: 100vh;
    /* padding removed from here so the header touches the top edge */
}

/* ==========================
   LAYOUT
========================== */

/* ==========================
   LAYOUT
========================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    margin-top: 20px;
    
    /* ADD THESE TWO LINES TO FIX THE WHITE SQUARE */
    background: transparent; 
    box-shadow: none;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.preferences-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* ==========================
   CARD
========================== */

.card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    padding: 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

.profile-card {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 20px;
}

/* ==========================
   PROFILE
========================== */

.profile-content {
    text-align: center;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        #3b82f6,
        #4f46e5
    );
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    overflow: hidden;
    position: relative;
}

.profile-avatar svg {
    width: 48px;
    height: 48px;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

#studentName {
    margin-top: 16px;
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

#examType {
    margin-top: 6px;
    color: #94a3b8;
    font-size: 14px;
}

/* ==========================
   BUTTONS
========================== */

.primary-outline-btn {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 600;
    cursor: pointer;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;

    transition: 0.3s;
}

.primary-outline-btn:hover {
    background: #dbeafe;
}

.success-btn {
    width: 100%;
    border: none;
    padding: 12px;
    border-radius: 12px;
    background: #10b981;
    color: white;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
    transition: 0.3s;
}

.success-btn:hover {
    background: #059669;
}

.dashed-btn {
    width: 100%;
    padding: 12px;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background: white;
    color: #64748b;
    cursor: pointer;
    font-weight: 600;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;

    transition: 0.3s;
}

.dashed-btn:hover {
    border-color: #3b82f6;
    color: #2563eb;
}

.cancel-btn {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: white;
    cursor: pointer;
    font-weight: 600;
}

.cancel-btn:hover {
    background: #f8fafc;
}

.save-btn {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: #2563eb;
    color: white;
    cursor: pointer;
    font-weight: 600;
}

.save-btn:hover {
    background: #1d4ed8;
}

/* ==========================
   PROGRESS SECTION
========================== */

.progress-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 20px;
}

.progress-circle {
    width: 180px;
    height: 180px;
}

.small-circle {
    width: 180px;
    height: 180px;
}

.circle-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 12;
}

.circle-percentile,
.circle-completion {
    fill: none;
    stroke-width: 12;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: center;

    /* Start empty */
    stroke-dasharray: 377;
    stroke-dashoffset: 377;

    transition: stroke-dashoffset 0.8s ease;
}

.circle-percentile {
    stroke: #3b82f6;
}

.circle-completion {
    stroke: #10b981;
}

.progress-text {
    position: absolute;
    inset: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.progress-text span {
    font-size: 32px;
    font-weight: 800;
}

.progress-text p {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.description {
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

/* ==========================
   SECTION HEADER
========================== */

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.section-header h3 {
    font-size: 20px;
    font-weight: 700;
}

.icon-box {
    width: 42px;
    height: 42px;
    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.blue-box {
    background: #dbeafe;
    color: #2563eb;
}

.purple-box {
    background: #ede9fe;
    color: #7c3aed;
}

/* ==========================
   LISTS
========================== */

.list-container {
    margin-bottom: 20px;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 14px;
    margin-bottom: 10px;

    border: 1px solid #e2e8f0;
    border-radius: 12px;

    background: #f8fafc;
}

.list-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.list-item-number {
    width: 28px;
    height: 28px;
    border-radius: 8px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 12px;
    font-weight: bold;
}

.branch-number {
    background: #dbeafe;
    color: #2563eb;
}

.city-number {
    background: #ede9fe;
    color: #7c3aed;
}

/* ==========================
   MODAL
========================== */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.5);

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 20px;
    z-index: 1000;
}

.hidden {
    display: none;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
    margin-bottom: 4px;
}

.modal-header p {
    color: #64748b;
    font-size: 13px;
}

.close-btn {
    border: none;
    background: transparent;
    cursor: pointer;
}

.close-btn svg {
    width: 22px;
    height: 22px;
}

/* ==========================
   FORM
========================== */

form {
    padding: 20px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;

    border: 1px solid #cbd5e1;
    border-radius: 12px;

    font-size: 15px;
}

.form-group input:focus {
    outline: none;
    border-color: #2563eb;
}

.button-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* ==========================
   RESPONSIVE
========================== */

@media (max-width: 992px) {

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .preferences-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 576px) {

    .container {
        padding: 15px;
    }

    .card {
        padding: 18px;
    }

    .progress-container {
        width: 150px;
        height: 150px;
    }

    .progress-circle {
        width: 150px;
        height: 150px;
    }

    .small-circle {
        width: 150px;
        height: 150px;
    }

    .progress-text {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .progress-text span {
        font-size: 24px;
    }

}