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

body {
    font-family: 'Courier New', Courier, monospace;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: none;
    margin: 0;
    padding: 0;
    background: #ffffff;
    border: none;
    box-shadow: none;
    min-height: 100vh;
}

.container > header,
.container > main,
.container > .admin-main {
    padding: 30px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Auth forms centered layout */
.container > .auth-form,
.container > form:not(.status-form):not(.quantity-form):not([style*="display: inline"]) {
    max-width: 500px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

header h1 {
    color: #000000;
    margin-bottom: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

header p {
    color: #666666;
}

.btn-logout {
    position: absolute;
    top: 0;
    right: 0;
    padding: 8px 16px;
    background: #000000;
    color: #ffffff;
    text-decoration: none;
    border: 2px solid #000000;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: #ffffff;
    color: #000000;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #000000;
    background: #ffffff;
    color: #000000;
    font-size: 14px;
    font-family: inherit;
    border-radius: 0;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    background: #f0f0f0;
    box-shadow: 4px 4px 0px #000000;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 0;
}

.btn-submit:hover {
    background-color: #ffffff;
    color: #000000;
    box-shadow: 4px 4px 0px #000000;
}

footer {
    margin-top: 30px;
    text-align: center;
    color: #666666;
    border-top: 2px solid #000000;
    padding-top: 20px;
}

footer a {
    color: #000000;
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

.success-message {
    text-align: center;
    padding: 30px;
    background-color: #ffffff;
    border: 2px solid #000000;
    box-shadow: 4px 4px 0px #000000;
    color: #000000;
    margin-bottom: 20px;
}

.success-message strong {
    font-size: 18px;
    text-transform: uppercase;
}

.actions {
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #000000;
    color: #ffffff;
    text-decoration: none;
    border: 2px solid #000000;
    transition: all 0.3s;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 0;
}

.btn:hover {
    background-color: #ffffff;
    color: #000000;
    box-shadow: 4px 4px 0px #000000;
}

.error-message {
    padding: 12px;
    background-color: #ffffff;
    border: 2px solid #000000;
    box-shadow: 4px 4px 0px #000000;
    color: #000000;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

/* Shared helpers (used by “new” pages) */
.back-link {
    display: inline-block;
    margin-top: 24px;
    color: #000000;
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}

.dashboard-actions {
    margin-top: 24px;
    text-align: center;
}

.dashboard-actions a {
    color: #000000;
    text-decoration: none;
    font-weight: 600;
    margin: 0 10px;
}

.dashboard-actions a:hover {
    text-decoration: underline;
}

.hint {
    font-size: 0.8rem;
    color: #666666;
    margin-top: 6px;
}

.required {
    color: #000000;
    font-weight: 700;
    margin-left: 2px;
}

.data-table {
    width: 100%;
    background: #ffffff;
    border: 2px solid #000000;
    box-shadow: 8px 8px 0px #000000;
    border-collapse: collapse;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border: 1px solid #000000;
}

.data-table th {
    background-color: #000000;
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.data-table tr:hover {
    background-color: #f0f0f0;
}

.role-badge {
    display: inline-block;
    padding: 4px 8px;
    border: 2px solid #000000;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    background: #ffffff;
    margin-left: 10px;
}

.signup-status {
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 10px;
}

/* Admin Styles */
.admin-container {
    min-height: 100vh;
}

.admin-nav {
    background-color: #000000;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #000000;
}

.nav-brand {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    padding: 8px 16px;
    border: 2px solid #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: #ffffff;
    color: #000000;
    box-shadow: 2px 2px 0px #ffffff;
}

.admin-main {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-main h1 {
    margin-bottom: 25px;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Calendar Styles */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.calendar-navigation {
    display: flex;
    align-items: center;
    gap: 20px;
}

.current-month {
    font-size: 20px;
    font-weight: 700;
    color: #000000;
    min-width: 200px;
    text-align: center;
    text-transform: uppercase;
}

.btn-nav {
    color: #000000;
    text-decoration: none;
    padding: 8px 16px;
    border: 2px solid #000000;
    font-weight: 600;
    transition: all 0.3s;
    text-transform: uppercase;
}

.btn-nav:hover {
    background-color: #000000;
    color: #ffffff;
    box-shadow: 2px 2px 0px #000000;
}

.btn-create {
    padding: 10px 20px;
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-create:hover {
    background-color: #ffffff;
    color: #000000;
    box-shadow: 4px 4px 0px #000000;
}

.calendar-grid {
    background: #ffffff;
    border: 2px solid #000000;
    box-shadow: 8px 8px 0px #000000;
    overflow: hidden;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background-color: #000000;
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calendar-weekdays div {
    padding: 15px;
    text-align: center;
    border-right: 1px solid #333;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day {
    min-height: 120px;
    padding: 10px;
    border: 1px solid #000000;
    background-color: #ffffff;
}

.calendar-day.empty {
    background-color: #f5f5f5;
}

.day-number {
    font-weight: 700;
    color: #000000;
    display: block;
    margin-bottom: 8px;
}

.day-projects {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.project-badge {
    padding: 5px 8px;
    border: 2px solid #000000;
    font-size: 12px;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
}

.status-new { background-color: #000000; color: #ffffff; }
.status-confirmed { background-color: #333333; color: #ffffff; }
.status-in_progress { background-color: #666666; color: #ffffff; }
.status-completed { background-color: #999999; color: #ffffff; }
.status-cancelled { background-color: #cccccc; color: #000000; }

/* Table Styles */
.projects-table,
.equipment-table {
    width: 100%;
    background: #ffffff;
    border: 2px solid #000000;
    box-shadow: 8px 8px 0px #000000;
    border-collapse: collapse;
    overflow: hidden;
}

.projects-table th,
.projects-table td,
.equipment-table th,
.equipment-table td {
    padding: 15px;
    text-align: left;
    border: 1px solid #000000;
}

.projects-table th,
.equipment-table th {
    background-color: #000000;
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.projects-table tr:hover,
.equipment-table tr:hover {
    background-color: #f0f0f0;
}

.description-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-badge {
    padding: 5px 12px;
    border: 2px solid #000000;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
    text-transform: uppercase;
    background: transparent;
}

.status-form select {
    padding: 8px 12px;
    border: 2px solid #000000;
    background: #ffffff;
    color: #000000;
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
}

/* Warehouse specific */
.warehouse-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.stock-status {
    padding: 5px 12px;
    border: 2px solid #000000;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
    text-transform: uppercase;
    background: #ffffff;
}

.in-stock {
    background-color: #ffffff;
    color: #000000;
}

.low-stock {
    background-color: #f0f0f0;
    color: #000000;
}

.out-of-stock {
    background-color: #e0e0e0;
    color: #000000;
}

.quantity-form input {
    padding: 8px;
    border: 2px solid #000000;
    background: #ffffff;
    color: #000000;
    text-align: center;
    font-weight: 600;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 30px;
    border: 2px solid #000000;
    box-shadow: 8px 8px 0px #000000;
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: 700;
    color: #000000;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #666666;
}

.modal-content h2 {
    margin-bottom: 25px;
    color: #000000;
    text-transform: uppercase;
}

.login-form {
    max-width: 400px;
    margin: 0 auto;
}

/* User Navigation */
.user-nav {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #000000;
}

.user-nav a {
    padding: 10px 20px;
    border: 2px solid #000000;
    text-decoration: none;
    color: #000000;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s;
}

.user-nav a:hover,
.user-nav a.active {
    background-color: #000000;
    color: #ffffff;
    box-shadow: 4px 4px 0px #000000;
}

.user-nav .btn-new {
    margin-left: auto;
}

/* Projects Grid for User Dashboard */
.projects-section {
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.projects-grid {
    display: grid;
    gap: 20px;
}

.project-card {
    border: 2px solid #000000;
    padding: 20px;
    background: #ffffff;
    box-shadow: 4px 4px 0px #000000;
    transition: all 0.3s;
}

.project-card:hover {
    box-shadow: 8px 8px 0px #000000;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #000000;
}

.project-header h3 {
    color: #000000;
    text-transform: uppercase;
    font-size: 18px;
}

.project-body {
    margin-bottom: 15px;
}

.project-body p {
    margin-bottom: 8px;
}

.project-date {
    font-weight: 700;
    text-transform: uppercase;
}

.project-footer {
    padding-top: 10px;
    border-top: 1px solid #000000;
    color: #666666;
}

.empty-state {
    text-align: center;
    padding: 40px;
    border: 2px solid #000000;
    background: #f9f9f9;
}

.empty-state p {
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .calendar-header {
        flex-direction: column;
        align-items: stretch;
    }

    .calendar-navigation {
        justify-content: center;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .projects-table,
    .equipment-table {
        font-size: 12px;
    }

    .projects-table th,
    .projects-table td,
    .equipment-table th,
    .equipment-table td {
        padding: 10px 8px;
    }

    .user-nav {
        flex-direction: column;
    }

    .user-nav .btn-new {
        margin-left: 0;
    }
}
/* Additional styles */

/* Profile section styles */
.profile-section {
    margin-bottom: 40px;
}

.profile-section h2,
.projects-section h2,
.knowledge-section h2 {
    padding: 0 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 20px;
}

/* Big points card at top */
.points-card {
    background: #ffffff;
    border: 2px solid #000000;
    padding: 25px 30px;
    box-shadow: 6px 6px 0px #000000;
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.points-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.points-label {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.points-value-large {
    font-size: 48px;
    font-weight: 700;
}

.progress-bar-large {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border: 2px solid #000000;
    position: relative;
    margin-bottom: 10px;
}

.points-remaining {
    display: block;
    text-align: right;
    color: #666666;
}

/* Small grid for level and exam */
.profile-grid-small {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 600px) {
    .profile-grid-small {
        grid-template-columns: 1fr;
    }
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.profile-card {
    background: #ffffff;
    border: 2px solid #000000;
    padding: 20px;
    box-shadow: 4px 4px 0px #000000;
    text-align: center;
}

.profile-card h3 {
    font-size: 14px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.level-display {
    font-size: 24px;
    font-weight: 700;
    padding: 15px;
    border: 2px solid #000000;
    text-transform: uppercase;
}

.level-display.level-Студент,
.level-display.level-Lvl1,
.level-display.level-Lvl2,
.level-display.level-Lvl3,
.level-display.level-Extra {
    background: #000000;
    color: #ffffff;
}

.points-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.points-value {
    font-size: 36px;
    font-weight: 700;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border: 2px solid #000000;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: #000000;
    transition: width 0.3s ease;
}

.exam-status {
    font-size: 18px;
    font-weight: 700;
    padding: 10px;
    border: 2px solid #000000;
    text-transform: uppercase;
}

.exam-status.passed {
    background: #000000;
    color: #ffffff;
}

.exam-status.not-passed {
    background: #ffffff;
    color: #000000;
}

.events-section {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.events-section h2 {
    padding: 0 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 20px;
}

.knowledge-section {
    margin-top: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.kb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.kb-card {
    background: #ffffff;
    border: 2px solid #000000;
    padding: 20px;
    box-shadow: 4px 4px 0px #000000;
}

.kb-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.kb-card p {
    font-size: 14px;
    margin-bottom: 15px;
}

.kb-grid-full {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.kb-card-large {
    background: #ffffff;
    border: 2px solid #000000;
    padding: 30px;
    box-shadow: 6px 6px 0px #000000;
}

.kb-card-large h2 {
    font-size: 20px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.kb-content {
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.8;
}

.kb-date {
    display: block;
    margin-top: 15px;
    color: #666666;
    font-size: 12px;
}

.level-info {
    margin-top: 40px;
    padding: 20px;
    border: 2px solid #000000;
    background: #f9f9f9;
}

.level-info h3 {
    margin-bottom: 15px;
    text-transform: uppercase;
}

.level-info ul {
    list-style: none;
    padding-left: 0;
}

.level-info li {
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.level-info li:last-child {
    border-bottom: none;
}

.note {
    margin-top: 15px;
    font-style: italic;
    color: #666666;
}

.small-input {
    width: 80px;
    padding: 5px;
    border: 2px solid #000000;
    font-family: inherit;
    font-size: 14px;
}

.small-select {
    padding: 5px;
    border: 2px solid #000000;
    font-family: inherit;
    font-size: 14px;
    background: #ffffff;
}

.btn-small {
    padding: 5px 10px;
    font-size: 14px;
}

.level-badge {
    display: inline-block;
    padding: 4px 8px;
    border: 2px solid #000000;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.level-badge.level-Студент,
.level-badge.level-Lvl1,
.level-badge.level-Lvl2,
.level-badge.level-Lvl3,
.level-badge.level-Extra {
    background: #000000;
    color: #ffffff;
}

.hero {
    text-align: center;
    padding: 40px 0;
}

.hero h2 {
    font-size: 28px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-text {
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.info-blocks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.info-block {
    background: #ffffff;
    border: 2px solid #000000;
    padding: 30px 20px;
    box-shadow: 6px 6px 0px #000000;
}

.info-block h3 {
    font-size: 18px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.info-block p {
    font-size: 14px;
    line-height: 1.6;
}

.cta-section {
    margin-top: 60px;
    padding: 40px;
    border: 2px solid #000000;
    background: #000000;
    color: #ffffff;
}

.cta-text {
    font-size: 18px;
    margin-bottom: 25px;
    text-transform: uppercase;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-secondary {
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
}

.btn-secondary:hover {
    background: #000000;
    color: #ffffff;
}

/* Main Navigation - Unified for all users */
.main-nav {
    background-color: #000000;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #000000;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.main-nav .nav-brand a {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
}

.main-nav .nav-links {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.main-nav .nav-links a {
    color: #ffffff;
    text-decoration: none;
    padding: 8px 14px;
    border: 2px solid #ffffff;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    white-space: nowrap;
}

.main-nav .nav-links a:hover,
.main-nav .nav-links a.active {
    background-color: #ffffff;
    color: #000000;
    box-shadow: 2px 2px 0px #ffffff;
}

.main-nav .nav-links .nav-logout {
    background-color: #ffffff;
    color: #000000;
}

.main-nav .nav-links .nav-logout:hover {
    background-color: #000000;
    color: #ffffff;
    box-shadow: 2px 2px 0px #ffffff;
}

@media (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        margin: -30px -30px 20px -30px;
    }
    
    .main-nav .nav-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .main-nav {
        margin: -20px -20px 20px -20px;
        padding: 10px;
    }
    
    .main-nav .nav-brand a {
        font-size: 16px;
    }
    
    .main-nav .nav-links {
        gap: 8px;
    }
    
    .main-nav .nav-links a {
        padding: 6px 10px;
        font-size: 11px;
        letter-spacing: 0.5px;
    }
    
    .container > header,
    .container > main,
    .container > .admin-main {
        padding: 20px;
    }
}
