.home-dashboard {
    margin-top: 0.25rem;
}

.home-notifications-stack {
    display: grid;
    gap: 0.6rem;
}

.home-notification {
    border: 1px solid #dbe6f7;
    border-radius: 0.9rem;
    background: #f7faff;
    padding: 0.72rem 0.9rem;
}

.home-notification-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: #466291;
    margin-bottom: 0.2rem;
}

.home-notification-text {
    color: #334155;
    font-size: 0.9rem;
    line-height: 1.35;
}

.home-notification--update {
    background: #f5f9ff;
    border-color: #d6e3fb;
}

.home-notification--maintenance {
    background: #fff8ef;
    border-color: #f2ddbf;
}

.home-notification--maintenance .home-notification-label {
    color: #8f5d1e;
}

.home-hero-panel {
    background: linear-gradient(180deg, #f9fbff 0%, #f3f7ff 100%);
    border: 1px solid #dce7fb;
    border-radius: 1.25rem;
    padding: 1.5rem;
}

.home-eyebrow {
    color: #3b6ad6;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-title {
    font-size: clamp(1.8rem, 2.7vw, 2.4rem);
    line-height: 1.18;
    color: #1f2937;
    font-weight: 700;
    max-width: 15ch;
}

.home-subtitle {
    color: #556275;
    font-size: 1rem;
    max-width: 56ch;
}

.home-cta {
    border-radius: 999px;
    padding: 0.58rem 1.1rem;
    font-weight: 600;
}

.home-flow-card {
    background: #ffffff;
    border: 1px solid #dce5f7;
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    height: 100%;
}

.flow-step {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.flow-index {
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 999px;
    background: #e8f0ff;
    color: #1f5bd8;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.flow-title {
    color: #1f2937;
    font-weight: 600;
    font-size: 0.95rem;
}

.flow-text {
    color: #69778c;
    font-size: 0.87rem;
    line-height: 1.35;
}

.home-library-head {
    background: #ffffff;
    border: 1px solid #dbe3f1;
    border-radius: 1rem;
    padding: 0.9rem;
}

.home-tabs {
    scrollbar-width: none;
    padding: 2px 0;
    margin: -2px 0;
}

.home-tabs::-webkit-scrollbar {
    display: none;
}

.home-tab-btn {
    border: 1px solid #d6dfef;
    background: #f5f8fe;
    color: #4f5f79;
    font-size: 0.88rem;
    border-radius: 999px;
    padding: 0.42rem 0.92rem;
    font-weight: 600;
    min-height: 36px;
    text-decoration: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
}

.home-tab-btn:hover {
    background: #edf3ff;
    color: #2f4e91;
    text-decoration: none !important;
    box-shadow: none !important;
}

.home-tabs .home-tab-btn.active {
    background: #1d69f0;
    border-color: #1d69f0;
    color: #fff;
    text-decoration: none !important;
    box-shadow: none !important;
}

.home-tab-btn:focus-visible,
.home-search-input:focus-visible,
.library-card-link:focus-visible,
.library-create-card:focus-visible,
.library-card .dropdown > button:focus-visible {
    outline: 2px solid #3a76d9;
    outline-offset: 2px;
}

.home-tab-btn:focus,
.home-tab-btn:focus-visible,
.home-tab-btn:active {
    text-decoration: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.home-tab-btn::-moz-focus-inner {
    border: 0;
}

.home-search-wrap {
    position: relative;
}

.home-search-wrap i {
    position: absolute;
    top: 50%;
    left: 0.82rem;
    transform: translateY(-50%);
    color: #7a879b;
    font-size: 0.87rem;
}

.home-search-input {
    border-radius: 999px;
    border: 1px solid #d7dfeb;
    font-size: 0.9rem;
    padding: 0.53rem 0.8rem 0.53rem 2rem;
}

.home-search-input:focus {
    border-color: #74a4ff;
    box-shadow: 0 0 0 0.18rem rgba(61, 122, 255, 0.14);
}

#materials-container .material-item {
    display: flex;
}

.library-card {
    border: 1px solid #dce4f2;
    border-radius: 12px;
    width: 100%;
    background: #fff;
    box-shadow: 0 4px 12px rgba(28, 48, 86, 0.05);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
    position: relative;
    z-index: 1;
}

.library-card:hover {
    transform: translateY(-2px);
    border-color: #c7d4ea;
    box-shadow: 0 8px 18px rgba(28, 48, 86, 0.09);
    z-index: 5;
}

.library-card:focus-within {
    z-index: 25;
}

.library-card .dropdown-menu {
    z-index: 1080;
}

.library-card-title {
    color: #243248;
    font-size: 1rem;
    line-height: 1.3;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.library-card-author {
    color: #6a788d;
    font-size: 0.85rem;
    margin-top: 0.12rem;
}

.library-card-badge {
    align-self: flex-start;
    border-radius: 999px;
    padding: 0.26rem 0.57rem;
    font-size: 0.73rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.library-card-badge--classroom {
    background: #ebf7f0;
    color: #1f7a4f;
    border-color: #cdecd9;
}

.library-card-badge--student {
    background: #f0f4ff;
    color: #395ca8;
    border-color: #d8e2f9;
}

.library-card-badge--course {
    background: #fff4e9;
    color: #9a5a16;
    border-color: #f5dfc6;
}

.library-card-thumb-img,
.library-card-thumb-fallback {
    width: 46px;
    height: 46px;
    border-radius: 0.72rem;
    flex: 0 0 46px;
}

.library-card-thumb-img {
    object-fit: cover;
    border: 1px solid #d9e3f3;
}

.library-card-thumb-fallback {
    background: #eff4ff;
    color: #5079d9;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe6fc;
}

.library-card-thumb-fallback i {
    font-size: 1rem;
}

.library-card-link {
    font-weight: 700;
    color: #2e5bb6;
    border-radius: 999px;
    padding: 0.22rem 0.35rem;
    text-decoration: none;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
}

.library-card-link:hover {
    color: #244c9d;
    background: #f1f5fd;
}

.library-card--classrooms {
    background: linear-gradient(180deg, #ffffff 0%, #f8fcfa 100%);
    border-color: #d7e8df;
}

.library-card--classrooms .library-card-link {
    color: #1f7a4f;
}

.library-card--classrooms .library-card-link:hover {
    color: #18613f;
    background: #ebf8f1;
}

.library-card--my-courses {
    background: linear-gradient(180deg, #ffffff 0%, #fffaf4 100%);
    border-color: #ebdecd;
}

.library-card--my-courses .library-card-link {
    color: #9a5a16;
}

.library-card--my-courses .library-card-link:hover {
    color: #7a460f;
    background: #fff1e2;
}

.library-card--public {
    background: #fff;
}

.library-create-card {
    border: 1px dashed #c7d6ef;
    border-radius: 12px;
    background: #f9fbff;
    width: 100%;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #385f9e;
    font-weight: 700;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
    min-height: 168px;
}

.library-create-card:hover {
    border-color: #9eb8e3;
    background: #f1f6ff;
    color: #2d4f88;
}

.home-empty-state {
    background: #f8fbff;
    border: 1px solid #dce5f5;
    border-radius: 1rem;
    padding: 1.1rem;
    text-align: center;
}

.empty-title {
    color: #5d6c82;
    margin-bottom: 0.6rem;
}

@media (max-width: 991.98px) {
    .home-hero-panel {
        padding: 1.15rem;
    }

    .home-title {
        max-width: none;
    }
}

@media (max-width: 575.98px) {
    .home-subtitle {
        display: none;
    }

    .home-library-head {
        padding: 0.75rem;
    }

    .home-tab-btn {
        font-size: 0.83rem;
        padding: 0.38rem 0.8rem;
    }
}

@media (pointer: coarse) {
    .home-tab-btn,
    .library-card-link,
    .library-create-card {
        min-height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .library-card,
    .library-create-card {
        transition: none;
    }
}
