sozday-sovremennyy-adaptivny/style.css

1127 lines
18 KiB
CSS

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--primary: #1e3a5f;
--primary-light: #2c5282;
--secondary: #4299e1;
--success: #38a169;
--danger: #e53e3e;
--warning: #dd6b20;
--gray-50: #f7fafc;
--gray-100: #edf2f7;
--gray-200: #e2e8f0;
--gray-300: #cbd5e0;
--gray-400: #a0aec0;
--gray-500: #718096;
--gray-600: #4a5568;
--gray-700: #2d3748;
--gray-800: #1a202c;
--shadow: 0 1px 3px rgba(0,0,0,0.1);
--shadow-md: 0 4px 6px rgba(0,0,0,0.1);
--shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
--radius: 8px;
--radius-lg: 12px;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
background: var(--gray-50);
color: var(--gray-800);
line-height: 1.6;
min-height: 100vh;
}
/* Утилиты */
.container {
max-width: 1400px;
margin: 0 auto;
padding: 0 20px;
}
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 10px 20px;
border: none;
border-radius: var(--radius);
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;
text-decoration: none;
}
.btn-primary {
background: var(--primary);
color: white;
}
.btn-primary:hover {
background: var(--primary-light);
}
.btn-secondary {
background: var(--secondary);
color: white;
}
.btn-secondary:hover {
background: #3182ce;
}
.btn-success {
background: var(--success);
color: white;
}
.btn-danger {
background: var(--danger);
color: white;
}
.btn-outline {
background: transparent;
border: 1px solid var(--gray-300);
color: var(--gray-700);
}
.btn-outline:hover {
background: var(--gray-100);
}
.btn-sm {
padding: 6px 12px;
font-size: 13px;
}
.btn-lg {
padding: 14px 28px;
font-size: 16px;
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.card {
background: white;
border-radius: var(--radius-lg);
box-shadow: var(--shadow);
padding: 20px;
}
.card-header {
padding-bottom: 15px;
border-bottom: 1px solid var(--gray-200);
margin-bottom: 15px;
}
.card-title {
font-size: 18px;
font-weight: 600;
color: var(--gray-800);
}
/* Страница входа */
.login-page {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
padding: 20px;
}
.login-card {
background: white;
border-radius: var(--radius-lg);
box-shadow: var(--shadow-lg);
padding: 40px;
width: 100%;
max-width: 420px;
}
.login-logo {
text-align: center;
margin-bottom: 30px;
}
.login-logo h1 {
font-size: 28px;
color: var(--primary);
margin-bottom: 8px;
}
.login-logo p {
color: var(--gray-500);
font-size: 14px;
}
.form-group {
margin-bottom: 20px;
}
.form-label {
display: block;
margin-bottom: 8px;
font-weight: 500;
font-size: 14px;
color: var(--gray-700);
}
.form-input {
width: 100%;
padding: 12px 14px;
border: 1px solid var(--gray-300);
border-radius: var(--radius);
font-size: 15px;
transition: border-color 0.2s;
}
.form-input:focus {
outline: none;
border-color: var(--primary);
}
.form-input::placeholder {
color: var(--gray-400);
}
.input-with-icon {
position: relative;
}
.input-toggle {
position: absolute;
right: 12px;
top: 50%;
transform: translateY(-50%);
background: none;
border: none;
cursor: pointer;
color: var(--gray-400);
font-size: 18px;
}
.login-error {
background: #fff5f5;
color: var(--danger);
padding: 12px;
border-radius: var(--radius);
margin-bottom: 20px;
font-size: 14px;
display: none;
}
.login-error.show {
display: block;
}
.forgot-password {
text-align: right;
margin-top: -12px;
margin-bottom: 20px;
}
.forgot-password a {
color: var(--secondary);
font-size: 13px;
text-decoration: none;
}
/* Боковое меню */
.layout {
display: flex;
min-height: 100vh;
}
.sidebar {
width: 260px;
background: white;
border-right: 1px solid var(--gray-200);
position: fixed;
height: 100vh;
overflow-y: auto;
transition: transform 0.3s;
z-index: 100;
}
.sidebar-header {
padding: 20px;
border-bottom: 1px solid var(--gray-200);
}
.sidebar-logo {
font-size: 20px;
font-weight: 700;
color: var(--primary);
}
.sidebar-user {
margin-top: 15px;
padding-top: 15px;
border-top: 1px solid var(--gray-200);
}
.sidebar-user-name {
font-weight: 600;
font-size: 14px;
color: var(--gray-800);
}
.sidebar-user-role {
font-size: 12px;
color: var(--gray-500);
margin-top: 2px;
}
.sidebar-nav {
padding: 15px 0;
}
.sidebar-nav-item {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 20px;
color: var(--gray-600);
text-decoration: none;
transition: all 0.2s;
cursor: pointer;
}
.sidebar-nav-item:hover {
background: var(--gray-50);
color: var(--primary);
}
.sidebar-nav-item.active {
background: var(--gray-50);
color: var(--primary);
border-right: 3px solid var(--primary);
}
.sidebar-nav-icon {
width: 20px;
text-align: center;
font-size: 18px;
}
.main-content {
flex: 1;
margin-left: 260px;
padding: 30px;
min-height: 100vh;
}
.main-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 30px;
}
.main-title {
font-size: 28px;
font-weight: 700;
color: var(--gray-800);
}
.header-actions {
display: flex;
align-items: center;
gap: 15px;
}
.notification-btn {
position: relative;
background: none;
border: none;
font-size: 22px;
cursor: pointer;
color: var(--gray-500);
}
.notification-badge {
position: absolute;
top: -5px;
right: -5px;
background: var(--danger);
color: white;
font-size: 10px;
width: 18px;
height: 18px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.logout-btn {
background: none;
border: 1px solid var(--gray-300);
padding: 8px 16px;
border-radius: var(--radius);
cursor: pointer;
color: var(--gray-600);
font-size: 14px;
}
/* Дашборд сотрудника */
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 20px;
margin-bottom: 30px;
}
.stat-card {
background: white;
border-radius: var(--radius-lg);
padding: 20px;
box-shadow: var(--shadow);
}
.stat-value {
font-size: 32px;
font-weight: 700;
color: var(--primary);
margin-bottom: 5px;
}
.stat-label {
font-size: 14px;
color: var(--gray-500);
}
.stat-card.success .stat-value {
color: var(--success);
}
.stat-card.danger .stat-value {
color: var(--danger);
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.section-title {
font-size: 20px;
font-weight: 600;
color: var(--gray-800);
}
/* Карточки курсов */
.courses-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 20px;
}
.course-card {
background: white;
border-radius: var(--radius-lg);
overflow: hidden;
box-shadow: var(--shadow);
transition: transform 0.2s, box-shadow 0.2s;
}
.course-card:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-md);
}
.course-cover {
width: 100%;
height: 180px;
object-fit: cover;
}
.course-content {
padding: 20px;
}
.course-category {
display: inline-block;
font-size: 12px;
font-weight: 600;
padding: 4px 10px;
border-radius: 20px;
margin-bottom: 10px;
color: white;
}
.course-title {
font-size: 18px;
font-weight: 600;
color: var(--gray-800);
margin-bottom: 8px;
}
.course-description {
font-size: 14px;
color: var(--gray-500);
margin-bottom: 15px;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.course-meta {
display: flex;
gap: 15px;
font-size: 13px;
color: var(--gray-500);
margin-bottom: 15px;
}
.course-meta span {
display: flex;
align-items: center;
gap: 4px;
}
.course-progress {
margin-bottom: 15px;
}
.progress-bar {
background: var(--gray-200);
height: 8px;
border-radius: 4px;
overflow: hidden;
margin-bottom: 8px;
}
.progress-fill {
height: 100%;
border-radius: 4px;
transition: width 0.3s;
}
.progress-fill.not-started {
background: var(--gray-400);
}
.progress-fill.in-progress {
background: var(--secondary);
}
.progress-fill.completed {
background: var(--success);
}
.progress-fill.overdue {
background: var(--danger);
}
.progress-text {
font-size: 12px;
color: var(--gray-500);
}
.course-status {
display: inline-block;
font-size: 12px;
font-weight: 500;
padding: 4px 10px;
border-radius: 4px;
margin-bottom: 12px;
}
.course-status.not-started {
background: var(--gray-200);
color: var(--gray-600);
}
.course-status.in-progress {
background: #bee3f8;
color: var(--primary);
}
.course-status.completed {
background: #c6f6d5;
color: var(--success);
}
.course-status.overdue {
background: #fed7d7;
color: var(--danger);
}
/* Фильтры */
.filters-bar {
display: flex;
gap: 15px;
margin-bottom: 25px;
flex-wrap: wrap;
}
.search-input {
flex: 1;
min-width: 250px;
padding: 10px 14px;
border: 1px solid var(--gray-300);
border-radius: var(--radius);
font-size: 14px;
}
.filter-select {
padding: 10px 14px;
border: 1px solid var(--gray-300);
border-radius: var(--radius);
font-size: 14px;
background: white;
cursor: pointer;
}
/* Страница курса */
.course-detail-header {
background: white;
border-radius: var(--radius-lg);
padding: 30px;
margin-bottom: 30px;
box-shadow: var(--shadow);
}
.course-detail-grid {
display: grid;
grid-template-columns: 1fr 300px;
gap: 30px;
}
.course-detail-info h1 {
font-size: 28px;
color: var(--gray-800);
margin-bottom: 15px;
}
.course-detail-meta {
display: flex;
gap: 20px;
flex-wrap: wrap;
margin-bottom: 20px;
}
.course-detail-meta-item {
display: flex;
align-items: center;
gap: 8px;
font-size: 14px;
color: var(--gray-600);
}
.course-detail-description {
color: var(--gray-600);
line-height: 1.7;
}
.course-sidebar {
background: var(--gray-50);
border-radius: var(--radius);
padding: 20px;
}
.course-sidebar-title {
font-size: 16px;
font-weight: 600;
margin-bottom: 15px;
}
.course-modules {
list-style: none;
}
.module-item {
margin-bottom: 20px;
}
.module-title {
font-size: 14px;
font-weight: 600;
color: var(--gray-700);
margin-bottom: 10px;
padding-bottom: 8px;
border-bottom: 1px solid var(--gray-200);
}
.lesson-item {
display: flex;
align-items: center;
gap: 10px;
padding: 10px;
border-radius: var(--radius);
cursor: pointer;
transition: background 0.2s;
margin-bottom: 5px;
font-size: 14px;
}
.lesson-item:hover {
background: white;
}
.lesson-item.active {
background: white;
border-left: 3px solid var(--primary);
}
.lesson-item.completed {
color: var(--success);
}
.lesson-icon {
font-size: 16px;
}
/* Урок */
.lesson-viewer {
display: grid;
grid-template-columns: 280px 1fr;
gap: 30px;
height: calc(100vh - 150px);
}
.lesson-content {
background: white;
border-radius: var(--radius-lg);
padding: 30px;
overflow-y: auto;
}
.lesson-content h2 {
font-size: 24px;
margin-bottom: 20px;
color: var(--gray-800);
}
.lesson-content video {
width: 100%;
border-radius: var(--radius);
margin: 20px 0;
}
.lesson-content iframe {
width: 100%;
aspect-ratio: 16/9;
border: none;
border-radius: var(--radius);
margin: 20px 0;
}
.lesson-nav {
display: flex;
justify-content: space-between;
margin-top: 30px;
padding-top: 30px;
border-top: 1px solid var(--gray-200);
}
/* Тестирование */
.quiz-container {
max-width: 800px;
margin: 0 auto;
}
.quiz-header {
background: white;
padding: 20px;
border-radius: var(--radius-lg);
margin-bottom: 20px;
display: flex;
justify-content: space-between;
align-items: center;
}
.quiz-timer {
font-size: 24px;
font-weight: 700;
color: var(--danger);
}
.quiz-question {
background: white;
padding: 30px;
border-radius: var(--radius-lg);
margin-bottom: 20px;
}
.question-text {
font-size: 18px;
font-weight: 600;
margin-bottom: 20px;
color: var(--gray-800);
}
.quiz-options {
display: flex;
flex-direction: column;
gap: 12px;
}
.quiz-option {
display: flex;
align-items: center;
gap: 12px;
padding: 15px;
border: 2px solid var(--gray-200);
border-radius: var(--radius);
cursor: pointer;
transition: all 0.2s;
}
.quiz-option:hover {
border-color: var(--secondary);
background: #f0f7ff;
}
.quiz-option.selected {
border-color: var(--primary);
background: #ebf4ff;
}
.quiz-option input {
width: 20px;
height: 20px;
}
.quiz-result {
text-align: center;
padding: 40px;
background: white;
border-radius: var(--radius-lg);
}
.result-score {
font-size: 64px;
font-weight: 700;
color: var(--primary);
margin-bottom: 10px;
}
.result-status {
font-size: 20px;
margin-bottom: 20px;
}
.result-status.passed {
color: var(--success);
}
.result-status.failed {
color: var(--danger);
}
/* Таблицы */
.data-table {
width: 100%;
border-collapse: collapse;
background: white;
border-radius: var(--radius-lg);
overflow: hidden;
box-shadow: var(--shadow);
}
.data-table th,
.data-table td {
padding: 14px;
text-align: left;
border-bottom: 1px solid var(--gray-200);
}
.data-table th {
background: var(--gray-50);
font-weight: 600;
font-size: 13px;
color: var(--gray-600);
text-transform: uppercase;
letter-spacing: 0.5px;
}
.data-table tr:hover {
background: var(--gray-50);
}
.data-table tr:last-child td {
border-bottom: none;
}
.badge {
display: inline-block;
padding: 4px 10px;
border-radius: 20px;
font-size: 12px;
font-weight: 500;
}
.badge-success {
background: #c6f6d5;
color: var(--success);
}
.badge-warning {
background: #feebc8;
color: var(--warning);
}
.badge-danger {
background: #fed7d7;
color: var(--danger);
}
.badge-info {
background: #bee3f8;
color: var(--primary);
}
.badge-secondary {
background: var(--gray-200);
color: var(--gray-600);
}
/* Уведомления */
.notifications-panel {
position: fixed;
top: 0;
right: -400px;
width: 400px;
height: 100vh;
background: white;
box-shadow: var(--shadow-lg);
z-index: 200;
transition: right 0.3s;
padding: 20px;
overflow-y: auto;
}
.notifications-panel.open {
right: 0;
}
.notification-item {
padding: 15px;
border-radius: var(--radius);
margin-bottom: 10px;
background: var(--gray-50);
cursor: pointer;
transition: background 0.2s;
}
.notification-item:hover {
background: var(--gray-100);
}
.notification-item.unread {
background: #ebf4ff;
border-left: 3px solid var(--secondary);
}
.notification-title {
font-weight: 600;
font-size: 14px;
margin-bottom: 5px;
}
.notification-message {
font-size: 13px;
color: var(--gray-600);
}
.notification-time {
font-size: 11px;
color: var(--gray-400);
margin-top: 8px;
}
/* Сертификат */
.certificate {
background: white;
border: 10px solid var(--primary);
padding: 40px;
text-align: center;
border-radius: var(--radius);
position: relative;
}
.certificate-logo {
font-size: 48px;
color: var(--primary);
margin-bottom: 20px;
}
.certificate-title {
font-size: 36px;
font-weight: 700;
color: var(--primary);
margin-bottom: 10px;
}
.certificate-subtitle {
font-size: 18px;
color: var(--gray-600);
margin-bottom: 30px;
}
.certificate-name {
font-size: 32px;
font-weight: 700;
color: var(--gray-800);
margin-bottom: 20px;
border-bottom: 2px solid var(--gray-300);
display: inline-block;
padding: 0 40px 10px;
}
.certificate-course {
font-size: 20px;
color: var(--gray-700);
margin-bottom: 30px;
}
.certificate-date {
font-size: 14px;
color: var(--gray-500);
}
.certificate-number {
position: absolute;
bottom: 20px;
right: 40px;
font-size: 12px;
color: var(--gray-400);
}
/* Адаптивность */
@media (max-width: 1024px) {
.main-content {
margin-left: 0;
padding: 20px;
}
.sidebar {
transform: translateX(-100%);
}
.sidebar.open {
transform: translateX(0);
}
.course-detail-grid {
grid-template-columns: 1fr;
}
.lesson-viewer {
grid-template-columns: 1fr;
height: auto;
}
.mobile-menu-btn {
display: block;
}
}
@media (max-width: 768px) {
.stats-grid {
grid-template-columns: repeat(2, 1fr);
}
.courses-grid {
grid-template-columns: 1fr;
}
.filters-bar {
flex-direction: column;
}
.search-input {
min-width: 100%;
}
.main-header {
flex-direction: column;
gap: 15px;
align-items: flex-start;
}
.header-actions {
width: 100%;
justify-content: space-between;
}
.notifications-panel {
width: 100%;
right: -100%;
}
}
.mobile-menu-btn {
display: none;
background: none;
border: none;
font-size: 24px;
cursor: pointer;
color: var(--gray-700);
}
/* Скрытие элементов */
.hidden {
display: none !important;
}
/* Состояние загрузки */
.loading {
display: flex;
align-items: center;
justify-content: center;
padding: 60px;
}
.spinner {
width: 40px;
height: 40px;
border: 4px solid var(--gray-200);
border-top-color: var(--primary);
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Пустое состояние */
.empty-state {
text-align: center;
padding: 60px 20px;
color: var(--gray-500);
}
.empty-state-icon {
font-size: 64px;
margin-bottom: 20px;
opacity: 0.5;
}
.empty-state-title {
font-size: 20px;
font-weight: 600;
color: var(--gray-700);
margin-bottom: 10px;
}
.empty-state-text {
font-size: 14px;
}