* {
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #121212;
    color: white;
}

.hidden {
    display: none !important;
}

/* Login */

.login-container {
    width: 100%;
    max-width: 420px;
    background: #1c1c1c;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    margin: 80px auto;
}

.login-container h1,
.login-container p {
    text-align: center;
}

.message {
    background: #123d22;
    color: #8dffad;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.error {
    background: #451818;
    color: #ff8d8d;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.tab-button {
    background: #333333;
    color: white;
}

.tab-button.active {
    background: #ff8c42;
    color: black;
}

form {
    margin-top: 20px;
}

label {
    display: block;
    margin-bottom: 6px;
    color: #dddddd;
}

input,
select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: none;
    border-radius: 8px;
    outline: none;
    background: #2d2d2d;
    color: white;
}

input:focus,
select:focus {
    outline: 2px solid #ff8c42;
}

button {
    border: none;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    font-weight: bold;
}

form button {
    width: 100%;
    background: #ff8c42;
    color: black;
}

/* App Layout */

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 220px;
    background: #181818;
    border-right: 1px solid #2d2d2d;
    padding: 24px;
}

.sidebar h2 {
    margin-top: 0;
    margin-bottom: 24px;
}

.side-tab {
    display: block;
    width: 100%;
    background: #252525;
    color: white;
    margin-bottom: 12px;
    text-align: left;
}

.side-tab.active {
    background: #ff8c42;
    color: black;
}

.logout {
    display: block;
    color: #ff8c42;
    text-decoration: none;
    margin-top: 30px;
}

.logout:hover {
    text-decoration: underline;
}

.main-content {
    flex: 1;
    padding: 32px;
}

.page {
    display: none;
}

.active-page {
    display: block;
}

/* Schedule */

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.schedule-header h1 {
    margin: 0;
    text-align: center;
}

.schedule-header p {
    color: #aaaaaa;
    text-align: center;
    margin: 6px 0 0;
}

.week-button {
    background: #252525;
    color: white;
    font-size: 22px;
    width: 52px;
    height: 52px;
}

.week-button:hover {
    background: #333333;
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(150px, 1fr));
    gap: 16px;
}

.day-card {
    background: #1c1c1c;
    border: 1px solid #2d2d2d;
    border-radius: 14px;
    min-height: 260px;
    padding: 14px;
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.day-header h3 {
    margin: 0;
    font-size: 16px;
}

.day-header span {
    color: #aaaaaa;
    font-size: 13px;
}

.add-shift-button {
    background: #ff8c42;
    color: black;
    width: 34px;
    height: 34px;
    padding: 0;
    font-size: 20px;
}

.shift-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.empty-day {
    color: #777777;
    font-size: 14px;
}

.shift-item {
    width: 100%;
    text-align: left;
    color: black;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.shift-item span {
    font-size: 13px;
}

.shift-item em {
    font-size: 12px;
    font-style: normal;
    font-weight: bold;
}

.shift-item.morning {
    background: #ffd84d;
}

.shift-item.evening {
    background: #9df5ff;
}

.shift-item.night {
    background: #1f3c88;
    color: white;
}

.shift-item.cancelled {
    background: #ff4d4d;
    color: white;
}

.shift-item.late_cancelled {
    background: #8b0000;
    color: white;
}

.shift-item.custom {
    background: #9b5cff;
    color: white;
}

/* Modal */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #1c1c1c;
    border: 1px solid #333333;
    border-radius: 16px;
    padding: 26px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.7);
}

.modal h2 {
    margin-top: 0;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: transparent;
    color: white;
    font-size: 28px;
    padding: 0;
    width: 32px;
    height: 32px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.modal-actions button {
    flex: 1;
}

.primary-button {
    background: #ff8c42;
    color: black;
}

.danger-button {
    background: #333333;
    color: white;
}

.delete-button {
    background: #ff4d4d;
    color: white;
}

.late-cancel-button {
    background: #8b0000;
    color: white;
}

/* Responsive */

@media (max-width: 1100px) {
    .schedule-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .app-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #2d2d2d;
    }

    .schedule-grid {
        grid-template-columns: 1fr;
    }

    .schedule-header {
        gap: 16px;
    }
}