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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #e0e0e0;
}

/* Тёмная тема */
body.dark-theme {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

.container {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 24px 32px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #242424;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #666;
}

.header h1 {
    font-size: 28px;
    color: #e0e0e0;
}

.header-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.username {
    color: #999;
    font-size: 14px;
}

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #1a1a1a;
}

.login-box {
    background-color: #242424;
    padding: 40px;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    border: 1px solid #333;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #e0e0e0;
    font-size: 24px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #999;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: #333;
    border: 1px solid #444;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #666;
    background-color: #3a3a3a;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.btn-primary {
    background-color: #555;
    color: #fff;
}

.btn-primary:hover {
    background-color: #666;
}

.btn-secondary {
    background-color: #444;
    color: #e0e0e0;
}

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

.btn-success {
    background-color: #4a7c4e;
    color: #fff;
}

.btn-success:hover {
    background-color: #5a8c5e;
}

.btn-danger {
    background-color: #7a4a4a;
    color: #fff;
}

.btn-danger:hover {
    background-color: #8a5a5a;
}

.btn-large {
    padding: 15px 30px;
    font-size: 16px;
    width: 100%;
}

/* Dashboard */
.dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.shift-card,
.actions-card {
    background-color: #242424;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #333;
}

.shift-card h2,
.actions-card h2 {
    margin-bottom: 20px;
    color: #e0e0e0;
}

.shift-status {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.duration {
    font-size: 48px;
    font-weight: bold;
    color: #999;
    font-family: 'Courier New', monospace;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Error message */
.error-message {
    color: #ff6b6b;
    font-size: 14px;
    margin-top: 10px;
}

.admin-link {
    text-align: center;
    margin-top: 20px;
}

.admin-link a {
    color: #666;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s;
}

.admin-link a:hover {
    color: #999;
}

/* Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #242424;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid #333;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #e0e0e0;
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

.close:hover {
    color: #e0e0e0;
}

/* Tabs */
.admin-tabs,
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #e0e0e0;
}

.tab-btn.active {
    color: #e0e0e0;
    border-bottom-color: #666;
}

.tab-content {
    display: none;
}

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

/* Users list */
.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #333;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* Clients */
.clients-container {
    background-color: #242424;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #333;
}

.client-card {
    background-color: #1a1a1a;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #333;
    margin-top: 20px;
}

.client-info {
    text-align: center;
    padding: 60px 20px;
}

.client-info h2 {
    color: #666;
    font-size: 18px;
}

.client-details {
    background-color: #333;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.client-details p {
    margin-bottom: 10px;
    font-size: 16px;
}

.client-details strong {
    color: #999;
}

.quick-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.quick-actions .btn {
    flex: 1;
}

#commentText {
    width: 100%;
    padding: 12px;
    background-color: #333;
    border: 1px solid #444;
    border-radius: 4px;
    color: #e0e0e0;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 10px;
}

.choice-modal {
    background-color: #333;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.choice-modal h3 {
    margin-bottom: 10px;
    color: #e0e0e0;
}

.choice-modal .btn {
    width: 100%;
}

/* Working clients */
.working-client-container {
    max-width: 1100px;
    margin: 20px auto;
}

.client-header-card {
    background-color: #242424;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #333;
    margin-bottom: 20px;
}

.client-header-card h2 {
    color: #e0e0e0;
    margin-bottom: 15px;
}

.client-header-card p {
    color: #999;
    margin-bottom: 8px;
}

.comments-card {
    background-color: #242424;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #333;
}

.comments-card h3 {
    color: #e0e0e0;
    margin-bottom: 20px;
}

.comments-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.comment-item {
    background-color: #333;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.comment-item strong {
    color: #999;
    font-size: 12px;
}

.comment-item p {
    margin-top: 8px;
    color: #e0e0e0;
}

.clients-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.working-client-item {
    background-color: #333;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #444;
}

.client-header {
    margin-bottom: 15px;
}

.client-header h3 {
    color: #e0e0e0;
    margin-bottom: 5px;
}

.client-header p {
    color: #999;
    font-size: 14px;
}

.working-client-item .btn {
    width: 100%;
}

.site-credit {
    position: fixed;
    right: 12px;
    bottom: 4px;
    z-index: 1100;
    color: #8b8b8b;
    font-size: 12px;
    letter-spacing: 0.2px;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .modal-content {
        width: 95%;
    }
}
