/* public/assets/css/style.css */
:root {
    --wb-primary: #6E0BD4;
    --wb-accent: #FF2E85;
    --wb-dark: #1b102e;
    --wb-soft: #f7f3ff;
    --wb-pink: #ff66a3;
    --wb-lilac: #c084fc;
    --wb-violet: #8b5cf6;
    --wb-bg: #ffffff;
    --wb-text: #333333;
    --wb-border: #e0e0e0;
    --wb-card-bg: #ffffff;
    --wb-header-bg: #6E0BD4;
    --wb-hover: #f5f5f5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--wb-bg);
    color: var(--wb-text);
    line-height: 1.6;
}

/* Header */
.header {
    background-color: var(--wb-header-bg);
    color: white;
    padding: 12px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 16px;
}

.logo-text {
    font-weight: 700;
    font-size: 18px;
}

.logo-subtitle {
    font-size: 12px;
    opacity: 0.8;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-role {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 12px;
}

.user-name {
    font-size: 14px;
}

/* Main container */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
}

/* Auth page */
.auth-page {
    background: linear-gradient(135deg, var(--wb-primary) 0%, var(--wb-violet) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.auth-header {
    background: var(--wb-primary);
    color: white;
    padding: 24px;
    text-align: center;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.auth-subtitle {
    opacity: 0.8;
    font-size: 14px;
}

.auth-body {
    padding: 24px;
}

.auth-error {
    background: #fff4f4;
    border: 1px solid #ffcdd2;
    color: #d9364d;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-footer {
    padding: 16px 24px;
    background: #f9f9f9;
    text-align: center;
    font-size: 12px;
    color: #666;
}

/* Dashboard grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

/* Cards */
.card {
    background: var(--wb-card-bg);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--wb-border);
    overflow: hidden;
}

.card-wide {
    grid-column: 1 / -1;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--wb-border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h2 {
    font-weight: 600;
    font-size: 16px;
    color: var(--wb-text);
    margin: 0;
}

.card-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-filters {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 20px;
}

.card-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 16px;
}

.card-note {
    color: #888;
    font-size: 12px;
    margin-top: 16px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    gap: 6px;
    text-decoration: none;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-full {
    width: 100%;
}

.btn-half {
    width: 48%;
}

.btn-primary {
    background-color: var(--wb-primary);
    color: white;
}

.btn-primary:hover {
    background-color: #5a09b3;
}

.btn-accent {
    background-color: var(--wb-accent);
    color: white;
}

.btn-accent:hover {
    background-color: #e01a71;
}

.btn-secondary {
    background-color: #f5f5f5;
    color: #333;
}

.btn-secondary:hover {
    background-color: #e8e8e8;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--wb-border);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-input-sm {
    padding: 6px 10px;
    font-size: 13px;
}

.form-input:focus {
    outline: none;
    border-color: var(--wb-primary);
    box-shadow: 0 0 0 2px rgba(110, 11, 212, 0.1);
}

.input-group {
    display: flex;
    gap: 8px;
}

.input-group .form-input {
    flex: 1;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.alert-warning {
    background-color: #fff8e6;
    border: 1px solid #ffeaa7;
    color: #b36b00;
}

.alert-success {
    background-color: #e6f7ee;
    border: 1px solid #a3e9cb;
    color: #0a7b4c;
}

.alert-danger {
    background-color: #fff4f4;
    border: 1px solid #ffcdd2;
    color: #d9364d;
}

/* Payout details */
.payout-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.payout-divider {
    height: 1px;
    background-color: var(--wb-border);
    margin: 8px 0;
}

.payout-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    padding: 8px 0;
}

.total-amount {
    font-size: 1.2em;
    color: var(--wb-primary);
}

/* Shift info */
.shift-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}

.shift-time-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 500;
}

.check-in, .check-out {
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 6px;
}

.time-separator {
    color: #666;
}

.no-shift {
    color: #888;
    font-style: italic;
}

.shift-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Overtime examples */
.overtime-examples {
    background: #f9f9f9;
    padding: 12px;
    border-radius: 8px;
    margin-top: 16px;
}

.overtime-examples h4 {
    margin-bottom: 8px;
    font-size: 14px;
}

.overtime-examples ul {
    font-size: 13px;
    color: #666;
    padding-left: 20px;
}

.overtime-examples li {
    margin-bottom: 4px;
}

/* Employees list */
.employees-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.employee-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.employee-info {
    flex: 1;
}

.employee-name {
    font-weight: 500;
}

.employee-details {
    font-size: 12px;
    color: #666;
}

.employee-toggle {
    margin: 0;
}

.employee-form {
    margin-top: 16px;
}

/* Switch toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--wb-primary);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Action buttons */
.action-buttons {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 16px 0;
}

/* Divider */
.divider {
    height: 1px;
    background-color: var(--wb-border);
    margin: 16px 0;
}

/* Payouts pending */
.payouts-pending {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.payout-pending {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: #fff8e6;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
}

.payout-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.payout-employee {
    font-weight: 500;
}

.payout-date {
    font-size: 12px;
    color: #666;
}

/* Calendar nav */
.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.current-month {
    font-weight: 500;
    min-width: 120px;
    text-align: center;
}

/* Calendar */
.calendar {
    width: 100%;
}

.calendar.compact .calendar-day {
    height: 60px;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 500;
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    height: 80px;
    padding: 4px;
    border: 1px solid var(--wb-border);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.calendar-day:hover {
    background-color: #f9f9f9;
}

.calendar-day.other-month {
    background-color: #f9f9f9;
    color: #ccc;
    cursor: default;
}

.calendar-day.today {
    border-color: var(--wb-primary);
    background-color: rgba(110, 11, 212, 0.05);
}

.day-number {
    font-weight: 500;
    margin-bottom: 4px;
    text-align: right;
}

.day-shift {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.day-shifts {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    justify-content: center;
}

.shift-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.shift-time {
    font-size: 10px;
    color: #666;
}

.overtime-info {
    margin-top: 2px;
}

.overtime-badge {
    background: #e6f7ee;
    color: #0a7b4c;
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 9px;
}

.shift-deduction {
    color: #dc3545;
    font-size: 10px;
}

.shift-bonus {
    color: #28a745;
    font-size: 10px;
}

.shift-pending {
    font-size: 10px;
    color: #999;
    font-style: italic;
}

/* Payouts list */
.payouts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--wb-border);
}

.payout-item:last-child {
    border-bottom: none;
}

.payout-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 500;
}

.status-success {
    background-color: #e6f7ee;
    color: #0a7b4c;
}

.status-warning {
    background-color: #fff8e6;
    color: #b36b00;
}

.status-danger {
    background-color: #fff4f4;
    color: #d9364d;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
}

.badge-success {
    background-color: #e6f7ee;
    color: #0a7b4c;
    border: 1px solid #a3e9cb;
}

.badge-danger {
    background-color: #fff4f4;
    color: #d9364d;
    border: 1px solid #ffcdd2;
}

/* Text utilities */
.text-success {
    color: #0a7b4c;
}

.text-danger {
    color: #d9364d;
}

.text-warning {
    color: #b36b00;
}

.text-muted {
    color: #666;
}

.text-center {
    text-align: center;
}

/* Table */
.table-container {
    overflow-x: auto;
    margin-bottom: 16px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background-color: #f9f9f9;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: #666;
    border-bottom: 1px solid var(--wb-border);
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--wb-border);
    font-size: 14px;
}

.data-table tr:hover {
    background-color: #f9f9f9;
}

/* Inline form */
.inline-form {
    display: inline;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--wb-border);
}

.pagination-info {
    font-size: 14px;
    color: #666;
}

.pagination-controls {
    display: flex;
    gap: 8px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--wb-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.bonus-list, .deduction-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bonus-item, .deduction-item {
    padding: 12px;
    border: 1px solid var(--wb-border);
    border-radius: 8px;
}

.bonus-amount, .deduction-amount {
    font-weight: 600;
    margin-bottom: 4px;
}

.bonus-amount {
    color: #0a7b4c;
}

.deduction-amount {
    color: #d9364d;
}

.bonus-note, .deduction-note {
    color: #666;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .header-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-half {
        width: 100%;
    }
    
    .card-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pagination {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    .calendar-day {
        height: 60px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 16px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .card-actions {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
    
    .employee-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .employee-toggle {
        align-self: flex-end;
    }
    
    .payout-pending {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .shift-time-display {
        flex-direction: column;
        gap: 4px;
    }
}


/* Auth tabs */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--wb-border);
}

.auth-tab {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.auth-tab.active {
    color: var(--wb-primary);
    border-bottom-color: var(--wb-primary);
}

.auth-tab-content {
    display: none;
    padding: 20px;
}

.auth-tab-content.active {
    display: block;
}

.auth-success {
    background: #e6f7ee;
    border: 1px solid #a3e9cb;
    color: #0a7b4c;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.calendar-day.selected {
    background-color: rgba(110, 11, 212, 0.1);
    border: 2px solid var(--wb-primary);
}

/* Дополнительные стили для календаря */
.calendar-day.selected {
    background-color: rgba(110, 11, 212, 0.1);
    border: 2px solid var(--wb-primary);
}

.calendar-day.selected .day-number {
    font-weight: bold;
    color: var(--wb-primary);
}

/* Стили для точек смен в календаре */
.day-shifts {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    justify-content: center;
    margin-top: 2px;
}

.shift-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* Стили для статусов выплат */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-success {
    background-color: #e6f7ee;
    color: #0a7b4c;
    border: 1px solid #a3e9cb;
}

.status-warning {
    background-color: #fff8e6;
    color: #b36b00;
    border: 1px solid #ffeaa7;
}

/* Стили для бейджей премий и удержаний */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.badge:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.badge-success {
    background-color: #e6f7ee;
    color: #0a7b4c;
    border: 1px solid #a3e9cb;
}

.badge-danger {
    background-color: #fff4f4;
    color: #d9364d;
    border: 1px solid #ffcdd2;
}

/* Анимация для выбранных дат */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.calendar-day.selected {
    animation: pulse 0.5s ease;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .calendar.compact .calendar-day {
        height: 50px;
        font-size: 11px;
    }
    
    .shift-dot {
        width: 6px;
        height: 6px;
    }
    
    .card-filters {
        flex-direction: column;
        gap: 8px;
    }
    
    .card-filters .form-input-sm {
        width: 100%;
    }
}

/* Дополнительные стили для календаря сотрудника */
.shift-info {
    text-align: center;
    margin-top: 4px;
}

.shift-pending {
    font-weight: 600;
    font-size: 12px;
    color: var(--wb-primary);
}

.shift-status {
    font-size: 10px;
    color: #666;
    margin-top: 2px;
}

.calendar-day.today .shift-pending {
    color: white;
}

.calendar-day.today .shift-status {
    color: rgba(255, 255, 255, 0.8);
}

/* Улучшенное отображение для календаря */
.day-shift {
    margin-top: 4px;
    text-align: center;
}

.shift-time {
    font-size: 11px;
    font-weight: 500;
    color: #333;
}

.overtime-info {
    margin-top: 2px;
}

.overtime-badge {
    background: #e6f7ee;
    color: #0a7b4c;
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 500;
}

.shift-deduction,
.shift-bonus {
    font-size: 10px;
    margin-top: 2px;
}

.shift-deduction {
    color: #dc3545;
}

.shift-bonus {
    color: #28a745;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .shift-pending {
        font-size: 10px;
    }
    
    .shift-status {
        font-size: 9px;
    }
    
    .shift-time {
        font-size: 10px;
    }
}