/* Bedömningsmatris Custom Styles */
/* Following Vklass UI Design System */

/* Layout System */
.vk-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.vk-layout--app-main {
    background-color: var(--gray-lightest);
}

/* Toolbar */
.vk-layout__toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--toolbar-height);
    background-color: var(--white);
    border-bottom: 1px solid var(--gray-light);
    z-index: 9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--content-padding-horizontal);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toolbar-section {
    display: flex;
    align-items: center;
}

.toolbar-section--align-start {
    justify-content: flex-start;
}

.toolbar-section--align-end {
    justify-content: flex-end;
    gap: 15px;
}

/* Logo Styling */
.vk-layout__logo {
    display: flex;
    align-items: center;
}

/* Desktop Logo Styling */
@media (min-width: 1280px) {
    .vk-layout__logo {
        position: relative;
        left: 65px;
        border-left: solid 1px var(--gray-light);
        height: 37px;
    }

    .vk-layout__logo__symbol {
        width: 44px;
        height: 28.45px;
        position: relative;
        left: -65px;
    }

    .vk-layout__logo__text {
        width: 58px;
        height: 15.5px;
        position: relative;
        left: -24px;
    }
}

/* Tablet Logo Styling */
@media (min-width: 600px) and (max-width: 1279px) {
    .vk-layout__logo {
        position: relative;
        left: 46.2px;
        height: 37px;
    }

    .vk-layout__logo__symbol {
        width: 40.2px;
        height: 26px;
        position: relative;
        left: -46.2px;
    }

    .vk-layout__logo__text {
        width: 58px;
        height: 15.5px;
        position: relative;
        left: -33px;
    }
}

/* Mobile Logo Styling */
@media (max-width: 599px) {
    .vk-layout__logo__symbol {
        width: 40.2px;
        height: 26px;
    }

    .vk-layout__logo__text {
        width: 48.75px;
        height: 13px;
        margin-left: 15px;
    }
}

/* Main Menu */
.vk-layout__main-menu {
    position: fixed;
    top: var(--toolbar-height);
    left: 0;
    width: var(--permanent-drawer-width);
    height: calc(100vh - var(--toolbar-height));
    background-color: var(--gray-lighter);
    z-index: 8;
    overflow-y: auto;
    transition: left 0.3s ease;
}

.vk-main-web-menu {
    height: 100%;
    padding: var(--gap-double) 0;
}

.vk-main-web-menu__item + .vk-main-web-menu__item {
    margin-top: 11px;
}

.vk-main-web-menu__link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 32px;
    padding-right: 16px;
    text-transform: uppercase;
    height: 48px;
    white-space: nowrap;
    letter-spacing: 0.04em;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--gray-darker);
    transition: all 180ms ease;
    position: relative;
}

.vk-main-web-menu__link > i {
    margin-right: 16px;
    color: var(--gray-dark);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vk-main-web-menu__link:hover,
.vk-main-web-menu__link.activated {
    background-color: var(--cl-hard);
    color: var(--gray-lighter);
}

.vk-main-web-menu__link:hover > i,
.vk-main-web-menu__link.activated > i {
    color: var(--gray-lighter);
}

.vk-main-web-menu__link span {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    max-width: 200px;
    display: inline;
}

/* Main Content */
.vk-layout__main {
    margin-left: var(--permanent-drawer-width);
    margin-top: var(--toolbar-height);
    flex: 1;
    padding: var(--gap-double) var(--content-padding-horizontal);
}

.content-container {
    max-width: var(--content-container-max-width);
    margin: 0 auto;
    width: 100%;
}

.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    margin-bottom: 8px;
}

.page-header p {
    color: var(--gray-dark);
    font-size: 1rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--gray-darker);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

/* Menu overlay for mobile */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 7;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.menu-overlay--visible {
    opacity: 1;
    pointer-events: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .vk-layout__main-menu {
        left: -280px;
        width: 280px;
        z-index: 8;
    }

    .vk-layout__main-menu--open {
        left: 0;
    }

    .vk-layout__main {
        margin-left: 0;
        padding: var(--gap-double) var(--content-padding-horizontal-phone);
    }

    .vk-layout__toolbar {
        padding: 0 var(--content-padding-horizontal-phone);
    }
}

/* CSS Variables - Color Palette & Theme */
:root {
    /* Theme Colors */
    --cl-hard: #26418f;
    --cl-medium: #5c6bc0;
    --cl-soft: #9999cc;
    --cl-softer: #dee1ed;
    --cl-super-soft: #f0f3fc;
    --cl-soft-background: #c5cae9;

    /* Accent Colors */
    --cl-green: #73bc56;
    --cl-yellow: #f6a623;
    --cl-red: #f44336;

    /* Grayscale */
    --white: #fff;
    --gray-lightest: #fafafa;
    --gray-lighter: #eee;
    --gray-smooth: #e0e0e0;
    --gray-light: #c8c8c8;
    --gray: #a4a4a4;
    --gray-dark: #6d6d6d;
    --gray-darker: #4a4a4a;
    --black: #000;

    /* State Colors */
    --color-success: var(--cl-hard);
    --color-info: var(--cl-hard);
    --color-warning: var(--cl-yellow);
    --color-error: var(--cl-red);
    --color-positive: var(--cl-green);
    --color-negative: var(--cl-red);

    /* Layout Dimensions */
    --toolbar-height: 64px;
    --permanent-drawer-width: 280px;
    --collapsible-drawer-closed-width: 56px;
    --content-container-max-width: 1562px;
    --content-padding-horizontal: 24px;
    --content-padding-horizontal-phone: 16px;
    --gap: 8px;
    --gap-double: 16px;

    /* Breakpoints */
    --phone-max: 599px;
    --phone-landscape-max: 959px;
    --tablet-max: 1279px;
    --tablet-landscape-min: 960px;
    --desktop-min: 1280px;
}

/* Base Styles */
html {
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 20px;
    letter-spacing: 0.01em;
    color: var(--gray-darker);
    box-sizing: border-box;
    height: 100%;
}

body {
    line-height: 20px;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--gray-lightest);
}

*, *:before, *:after {
    box-sizing: inherit;
}

/* Typography */
h1 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--gray-darker);
}

h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 0.875rem;
    color: var(--gray-darker);
}

h3 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--gray-darker);
}

/* Tabs */
.tabs {
    border-bottom: 1px solid var(--gray-light);
    background-color: var(--white);
    margin-bottom: var(--gap-double);
}

.tab-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tab-button {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 16px 24px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray-dark);
    transition: all 0.15s ease;
}

.tab-button:hover {
    background-color: var(--cl-super-soft);
    color: var(--cl-hard);
}

.tab-button.active {
    color: var(--cl-hard);
    border-bottom-color: var(--cl-hard);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Search and Filter */
.search-filter-bar {
    display: flex;
    gap: 16px;
    margin-bottom: var(--gap-double);
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

/* Matrix Cards */
.matrix-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: var(--gap-double);
}

.matrix-card {
    background-color: var(--white);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.15s ease;
    cursor: pointer;
}

.matrix-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.matrix-card__header {
    padding: 16px;
    border-bottom: 1px solid var(--gray-lighter);
}

.matrix-card__title {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--gray-darker);
}

.matrix-card__meta {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--gray-dark);
    margin-top: 8px;
}

.matrix-card__body {
    padding: 16px;
}

.matrix-card__description {
    font-size: 0.875rem;
    color: var(--gray-darker);
    margin-bottom: 12px;
    line-height: 1.4;
}

.matrix-card__footer {
    padding: 12px 16px;
    background-color: var(--gray-lightest);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.matrix-card__actions {
    display: flex;
    gap: 8px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    border-radius: 12px;
    letter-spacing: 0.05em;
}

.badge--success {
    background-color: var(--cl-green);
    color: var(--white);
}

.badge--warning {
    background-color: var(--cl-yellow);
    color: var(--white);
}

.badge--info {
    background-color: var(--cl-hard);
    color: var(--white);
}

.badge--default {
    background-color: var(--gray-light);
    color: var(--gray-darker);
}

/* Assessment Matrix Display */
.assessment-matrix {
    background-color: var(--white);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    overflow-x: auto;
    margin-bottom: var(--gap-double);
}

.assessment-matrix table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.assessment-matrix th {
    padding: 12px;
    text-align: left;
    font-weight: 500;
    color: var(--gray-darker);
    border-bottom: 2px solid var(--gray-light);
    background-color: var(--gray-lightest);
    font-size: 0.875rem;
}

.assessment-matrix td {
    padding: 12px;
    border-bottom: 1px solid var(--gray-lighter);
    vertical-align: middle;
}

.assessment-matrix tr:hover {
    background-color: var(--gray-lightest);
}

.assessment-cell {
    text-align: center;
    min-width: 60px;
}

.assessment-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.assessment-indicator--empty {
    background-color: var(--gray-lighter);
    color: var(--gray-dark);
    border: 2px solid var(--gray-smooth);
}

.assessment-indicator--teacher {
    background-color: var(--cl-hard);
    color: var(--white);
}

.assessment-indicator--student {
    background-color: var(--cl-green);
    color: var(--white);
}

.assessment-indicator--both {
    background: linear-gradient(135deg, var(--cl-hard) 50%, var(--cl-green) 50%);
    color: var(--white);
}

.assessment-indicator:hover:not(.assessment-indicator--empty) {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Matrix Builder */
.matrix-builder {
    background-color: var(--white);
    border-radius: 4px;
    padding: 24px;
    margin-bottom: var(--gap-double);
}

.matrix-builder__section {
    margin-bottom: 24px;
}

.matrix-builder__label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-darker);
}

.matrix-builder__table {
    width: 100%;
    border: 1px solid var(--gray-light);
    border-radius: 4px;
    overflow: hidden;
}

.matrix-builder__row {
    display: flex;
    border-bottom: 1px solid var(--gray-lighter);
}

.matrix-builder__row:last-child {
    border-bottom: none;
}

.matrix-builder__cell {
    flex: 1;
    padding: 12px;
    border-right: 1px solid var(--gray-lighter);
}

.matrix-builder__cell:last-child {
    border-right: none;
}

.matrix-builder__cell--header {
    background-color: var(--gray-lightest);
    font-weight: 500;
}

.matrix-builder__input {
    width: 100%;
    border: 1px solid var(--gray-light);
    border-radius: 4px;
    padding: 8px;
    font-size: 0.875rem;
}

.matrix-builder__add-button {
    margin-top: 8px;
}

/* Student Selector */
.student-selector {
    background-color: var(--white);
    padding: 16px;
    border-radius: 4px;
    margin-bottom: var(--gap-double);
    display: flex;
    align-items: center;
    gap: 16px;
}

.student-selector__label {
    font-weight: 500;
    color: var(--gray-darker);
}

.student-selector__select {
    flex: 1;
    max-width: 300px;
}

/* Assessment Legend */
.assessment-legend {
    background-color: var(--white);
    padding: 16px;
    border-radius: 4px;
    margin-bottom: var(--gap-double);
}

.assessment-legend__title {
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--gray-darker);
}

.assessment-legend__items {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.assessment-legend__item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.assessment-legend__symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Results Overview */
.results-overview {
    background-color: var(--white);
    border-radius: 4px;
    padding: 24px;
    margin-bottom: var(--gap-double);
}

.results-grid {
    display: grid;
    grid-template-columns: auto repeat(auto-fit, minmax(60px, 1fr));
    gap: 1px;
    background-color: var(--gray-light);
    border: 1px solid var(--gray-light);
}

.results-cell {
    background-color: var(--white);
    padding: 12px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.results-cell--header {
    background-color: var(--gray-lightest);
    font-weight: 500;
    font-size: 0.875rem;
}

.results-cell--level-1 {
    background-color: #ffebee;
}

.results-cell--level-2 {
    background-color: #fff3e0;
}

.results-cell--level-3 {
    background-color: #e8f5e9;
}

.results-cell--level-4 {
    background-color: #c8e6c9;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: var(--gap-double);
    display: flex;
    align-items: center;
}

.alert--success {
    background-color: rgba(115, 188, 86, 0.1);
    border-left: 4px solid var(--cl-green);
    color: var(--gray-darker);
}

.alert--warning {
    background-color: rgba(246, 166, 35, 0.1);
    border-left: 4px solid var(--cl-yellow);
    color: var(--gray-darker);
}

.alert--error {
    background-color: rgba(244, 67, 54, 0.1);
    border-left: 4px solid var(--cl-red);
    color: var(--gray-darker);
}

.alert--info {
    background-color: rgba(38, 65, 143, 0.1);
    border-left: 4px solid var(--cl-hard);
    color: var(--gray-darker);
}

.alert__icon {
    margin-right: var(--gap);
    font-size: 20px;
}

/* Dialogs */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.dialog-overlay.active {
    display: flex;
}

.dialog {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    width: 100%;
}

.dialog--small {
    max-width: 500px;
}

.dialog--medium {
    max-width: 800px;
}

.dialog--large {
    max-width: 1200px;
}

.dialog__header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--gray-lighter);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dialog__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--gray-darker);
}

.dialog__close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--gray-dark);
}

.dialog__body {
    padding: 24px;
}

.dialog__footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-lighter);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Buttons */
.mdc-button {
    background-color: transparent;
    color: var(--cl-hard);
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.0892857143em;
    cursor: pointer;
    transition: background-color 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    min-width: 64px;
    height: 36px;
}

.mdc-button:hover {
    background-color: var(--cl-super-soft);
}

.mdc-button--unelevated {
    background-color: var(--cl-hard);
    color: var(--white);
}

.mdc-button--unelevated:hover {
    background-color: #1e3a7a;
}

.mdc-button--outlined {
    background-color: transparent;
    color: var(--cl-hard);
    border: 1px solid var(--cl-hard);
    padding: 7px 15px;
}

.mdc-button--outlined:hover {
    background-color: var(--cl-super-soft);
}

.mdc-button:disabled {
    background-color: var(--gray-lighter);
    color: var(--gray);
    cursor: not-allowed;
}

.mdc-button--danger {
    background-color: var(--cl-red);
    color: var(--white);
}

.mdc-button--danger:hover {
    background-color: #d32f2f;
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-darker);
}

.form-control {
    width: 100%;
    height: 56px;
    padding: 16px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 4px;
    font-size: 1rem;
    line-height: 1.5;
    background-color: var(--white);
    transition: border-color 0.15s ease;
    font-family: inherit;
}

.form-control:focus {
    border-color: var(--cl-hard);
    outline: none;
    box-shadow: 0 0 0 2px rgba(38, 65, 143, 0.2);
}

textarea.form-control {
    height: auto;
    min-height: 100px;
    resize: vertical;
}

/* FAB */
.fab-container {
    position: fixed;
    right: 40px;
    bottom: 40px;
    z-index: 6;
}

@media (max-width: 768px) {
    .fab-container {
        right: 16px;
        bottom: 16px;
    }
}

.fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--cl-green);
    color: var(--white);
    border: none;
    box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2),
                0 6px 10px 0 rgba(0, 0, 0, 0.14),
                0 1px 18px 0 rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab:hover {
    box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2),
                0 8px 10px 1px rgba(0, 0, 0, 0.14),
                0 3px 14px 2px rgba(0, 0, 0, 0.12);
    transform: scale(1.05);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

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

.text-right {
    text-align: right;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .matrix-cards {
        grid-template-columns: 1fr;
    }
    
    .search-filter-bar {
        flex-direction: column;
    }
    
    .search-box {
        width: 100%;
    }
    
    .dialog {
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--gray-dark);
}

.empty-state__icon {
    font-size: 64px;
    color: var(--gray);
    margin-bottom: 16px;
}

.empty-state__title {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--gray-darker);
}

.empty-state__text {
    font-size: 0.875rem;
    margin-bottom: 24px;
}

