@charset "UTF-8";

/* =========================================
   ZMIENNE GLOBALNE DLA SYSTEMU VORA
   ========================================= */
:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --secondary: #0f172a;
    --bg-light: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --error: #ef4444;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-login: 0 4px 20px rgba(0,0,0,0.08);
    --radius: 12px;
}

/* =========================================
   BAZOWE STYLE
   ========================================= */
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-light);
    color: var(--text-main);
    margin: 0;
    display: flex;
    min-height: 100vh;
}

/* =========================================
   1. STYLE STRONY LOGOWANIA (login.php)
   ========================================= */
body.login-page {
    flex-direction: column;
}

.login-page header {
    background: var(--secondary);
    color: var(--primary);
    padding: 25px 0;
    text-align: center;
    box-shadow: var(--shadow-login);
}

.login-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-login);
    border: 1px solid #e2e8f0;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    color: var(--primary);
    background: rgba(16, 185, 129, 0.1);
    padding: 15px;
    border-radius: 50%;
    font-size: 2rem;
    margin-bottom: 15px;
}

.login-page h2 {
    color: var(--secondary);
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.login-page .input-group {
    margin-bottom: 20px;
}

.login-page label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.login-page input {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    transition: 0.2s;
    box-sizing: border-box;
}

.login-page input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.btn-submit {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.error-alert {
    background: #fef2f2;
    color: var(--error);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #fee2e2;
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.login-page footer {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* =========================================
   2. STYLE PANELU ADMINA (index.php)
   ========================================= */
.sidebar {
    width: 280px;
    background: var(--secondary);
    color: white;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 10;
    box-sizing: border-box;
}

.sidebar h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary);
    margin-top: 0;
}

.sidebar a {
    color: #94a3b8;
    text-decoration: none;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar a:hover, .sidebar a.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary);
}

.sidebar a.active {
    background: var(--primary);
    color: white;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 15px 0;
}

.logout-link { color: #f87171 !important; }
.logout-link:hover { background: rgba(248, 113, 113, 0.1) !important; }

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 40px;
    max-width: 1400px;
    box-sizing: border-box;
}

.main-content h1 { font-size: 1.875rem; font-weight: 700; margin-bottom: 10px; color: var(--secondary); margin-top: 0; }
.page-intro { color: var(--text-muted); margin-bottom: 30px; font-size: 0.95rem; line-height: 1.5; }

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.stat-card h3 { font-size: 0.875rem; color: var(--text-muted); margin: 0; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-card .value { font-size: 2.25rem; font-weight: 700; color: var(--secondary); margin-top: 10px; }

.card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.card h3 { margin-top: 0; margin-bottom: 10px; font-size: 1.125rem; color: var(--secondary); }
.card p.desc { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 20px; }

.table-container { overflow-x: auto; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { background: #f1f5f9; padding: 16px; font-weight: 600; color: var(--text-muted); font-size: 0.875rem; }
td { padding: 16px; border-top: 1px solid #f1f5f9; vertical-align: middle; }
tr:hover { background-color: #f8fafc; }

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    text-decoration: none;
    font-family: inherit;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-danger { background: var(--error); color: white; }
.btn-warning { background: #f59e0b; color: white; }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid #e2e8f0; }
.btn-ghost:hover { background: #f1f5f9; }

.main-content .input-group { margin-bottom: 20px; }
.main-content .input-group label { display: block; margin-bottom: 8px; font-weight: 500; font-size: 0.875rem; }
.main-content input, .main-content select, .main-content textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.main-content input:focus, .main-content select:focus, .main-content textarea:focus {
    border-color: var(--primary);
    outline: none;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-accepted { background: #d1fae5; color: #065f46; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }

.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    margin-bottom: 25px;
    background: var(--white);
    padding: 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.alert {
    background: #d1fae5;
    color: #065f46;
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 30px;
    border-left: 4px solid var(--primary);
}

/* Kanban Board Styles */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}
.kanban-column {
    background: #f1f5f9;
    border-radius: var(--radius);
    padding: 20px;
    min-height: 600px;
    transition: background 0.2s ease;
}
.kanban-column.drag-over {
    background: #e2e8f0;
}
.kanban-column h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--secondary);
}
.kanban-card {
    background: var(--white);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}
.kanban-card:active { cursor: grabbing; }
.kanban-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kanban-card .time { font-weight: 700; color: var(--secondary); font-size: 0.95rem; }
.kanban-card .client-name { font-weight: 600; margin: 5px 0; font-size: 0.9rem; }
.kanban-card .details { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }
.kanban-card .service-tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    color: white;
    font-weight: 600;
    margin-top: 8px;
    margin-bottom: 8px;
}
.kanban-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 12px;
    border-top: 1px solid #f1f5f9;
    padding-top: 8px;
}
.kanban-actions .btn {
    padding: 4px 8px;
    font-size: 0.8rem;
}

/* Modal Reschedule Style */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0; top: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.modal-content {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}
.pagination a {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: var(--secondary);
    font-weight: 600;
}
.pagination a.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.pagination a:hover:not(.active) {
    background: #f1f5f9;
}

/* Wymuszenie zawijania tekstu w kalendarzu */
.fc .fc-event {
    white-space: normal !important;
    height: auto !important;
    min-height: 2em;
}

.fc-event-main, 
.fc-event-title,
.fc-daygrid-event-harness {
    white-space: normal !important;
    overflow-wrap: break-word !important;
}

.fc-timegrid-event .fc-event-main {
    white-space: normal !important;
    padding: 2px !important;
}

.fc-v-event .fc-event-title {
    white-space: normal !important;
    display: block !important;
}