:root {
    --primary-color: #2e7d32;
    --primary-light: #4caf50;
    --primary-dark: #1b5e20;
    --secondary-color: #f1f8e9;
    --remote-color: #2196f3;
    --vacation-color: #ff9800;
    --text-color: #333;
    --border-color: #ddd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: var(--text-color);
}

.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.1);
}

.main-content {
    padding: 2rem;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.info-box {
    background: var(--secondary-color);
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
}

.info-box p:last-child {
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

.table-container {
    overflow-x: auto;
    margin-bottom: 2rem;
}

.booking-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.9rem;
}

.booking-table th,
.booking-table td {
    padding: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
    min-width: 90px;
}

.booking-table th {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
    white-space: nowrap;
}

.employee-name {
    background-color: var(--secondary-color);
    font-weight: bold;
    text-align: left;
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 120px;
    padding: 8px;
}

.table-select {
    width: 100%;
    padding: 6px;
    border: 2px solid var(--primary-light);
    border-radius: 4px;
    background: white;
    font-size: 0.8rem;
    height: 36px;
    text-align: center;
}

.table-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.2);
}

.remote-option {
    background-color: #e3f2fd;
    color: var(--remote-color);
    font-weight: bold;
}

.vacation-option {
    background-color: #fff3e0;
    color: var(--vacation-color);
    font-weight: bold;
}

.table-option {
    background-color: var(--secondary-color);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--secondary-color), #e8f5e8);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    text-align: center;
}

.stat-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
}

.stat-number {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0.3rem 0;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
    margin: 0;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 0.8rem;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    z-index: 1000;
    animation: slideIn 0.3s ease;
    font-size: 0.9rem;
}

.notification.success {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
}

.notification.error {
    background: linear-gradient(135deg, #f44336, #c62828);
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .main-content {
        padding: 1rem;
    }

    .container {
        padding: 1rem;
    }

    .booking-table th,
    .booking-table td {
        padding: 6px 4px;
        font-size: 0.7rem;
        min-width: 80px;
    }

    .table-select {
        font-size: 0.7rem;
        padding: 4px;
        height: 32px;
    }

    .employee-name {
        font-size: 0.7rem;
        min-width: 100px;
        padding: 6px;
    }
}

.tables-visualization {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--secondary-color);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.tables-visualization h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.3rem;
}

.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.table-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.2rem;
    border-radius: 12px;
    background: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.table-item.free {
    border: 3px solid #4caf50;
    background: linear-gradient(135deg, #f1f8e9, #e8f5e9);
}

.table-item.occupied {
    border: 3px solid #f44336;
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
}

.table-image {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 1rem;
}

.table-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.table-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.free-overlay {
    background: rgba(76, 175, 80, 0.9);
}

.occupied-overlay {
    background: rgba(244, 67, 54, 0.9);
}

.status-text {
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.table-info {
    text-align: center;
}

.table-number {
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.table-employee {
    color: #c62828;
    font-weight: 500;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.8);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    margin-top: 0.5rem;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-item.free:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(76, 175, 80, 0.3);
}

.table-item.free:hover .table-img {
    transform: scale(1.05);
}

.table-item.occupied:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(244, 67, 54, 0.3);
}

.table-item.occupied:hover .table-img {
    transform: scale(1.05);
}

.table-image:hover .table-overlay {
    opacity: 0.95;
}

.table-image:not(:hover) .table-overlay {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .tables-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .table-item {
        padding: 1rem;
    }

    .table-image {
        width: 100px;
        height: 100px;
    }

    .status-text {
        font-size: 1rem;
    }

    .tables-visualization {
        padding: 1rem;
        margin: 1.5rem 0;
    }

    .table-number {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .tables-grid {
        grid-template-columns: 1fr;
    }

    .table-item {
        flex-direction: row;
        text-align: left;
        padding: 1rem;
    }

    .table-image {
        width: 80px;
        height: 80px;
        margin-bottom: 0;
        margin-right: 1rem;
    }

    .table-info {
        text-align: left;
        flex-grow: 1;
    }
}

.tables-row {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.tables-row:last-child {
    margin-bottom: 0;
}

.table-item {
    width: 220px;
}

@media (max-width: 768px) {
    .tables-row {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .table-item {
        width: 100%;
        max-width: 250px;
        flex-direction: row;
        text-align: left;
        padding: 1rem;
    }

    .table-image {
        width: 80px;
        height: 80px;
        margin-bottom: 0;
        margin-right: 1rem;
    }

    .status-text {
        font-size: 1rem;
    }

    .tables-visualization {
        padding: 1rem;
        margin: 1.5rem 0;
    }

    .table-number {
        font-size: 1rem;
    }

    .table-info {
        text-align: left;
        flex-grow: 1;
    }
}

@media (max-width: 480px) {
    .tables-row {
        gap: 0.8rem;
    }

    .table-item {
        max-width: 100%;
        padding: 0.8rem;
    }

    .table-image {
        width: 70px;
        height: 70px;
        margin-right: 0.8rem;
    }

    .table-employee {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }
}

.table-img[src*="table"]:not([src]) {
    content: '';
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: 2px solid #2196f3;
    border-radius: 8px;
    font-size: 2rem;
    font-weight: bold;
    color: #1565c0;
}

.table-img[src*="table1"]:not([src])::before { content: '1'; }
.table-img[src*="table2"]:not([src])::before { content: '2'; }
.table-img[src*="table3"]:not([src])::before { content: '3'; }
.table-img[src*="table4"]:not([src])::before { content: '4'; }

.tables-visualization {
    text-align: center;
}

.tables-image-container {
    position: relative;
    display: inline-block;
    margin: 0 auto;
    max-width: 1200px;
}

.tables-main-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.table-highlight {
    position: absolute;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.table-highlight.free {
    background: rgba(76, 175, 80, 0.3);
    border: 2px solid rgba(76, 175, 80, 0.8);
}

.table-highlight.occupied {
    background: rgba(244, 67, 54, 0.3);
    border: 2px solid rgba(244, 67, 54, 0.8);
}

.tables-image-container {
    position: relative;
    min-height: 300px;
}

.table-1 {
    top: 10%;
    left: 5%;
    width: 40%;
    height: 36%;
}

.table-2 {
    top: 10%;
    left: 55%;
    width: 40%;
    height: 36%;
}

.table-3 {
    top: 50%;
    left: 5%;
    width: 40%;
    height: 36%;
}

.table-4 {
    top: 50%;
    left: 55%;
    width: 40%;
    height: 36%;
}

.table-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.table-highlight:hover .table-tooltip {
    opacity: 1;
}

.tooltip-content {
    background: white;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    font-size: 0.9rem;
    white-space: nowrap;
}

.tooltip-content strong {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--text-color);
}

.free-text {
    color: #2e7d32;
    font-weight: 500;
}

.occupied-text {
    color: #c62828;
    font-weight: 500;
}

.table-numbers {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.table-number {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.free-number {
    background: #4caf50;
    color: white;
    border: 2px solid #2e7d32;
}

.occupied-number {
    background: #f44336;
    color: white;
    border: 2px solid #c62828;
}

.table-1-number {
    top: 30%;
    left: 30%;
}

.table-2-number {
    top: 30%;
    left: 70%;
}

.table-3-number {
    top: 70%;
    left: 30%;
}

.table-4-number {
    top: 70%;
    left: 70%;
}

.tables-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.free-color {
    background: #4caf50;
    border: 2px solid #2e7d32;
}

.occupied-color {
    background: #f44336;
    border: 2px solid #c62828;
}

.table-highlight:hover {
    transform: scale(1.05);
    z-index: 10;
}

.table-highlight.free:hover {
    background: rgba(76, 175, 80, 0.4);
    border: 2px solid #4caf50;
}

.table-highlight.occupied:hover {
    background: rgba(244, 67, 54, 0.4);
    border: 2px solid #f44336;
}

@media (max-width: 768px) {
    .tables-image-container {
        max-width: 100%;
    }

    .table-highlight {
        border-width: 1px;
    }

    .table-number {
        width: 25px;
        height: 25px;
        font-size: 1rem;
    }

    .tables-legend {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .tooltip-content {
        font-size: 0.8rem;
        padding: 0.6rem 0.8rem;
    }
}

.tables-main-image[src*="tables"]:not([src]) {
    content: '';
    display: block;
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: 2px solid #2196f3;
    border-radius: 8px;
    position: relative;
}

.tables-main-image[src*="tables"]:not([src])::before {
    content: 'Изображение столов';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #1565c0;
    font-weight: bold;
    font-size: 1.2rem;
}

.stats-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--secondary-color);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.stats-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.3rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #f5f5f5;
}

.stat-header h4 {
    color: var(--primary-color);
    margin: 0;
    font-size: 1.1rem;
}

.stat-date, .stat-period {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.stat-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-progress {
    flex-shrink: 0;
}

.progress-circle {
    width: 80px;
    height: 80px;
}

.circular-chart {
    display: block;
    width: 100%;
    height: 100%;
}

.circle-bg {
    fill: none;
    stroke: #f0f0f0;
    stroke-width: 3;
}

.circle {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    animation: progress 1s ease-out forwards;
}

.free-circle {
    stroke: #4caf50;
}

.occupied-circle {
    stroke: #f44336;
}

.percentage {
    fill: var(--text-color);
    font-size: 0.4em;
    font-weight: bold;
    text-anchor: middle;
}

.stat-numbers {
    flex-grow: 1;
    text-align: center;
}

.stat-number-main {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.stat-details {
    background: #f8f9fa;
    padding: 0.6rem;
    border-radius: 6px;
    border-left: 3px solid #4caf50;
}

.free-detail {
    color: #2e7d32;
    font-weight: 500;
    font-size: 0.9rem;
}

.overall-card .stat-content {
    flex-direction: column;
    gap: 1rem;
}

.overall-stats {
    width: 100%;
}

.overall-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.8rem;
}

.overall-item:last-child {
    margin-bottom: 0;
}

.overall-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-color);
    border-radius: 8px;
}

.overall-info {
    flex-grow: 1;
}

.overall-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
}

.overall-label {
    color: #666;
    font-size: 0.9rem;
}

@keyframes progress {
    0% {
        stroke-dasharray: 0 100;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1.2rem;
    }

    .stat-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .progress-circle {
        width: 70px;
        height: 70px;
    }

    .stat-number-main {
        font-size: 1.7rem;
    }

    .overall-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .overall-icon {
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .stats-section {
        padding: 1rem;
        margin: 1.5rem 0;
    }

    .stat-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .stat-header h4 {
        font-size: 1rem;
    }
}

.skud-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.skud-stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.skud-stat-card:hover {
    transform: translateY(-2px);
}

.skud-stat-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-color);
    border-radius: 12px;
}

.skud-stat-info {
    flex-grow: 1;
}

.skud-stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
}

.skud-stat-label {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

.skud-table-container {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 1.5rem 0;
}

.skud-table-container h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.skud-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: #666;
    font-size: 0.9rem;
}

.filter-select {
    padding: 0.5rem;
    border: 2px solid var(--primary-light);
    border-radius: 6px;
    background: white;
}

.filter-reset {
    padding: 0.5rem 1rem;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.filter-reset:hover {
    background: #e0e0e0;
}

.skud-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.skud-table th {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: bold;
}

.skud-table td {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.status-присутствует {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.status-отсутствует {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.status-опоздание {
    background: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffcc80;
}

.skud-action-btn {
    padding: 0.4rem 0.8rem;
    background: var(--secondary-color);
    border: 1px solid var(--primary-light);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.skud-action-btn:hover {
    background: var(--primary-light);
    color: white;
}

.activity-chart {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 1.5rem 0;
}

.chart-placeholder {
    text-align: center;
    padding: 3rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

.integration-info {
    background: #e3f2fd;
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #2196f3;
    margin: 1.5rem 0;
}

.integration-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.integration-content li {
    margin-bottom: 0.5rem;
}

.api-example {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    overflow-x: auto;
}

.api-example pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #1565c0;
}

@media (max-width: 768px) {
    .skud-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .skud-stat-card {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }

    .skud-stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .skud-stat-value {
        font-size: 1.5rem;
    }

    .skud-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .skud-table {
        font-size: 0.9rem;
    }

    .skud-table th,
    .skud-table td {
        padding: 0.6rem;
    }

    .chart-placeholder {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .skud-stats {
        grid-template-columns: 1fr;
    }

    .skud-table {
        font-size: 0.8rem;
    }

    .status-badge {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
}

.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.add-employee-btn {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.add-employee-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.employee-actions {
    margin-left: 0.5rem;
}

.action-btn {
    background: none;
    border: 1px solid var(--primary-light);
    border-radius: 4px;
    padding: 0.3rem;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s ease;
}

.action-btn:hover {
    background: var(--secondary-color);
}

.employee-name {
    position: relative;
}

.delete-employee-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.employee-name:hover .delete-employee-btn {
    opacity: 1;
}

.delete-employee-btn:hover {
    background: #d32f2f;
}

.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.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: white;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #ffebee;
}

.modal-body {
    padding: 1.5rem;
}

.add-employee-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.add-employee-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.input-group {
    display: flex;
    gap: 0.5rem;
}

.employee-input {
    flex-grow: 1;
    padding: 0.8rem;
    border: 2px solid var(--primary-light);
    border-radius: 6px;
    font-size: 1rem;
}

.employee-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.2);
}

.add-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.add-btn:hover {
    background: var(--primary-dark);
}

.current-employees-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.employees-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
}

.employee-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s ease;
}

.employee-item:last-child {
    border-bottom: none;
}

.employee-item:hover {
    background: #f8f9fa;
}

.delete-btn {
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background 0.3s ease;
}

.delete-btn:hover {
    background: #d32f2f;
}

@media (max-width: 768px) {
    .header-section {
        flex-direction: column;
        align-items: stretch;
    }

    .add-employee-btn {
        align-self: flex-end;
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
    }

    .input-group {
        flex-direction: column;
    }

    .employee-name {
        padding-right: 25px !important;
    }

    .delete-employee-btn {
        opacity: 1;
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .modal-body {
        padding: 1rem;
    }

    .modal-header {
        padding: 1rem;
    }

    .employee-input {
        font-size: 0.9rem;
    }
}

.department-header {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb) !important;
    border-top: 3px solid #2196f3;
}

.department-cell {
    padding: 0.8rem 1rem !important;
    font-weight: bold;
}

.department-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.department-name {
    color: #1565c0;
    font-size: 1.1rem;
}

.department-count {
    color: #666;
    font-size: 0.9rem;
    font-weight: normal;
}

.employee-row {
    transition: background-color 0.3s ease;
}

.employee-row:hover {
    background-color: #f8f9fa;
}

.employee-name {
    position: relative;
}

.delete-employee-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.employee-name:hover .delete-employee-btn {
    opacity: 1;
}

.delete-employee-btn:hover {
    background: #d32f2f;
}

.modal-tabs {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 1.5rem;
}

.tab-button {
    background: none;
    border: none;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-button.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
}

.tab-button:hover {
    background: #f8f9fa;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.departments-list {
    max-height: 300px;
    overflow-y: auto;
}

.department-group {
    margin-bottom: 1.5rem;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
}

.department-group:last-child {
    margin-bottom: 0;
}

.department-group .department-header {
    background: #f8f9fa;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.department-group h5 {
    margin: 0;
    color: var(--primary-color);
}

.employee-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s ease;
}

.employee-item:last-child {
    border-bottom: none;
}

.employee-item:hover {
    background: #f8f9fa;
}

.delete-btn {
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background 0.3s ease;
}

.delete-btn:hover {
    background: #d32f2f;
}

.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.department-card {
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.department-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.department-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.department-card-header h5 {
    margin: 0;
    color: var(--primary-color);
}

.employee-count {
    background: #e3f2fd;
    color: #1565c0;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.department-employees {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.department-employee {
    font-size: 0.9rem;
    color: #666;
    padding: 0.2rem 0;
}

.department-select {
    padding: 0.5rem;
    border: 2px solid var(--primary-light);
    border-radius: 6px;
    background: white;
}

@media (max-width: 768px) {
    .department-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .delete-employee-btn {
        opacity: 1;
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
    }

    .departments-grid {
        grid-template-columns: 1fr;
    }

    .modal-tabs {
        flex-direction: column;
    }

    .tab-button {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .department-name {
        font-size: 1rem;
    }

    .input-group {
        flex-direction: column;
    }
}

.settings-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-input {
    width: 100%;
    max-width: 300px;
    padding: 0.8rem;
    border: 2px solid var(--primary-light);
    border-radius: 6px;
    font-size: 1rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.2);
}

.form-group small {
    display: block;
    margin-top: 0.3rem;
    color: #666;
    font-size: 0.8rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.save-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.save-btn:hover {
    background: var(--primary-dark);
}

.reset-btn {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    padding: 1rem 2rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.reset-btn:hover {
    background: #e0e0e0;
}

.settings-info {
    margin-bottom: 2rem;
}

.settings-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.setting-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.setting-card:hover {
    transform: translateY(-2px);
}

.setting-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-color);
    border-radius: 12px;
}

.setting-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.setting-label {
    color: #666;
    font-size: 0.9rem;
}

.settings-warning {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.settings-warning h4 {
    color: #ef6c00;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .settings-form {
        padding: 1rem;
    }

    .form-input {
        max-width: 100%;
    }

    .form-actions {
        flex-direction: column;
    }

    .settings-cards {
        grid-template-columns: 1fr;
    }

    .setting-card {
        padding: 1rem;
    }
}

.editor-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.edit-btn, .save-btn, .reset-btn, .cancel-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.edit-btn {
    background: #2196f3;
    color: white;
}

.save-btn {
    background: #4caf50;
    color: white;
}

.reset-btn {
    background: #ff9800;
    color: white;
}

.cancel-btn {
    background: #f44336;
    color: white;
}

.editor-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-bottom: 2rem;
}

.image-editor {
    position: relative;
    border: 2px dashed #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

.image-editor.editing-mode {
    border-color: #2196f3;
    background: #f3f9ff;
}

.editor-image {
    width: 100%;
    height: auto;
    display: block;
}

.table-area {
    position: absolute;
    border: 2px solid #4caf50;
    background: rgba(76, 175, 80, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #2e7d32;
    pointer-events: auto;
    box-sizing: border-box;
}

.table-area.editable {
    border-style: solid;
    border-color: #2196f3;
    background: rgba(33, 150, 243, 0.2);
    cursor: move;
}

.table-area.editable:hover {
    border-color: #1976d2;
    background: rgba(33, 150, 243, 0.3);
    transform: scale(1.02);
}

.table-area.selected {
    border: 3px solid #ff9800;
    background: rgba(255, 152, 0, 0.3);
    z-index: 100;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

.table-area.dragging {
    opacity: 0.9;
    z-index: 1000;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.table-area.resizing {
    opacity: 0.8;
    z-index: 1000;
}

.resize-handle {
    position: absolute;
    width: 16px;
    height: 16px;
    background: #ff9800;
    border: 2px solid white;
    border-radius: 50%;
    z-index: 101;
    pointer-events: auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.resize-handle:hover {
    background: #f57c00;
    transform: scale(1.2);
}

.resize-handle.nw { top: -8px; left: -8px; cursor: nw-resize; }
.resize-handle.ne { top: -8px; right: -8px; cursor: ne-resize; }
.resize-handle.sw { bottom: -8px; left: -8px; cursor: sw-resize; }
.resize-handle.se { bottom: -8px; right: -8px; cursor: se-resize; }

.preview-table {
    position: absolute;
    border: 2px solid #333;
    background: rgba(76, 175, 80, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #333;
    font-size: 14px;
    box-sizing: border-box;
}

.preview-table span {
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 3px;
}

.table-area {
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.resize-handle {
    transition: background-color 0.3s ease, transform 0.2s ease;
}

@media (max-width: 768px) {
    .editor-container {
        grid-template-columns: 1fr;
    }

    .editor-controls {
        flex-direction: column;
    }
}

.department-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.delete-department-btn {
    background: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.delete-department-btn:hover:not(:disabled) {
    background: #d32f2f;
    transform: scale(1.1);
}

.delete-department-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.no-employees {
    color: #999;
    font-style: italic;
    font-size: 0.9rem;
}

.department-warning {
    background: #fff3e0;
    color: #ef6c00;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    text-align: center;
    border-left: 3px solid #ff9800;
}

.date-header {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.date-header:hover {
    background: rgba(76, 175, 80, 0.1) !important;
}

.date-header.active {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color)) !important;
    color: white;
}

.date-header.active::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.8rem;
}

.tables-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.date-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-selector label {
    font-weight: 500;
    color: var(--primary-color);
}

.date-select {
    padding: 0.5rem;
    border: 2px solid var(--primary-light);
    border-radius: 6px;
    background: white;
    font-size: 0.9rem;
}

.date-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.remote-color {
    background: #2196f3;
    border: 2px solid #1976d2;
}

.vacation-color {
    background: #ff9800;
    border: 2px solid #f57c00;
}

.table-highlight.remote {
    background: rgba(33, 150, 243, 0.3);
    border: 2px solid rgba(33, 150, 243, 0.8);
}

.table-highlight.vacation {
    background: rgba(255, 152, 0, 0.3);
    border: 2px solid rgba(255, 152, 0, 0.8);
}

.remote-number {
    background: #2196f3;
    color: white;
    border: 2px solid #1976d2;
}

.vacation-number {
    background: #ff9800;
    color: white;
    border: 2px solid #f57c00;
}

.remote-text {
    color: #1976d2;
    font-weight: 500;
}

.vacation-text {
    color: #f57c00;
    font-weight: 500;
}

.image-upload-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
}

.current-image-preview {
    margin: 1rem 0;
    text-align: center;
}

.current-image-preview img {
    max-width: 300px;
    max-height: 200px;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 5px;
    background: white;
}

.image-upload-area {
    border: 2px dashed #2196f3;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    background: #f8fbff;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 1rem 0;
    max-width: 400px;
}

.image-upload-area:hover {
    background: #e3f2fd;
    border-color: #1976d2;
    transform: translateY(-1px);
}

.image-upload-area.dragover {
    background: #bbdefb;
    border-color: #1565c0;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #2196f3;
}

.upload-text {
    margin-bottom: 0.8rem;
    color: #666;
}

.upload-text p {
    margin: 0.3rem 0;
    font-size: 0.9rem;
}

.upload-text p:first-child {
    font-weight: 500;
    color: #333;
}

.upload-text small {
    font-size: 0.8rem;
    color: #888;
}

.upload-btn {
    background: #2196f3;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background 0.3s ease;
    margin: 0.3rem;
}

.upload-btn:hover {
    background: #1976d2;
}

.upload-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.file-input {
    display: none;
}

.upload-progress {
    margin-top: 0.8rem;
    display: none;
    max-width: 400px;
}

.progress-bar {
    width: 100%;
    height: 16px;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #2e7d32);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
}

.image-info {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 6px;
    padding: 0.8rem;
    margin-top: 1rem;
    max-width: 400px;
}

.image-info h5 {
    color: #2e7d32;
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.image-info ul {
    margin: 0;
    padding-left: 1.2rem;
    color: #666;
    font-size: 0.8rem;
}

.image-info li {
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.reset-image-btn {
    background: #ff9800;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
    margin-top: 0.5rem;
}

.reset-image-btn:hover {
    background: #f57c00;
}

.image-upload-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.image-preview-side {
    flex: 1;
    min-width: 250px;
}

.image-upload-side {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
}

@media (max-width: 768px) {
    .image-upload-container {
        flex-direction: column;
        gap: 1rem;
    }

    .image-preview-side,
    .image-upload-side {
        width: 100%;
        max-width: none;
    }

    .image-upload-area {
        max-width: none;
    }

    .current-image-preview img {
        max-width: 200px;
        max-height: 120px;
    }
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(255,255,255,0.3);
}

.user-info {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
}

.logout-btn {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.2);
}

@media (max-width: 768px) {
    .user-menu {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.3);
        padding-top: 0.5rem;
        margin-top: 0.5rem;
        width: 100%;
        justify-content: space-between;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}

.reset-image-btn {
    background: #ff9800;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
    margin-top: 0.5rem;
}

.reset-image-btn:hover {
    background: #f57c00;
}

.employee-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.employee-form .form-group {
    margin-bottom: 0;
}

.employee-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.employee-form .form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.employee-form .form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.employee-form .form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
}

.cancel-btn {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.cancel-btn:hover {
    background: #e0e0e0;
}

.employee-role {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.employee-role.admin {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.employee-role.manager {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.employee-role.employee {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.employee-role.none {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #e0e0e0;
}

.employee-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s ease;
}

.employee-item:last-child {
    border-bottom: none;
}

.employee-item:hover {
    background: #f8f9fa;
}

.employee-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .employee-form .form-actions {
        flex-direction: column;
    }

    .employee-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .employee-role {
        margin-left: 0;
    }
}

.table-display {
    padding: 6px;
    border-radius: 4px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    text-align: center;
    font-size: 0.8rem;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #495057;
}

.booking-cell.readonly {
    background-color: #f8f9fa;
}

.employee-row:not(.editable) .booking-cell {
    position: relative;
}

.employee-row:not(.editable) .booking-cell:hover::after {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 10;
}

.employee-row.editable {
    background-color: rgba(76, 175, 80, 0.05);
}

.editor-link {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.edit-layout-btn {
    background: #2196f3;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
    margin-bottom: 0.5rem;
}

.edit-layout-btn:hover {
    background: #1976d2;
}

.compact-image-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.current-image-compact h4,
.upload-section-compact h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.image-preview-box {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid #f0f0f0;
    text-align: center;
}

.compact-preview-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
}

.image-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.edit-layout-btn {
    background: #2196f3;
    color: white;
}

.edit-layout-btn:hover {
    background: #1976d2;
    transform: translateY(-1px);
}

.reset-btn {
    background: #ff9800;
    color: white;
}

.reset-btn:hover {
    background: #f57c00;
    transform: translateY(-1px);
}

.upload-section-compact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.compact-upload-area {
    border: 2px dashed #2196f3;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    background: #f8fbff;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

.compact-upload-area:hover {
    background: #e3f2fd;
    border-color: #1976d2;
    transform: translateY(-1px);
}

.compact-upload-area.dragover {
    background: #bbdefb;
    border-color: #1565c0;
    transform: scale(1.02);
}

.compact-upload-area .upload-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #2196f3;
}

.compact-upload-area .upload-text p {
    margin: 0.2rem 0;
    font-size: 0.9rem;
    color: #666;
}

.compact-upload-area .upload-text p:first-child {
    font-weight: 500;
    color: #333;
}

.compact-info {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 6px;
    padding: 1rem;
}

.compact-info h5 {
    color: #2e7d32;
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.compact-info ul {
    margin: 0;
    padding-left: 1.2rem;
    color: #666;
    font-size: 0.8rem;
}

.compact-info li {
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.compact-progress {
    margin-top: 0.5rem;
    display: none;
}

.compact-progress-bar {
    width: 100%;
    height: 12px;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
}

.compact-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #2e7d32);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.6rem;
    font-weight: bold;
}

@media (max-width: 768px) {
    .compact-image-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .image-preview-box {
        padding: 0.8rem;
    }

    .compact-upload-area {
        padding: 1rem;
        min-height: 120px;
    }

    .action-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
}

.table-select:focus {
    border-color: #ff9800 !important;
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.3) !important;
    outline: none;
    transform: scale(1.02);
    transition: all 0.2s ease;
}

.quick-help {
    position: fixed;
    top: 80px;
    right: 20px;
    background: white;
    border-left: 4px solid #4caf50;
    padding: 0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    max-width: 300px;
    animation: slideInRight 0.3s ease;
}

.quick-help.error {
    border-left-color: #f44336;
}

.quick-help.info {
    border-left-color: #2196f3;
}

.help-content {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.help-message {
    flex-grow: 1;
    font-size: 0.9rem;
    color: #333;
}

.help-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
    margin-left: 10px;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-close:hover {
    color: #333;
}

.help-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.3s ease;
}

.help-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    animation: scaleIn 0.3s ease;
}

.help-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
    border-radius: 12px 12px 0 0;
}

.help-modal-header h3 {
    margin: 0;
    color: white;
}

.help-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-modal-body {
    padding: 1.5rem;
}

.help-section {
    margin-bottom: 1.5rem;
}

.help-section h4 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.help-shortcuts {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.shortcut-item kbd {
    background: #333;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    min-width: 40px;
    text-align: center;
    display: inline-block;
}

.help-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #f0f0f0;
    text-align: right;
}

.help-modal-ok {
    background: #4caf50;
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.help-modal-ok:hover {
    background: #45a049;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.table-select[data-selected="true"] {
    background: #e8f5e9 !important;
    border-color: #4caf50 !important;
}

@media (max-width: 768px) {
    .quick-help {
        top: 60px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .help-modal-content {
        width: 95%;
        margin: 1rem;
    }

    .shortcut-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .table-select:focus {
        transform: scale(1.01);
    }
}

.keyboard-mode-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ff9800;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
    z-index: 9999;
    display: none;
}

.keyboard-mode-indicator.active {
    display: block;
    animation: bounceIn 0.5s ease;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(255,255,255,0.3);
}

.user-info {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.1);
}

.logout-btn {
    background: rgba(255,255,255,0.1);
}

@media (max-width: 768px) {
    .user-menu {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.3);
        padding-top: 0.5rem;
        margin-top: 0.5rem;
        width: 100%;
        justify-content: space-between;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}

.tables-visualization .table-highlight {
    position: absolute;
    border: 3px solid;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transition: all 0.3s ease;
    z-index: 10;
    min-width: 90px;
    min-height: 70px;
    padding: 8px 5px;
    box-sizing: border-box;
}

.tables-visualization .table-highlight.free {
    border-color: rgba(76, 175, 80, 0.6);
    background: rgba(76, 175, 80, 0.15);
}

.tables-visualization .table-highlight.occupied {
    border-color: rgba(244, 67, 54, 0.8);
    background: rgba(244, 67, 54, 0.25);
    box-shadow: 0 0 20px rgba(244, 67, 54, 0.4);
}

.tables-visualization .table-number {
    font-size: 16px;
    font-weight: bold;
    color: #2e7d32;
    margin-bottom: 2px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.95);
    padding: 3px 8px;
    border-radius: 20px;
    border: 2px solid;
    margin-top: 2px;
    z-index: 2;
    position: relative;
}

.tables-visualization .table-highlight.free .table-number {
    color: #2e7d32;
    border-color: #4caf50;
}

.tables-visualization .table-highlight.occupied .table-number {
    color: #d32f2f;
    border-color: #f44336;
    background: rgba(255, 255, 255, 0.95);
}

.tables-visualization .employee-name {
    font-size: 11px;
    font-weight: 600;
    color: #d32f2f;
    text-align: center;
    line-height: 1.2;
    max-width: 85px;
    word-break: break-word;
    background: rgba(255, 255, 255, 0.95);
    padding: 3px 4px;
    border-radius: 6px;
    border: 1px solid rgba(211, 47, 47, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: none;
    margin-top: auto;
    margin-bottom: 2px;
    min-height: 20px;
    z-index: 1;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.tables-visualization .table-highlight.occupied .employee-name {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tables-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid;
}

.free-color {
    background: rgba(76, 175, 80, 0.15);
    border-color: rgba(76, 175, 80, 0.6);
}

.occupied-color {
    background: rgba(244, 67, 54, 0.25);
    border-color: rgba(244, 67, 54, 0.8);
}


/* Стили для окрашивания ячеек таблицы */
.booking-cell .table-display {
    padding: 0.5rem;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
}

/* Белый цвет для столов */
.booking-cell .table-display:contains("Стол") {
    background-color: white;
    border: 1px solid #e0e0e0;
}

/* Голубой для удаленки */
.remote-cell {
    background-color: #e3f2fd !important;
    border: 1px solid #bbdefb !important;
    color: #1565c0;
}

/* Желтый для отпуска */
.vacation-cell {
    background-color: #fff8e1 !important;
    border: 1px solid #ffecb3 !important;
    color: #ff8f00;
}

/* Стили для выпадающих списков */
.remote-option {
    background-color: #e3f2fd;
    color: #1565c0;
}

.vacation-option {
    background-color: #fff8e1;
    color: #ff8f00;
}

.table-option {
    background-color: white;
}

/* Кнопка редактирования для админов и руководителей */
.edit-mode-btn {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    margin-left: 1rem;
    transition: all 0.3s ease;
}

.edit-mode-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.edit-mode-btn.active {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
}

/* Стили для режима редактирования */
.edit-mode .employee-row.editable .booking-cell {
    background-color: #f8f9fa;
}

.edit-mode .table-select {
    background-color: white;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    padding: 0.3rem;
    width: 100%;
}

/* Стили для окрашивания ячеек таблицы */
/* Стили для окрашивания ячеек таблицы */
.remote-cell {
    background-color: #e3f2fd !important;
    border: 1px solid #bbdefb !important;
    color: #1565c0;
}

.vacation-cell {
    background-color: #fff8e1 !important;
    border: 1px solid #ffecb3 !important;
    color: #ff8f00;
}

/* Стили для кнопки редактирования */
.edit-mode-btn {
    background: #ff9800;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    margin-left: 0.5rem;
    transition: all 0.3s ease;
    font-size: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-mode-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
    background: #f57c00;
}

.edit-mode-btn.active {
    background: #4caf50;
}

.edit-mode-btn.active:hover {
    background: #45a049;
}

/* Стили для выпадающих списков */
.table-select {
    background-color: white;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    padding: 0.3rem;
    width: 100%;
    font-size: 0.9rem;
}

.table-select:focus {
    border-color: #4caf50;
    outline: none;
}

/* Отображение текста в ячейках */
.table-display {
    padding: 0.5rem;
    text-align: center;
    font-weight: 500;
}

/* Стили для action кнопок */
.employee-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.action-btn {
    background: #2196f3;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

/* Стили для пользовательских селектов (всегда видимых) */
.user-select {
    background-color: white;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    padding: 0.3rem;
    width: 100%;
    font-size: 0.9rem;
    display: block !important; /* Всегда показываем для пользователей */
}

.user-select:focus {
    border-color: #4caf50;
    outline: none;
}

/* Стили для админских селектов (управляются через режим редактирования) */
.admin-select {
    background-color: white;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    padding: 0.3rem;
    width: 100%;
    font-size: 0.9rem;
}

/* Отображение текста в ячейках для админов */
.admin-display {
    padding: 0.5rem;
    text-align: center;
    font-weight: 500;
}

/* Остальные стили остаются без изменений */
.remote-cell {
    background-color: #e3f2fd !important;
    border: 1px solid #bbdefb !important;
    color: #1565c0;
}

.vacation-cell {
    background-color: #fff8e1 !important;
    border: 1px solid #ffecb3 !important;
    color: #ff8f00;
}

.edit-mode-btn {
    background: #ff9800;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    margin-left: 0.5rem;
    transition: all 0.3s ease;
    font-size: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-mode-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
    background: #f57c00;
}

.edit-mode-btn.active {
    background: #4caf50;
}

.edit-mode-btn.active:hover {
    background: #45a049;
}

/* Стили для action-btn ТОЛЬКО в основной таблице */
.employee-actions .action-btn {
    background: #2196f3;
    color: white;
    border: none;
    padding: 0.3rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.employee-actions .action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.3);
}

.employee-actions .edit-mode-btn {
    background: #ff9800;
}

.employee-actions .edit-mode-btn:hover {
    background: #f57c00;
}

.employee-actions .edit-mode-btn.active {
    background: #4caf50;
}

.employee-actions .edit-mode-btn.active:hover {
    background: #45a049;
}

/* Альтернатива: уменьшаем все размеры на 10% */
.booking-table {
    font-size: 0.765rem; /* 0.85rem * 0.9 */
}

.booking-table th,
.booking-table td {
    padding: 0.27rem; /* 0.3rem * 0.9 */
    height: 36px; /* 40px * 0.9 */
    min-width: 108px; /* 120px * 0.9 */
}

.booking-cell {
    min-width: 108px;
    height: 36px;
}

.table-select {
    height: 29px; /* 32px * 0.9 */
    font-size: 0.72rem; /* 0.8rem * 0.9 */
    padding: 0.18rem 0.27rem; /* 0.2rem * 0.9, 0.3rem * 0.9 */
}

.table-display,
.admin-display {
    height: 29px;
    font-size: 0.72rem;
    padding: 0.27rem 0.36rem; /* 0.3rem * 0.9, 0.4rem * 0.9 */
}

.employee-actions .action-btn {
    width: 25px; /* 28px * 0.9 */
    height: 25px;
    font-size: 0.72rem;
    padding: 0.27rem; /* 0.3rem * 0.9 */
}

/* Компактные тексты */
.remote-cell .table-display,
.remote-cell .admin-display {
    font-size: 0.675rem; /* 0.75rem * 0.9 */
    padding: 0.18rem 0.27rem; /* 0.2rem * 0.9, 0.3rem * 0.9 */
}

.vacation-cell .table-display,
.vacation-cell .admin-display {
    font-size: 0.675rem;
    padding: 0.18rem 0.27rem;
}