/* --- BAZOWE STYLE --- */
body { font-family: system-ui, -apple-system, sans-serif; margin: 0; background-color: #f1f5f9; color: #1e293b; }

#login-wrapper { display: flex; justify-content: center; align-items: center; height: 100vh; background-color: #0f172a; }
.login-box { background: white; padding: 40px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); text-align: center; width: 100%; max-width: 350px; }
.login-logo { max-width: 200px; margin-bottom: 20px; }

.login-input, .app-input, .app-select { width: 100%; padding: 10px 12px; margin: 8px 0; border: 1px solid #cbd5e1; border-radius: 4px; font-size: 0.95em; box-sizing: border-box; transition: 0.2s; }
.login-input:focus, .app-input:focus, .app-select:focus { outline: none; border-color: #0284c7; box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2); }
input[type="date"], input[type="time"] { cursor: pointer; position: relative; font-family: inherit; }

.btn-primary { width: 100%; background-color: #0284c7; color: white; border: none; padding: 12px; border-radius: 4px; font-size: 1em; font-weight: bold; cursor: pointer; transition: 0.2s; }
.btn-primary:hover { background-color: #0369a1; }
.btn-success { background-color: #10b981; }
.btn-success:hover { background-color: #059669; }
.btn-warning { background-color: #f59e0b; color: white; }
.btn-warning:hover { background-color: #d97706; }
.btn-danger { background-color: #ef4444; color: white; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 0.85em; font-weight: bold; }
.btn-danger:hover { background-color: #dc2626; }
.error-msg { color: #ef4444; font-size: 0.9em; min-height: 20px; margin-top: 10px; }

.btn-upload { display: inline-block; background-color: #475569; color: white; padding: 10px 15px; border-radius: 4px; font-weight: normal; cursor: pointer; transition: 0.2s; text-align: center; }
.btn-upload:hover { background-color: #334155; }
input[type="file"] { display: none; }

/* STRUKTURA I MENU */
#app-wrapper { display: none; height: 100vh; }
.sidebar { width: 240px; background-color: #0f172a; color: #f8fafc; padding: 20px 0; display: flex; flex-direction: column; z-index: 20; height: 100vh; box-sizing: border-box; }
.logo-container { margin: 0 15px 20px 15px; background-color: white; padding: 15px; border-radius: 4px; display: flex; justify-content: center; align-items: center; flex-shrink: 0; }
.sidebar-logo { max-width: 100%; height: auto; display: block; }
.menu-container { flex-grow: 1; overflow-y: auto; padding-bottom: 20px; }
.menu-container::-webkit-scrollbar { width: 6px; }
.menu-container::-webkit-scrollbar-track { background: #0f172a; }
.menu-container::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
.menu-item { padding: 12px 20px; margin: 2px 10px; border-radius: 4px; cursor: pointer; font-weight: 500; font-size: 0.9em; color: #cbd5e1; transition: 0.2s; }
.menu-item:hover { background-color: #1e293b; color: white; }
.menu-item.active { background-color: #0284c7; color: white; font-weight: bold; }
.logout-btn { margin: 10px 10px 20px 10px; background-color: #ef4444; text-align: center; flex-shrink: 0; color: white; }
.main-content { flex-grow: 1; padding: 20px; overflow-y: auto; }
.view-section { display: none; }
.view-section.active { display: block; }
.card-container { background-color: white; border-radius: 4px; border: 1px solid #e2e8f0; padding: 20px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }

/* KALENDARZ GŁÓWNY */
.calendar-toolbar { display: flex; justify-content: space-between; align-items: center; padding-bottom: 15px; border-bottom: 1px solid #e2e8f0; margin-bottom: 15px; }
.calendar-date-title { font-size: 1.4em; font-weight: normal; color: #334155; margin: 0; }
.calendar-wrapper { display: flex; border: 1px solid #cbd5e1; background: white; height: 70vh; overflow-y: auto; overflow-x: auto; position: relative; }
.time-axis { width: 60px; flex-shrink: 0; background: #f8fafc; border-right: 1px solid #cbd5e1; position: sticky; left: 0; z-index: 10; }
.time-axis-header { height: 40px; border-bottom: 1px solid #cbd5e1; position: sticky; top: 0; background: #f8fafc; z-index: 15; }
.time-label { height: 60px; box-sizing: border-box; text-align: center; font-size: 11px; color: #64748b; border-bottom: 1px solid #e2e8f0; padding-top: 5px; }
.emp-columns-container { display: flex; flex-grow: 1; }
.emp-column { flex: 1; min-width: 220px; border-right: 1px solid #cbd5e1; position: relative; background-image: linear-gradient(#e2e8f0 1px, transparent 1px), linear-gradient(#f1f5f9 1px, transparent 1px); background-size: 100% 60px, 100% 30px; }
.emp-header { height: 40px; line-height: 40px; text-align: center; border-bottom: 1px solid #cbd5e1; background: white; font-size: 0.95em; font-weight: bold; color: #334155; position: sticky; top: 0; z-index: 5; }
.emp-click-layer { position: absolute; top: 40px; left: 0; right: 0; bottom: 0; z-index: 1; cursor: pointer; }
.emp-click-layer:hover { background-color: rgba(241, 245, 249, 0.5); }
.visit-badge-absolute { position: absolute; left: 2px; right: 2px; z-index: 5; background-color: #e0f2fe; border: 1px solid #0284c7; border-top: 5px solid #0284c7; padding: 4px 6px; box-sizing: border-box; cursor: pointer; overflow: hidden; font-size: 11px; line-height: 1.3; color: #0f172a; transition: 0.1s; }
.visit-badge-absolute:hover { z-index: 10; filter: brightness(0.95); }
.visit-badge-absolute.completed { background-color: #f0fdf4 !important; border-color: #10b981 !important; border-top-color: #10b981 !important; color: #166534; }
.v-time-block { font-weight: bold; background-color: rgba(255,255,255,0.4); display: inline-block; padding: 1px 4px; margin-bottom: 3px; font-size: 10px;}
.v-client-name { font-weight: bold; font-size: 12px; margin-bottom: 2px; }
.v-service-name { color: #334155; }
.v-first-visit { display: inline-block; background-color: #bbf7d0; border: 1px solid #166534; color: #166534; padding: 1px 3px; margin-top: 3px; font-size: 9px; }

/* TABELE I MODALE */
.styled-table { width: 100%; border-collapse: collapse; background-color: white; font-size: 0.9em; }
.styled-table th, .styled-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #e2e8f0; }
.styled-table th { background-color: #f8fafc; color: #475569; font-weight: bold; text-transform: uppercase; font-size: 0.85em; }
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15,23,42,0.6); z-index: 100; justify-content: center; align-items: center; }
.modal-content { background: white; padding: 25px; border-radius: 4px; width: 100%; max-width: 500px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); max-height: 90vh; overflow-y: auto; }
.modal-content h3 { margin-top: 0; color: #1e293b; border-bottom: 1px solid #e2e8f0; padding-bottom: 10px; }
.btn-cancel { background-color: #e2e8f0; color: #334155; border: none; padding: 12px; border-radius: 4px; font-weight: bold; cursor: pointer; transition: 0.2s;}
.btn-cancel:hover { background-color: #cbd5e1; }
.modal-buttons { display: flex; gap: 10px; margin-top: 20px; }

/* WSKAŹNIKI (PULPIT) */
.stats-grid { display: flex; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-card { background-color: white; padding: 20px; border-radius: 12px; flex: 1; border-left: 5px solid #3b82f6; box-shadow: 0 2px 4px rgba(0,0,0,0.05); min-width: 240px; }
.stat-card.green { border-left-color: #10b981; }
.stat-card.purple { border-left-color: #8b5cf6; }
.stat-card h3 { margin: 0 0 10px 0; color: #64748b; font-size: 0.9em; text-transform: uppercase; }
.stat-card .value { font-size: 1.8em; font-weight: bold; color: #1e293b; margin: 0; }
.progress-container { margin-top: 15px; }
.progress-item { display: flex; justify-content: space-between; font-size: 0.85em; margin-bottom: 5px; color: #475569; font-weight: bold; }
.progress-bar-bg { background-color: #e2e8f0; height: 8px; border-radius: 4px; margin-bottom: 10px; overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 4px; }
.date-navigation { display: flex; justify-content: space-between; align-items: center; }
.btn-nav { background-color: white; color: #3b82f6; border: 1px solid #bfdbfe; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-weight: bold; }
.btn-nav:hover { background-color: #eff6ff; }
.date-picker-input { font-size: 1.2em; font-weight: bold; color: #1e293b; border: 1px solid #e2e8f0; background: white; padding: 8px; border-radius: 6px; }
.grid-container { display: flex; gap: 15px; flex-wrap: wrap; margin-top: 15px; }
.client-card { background-color: white; width: 250px; padding: 15px; border-radius: 4px; border: 1px solid #e2e8f0; font-size: 0.9em; }

/* --- NOWE LISTY PRACOWNIKÓW I KLIENTÓW --- */
.list-container { display: flex; flex-direction: column; gap: 10px; margin-top: 15px; }
.list-item { display: flex; align-items: center; background: white; border: 1px solid #e2e8f0; border-radius: 6px; padding: 15px 20px; transition: 0.2s; }
.list-item:hover { background-color: #f8fafc; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.list-avatar { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid #e2e8f0; margin-right: 20px; background-color: #f1f5f9; display: flex; align-items: center; justify-content: center; font-weight: bold; color: #64748b; font-size: 1.2em; }
.list-info { flex-grow: 1; display: flex; flex-direction: column; }
.list-title { margin: 0 0 5px 0; font-size: 1.1em; color: #1e293b; font-weight: bold; }
.list-subtitle { margin: 0; font-size: 0.9em; color: #64748b; }
.list-actions { display: flex; gap: 10px; flex-shrink: 0; align-items: center; }