:root {
    --pg-sky: #5ba4d9;
    --pg-sky-light: #e8f4fc;
    --pg-green: #4a8f3f;
    --pg-green-light: #eef6ec;
    --pg-red: #c0392b;
    --pg-red-light: #fdf0ee;
    --pg-gold: #d4a017;
    --pg-text: #2c3e50;
    --pg-muted: #6c7a89;
    --pg-white: #ffffff;
    --pg-shadow: 0 8px 32px rgba(44, 62, 80, 0.08);
    --pg-radius: 12px;
}

* { box-sizing: border-box; }

body.pg-site {
    font-family: 'Source Sans 3', sans-serif;
    color: var(--pg-text);
    background: var(--pg-white);
    margin: 0;
    line-height: 1.6;
}

.pg-site h1, .pg-site h2, .pg-site h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

/* Header */
.pg-header {
    background: var(--pg-white);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.pg-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
}

.pg-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.pg-logo:hover {
    text-decoration: none;
    color: inherit;
}

.pg-logo-mark {
    flex-shrink: 0;
    line-height: 0;
}

.pg-logo-mark svg {
    display: block;
    width: 48px;
    height: 48px;
}

.pg-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.pg-logo-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--pg-text);
}

.pg-logo-sub {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--pg-green);
    letter-spacing: 0.02em;
}

.pg-logo img {
    height: 52px;
    width: auto;
    max-width: 280px;
}

.pg-nav a {
    color: var(--pg-text);
    text-decoration: none;
    font-weight: 600;
    margin-left: 1.5rem;
    transition: color 0.2s;
}

.pg-nav a:hover { color: var(--pg-green); }

.pg-btn {
    display: inline-block;
    background: var(--pg-green);
    color: var(--pg-white) !important;
    padding: 0.65rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.pg-btn:hover {
    background: #3d7535;
    transform: translateY(-1px);
    color: var(--pg-white);
    text-decoration: none;
}

.pg-btn-outline {
    background: transparent;
    color: var(--pg-green) !important;
    border: 2px solid var(--pg-green);
}

.pg-btn-outline:hover {
    background: var(--pg-green);
    color: var(--pg-white) !important;
}

.pg-btn-red {
    background: var(--pg-red);
}

.pg-btn-red:hover { background: #a93226; }

/* Hero */
.pg-hero {
    background: linear-gradient(135deg, var(--pg-sky-light) 0%, var(--pg-green-light) 100%);
    padding: 3rem 0 4rem;
}

.pg-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
}

.pg-hero-badge {
    display: inline-block;
    background: var(--pg-red);
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.pg-hero h1 {
    font-size: 2.4rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: var(--pg-text);
}

.pg-hero-motto {
    font-style: italic;
    color: var(--pg-red);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.pg-hero-dates {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--pg-green);
    margin-bottom: 1.5rem;
}

.pg-hero-poster {
    border-radius: var(--pg-radius);
    overflow: hidden;
    box-shadow: var(--pg-shadow);
}

.pg-hero-poster img {
    width: 100%;
    height: auto;
    display: block;
}

/* Groups */
.pg-section {
    padding: 4rem 0;
}

.pg-section-alt {
    background: var(--pg-sky-light);
}

.pg-section-title {
    text-align: center;
    margin-bottom: 2.5rem;
}

.pg-section-title h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.pg-section-title p {
    color: var(--pg-muted);
    font-size: 1.1rem;
}

.pg-grupy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.pg-grupa-card {
    background: var(--pg-white);
    border-radius: var(--pg-radius);
    padding: 1.5rem;
    box-shadow: var(--pg-shadow);
    border-left: 4px solid var(--pg-green);
    transition: transform 0.2s;
}

.pg-grupa-card:hover { transform: translateY(-3px); }

.pg-grupa-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.pg-grupa-card .pg-parafia {
    color: var(--pg-muted);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.pg-grupa-card .pg-tel {
    font-weight: 700;
    color: var(--pg-green);
    font-size: 1.1rem;
}

.pg-grupa-card .pg-tel a {
    color: inherit;
    text-decoration: none;
}

.pg-grupa-card .pg-start {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--pg-red);
    font-weight: 600;
}

/* Form */
.pg-form-section {
    padding: 4rem 0;
    background: linear-gradient(180deg, var(--pg-white) 0%, var(--pg-green-light) 100%);
}

.pg-form-card {
    background: var(--pg-white);
    border-radius: var(--pg-radius);
    box-shadow: var(--pg-shadow);
    padding: 2.5rem;
    max-width: 780px;
    margin: 0 auto;
}

.pg-form-card h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.pg-form-card .pg-form-subtitle {
    text-align: center;
    color: var(--pg-muted);
    margin-bottom: 2rem;
}

.pg-form-card .form-group label {
    font-weight: 600;
    color: var(--pg-text);
}

/* W wierszach z kilkoma kolumnami — wyrównanie pól gdy etykiety mają różną wysokość */
.pg-form-card .row > [class*="col-"] {
    display: flex;
    flex-direction: column;
}

.pg-form-card .row > [class*="col-"] > .form-group {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.pg-form-card .row > [class*="col-"] > .form-group > label.control-label {
    flex: 0 0 auto;
    line-height: 1.35;
    margin-bottom: 0.35rem;
}

.pg-form-card .row > [class*="col-"] > .form-group > .form-control,
.pg-form-card .row > [class*="col-"] > .form-group > .custom-select,
.pg-form-card .row > [class*="col-"] > .form-group > .custom-control {
    margin-top: auto;
}

.pg-form-card .form-control {
    border-radius: 8px;
    border: 1.5px solid #dde3ea;
    padding: 0.6rem 0.85rem;
    transition: border-color 0.2s;
}

.pg-form-card .form-control:focus {
    border-color: var(--pg-sky);
    box-shadow: 0 0 0 3px rgba(91, 164, 217, 0.15);
}

.pg-form-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--pg-sky-light);
}

.pg-consent-box {
    background: var(--pg-sky-light);
    border-radius: var(--pg-radius);
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
}

.pg-consent-row {
    background: var(--pg-white);
    border: 1px solid #d4e4f0;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
}

.pg-consent-row:last-child {
    margin-bottom: 0;
}

.pg-consent-doc {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 0.65rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #eef2f6;
}

.pg-consent-doc-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.pg-consent-read {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--pg-green) !important;
    text-decoration: none;
    white-space: nowrap;
}

.pg-consent-read:hover {
    text-decoration: underline;
}

.pg-consent-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0;
    padding: 0.5rem 0.25rem 0;
    cursor: pointer;
    font-size: 0.925rem;
    line-height: 1.45;
}

.pg-consent-check input[type="checkbox"] {
    flex-shrink: 0;
    width: 1.15rem;
    height: 1.15rem;
    margin: 0.15rem 0 0 0;
    cursor: pointer;
    accent-color: var(--pg-green);
}

.pg-consent-check span {
    flex: 1;
}

.pg-doc-card {
    max-width: 800px;
    margin: 0 auto;
}

.pg-doc-body h3 {
    font-size: 1.05rem;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.pg-doc-body p,
.pg-doc-body li {
    font-size: 0.95rem;
    color: var(--pg-text);
}

.pg-regulamin-list {
    padding-left: 1.25rem;
}

.pg-regulamin-list > li {
    margin-bottom: 0.85rem;
}

.pg-regulamin-list ul {
    margin-top: 0.35rem;
    padding-left: 1.1rem;
}

.pg-radio-row {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.35rem;
}

.pg-radio-opt {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-weight: 600;
}

.pg-radio-opt input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--pg-green);
    cursor: pointer;
}

.pg-dni-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.pg-dzien-check {
    background: var(--pg-sky-light);
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.pg-dzien-check:hover { background: #d4ebf9; }

.pg-dzien-check input { margin: 0; }

.pg-form-note {
    background: var(--pg-red-light);
    border-left: 4px solid var(--pg-red);
    padding: 1rem 1.25rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.pg-wpisowe-box {
    background: var(--pg-green-light);
    border: 1px solid #c8e6c0;
    border-radius: var(--pg-radius);
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.55;
}

.pg-wpisowe-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    margin: 0 0 0.65rem;
    color: var(--pg-green);
}

.pg-wpisowe-cennik {
    margin: 0.5rem 0 0.85rem;
    padding-left: 1.25rem;
}

.pg-wpisowe-cennik li {
    margin-bottom: 0.25rem;
}

.pg-wpisowe-note {
    font-size: 0.9rem;
    color: var(--pg-text);
}

.pg-success .pg-wpisowe-box {
    text-align: left;
    margin-top: 1.25rem;
}

.pg-submit-wrap {
    text-align: center;
    margin-top: 1.5rem;
}

.pg-submit-wrap .pg-btn {
    padding: 0.85rem 2.5rem;
    font-size: 1.1rem;
}

/* Success */
.pg-success {
    text-align: center;
    padding: 4rem 2rem;
}

.pg-success-icon {
    width: 80px;
    height: 80px;
    background: var(--pg-green-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: var(--pg-green);
}

/* Footer */
.pg-footer {
    background: var(--pg-text);
    color: rgba(255,255,255,0.85);
    padding: 2rem 0;
    text-align: center;
    font-size: 0.95rem;
}

.pg-footer a { color: var(--pg-gold); }

/* Responsive */
@media (max-width: 768px) {
    .pg-hero-grid {
        grid-template-columns: 1fr;
    }
    .pg-hero h1 { font-size: 1.75rem; }
    .pg-hero { padding: 2rem 0; }
    .pg-hero-poster { order: -1; }
    .pg-logo-title { font-size: 0.92rem; }
    .pg-logo-sub { font-size: 0.65rem; }
    .pg-logo-mark svg { width: 40px; height: 40px; }
    .pg-form-card { padding: 1.5rem; margin: 0 0.5rem; }
}

.invalid-feedback { display: block; }

.help-block, .invalid-feedback {
    color: var(--pg-red);
    font-size: 0.875rem;
}

.has-error .form-control {
    border-color: var(--pg-red);
}

/* Panel organizatora */
.pg-panel-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.pg-panel-table-wrap {
    overflow-x: auto;
    background: var(--pg-white);
    border-radius: var(--pg-radius);
    box-shadow: var(--pg-shadow);
}

.pg-panel-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.pg-panel-table th,
.pg-panel-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eef2f6;
    text-align: left;
}

.pg-panel-table th {
    background: var(--pg-sky-light);
    font-weight: 600;
}

.pg-panel-table tr:last-child td {
    border-bottom: none;
}

/* Kompaktowa lista pielgrzymów (~300 osób) */
.pg-section-compact {
    padding: 1.25rem 0 2rem;
}

.pg-container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.pg-list-count {
    margin-left: auto;
    font-size: 0.875rem;
    color: var(--pg-muted);
    font-weight: 600;
}

.pg-btn-sm {
    padding: 0.35rem 0.85rem;
    font-size: 0.8125rem;
}

.pg-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: var(--pg-sky-light);
    border-radius: 8px;
}

.pg-filter-bar .form-control-sm {
    width: auto;
    min-width: 7rem;
    max-width: 100%;
    font-size: 0.8125rem;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    border: 1px solid #cdd8e3;
}

.pg-filter-bar .pg-filter-q {
    flex: 1 1 10rem;
    min-width: 8rem;
}

.pg-stats-fold {
    background: var(--pg-white);
    border-radius: 8px;
    box-shadow: var(--pg-shadow);
    padding: 0.5rem 0.75rem;
}

.pg-stats-fold summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--pg-muted);
    user-select: none;
}

.pg-stats-fold .pg-list-table {
    margin-top: 0.5rem;
}

.pg-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
    line-height: 1.35;
}

.pg-list-table th,
.pg-list-table td {
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid #eef2f6;
    text-align: left;
    vertical-align: middle;
}

.pg-list-table th {
    background: var(--pg-sky-light);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.pg-list-table th a {
    color: inherit;
    text-decoration: none;
}

.pg-list-table th a:hover {
    color: var(--pg-green);
}

.pg-list-table tbody tr:hover {
    background: #f8fbfd;
}

.pg-list-table .pg-col-num {
    width: 2.5rem;
    text-align: right;
    color: var(--pg-muted);
}

.pg-list-table .pg-col-dzieci {
    width: 2.5rem;
    text-align: center;
}

.pg-list-table .pg-col-status {
    width: 4.5rem;
}

.pg-list-table .pg-col-tel {
    white-space: nowrap;
    font-size: 0.8rem;
}

.pg-list-table .pg-col-akcje {
    width: 4rem;
    white-space: nowrap;
}

.pg-list-table .pg-col-dzien {
    white-space: nowrap;
    font-size: 0.75rem;
}

.pg-list-table .pg-col-adres {
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pg-list-table .pg-col-dowoz {
    width: 2.5rem;
    text-align: center;
}

.pg-row-inactive {
    opacity: 0.55;
}

.pg-row-inactive td {
    font-style: italic;
}

.pg-badge {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pg-badge-zarejestrowany { background: #e8f4fc; color: #2980b9; }
.pg-badge-potwierdzony { background: var(--pg-green-light); color: var(--pg-green); }
.pg-badge-anulowany { background: var(--pg-red-light); color: var(--pg-red); }

.pg-badge-oplata-tak { background: var(--pg-green-light); color: var(--pg-green); }
.pg-badge-oplata-nie { background: #f5f5f5; color: var(--pg-muted); }

.pg-list-table .pg-col-oplata {
    width: 2.75rem;
    text-align: center;
}

.pg-link-action {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pg-green);
    text-decoration: none;
}

.pg-link-action:hover { text-decoration: underline; }

.pg-link-danger {
    color: var(--pg-red);
    font-weight: 700;
    text-decoration: none;
}

.pg-link-danger:hover { text-decoration: underline; }

.pg-pager-wrap {
    margin-top: 1rem;
}

.pg-pager-wrap .pagination-sm .page-link {
    padding: 0.25rem 0.55rem;
    font-size: 0.8125rem;
}

@media (max-width: 768px) {
    .pg-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: flex-end;
    }
    .pg-nav a { margin-left: 0; font-size: 0.9rem; }
    .pg-nav .pg-btn { padding: 0.5rem 1rem; }
}
