/* MySU portal — visual system carried over from the Pathify reference snapshot */

@font-face {
    font-family: 'Roboto';
    src: url('/static/assets/Roboto-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Roboto';
    src: url('/static/assets/Roboto-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'Roboto';
    src: url('/static/assets/Roboto-Italic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
}

:root {
    --primary: hsla(350, 90%, 40%, 1);
    --primary-d1: hsla(350, 93%, 32%, 1);
    --primary-d3: hsla(350, 90%, 16%, 1);
    --primary-l: hsla(350, 70%, 94%, 1);
    --n1: hsl(240, 4%, 95%);
    --n2: hsl(240, 5%, 92%);
    --n3: hsl(240, 6%, 88%);
    --n4: hsl(240, 7%, 76%);
    --n5: hsl(240, 6%, 47%);
    --n6: hsl(240, 8%, 35%);
    --n7: hsl(240, 16%, 12%);
    --white: hsl(0, 0%, 100%);
    --g2: hsl(141, 51%, 51%);
    --r2: hsl(357, 100%, 68%);
    --r3: hsl(354, 77%, 48%);
    --y2: hsl(35, 100%, 65%);
    --blue: hsl(230, 90%, 58%);

    --header-height: 64px;
    --menu-width: 260px;
    --card-shadow: 0 3px 10px -4px rgba(0,0,0,.08), 0 0 1px 0 rgba(0,0,0,.08);
    --card-shadow-hover: 0 8px 24px -8px rgba(0,0,0,.12), 0 0 2px 0 rgba(0,0,0,.1);
    --border-radius: 8px;
    --widget-spacing: 24px;
    --font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

/* Dark theme — palette modeled on Pathify's dark mode (Light/Dark/Auto in avatar menu) */
html[data-theme="dark"] {
    --n1: hsl(240, 6%, 11%);          /* page background */
    --n2: hsl(240, 5%, 20%);          /* borders */
    --n3: hsl(240, 5%, 26%);
    --n4: hsl(240, 5%, 44%);
    --n5: hsl(240, 5%, 64%);
    --n6: hsl(240, 6%, 78%);
    --n7: hsl(240, 12%, 93%);         /* primary text */
    --white: hsl(240, 5%, 15%);       /* card / surface */
    --primary: hsl(350, 85%, 64%);    /* hover accent */
    --primary-d1: hsl(352, 78%, 55%); /* brighter red: readable as link text on dark */
    --primary-l: hsla(350, 50%, 24%, 1);
    --card-shadow: 0 3px 10px -4px rgba(0,0,0,.5), 0 0 1px 0 rgba(0,0,0,.5);
    --card-shadow-hover: 0 8px 24px -8px rgba(0,0,0,.7), 0 0 2px 0 rgba(0,0,0,.6);
}
html[data-theme="dark"] .main::before { opacity: 0.07; }
html[data-theme="dark"] .header-logo,
html[data-theme="dark"] .login-card img {
    background: #fff;
    border-radius: 6px;
    padding: 2px 6px;
}
html[data-theme="dark"] .search-input { color: var(--n7); }
html[data-theme="dark"] .login-body::before { background: rgba(10,10,14,.8); }

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

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.5;
    color: var(--n7);
    background: var(--n1);
    overflow: hidden;
    height: 100vh;
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--white);
    border-bottom: 1px solid var(--n2);
    display: flex;
    align-items: center;
    padding: 0 16px;
    z-index: 1030;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.header-logo {
    height: 40px;
    object-fit: contain;
}
.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    color: var(--n5);
    display: flex;
    align-items: center;
}
.menu-toggle:hover { background: var(--n1); }

.header-search {
    flex: 1;
    max-width: 360px;
    margin-left: 24px;
}
.search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--n3);
    border-radius: 20px;
    font-size: 14px;
    font-family: var(--font-family);
    background: var(--n1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") 10px center no-repeat;
    outline: none;
    transition: border-color .15s;
}
.search-input:focus { border-color: var(--primary); }
.search-input::placeholder { color: var(--n4); }

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}
.header-user {
    font-size: 13px;
    color: var(--n6);
    text-align: right;
    line-height: 1.3;
}
.header-user .role {
    font-size: 11px;
    color: var(--n5);
    text-transform: capitalize;
}
.header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-d1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    cursor: default;
}
/* Avatar dropdown menu (mirrors Pathify's profile menu) */
.user-menu-wrap { position: relative; }
.avatar-btn { border: none; background: none; padding: 0; cursor: pointer; }
.user-menu {
    display: none;
    position: absolute;
    top: 46px;
    right: 0;
    width: 240px;
    background: var(--white);
    border: 1px solid var(--n2);
    border-radius: 8px;
    box-shadow: var(--card-shadow-hover);
    z-index: 1100;
    overflow: hidden;
}
.user-menu.open { display: block; }
.user-menu-head {
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--n2);
}
.user-menu-head .name { font-size: 14px; font-weight: 700; color: var(--n7); }
.user-menu-head .email { font-size: 12px; color: var(--n5); word-break: break-all; }
.user-menu-head .role { font-size: 11px; color: var(--n5); text-transform: capitalize; }
.user-menu-item {
    display: block;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--n7);
    text-decoration: none;
}
.user-menu-item:hover { background: var(--n1); }
.theme-switch {
    display: flex;
    gap: 4px;
    padding: 10px 12px;
    border-top: 1px solid var(--n2);
}
.theme-switch button {
    flex: 1;
    padding: 6px 0;
    font-size: 12px;
    font-family: var(--font-family);
    border: 1px solid var(--n3);
    background: none;
    color: var(--n6);
    border-radius: 14px;
    cursor: pointer;
}
.theme-switch button:hover { background: var(--n1); }
.theme-switch button.selected {
    background: var(--primary-l);
    border-color: var(--primary-d1);
    color: var(--primary-d1);
    font-weight: 700;
}
html[data-theme="dark"] .theme-switch button.selected { color: var(--n7); }

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: var(--menu-width);
    background: var(--white);
    border-right: 1px solid var(--n2);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1035;
    padding: 8px 0 120px;
    transition: width .3s ease;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--n3); border-radius: 3px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }

.nav-section { padding: 0 8px; }
.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: var(--n7);
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    gap: 12px;
    cursor: pointer;
    transition: background .1s;
}
.nav-item:hover { background: rgba(0,0,0,.04); }
.nav-item.active {
    background: var(--primary-l);
    font-weight: 500;
}
.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    fill: currentColor;
    opacity: .7;
}

.nav-separator {
    border: none;
    border-top: 1px solid var(--n2);
    margin: 8px 16px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 4px;
}
.section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--n7);
}

.nav-folder {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    gap: 12px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    color: var(--n7);
}
.nav-folder:hover { background: rgba(0,0,0,.04); }
.nav-folder .arrow {
    margin-left: auto;
    transition: transform .2s;
    opacity: .5;
}
.nav-folder.open .arrow { transform: rotate(90deg); }
.nav-folder svg:first-child { width: 20px; height: 20px; opacity: .7; }

.nav-subfolder {
    padding-left: 20px;
    display: none;
}
.nav-subfolder.open { display: block; }
.nav-subfolder .nav-item { font-size: 13px; padding: 8px 12px; }

/* ===== MAIN CONTENT ===== */
.main {
    margin-left: var(--menu-width);
    margin-top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}
.main::before {
    content: '';
    position: fixed;
    top: var(--header-height);
    left: var(--menu-width);
    right: 0;
    bottom: 0;
    background: url('/static/assets/portfolio-featured_0001_simpson-university-redding-ca_201.jpg') center top / cover no-repeat;
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}
.main > * { position: relative; z-index: 1; }

/* Hero Banner */
.hero-banner {
    margin: 16px 40px 0;
    height: 220px;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: url('/static/assets/portfolio-featured_0001_simpson-university-redding-ca_201.jpg') center center / cover no-repeat;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: flex-end;
}
.hero-greeting {
    background: linear-gradient(transparent, rgba(0,0,0,.55));
    width: 100%;
    padding: 32px 24px 16px;
    color: white;
    font-size: 22px;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

/* Quick Link Cards */
.quick-links {
    display: flex;
    gap: 20px;
    padding: 0 40px;
    margin-top: 20px;
    position: relative;
    z-index: 10;
}
.quick-link-card {
    flex: 1;
    height: 160px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    text-decoration: none;
}
.quick-link-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}
.quick-link-card .card-bg {
    position: absolute;
    inset: 0;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}
.quick-link-card .card-overlay {
    position: absolute;
    inset: 0;
    background: hsla(350, 93%, 32%, 0.8);
}
.quick-link-card .card-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.quick-link-card .card-title {
    color: white;
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.quick-link-card .card-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity .25s ease, max-height .25s ease;
}
.quick-link-card:hover .card-links {
    opacity: 1;
    max-height: 200px;
}
.quick-link-card .card-links a {
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 5px 16px;
    border-radius: 4px;
    background: rgba(255,255,255,.15);
    transition: background .15s;
    white-space: nowrap;
}
.quick-link-card .card-links a:hover {
    background: rgba(255,255,255,.3);
}

/* Widgets Section */
.widgets-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px 40px 16px;
}
.widgets-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--n7);
}

.widget-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--widget-spacing);
    padding: 0 40px 40px;
}
.widget-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    min-height: 48px;
}
.widget-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--n7);
    margin: 0;
}
.widget-content {
    padding: 0 16px 16px;
    flex: 1;
    min-height: 200px;
}

/* Balances Widget */
.balance-hero {
    text-align: center;
    padding: 12px 0 16px;
    border-bottom: 1px solid var(--n2);
    margin-bottom: 8px;
}
.balance-hero .amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--n7);
}
.balance-hero .label {
    font-size: 12px;
    color: var(--n5);
}
.balance-hero .due {
    font-size: 12px;
    color: var(--r3);
    font-weight: 500;
}
.balance-line {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 5px 0;
    color: var(--n6);
}
.balance-line .amt { font-weight: 500; color: var(--n7); }
.balance-line .amt.credit { color: var(--g2); }
.balance-aid {
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--primary-l);
    border-radius: 6px;
    font-size: 12px;
    color: var(--primary-d1);
}

/* Events Widget */
.event-item {
    display: flex;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--n2);
    gap: 12px;
}
.event-item:last-child { border-bottom: none; }
.event-date {
    text-align: center;
    min-width: 36px;
}
.event-date .month {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-d1);
    text-transform: uppercase;
}
.event-date .day {
    font-size: 18px;
    font-weight: 700;
    color: var(--n7);
}
.event-info { flex: 1; }
.event-meta {
    font-size: 11px;
    color: var(--n5);
}
.event-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--n7);
}
.btn-view-all, .btn-visit, .btn-connect {
    display: block;
    width: 100%;
    padding: 10px;
    background: var(--primary-d1);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-family);
    margin-top: 8px;
    text-align: center;
    text-decoration: none;
}
.btn-view-all:hover, .btn-visit:hover, .btn-connect:hover { background: var(--primary); }

/* Canvas Courses Widget */
.course-list { list-style: none; }
.course-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 13px;
    color: var(--primary-d1);
    cursor: pointer;
    text-decoration: none;
}
.course-item:hover { text-decoration: underline; }
.course-item svg { width: 16px; height: 16px; color: var(--primary-d1); flex-shrink: 0; fill: currentColor; }

/* Image Widgets */
.widget-image-fill {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}
.insta-card {
    display: flex;
    gap: 12px;
    padding: 8px 0;
}
.insta-thumb {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}
.insta-text {
    font-size: 12px;
    color: var(--n6);
    line-height: 1.4;
}
.insta-source {
    font-size: 11px;
    color: var(--n4);
    margin-top: 4px;
}

/* Outlook Widget */
.outlook-content {
    text-align: center;
    padding: 16px;
}
.outlook-content p {
    color: var(--n5);
    font-size: 13px;
    margin-bottom: 16px;
}

/* ===== Content pages / Resources ===== */
.page-container {
    max-width: 900px;
    margin: 24px 40px 60px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 32px 40px;
}
.page-container h1 {
    font-size: 26px;
    margin-bottom: 16px;
    color: var(--n7);
}
.page-container h2 { font-size: 20px; margin: 24px 0 8px; }
.page-container p { margin-bottom: 12px; color: var(--n6); font-size: 15px; }
.page-container ul { margin: 0 0 12px 24px; color: var(--n6); font-size: 15px; }
.page-container a { color: var(--primary-d1); }

.resource-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--widget-spacing);
    padding: 24px 40px 60px;
}
.resource-category {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 20px;
}
.resource-category h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--n7);
}
.resource-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin: 0 -10px;
    font-size: 14px;
    color: var(--primary-d1);
    text-decoration: none;
    border-radius: 6px;
}
.resource-link:hover { background: var(--primary-l); }

/* ===== Migrated page bodies ===== */
.page-meta { font-size: 12px; color: var(--n5); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.page-desc { font-style: italic; color: var(--n5); }
.page-body { font-size: 15px; color: var(--n6); }
.page-body h1, .page-body h2, .page-body h3, .page-body h4 { color: var(--n7); margin: 20px 0 8px; }
.page-body p { margin-bottom: 12px; }
.page-body ul, .page-body ol { margin: 0 0 12px 24px; }
.page-body a { color: var(--primary-d1); }
.page-body img { max-width: 100%; height: auto; border-radius: 6px; }
.page-body table { border-collapse: collapse; margin: 12px 0; max-width: 100%; display: block; overflow-x: auto; }
.page-body td, .page-body th { border: 1px solid var(--n3); padding: 6px 10px; font-size: 14px; }
.page-body iframe { max-width: 100%; border: 0; }
.page-body hr { border: none; border-top: 1px solid var(--n2); margin: 16px 0; }

/* ===== Accordions (All Tools / All Pages) ===== */
.accordion-list { max-width: 900px; margin: 0 40px 60px; display: flex; flex-direction: column; gap: 12px; }
.accordion {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}
.accordion-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: none;
    border: none;
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 700;
    color: var(--n7);
    cursor: pointer;
}
.accordion-head .arrow { transition: transform .2s; opacity: .5; }
.accordion.open .accordion-head .arrow { transform: rotate(90deg); }
.accordion-body { display: none; padding: 0 12px 12px; }
.accordion.open .accordion-body { display: block; }
.cat-desc { font-size: 13px; color: var(--n5); padding: 0 8px 10px; }
.tool-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 8px;
    border-radius: 6px;
    text-decoration: none;
}
.tool-row:hover { background: var(--n1); }
.tool-name { font-size: 14px; font-weight: 500; color: var(--primary-d1); }
.tool-desc { font-size: 12px; color: var(--n5); }
.tool-open { color: var(--n4); }

/* ===== Settings ===== */
.settings-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--n2);
    font-size: 14px;
    color: var(--n6);
    max-width: 480px;
}
.settings-note { font-size: 13px; color: var(--n5); margin: 8px 0 12px; }
.settings-theme { max-width: 320px; border-top: none; padding: 0 0 8px; }

/* ===== LOGIN ===== */
.login-body {
    overflow: hidden;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('/static/assets/portfolio-featured_0001_simpson-university-redding-ca_201.jpg') center / cover no-repeat;
}
.login-body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.75);
}
.login-card {
    position: relative;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 12px 48px -12px rgba(0,0,0,.25);
    padding: 48px 44px;
    width: 400px;
    text-align: center;
}
.login-card img { height: 56px; margin-bottom: 24px; }
.login-card h1 { font-size: 22px; margin-bottom: 8px; color: var(--n7); }
.login-card p { font-size: 14px; color: var(--n5); margin-bottom: 28px; }
.btn-ms-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background: var(--primary-d1);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    font-family: var(--font-family);
}
.btn-ms-login:hover { background: var(--primary); }
.login-footnote { margin-top: 20px; font-size: 12px; color: var(--n4); }

/* Responsive */
@media (max-width: 1200px) {
    .widget-grid, .resource-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main { margin-left: 0; }
    .main::before { left: 0; }
    .widget-grid, .resource-grid { grid-template-columns: 1fr; }
    .quick-links { flex-direction: column; padding: 0 16px; }
    .widgets-header, .widget-grid, .resource-grid { padding-left: 16px; padding-right: 16px; }
    .hero-banner, .page-container { margin-left: 16px; margin-right: 16px; }
}
