/* Task Calendar - Main Styles */

.tc-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

/* Login Screen */
.tc-login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.tc-login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 350px;
    width: 100%;
}

.tc-login-box h2 {
    margin: 0 0 10px;
    color: #2c3e50;
}

.tc-login-box p {
    color: #6c757d;
    margin-bottom: 20px;
}

.tc-pin-input {
    text-align: center;
    font-size: 24px !important;
    letter-spacing: 8px;
    padding: 15px !important;
}

.tc-login-divider {
    margin: 20px 0;
    color: #6c757d;
}

/* Header */
.tc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
    flex-wrap: wrap;
    gap: 15px;
}

.tc-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.tc-header-right {
    display: flex;
    gap: 10px;
}

.tc-title {
    margin: 0;
    font-size: 1.8em;
    color: #2c3e50;
}

.tc-user-info {
    color: #6c757d;
    font-weight: 500;
}

.tc-date-display {
  font-size: 1.3em;
  color: #000;
  font-weight: bold;
  margin-bottom: 15px;
  padding-left: 20px;
}

/* Buttons */
.tc-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tc-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.tc-btn-primary {
    background: #3498db;
    color: white;
}

.tc-btn-secondary {
    background: #95a5a6;
    color: white;
}

.tc-btn-success {
    background: #27ae60;
    color: white;
}

.tc-btn-danger {
    background: #e74c3c;
    color: white;
}

.tc-btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.tc-btn-block {
    width: 100%;
    justify-content: center;
}

/* View Switcher */
.tc-view-switcher {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.tc-view-buttons {
    display: flex;
    background: #e9ecef;
    border-radius: 8px;
    padding: 4px;
}

.tc-view-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.2s;
}

.tc-view-btn.active {
    background: white;
    color: #2c3e50;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tc-navigation {
    display: flex;
    gap: 8px;
}

.tc-nav-btn {
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: black;
}

.tc-nav-btn:hover {
    background: #f8f9fa;
}

/* Calendar Content */
.tc-calendar-content {
    background: white;
    border-radius: 12px;
    min-height: 400px;
    padding: 20px;
}

/* Day View */
.tc-day-header h2 {
    margin: 0 0 20px;
    color: #2c3e50;
}

.tc-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tc-section-title {
    font-size: 14px;
    color: #6c757d;
    margin: 20px 0 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e9ecef;
}

.tc-empty-message {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

/* Task Item */
.tc-task-item {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #3498db;
    gap: 12px;
}

.tc-task-item.tc-task-completed {
    border-left-color: #27ae60;
    background: #f0fff4;
}

.tc-task-item.tc-task-completed .tc-task-title {
    text-decoration: line-through;
    color: #6c757d;
}

.tc-task-item.tc-task-overdue {
    border-left-color: #e74c3c;
    background: #fff5f5;
}

.tc-task-item.tc-task-disabled {
    opacity: 0.7;
}

.tc-task-item.priority-high {
    border-left-color: #e74c3c;
}

.tc-task-item.priority-medium {
    border-left-color: #f39c12;
}

.tc-task-item.priority-low {
    border-left-color: #3498db;
}

.tc-task-checkbox input {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #27ae60;
}

.tc-task-checkbox input:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.tc-task-content {
    flex: 1;
}

.tc-task-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.tc-task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
}

.tc-task-category {
    padding: 2px 8px;
    border-radius: 12px;
    color: white;
}

.tc-task-priority {
    padding: 2px 8px;
    border-radius: 12px;
    background: #e9ecef;
}

.tc-task-repeat {
    color: #6c757d;
}

.tc-task-note-preview {
    margin-top: 8px;
    padding: 8px;
    background: #e9ecef;
    border-radius: 6px;
    font-size: 13px;
}

.tc-task-actions {
    display: flex;
    gap: 6px;
}

/* Week View */
.tc-week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.tc-week-day {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 12px;
    min-height: 150px;
}

.tc-week-day.tc-is-today {
    background: #e3f2fd;
    border: 2px solid #3498db;
}

.tc-week-day-header {
    text-align: center;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.tc-week-day-name {
    font-size: 12px;
    color: #6c757d;
}

.tc-week-day-number {
    font-size: 1.4em;
    font-weight: 700;
    color: #2c3e50;
}

.tc-week-task {
    padding: 6px 8px;
    margin-bottom: 6px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    border-left: 3px solid;
    background: white;
}

.tc-week-task.tc-task-completed {
    text-decoration: line-through;
    opacity: 0.7;
}

/* Month View */
.tc-month-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    padding: 10px 0;
    font-weight: 600;
    color: #6c757d;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 10px;
}

.tc-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.tc-month-day {
    min-height: 80px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
}

.tc-month-day:hover {
    background: #e9ecef;
}

.tc-month-day.tc-is-today {
    background: #e3f2fd;
    border: 2px solid #3498db;
}

.tc-month-day.tc-other-month {
    opacity: 0.4;
}

.tc-month-day-number {
    font-weight: 600;
    color: #2c3e50;
}

.tc-month-task-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 1px;
}

.tc-month-task-count {
    font-size: 11px;
    color: #6c757d;
}

/* Modals */
.tc-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: 99999;
    padding: 20px;
}

.tc-modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.tc-modal-large {
    max-width: 650px;
}

.tc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.tc-modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.tc-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
}

.tc-modal-body {
    padding: 20px;
}

.tc-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

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

.tc-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #2c3e50;
}

.tc-form-row {
    display: flex;
    gap: 15px;
}

.tc-form-row .tc-form-group {
    flex: 1;
}

.tc-input, .tc-select, .tc-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}

.tc-input:focus, .tc-select:focus, .tc-textarea:focus {
    outline: none;
    border-color: #3498db;
}

.tc-error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 10px;
    padding: 10px;
    background: #fff5f5;
    border-radius: 6px;
}

.tc-task-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.tc-task-info p {
    margin: 0 0 8px;
}

/* Admin Panel */
.tc-admin-panel {
    margin-top: 20px;
}

.tc-admin-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: #2c3e50;
    color: white;
    border-radius: 10px;
    flex-wrap: wrap;
}
.tc-admin-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tc-admin-controls label {
    color: white;
    font-size: 14px;
}

/* Statistics */
.tc-stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.tc-stat-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.tc-stat-number {
    font-size: 2em;
    font-weight: 700;
    color: #2c3e50;
}

.tc-stat-label {
    color: #6c757d;
    font-size: 14px;
}

.tc-stat-success .tc-stat-number { color: #27ae60; }
.tc-stat-warning .tc-stat-number { color: #e74c3c; }
.tc-stat-info .tc-stat-number { color: #3498db; }

.tc-category-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.tc-category-bar {
    flex: 1;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.tc-category-fill {
    height: 100%;
    border-radius: 10px;
}

.tc-category-label {
    min-width: 100px;
}

.tc-category-value {
    min-width: 80px;
    text-align: right;
    color: #6c757d;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    .tc-week-grid {
        grid-template-columns: 1fr;
    }
    
    .tc-form-row {
        flex-direction: column;
    }
    
    .tc-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Admin Daily Overview */
.tc-admin-overview {
    background: #fff;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.tc-admin-overview h3 {
    margin: 0 0 15px;
    color: #2c3e50;
    font-size: 1.1em;
}

.tc-workers-overview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.tc-worker-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 15px;
    border-left: 4px solid #3498db;
}

.tc-worker-card.all-done {
    border-left-color: #27ae60;
    background: #f0fff4;
}

.tc-worker-card.has-pending {
    border-left-color: #f39c12;
}

.tc-worker-card.has-overdue {
    border-left-color: #e74c3c;
    background: #fff5f5;
}

.tc-worker-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.tc-worker-stats {
    font-size: 13px;
    color: #6c757d;
}

.tc-worker-stats .done {
    color: #27ae60;
}

.tc-worker-stats .pending {
    color: #e74c3c;
}

/* Priority Colors */
.tc-task-item.priority-high {
    border-left-color: #e74c3c !important;
}

.tc-task-item.priority-medium {
    border-left-color: #f39c12 !important;
}

.tc-task-item.priority-low {
    border-left-color: #3498db !important;
}

.tc-task-priority.priority-high {
    background: #e74c3c;
    color: white;
}

.tc-task-priority.priority-medium {
    background: #f39c12;
    color: white;
}

.tc-task-priority.priority-low {
    background: #3498db;
    color: white;
}
/* Floating Tasks Section */
.tc-floating-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px dashed #dee2e6;
}

.tc-floating-title {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 15px;
}

.tc-floating-section .tc-task-item {
    background: #f8f9fa;
    border-left-color: #6c757d !important;
}

.tc-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.tc-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* Kontejner pro název a popis úkolu */
.tc-task-header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 4px;
}

/* Název úkolu */
.tc-task-title {
    font-weight: 600;
    color: #2c3e50;
}

/* Popis úkolu vedle názvu */
.tc-task-description-inline {
    color: #7f8c8d;
    font-size: 0.9em;
    font-style: italic;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responzivita pro mobily */
@media (max-width: 600px) {
    .tc-task-description-inline {
        white-space: normal;
        display: block;
        width: 100%;
        margin-top: -2px;
    }
}

/* Archive Modal */
.tc-archive-description {
    color: #6c757d;
    margin-bottom: 20px;
}

.tc-archive-list {
    max-height: 400px;
    overflow-y: auto;
}

.tc-archive-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 15px;
    background: #f0fff4;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #27ae60;
}

.tc-archive-item-content {
    flex: 1;
}

.tc-archive-item-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.tc-archive-item-meta {
    font-size: 12px;
    color: #6c757d;
}

.tc-archive-item-date {
    font-size: 12px;
    color: #27ae60;
    white-space: nowrap;
}

.tc-archive-empty {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

/* Kontejner pro název a popis vedle sebe */
.tc-task-header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 4px;
}

/* Styl pro samotný název */
.tc-task-title {
    font-weight: 600;
    color: #2c3e50;
}

/* Styl pro popis vedle názvu */
.tc-task-description-inline {
    color: #7f8c8d; /* Jemnější šedá barva */
    font-size: 0.9em;
    font-style: italic;
    /* Zajištění, aby velmi dlouhý popis nezbořil design */
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Na mobilu nebo při najetí myší se může ukázat celý */
@media (max-width: 600px) {
    .tc-task-description-inline {
        white-space: normal;
        display: block; /* Na mobilu skočí pod název, pokud je dlouhý */
        width: 100%;
    }
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    
    #tc-print-container, #tc-print-container * {
        visibility: visible;
    }
    
    #tc-print-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
}

.tc-print-container {
    font-family: Arial, sans-serif;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.tc-print-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #000;
}

.tc-print-header h1 {
    margin: 0 0 5px;
    font-size: 18px;
}

.tc-print-header .tc-print-date {
    font-size: 14px;
    color: #333;
}

.tc-print-header .tc-print-worker {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.tc-print-section {
    margin-bottom: 20px;
}

.tc-print-section-title {
    font-size: 12px;
    font-weight: bold;
    color: #666;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ccc;
}

.tc-print-task {
    display: flex;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px dotted #ddd;
    page-break-inside: avoid;
}

.tc-print-checkbox {
    width: 16px;
    height: 16px;
    border: 2px solid #000;
    margin-right: 10px;
    flex-shrink: 0;
    margin-top: 2px;
}

.tc-print-task-content {
    flex: 1;
}

.tc-print-task-title {
    font-weight: bold;
    font-size: 13px;
}

.tc-print-task-description {
    font-size: 11px;
    color: #555;
    margin-top: 2px;
}

.tc-print-task-priority {
    font-size: 10px;
    color: #888;
    margin-left: 10px;
    white-space: nowrap;
}

.tc-print-footer {
    margin-top: 30px;
    padding-top: 10px;
    border-top: 1px solid #ccc;
    font-size: 10px;
    color: #999;
    text-align: center;
}

.tc-print-empty {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.tc-search-box {
    position: relative;
    flex: 1;
    max-width: 300px;
    min-width: 200px;
}

.tc-search-box .tc-input {
    width: 100%;
    padding-right: 15px;
    height: 40px;
}

.tc-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 5px;
}

.tc-search-result-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.tc-search-result-item:hover {
    background: #f8f9fa;
}

.tc-search-result-item:last-child {
    border-bottom: none;
}

.tc-search-result-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.tc-search-result-meta {
    font-size: 12px;
    color: #6c757d;
}

.tc-search-result-match {
    background: #fff3cd;
    padding: 1px 3px;
    border-radius: 3px;
}

.tc-search-empty {
    padding: 20px;
    text-align: center;
    color: #6c757d;
}

.tc-search-loading {
    padding: 20px;
    text-align: center;
    color: #6c757d;
}

/* Success message */
.tc-success {
    color: #27ae60;
    font-size: 13px;
    margin-top: 10px;
    padding: 10px;
    background: #f0fff4;
    border-radius: 6px;
}
/* Monthly Task List */
.tc-monthly-list {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.tc-monthly-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
    flex-wrap: wrap;
    gap: 10px;
}

.tc-monthly-list-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.tc-monthly-list-nav h3 {
    margin: 0;
    min-width: 150px;
    text-align: center;
    color: #2c3e50;
}

.tc-monthly-list-content {
    max-height: 400px;
    overflow-y: auto;
}

.tc-monthly-day-row {
    display: flex;
    align-items: flex-start;
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
}

.tc-monthly-day-row:hover {
    background: #f8f9fa;
}

.tc-monthly-day-row:last-child {
    border-bottom: none;
}

.tc-monthly-day-date {
    min-width: 50px;
    font-size: 13px;
    color: #2c3e50;
    font-weight: 600;
    padding-top: 2px;
}

.tc-monthly-day-tasks {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tc-monthly-task-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.tc-monthly-task-item:hover {
    background: #e9ecef;
}

.tc-monthly-task-item .task-title {
    color: #2c3e50;
}

.tc-monthly-task-item .task-status {
    font-weight: bold;
}

.tc-monthly-task-item .task-status.completed {
    color: #27ae60;
}

.tc-monthly-task-item .task-status.pending {
    color: #e74c3c;
}

.tc-monthly-list-summary {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #e9ecef;
    text-align: center;
    color: #6c757d;
    font-size: 14px;
}

.tc-monthly-list-empty {
    text-align: center;
    padding: 30px;
    color: #6c757d;
}
/* Completed date info */
.tc-completed-date {
    font-size: 11px;
    color: #27ae60;
    font-style: italic;
    margin-left: 5px;
}

.tc-task-completed .tc-completed-date {
    color: #27ae60;
}
/* Task note full text */
.tc-task-note-text {
    display: block;
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 4px;
    padding: 4px 8px;
    background: #f8f9fa;
    border-left: 2px solid #f0ad4e;
    border-radius: 0 4px 4px 0;
}
