/* style.css - Ενιαίο στυλ για όλη την εφαρμογή */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
}

.header {
    background: #2c3e50;
    color: white;
    padding: 15px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 24px;
}

.nav {
    background: #34495e;
    padding: 10px 20px;
    overflow: hidden;
}

.nav a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    margin: 0 5px;
    display: inline-block;
    border-radius: 5px;
    transition: background 0.3s;
}

.nav a:hover,
.nav a.active {
    background: #3498db;
}

.branch-selector {
    float: right;
    margin-top: 5px;
}

.branch-selector label {
    color: white;
    margin-right: 5px;
}

.branch-selector select {
    padding: 6px 12px;
    border-radius: 5px;
    border: none;
}

.container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-card .number {
    font-size: 36px;
    font-weight: bold;
    color: #2c3e50;
}

.stat-card.blue .number { color: #3498db; }
.stat-card.green .number { color: #27ae60; }
.stat-card.orange .number { color: #e67e22; }

.form-group {
    margin-bottom: 15px;
}

label {
    display: inline-block;
    width: 180px;
    font-weight: bold;
}

input, select, textarea {
    padding: 8px;
    width: 300px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.time24-input {
    font-family: monospace;
    font-size: 14px;
    text-align: center;
}

button, .btn {
    background: #3498db;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s;
}

button:hover, .btn:hover {
    background: #2980b9;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-warning {
    background: #f39c12;
}

.btn-warning:hover {
    background: #e67e22;
}

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

.btn-success:hover {
    background: #229954;
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
    margin: 0 2px;
    border-radius: 3px;
    display: inline-block;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: #ecf0f1;
    font-weight: bold;
}

tr:hover {
    background: #f8f9fa;
}

.status-success {
    color: #27ae60;
    font-weight: bold;
}

.status-failed {
    color: #e74c3c;
    font-weight: bold;
}

.status-pending {
    color: #f39c12;
    font-weight: bold;
}

.success {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.warning {
    background: #fff3cd;
    color: #856404;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.info {
    background: #e8f4fd;
    color: #0c5460;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.tab {
    overflow: hidden;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tab button {
    background: #f1f1f1;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 10px 20px;
    margin-right: 5px;
    border-radius: 5px 5px 0 0;
    color: #333;
}

.tab button.active {
    background: #3498db;
    color: white;
}

.tabcontent {
    display: none;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.form-row label {
    display: block;
    width: auto;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-row input,
.form-row select {
    width: 100%;
}

.filter-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    width: auto;
    margin-bottom: 5px;
}

/* Calendar styles */
.calendar-header {
    background: white;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.week-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.week-nav a {
    background: #3498db;
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
}

.week-range {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
}

.filters {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.calendar-table {
    background: white;
    border-radius: 10px;
    overflow-x: auto;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.calendar-table table {
    min-width: 800px;
}

.calendar-table th {
    background: #2c3e50;
    color: white;
    padding: 15px 10px;
    text-align: center;
}

.calendar-table th.employee-col {
    background: #34495e;
    min-width: 180px;
}

.calendar-table td {
    border: 1px solid #ddd;
    padding: 10px;
    vertical-align: middle;
}

.employee-cell {
    background: #ecf0f1;
    font-weight: bold;
    position: sticky;
    left: 0;
    z-index: 1;
}

.employee-cell .employee-name {
    color: #2c3e50;
    font-size: 14px;
}

.employee-cell .employee-details {
    font-size: 11px;
    color: #7f8c8d;
    margin-top: 3px;
}

.schedule-cell {
    text-align: center;
    padding: 8px;
    border-radius: 8px;
    transition: transform 0.2s;
}

.schedule-cell:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.schedule-cell.daily {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.schedule-cell.weekly {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.schedule-cell.rest {
    background: #f39c12;
    color: white;
}

.schedule-cell.no-work {
    background: #e74c3c;
    color: white;
}

.schedule-cell.empty {
    background: #ecf0f1;
    color: #95a5a6;
}

.schedule-cell .time {
    display: block;
    font-size: 13px;
    font-weight: bold;
}

.schedule-cell .type {
    display: block;
    font-size: 18px;
    margin-top: 5px;
}

.day-header {
    text-align: center;
}

.day-header .date {
    font-size: 12px;
    font-weight: normal;
    margin-top: 5px;
    color: #bdc3c7;
}

.weekend {
    background: rgba(231, 76, 60, 0.1);
}

.legend {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 30px;
    height: 30px;
    border-radius: 5px;
}

.legend-color.daily { background: linear-gradient(135deg, #667eea, #764ba2); }
.legend-color.weekly { background: linear-gradient(135deg, #11998e, #38ef7d); }
.legend-color.rest { background: #f39c12; }
.legend-color.no-work { background: #e74c3c; }
.legend-color.empty { background: #ecf0f1; }

@media print {
    .nav, .calendar-header, .legend, .filters button, .week-nav a,
    .tab, .btn, .stats, .form-card, .filter-form, .branch-selector {
        display: none;
    }
    body { background: white; }
    .container { margin: 0; padding: 0; }
}

@media (max-width: 768px) {
    .nav a { padding: 8px 12px; font-size: 12px; }
    label { width: 100%; }
    input, select, textarea { width: 100%; }
    .form-row { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr; }
    .branch-selector { float: none; margin-bottom: 10px; }
}