/**
 * team.css
 * Style dla systemu zespołów rekrutacyjnych
 */

/* Dostępność: jednolity focus dla przycisków */
[class*="btn"]:focus-visible,
[class*="button"]:focus-visible,
button:focus-visible,
input[type="button"]:focus-visible,
input[type="submit"]:focus-visible {
    outline: 2px solid #003d82;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(0, 61, 130, 0.25);
}

/* ============================================
   TWORZENIE ZESPOŁU
   ============================================ */

.agency-create-card {
    max-width: 900px;
    margin: 2.5rem auto;
}

.agency-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 1.25rem 0;
}

.agency-plan-card {
    position: relative;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.agency-plan-card:hover {
    border-color: #003d82;
    box-shadow: 0 4px 12px rgba(0, 61, 130, 0.1);
    transform: translateY(-2px);
}

.agency-plan-card.selected {
    border-color: #003d82;
    background: #f8fbff;
    box-shadow: 0 4px 16px rgba(0, 61, 130, 0.15);
}

.agency-plan-card.recommended {
    border-color: #27ae60;
}

.agency-plan-card.recommended::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border-radius: 12px;
    z-index: -1;
    opacity: 0.1;
}

.agency-plan-card.enterprise {
    border-color: #9b59b6;
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #27ae60;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.plan-header h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    color: #003d82;
}

.plan-seats {
    color: #666;
    font-size: 14px;
    margin-bottom: 1rem;
}

.plan-features {
    margin: 1rem 0;
    min-height: 180px;
}

.plan-features .feature {
    padding: 0.5rem 0;
    color: #333;
    font-size: 14px;
}

.plan-features .feature::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background: #27ae60;
    border-radius: 50%;
    margin-right: 0.5rem;
}

/* .price-per-seat - główna definicja w forms.css z wariantem dla .team-package */

.enterprise-contact-btn {
    width: 100%;
    margin-top: 1rem;
}

/* Wybór okresu */
.period-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 1.25rem 0;
}

.period-option {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.period-option:hover {
    border-color: #003d82;
    box-shadow: 0 2px 8px rgba(0, 61, 130, 0.1);
}

.period-option.selected {
    border-color: #003d82;
    background: #f8fbff;
}

.period-option.recommended {
    border-color: #27ae60;
}

.period-option.recommended::after {
    content: 'Najlepsza oferta';
    position: absolute;
    top: -12px;
    right: 16px;
    background: #27ae60;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.period-option input[type="radio"] {
    display: none;
}

.period-option label {
    cursor: pointer;
    width: 100%;
}

.period-name {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 0.5rem;
}

.period-price {
    font-size: 24px;
    font-weight: 700;
    color: #003d82;
    margin: 0.5rem 0;
}

.period-savings {
    font-size: 13px;
    color: #27ae60;
    font-weight: 500;
}

/* Podsumowanie */
.agency-summary {
    background: #f8fbff;
    border: 2px solid #003d82;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.25rem 0;
}

.agency-summary h3 {
    margin: 0 0 16px 0;
    color: #003d82;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row.total {
    border-top: 2px solid #003d82;
    margin-top: 0.75rem;
    padding-top: 1rem;
    font-size: 18px;
}

.summary-row.total strong {
    color: #003d82;
    font-size: 24px;
}

/* ============================================
   DOŁĄCZANIE DO ZESPOŁU
   ============================================ */

.agency-join-card {
    max-width: 500px;
    margin: 3.75rem auto;
}

.icon-circle {
    width: 80px;
    height: 80px;
    background: #e3f2fd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #003d82;
}

/* .info-box - główna definicja w forms.css, użyj .info-box.with-icon dla wersji z ikoną */

.info-content strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #003d82;
}

.info-content ul {
    margin: 0.5rem 0 0 0;
    padding-left: 0;
    list-style: none;
}

.info-content ul li {
    padding: 0.25rem 0;
    color: #333;
}

/* ============================================
   DASHBOARD ZESPOŁU
   ============================================ */

.agency-dashboard {
    max-width: 1200px;
    margin: 2.5rem auto;
    padding: 0 20px;
}

.agency-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e0e0e0;
}

.agency-info h1 {
    margin: 0 0 12px 0;
    color: #003d82;
}

.agency-meta {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* .badge - główna definicja w userMenuStyles.css */

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.agency-plan {
    color: #666;
}

/* Statystyki - definicja w components.css:
   - .stats-grid, .stat-card (kontenery)
   - .stat-card .stat-icon, .stat-card .stat-content, .stat-card .stat-value, .stat-card .stat-label (scoped)
   - Responsywność również w components.css
*/

/* Sekcja członków */
.members-section {
    margin-bottom: 2rem;
}

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

.member-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.member-item:hover {
    background: #e9ecef;
}

.member-avatar {
    width: 48px;
    height: 48px;
    background: #003d82;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    flex-shrink: 0;
}

.member-info {
    flex: 1;
}

.member-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.member-status {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.member-status-joined {
    background: #d4edda;
    color: #155724;
}

.member-status-pending {
    background: #fff3cd;
    color: #856404;
}

.member-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #666;
}

.member-actions {
    margin-left: auto;
}

/* ============================================
   DROPDOWN - JavaScript Based
   Używa: .dropdown-menu (otwieranie przez JS z klasą .show)
   
   UWAGA: W forms.css istnieje drugi system dropdown:
   - .dropdown-content (automatyczne otwieranie przez CSS :hover)
   - Różne przypadki użycia - ZACHOWAĆ OBA!
   ============================================ */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    display: none;
    z-index: 1000;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    text-align: left;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: #f8f9fa;
}

.dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 8px 8px;
}

/* Subskrypcja */
.access-section {
    margin-bottom: 2rem;
}

.access-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 1.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: #666;
}

.detail-value {
    font-weight: 600;
    color: #333;
}

.access-actions {
    display: flex;
    gap: 12px;
}

/* Modal - główna definicja w components.css */

/* Definicja .empty-state w components.css */

/* ============================================
   CONTAINER - podstawowy padding
   ============================================ */

.agency-hero .container,
.benefits-section .container,
.pricing-section .container,
.faq-section .container,
.cta-section .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* ============================================
   HERO SECTION
   ============================================ */

.agency-hero {
    background: linear-gradient(135deg, #003153 0%, #0B4A73 100%);
    color: white;
    padding: 1.5625rem 0;
    text-align: center;
    margin-top: 1.25rem;
}

.hero-content {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    line-height: 1.2;
    color: #fff;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    line-height: 1.6;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0;
    margin: 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.hero-stats .stat {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.125rem;
    min-height: 9rem;
    padding: 0.25rem;
    text-align: center;
}

.hero-stats .stat:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 22%;
    right: 0;
    width: 1px;
    height: 56%;
    background: #d9dee5;
}

.hero-stats .stat-kicker {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: rgba(0, 61, 130, 0.72);
    line-height: 1.3;
}

.hero-stats .stat-value {
    font-size: clamp(1.25rem, 3.5vw, 2rem);
    font-weight: 700;
    line-height: 1.05;
    white-space: nowrap;
}

.hero-stats .stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.45;
    max-width: 16ch;
    margin: 0 auto;
    margin-bottom: 0;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 2.5rem;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.select-team-plan-btn {
    padding: 1rem 0;
}

/* ============================================
   BENEFITS SECTION
   ============================================ */

.benefits-section {
    padding: 1.5625rem 0;
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #003d82;
    margin-bottom: 1.25rem;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #6c757d;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 2.5rem;
}

.benefit-card {
    background: white;
    padding: 1.875rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.benefit-card,
.benefit-card h3,
.benefit-card p {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 61, 130, 0.15);
}

.benefit-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #003d82 0%, #0056b3 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.benefit-icon svg {
    color: white;
}

.benefit-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #003d82;
    margin-bottom: 0.9375rem;
}

.benefit-card p {
    color: #6c757d;
    line-height: 1.6;
}

/* ============================================
   PRICING SECTION
   ============================================ */

.pricing-section {
    padding: 1.5625rem 0;
    background: white;
}

/* ORYGINALNY STYLE - używany w dla-zespolow.ejs */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px;
    margin-top: 3.125rem;
}

/* ============================================
   PRICING CAROUSEL - TYLKO DLA WIDOKU USTAWIEŃ
   ============================================ */

/* Wrapper carousel dla pricing grid w ustawieniach */
.pricing-carousel-wrapper {
    position: relative;
}

.pricing-carousel-wrapper .pricing-grid-scrollable {
    overflow: hidden;
    width: 100%;
    padding-top: 1.25rem;
}

.pricing-carousel-wrapper .pricing-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 30px;
    margin-top: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.pricing-carousel-wrapper .pricing-grid .pricing-card {
    flex: 0 0 calc((100% - 60px) / 3);
    max-width: calc((100% - 60px) / 3);
    box-sizing: border-box;
    min-width: 0;
}

/* Nadpisanie display: flex z klasy .settings-card h3 która powodowała brak wycentrowania tekstu w nagłówku */
.pricing-carousel-wrapper .pricing-header h3 {
    display: block;
}

/* Strzałki nawigacji carousel */
.pricing-nav-arrow {
    position: absolute;
    top: 44%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: 2px solid #003d82;
    color: #003d82;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 61, 130, 0.15);
}

.pricing-nav-arrow:hover {
    background: #003d82;
    color: white;
    box-shadow: 0 6px 16px rgba(0, 61, 130, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.pricing-nav-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: #f5f5f5;
    border-color: #ddd;
    color: #999;
}

.pricing-nav-arrow:disabled:hover {
    background: #f5f5f5;
    color: #999;
    transform: translateY(-50%) scale(1);
    box-shadow: 0 4px 12px rgba(0, 61, 130, 0.15);
}

.pricing-nav-prev {
    left: -22px;
}

.pricing-nav-next {
    right: -22px;
}

.pricing-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 1.25rem;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    border-color: #003d82;
    box-shadow: 0 8px 24px rgba(0, 61, 130, 0.15);
    transform: translateY(-5px);
}

.pricing-card.recommended {
    border-color: #27ae60;
    background: linear-gradient(to bottom, #f0fff4 0%, white 100%);
}

.pricing-badge {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: #27ae60;
    color: white;
    padding: 0.375rem 1.25rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

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

.pricing-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #003d82;
    margin-top: 0.625rem;
    margin-bottom: 0;
}

.pricing-seats {
    font-size: 0.95rem;
    color: #6c757d;
    padding-bottom: 1.25rem;
}

.pricing-price {
    border-top: 2px solid #f0f0f0;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 0.625rem;
}

.price-monthly {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-bottom: 0.625rem;
}

.price-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #003d82;
}

.price-currency {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.15;
    color: #003d82;
}

.price-tax-label {
    font-size: 0.75em;
}

.price-period {
    font-size: 1rem;
    color: #6c757d;
}

.price-per-seat {
    text-align: center;
    font-size: 0.9rem;
    color: #6c757d;
}

.price-savings {
    text-align: center;
    margin-top: 0.3125rem;
    color: #27ae60;
    font-weight: 600;
    font-size: 0.9rem;
}

.price-custom {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #003d82;
    margin-bottom: 0.625rem;
}

.pricing-features .feature {
    padding: 0.75rem 0;
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.5;
    border-bottom: 1px solid #f0f0f0;
}

.pricing-features .feature:last-child {
    border-bottom: none;
}

.pricing-footer {
    margin-top: auto;
}

/* FAQ */
.faq-section {
    padding: 1.5625rem 0;
}

/* Link informacyjny */
.info-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0B4A73;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.info-link:hover {
    color: #003153;
    text-decoration: underline;
}

.info-link svg {
    flex-shrink: 0;
}

.pricing-card.enterprise {
    border-color: #6c757d;
}

.annual-pricing-info {
    margin-top: 1.5625rem;
    padding: 1.75rem;
    background: linear-gradient(180deg, #f8fbff 0%, #f4f7fb 100%);
    border: 1px solid rgba(11, 74, 115, 0.08);
    border-radius: 1.25rem;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06);
    text-align: center;
}

.annual-pricing-info h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #003d82;
    margin-bottom: 0.9375rem;
    margin-top: 0rem;
}

.annual-pricing-info p {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.annual-comparison {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.annual-plan {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid rgba(11, 74, 115, 0.08);
    border-radius: 1rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
    font-size: 1rem;
    color: #495057;
    text-align: left;
}

.annual-plan-name {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #64748b;
}

.annual-plan-price {
    font-size: 2rem;
    font-weight: 700;
    color: #003d82;
    line-height: 1.1;
}

.annual-plan-price span {
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
}

.annual-plan-meta {
    font-size: 0.95rem;
    color: #5b6b7d;
    line-height: 1.5;
}

.annual-plan-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.375rem 0.75rem;
    background: #e8f3ff;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #0B4A73;
}

/* ============================================
   FAQ SECTION
   ============================================ */
.faq-grid {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 1.125rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.faq-item.featured {
    border: 2px solid #27ae60;
}

.faq-question {
    width: 100%;
    padding: 1.5625rem 1.875rem;
    background: white;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: #003d82;
    text-align: left;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: #f8f9fa;
}

.faq-question span {
    flex: 1;
    padding-right: 1.25rem;
}

.faq-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: #003d82;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 3000px;
}

.faq-answer>div {
    padding: 0 30px 30px 30px;
}

.faq-answer p {
    color: #495057;
    line-height: 1.7;
    margin-bottom: 0.9375rem;
}

.faq-answer h4 {
    color: #003d82;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5625rem 0 15px 0;
}

.faq-answer ol,
.faq-answer ul {
    color: #495057;
    line-height: 1.7;
    margin: 0.9375rem 0;
    padding-left: 1.5625rem;
}

.faq-answer li {
    margin-bottom: 0.625rem;
}

.faq-answer code {
    background: #f0f0f0;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #d63384;
    font-size: 0.9em;
}

.code-example {
    background: #f8f9fa;
    border-left: 4px solid #003d82;
    padding: 1.25rem;
    margin: 1.25rem 0;
    border-radius: 4px;
}

.code-example pre {
    margin: 0.9375rem 0 0 0;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #495057;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
}

.comparison-table thead {
    background: #f8f9fa;
}

.comparison-table th {
    padding: 0.9375rem;
    text-align: left;
    font-weight: 600;
    color: #003d82;
    border-bottom: 2px solid #dee2e6;
}

.comparison-table td {
    padding: 0.9375rem;
    border-bottom: 1px solid #dee2e6;
    color: #495057;
}

.comparison-table tbody tr:last-child td {
    border-bottom: none;
}

.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 1.25rem 0;
}

.role-card {
    background: #f8f9fa;
    padding: 1.25rem;
    border-radius: 8px;
    border-left: 4px solid #003d82;
}

.role-card h4 {
    margin-top: 0 !important;
    margin-bottom: 0.9375rem;
}

.role-card ul {
    margin: 0;
    padding-left: 1.25rem;
}

.stats-preview {
    background: #f8f9fa;
    padding: 1.25rem;
    border-radius: 8px;
    margin: 1.25rem 0;
}

.stats-preview h4 {
    margin-top: 0 !important;
}

.cancellation-rules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 1.25rem 0;
}

.cancellation-rules .rule {
    background: #f8f9fa;
    padding: 1.25rem;
    border-radius: 8px;
}

.alert {
    padding: 1.25rem;
    border-radius: 8px;
    margin: 1.25rem 0;
}

.alert-info {
    background: #e3f2fd;
    border-left: 4px solid #003d82;
    color: #003d82;
}

.alert a {
    color: #003d82;
    text-decoration: underline;
    font-weight: 600;
}

/* ============================================
   CTA SECTION
   ============================================ */

.cta-section {
    padding: 2.5rem 0;
    background: linear-gradient(315deg, #003153 0%, #0B4A73 100%);
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: white;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.cta-section .cta-buttons .btn-primary {
    background: #fff;
    border: 1px solid #fff;
    color: #003153;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.cta-section .cta-buttons .btn-primary:hover,
.cta-section .cta-buttons .btn-primary:focus-visible {
    background: #f1f5f9;
    border-color: #f1f5f9;
    color: #003153;
    transform: translateY(-1px);
}

.cta-section .cta-buttons .btn-outline {
    background: #003153;
    border: 1px solid rgba(255, 255, 255, 0.75);
    color: #fff;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.cta-section .cta-buttons .btn-outline:hover,
.cta-section .cta-buttons .btn-outline:focus-visible {
    background: #0B4A73;
    border-color: #fff;
    color: #fff;
    transform: translateY(-1px);
}

/* ============================================
   API SECTION (Dashboard)
   ============================================ */

.api-section {
    margin-bottom: 1.5rem;
}

.api-section .card-disabled {
    opacity: 0.7;
    background: #f8fafc;
}

.api-quick-links {
    display: flex;
    gap: 16px;
    margin-top: 1rem;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1rem;
    background: #f1f5f9;
    border-radius: 8px;
    text-decoration: none;
    color: #334155;
    transition: all 0.2s;
}

.quick-link:hover {
    background: #e2e8f0;
    color: #003153;
}

.quick-link-icon {
    font-size: 1.25rem;
}

.quick-link-text {
    font-weight: 500;
}

/* ============================================
   API SPECS (FAQ Section)
   ============================================ */

.api-specs {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    display: grid;
    gap: 8px;
}

.api-specs div {
    display: flex;
    gap: 8px;
    font-size: 0.9rem;
    color: #475569;
}

.api-specs a {
    color: #003d82;
    text-decoration: underline;
}

.api-specs a:hover {
    color: #0056b3;
}

/* ============================================
   PANEL ZESPOŁU W USTAWIENIACH
   ============================================ */

.team-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3.75rem 1.25rem;
    color: #666;
}

.team-loading-state .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #003153;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.team-loading-state p {
    margin-top: 1rem;
    font-size: 14px;
}

.team-error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3.75rem 1.25rem;
    text-align: center;
    color: #666;
}

.team-error-state .error-icon {
    color: #dc3545;
    margin-bottom: 1rem;
}

.team-error-state h3 {
    color: #333;
    margin: 0 0 8px 0;
}

.team-error-state p {
    margin-bottom: 1.25rem;
}

.team-header-card {
    background: linear-gradient(135deg, #003153 0%, #0B4A73 100%);
    border-radius: 12px;
    padding: 1.5rem;
    color: white;
    margin-bottom: 0.5rem;
}

.team-header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.team-org-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: white;
}

.team-org-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.team-plan-info {
    font-size: 14px;
    opacity: 0.9;
}

.team-header-actions .btn-outline {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.team-header-actions .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.team-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 1rem;
}

.team-stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.team-stat-card:hover {
    background: #f0f4f8;
    transform: translateY(-2px);
}

.team-stat-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #003153 0%, #0B4A73 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.team-stat-icon svg {
    color: white;
}

.team-stat-content {
    flex: 1;
}

.team-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #003153;
    line-height: 1.2;
}

.team-stat-label {
    font-size: 13px;
    color: #666;
    margin-top: 0.125rem;
}

.team-stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 0.5rem;
}

.team-stats-header h3 {
    margin: 0;
}

.team-stat-trend {
    font-size: 12px;
    font-weight: 600;
    margin-left: 0.375rem;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

.team-stat-trend.positive {
    color: #16a34a;
    background: rgba(22, 163, 74, 0.1);
}

.team-stat-trend.negative {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}

.team-stat-trend.neutral {
    color: #666;
    background: rgba(102, 102, 102, 0.1);
}

.team-stats-secondary {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.team-stat-secondary-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-stat-secondary-label {
    font-size: 13px;
    color: #666;
}

.team-stat-secondary-value {
    font-size: 14px;
    font-weight: 600;
    color: #003153;
}

.team-members-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 1rem;
}

.team-members-header h3 {
    margin: 0;
}

.team-members-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.team-members-list .member-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.team-members-list .member-item:hover {
    background: #f0f4f8;
}

.team-members-list .member-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #003153 0%, #0B4A73 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
}

.team-members-list .member-info {
    flex: 1;
    min-width: 0;
}

.team-members-list .member-name {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.team-members-list .member-name .badge {
    font-size: 11px;
    padding: 0.125rem 0.5rem;
}

.team-members-list .member-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #666;
    margin-top: 0.25rem;
    flex-wrap: wrap;
}

.team-members-list .member-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.team-members-list .role-select {
    padding: 0.375rem 0.625rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: white;
    cursor: pointer;
}

.team-members-list .role-select:focus {
    outline: none;
    border-color: #003153;
}

.info-box-highlight {
    background: #e3f2fd;
    border-left: 4px solid #003153;
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.info-box-highlight p {
    margin: 0;
    color: #333;
    line-height: 1.6;
}

.team-quick-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.api-upgrade-notice {
    text-align: center;
    padding: 2.5rem 1.25rem;
}

.api-upgrade-notice .upgrade-icon {
    color: #666;
    margin-bottom: 1.25rem;
}

.api-upgrade-notice h3 {
    color: #333;
    margin: 0 0 12px 0;
}

.api-upgrade-notice p {
    color: #666;
    margin-bottom: 0.5rem;
}

.api-upgrade-notice .api-features-list {
    list-style: none;
    margin: 1.25rem 0;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.api-upgrade-notice .api-features-list li {
    padding: 0.5rem 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.api-upgrade-notice .api-features-list li::before {
    content: '✓';
    color: #27ae60;
    font-weight: bold;
}

.api-benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 1.25rem;
}

.api-benefit-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.api-benefit-item:hover {
    background: #f0f4f8;
    transform: translateY(-2px);
}

.api-benefit-item .benefit-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.api-benefit-item h4 {
    color: #003153;
    margin: 0 0 8px 0;
    font-size: 1rem;
}

.api-benefit-item p {
    color: #666;
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   ZAKŁADKA API W USTAWIENIACH
   ============================================ */

.api-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 1rem;
}

.api-stat-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.api-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.api-stat-card.success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-color: #86efac;
}

.api-stat-card.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: #fca5a5;
}

.api-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.api-stat-label {
    font-size: 0.875rem;
    color: #64748b;
}

.api-keys-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.api-keys-header h3 {
    margin: 0;
}

.api-keys-list {
    margin-top: 1.25rem;
}

.api-key-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s ease;
}

.api-key-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.api-key-card.inactive {
    opacity: 0.6;
    background: #f8fafc;
}

.api-key-card .key-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.api-key-card .key-info h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.api-key-card .key-prefix {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.8rem;
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: #64748b;
}

.api-key-card .status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.api-key-card .status-badge.active {
    background: #dcfce7;
    color: #166534;
}

.api-key-card .status-badge.inactive {
    background: #f1f5f9;
    color: #64748b;
}

.api-key-card .key-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.api-key-card .key-stat {
    color: #64748b;
}

.api-key-card .key-stat .stat-label {
    color: #94a3b8;
}

.api-key-card .key-stat .stat-value {
    color: #475569;
    font-weight: 500;
    font-size: 16px;
}

.api-key-card .key-permissions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1rem;
}

.permission-badge {
    background: #e0f2fe;
    color: #0369a1;
    padding: 0.25rem 0.625rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
}

.api-key-card .key-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
}

.api-docs-quick .code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.85rem;
    overflow-x: auto;
    margin-top: 0.5rem;
}

.api-docs-quick .code-block code {
    color: #e2e8f0;
    white-space: pre-wrap;
    word-break: break-all;
}

.api-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1.25rem;
}

.api-modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.api-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.api-modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.api-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.api-modal-close:hover {
    color: #1e293b;
}

.api-modal-body {
    padding: 1.5rem;
}

.api-modal form {
    padding: 1.5rem;
}

.api-modal .form-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 0 16px 16px;
}

.api-modal .form-actions .btn {
    min-width: 140px;
}

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 0.5rem;
}

.permissions-grid .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.permissions-grid .checkbox-label:hover {
    background: #f1f5f9;
}

.permissions-grid .permission-webhooks {
    grid-column: 1 / -1;
}

.permissions-grid .checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #003153;
}

.warning-box {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #92400e;
}

.api-key-display {
    background: #1e293b;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.api-key-display code {
    flex: 1;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    color: #22c55e;
    word-break: break-all;
}

/* ============================================
   DOŁĄCZANIE DO ZESPOŁU - STRONA
   ============================================ */

.team-join-container {
    max-width: 600px;
    margin: 2.5rem auto;
    padding: 0 20px;
}

.team-join-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 49, 83, 0.08);
    overflow: hidden;
}

.team-join-header {
    background: linear-gradient(135deg, #003153 0%, #0B4A73 100%);
    color: white;
    padding: 2.5rem 2rem;
    text-align: center;
}

.team-join-header .icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.team-join-header .icon-wrapper svg {
    color: white;
}

.team-join-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: white;
}

.team-join-header p {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
    line-height: 1.5;
}

.team-join-body {
    padding: 2rem;
    overflow: hidden;
}

.code-input-section {
    margin-bottom: 1.75rem;
}

.code-input-section label {
    display: block;
    text-align: center;
    font-weight: 600;
    color: #213445;
    margin-bottom: 0.625rem;
    font-size: 0.95rem;
}

.code-input-wrapper {
    position: relative;
}

.code-input-wrapper input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 1rem 1.25rem;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-align: center;
    text-transform: uppercase;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: #f8f9fa;
    color: #003153;
    transition: all 0.2s ease;
}

.code-input-wrapper input:focus {
    outline: none;
    border-color: #003153;
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 49, 83, 0.1);
}

.code-input-wrapper input::placeholder {
    color: #adb5bd;
    letter-spacing: 2px;
}

.code-format-hint {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.625rem;
}

.benefits-section {
    background: #f8fbff;
    border: 1px solid #e3f2fd;
    border-radius: 12px;
    padding: 1.5rem;
}

.benefits-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #003153;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.benefits-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
    color: #495057;
    line-height: 1.4;
}

.benefits-list li svg {
    flex-shrink: 0;
    color: #27ae60;
    margin-top: 0.125rem;
}

.submit-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 100%;
}

.submit-section .btn-primary {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-section .btn-back {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    color: #6c757d;
    text-decoration: none;
    text-align: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.submit-section .btn-back:hover {
    background: #f8f9fa;
    color: #003153;
}

.form-message {
    padding: 0.625rem 1rem;
    border-radius: 10px;
    font-size: 1rem;
    text-align: center;
    display: none;
    width: 50%;
}

.form-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.form-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.team-join-footer {
    background: #f8f9fa;
    padding: 1.5rem 2rem;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.team-join-footer p {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: #6c757d;
}

.team-join-footer p:last-child {
    margin-bottom: 0;
}

.team-join-footer a {
    color: #003153;
    font-weight: 500;
    text-decoration: none;
}

.team-join-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   MODAL ROZLICZENIA (Billing Modal)
   ============================================ */

.billing-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.billing-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

.billing-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 2rem 1.125rem;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease;
}

.billing-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
}

.billing-modal-close:hover {
    color: #333;
}

.billing-modal-content h2 {
    color: #003153;
    font-size: 1.5rem;
    margin: 0 0 8px 0;
    text-align: center;
}

.billing-modal-plan-name {
    text-align: center;
    color: #666;
    margin: 0 0 8px 0;
}

.billing-options {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 1.5rem;
}

.billing-option {
    position: relative;
    display: block;
    cursor: pointer;
}

.billing-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.billing-option-content {
    text-align: center;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.25rem 1.25rem 0.75rem 1.25rem;
    transition: all 0.2s ease;
}

.billing-option input:checked+.billing-option-content {
    border-color: #003153;
    background: #f0f4f8;
}

.billing-option:hover .billing-option-content {
    border-color: #003153;
}

.billing-option-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #F39C12;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.billing-option-title {
    font-weight: 600;
    color: #213445;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.billing-option-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.15;
    color: #003153;
    margin-bottom: 0.25rem;
}

.billing-tax-label {
    font-size: 0.75em;
}

.billing-option-desc {
    font-size: 0.875rem;
    color: #666;
}

.billing-modal-actions {
    margin-top: 0.5rem;
}

/* ============================================
   DOKUMENTACJA API
   ============================================ */

.api-docs-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem;
}

.api-docs-content h1 {
    color: #003153;
    border-bottom: 3px solid #003d82;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.api-docs-content h2 {
    color: #003d82;
    margin-top: 3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.api-docs-content h3 {
    color: #1e3a5f;
    margin-top: 2rem;
}

.api-docs-content h4 {
    color: #475569;
    margin-top: 1.5rem;
}

.api-docs-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
}

.api-docs-content code {
    background: #f1f5f9;
    color: #dc2626;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.875em;
}

.api-docs-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.api-docs-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.api-docs-content th,
.api-docs-content td {
    border: 1px solid #e2e8f0;
    padding: 0.75rem;
    text-align: left;
}

.api-docs-content th {
    background: #f8fafc;
    font-weight: 600;
    color: #334155;
}

.api-docs-content blockquote {
    border-left: 4px solid #003d82;
    background: #f0f9ff;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

.api-docs-content ul,
.api-docs-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.api-docs-content li {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.api-docs-content a {
    color: #003d82;
}

.api-docs-content a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.api-access-notice {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.api-access-notice svg {
    flex-shrink: 0;
}

.api-access-notice p {
    margin: 0;
    color: #92400e;
    font-size: 0.95rem;
}

.api-access-notice a {
    color: #92400e;
    font-weight: 600;
}

.team-invite-page .team-invite-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #213445;
    text-align: center;
}

.team-invite-page .team-invite-card {
    max-width: 720px;
    margin: 0 auto;
}

.team-invite-page .team-invite-team-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1.5rem 1rem 1rem;
}

.team-invite-page .team-invite-icon {
    color: #003d82;
    margin-bottom: 0.25rem;
}

.team-invite-page .team-invite-label {
    margin: 0;
}

.team-invite-page .team-invite-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: #213445;
    margin: 0;
}

.team-invite-page .team-invite-login-hint {
    margin: 0 0 1.25rem 0;
    color: #5a6c7d;
    text-align: center;
}

.team-invite-page .team-invite-nonrecruiter-info {
    margin: 0 0 1.25rem 0;
    color: #5a6c7d;
    text-align: center;
}

.team-invite-page .team-invite-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(24px, 6vw, 100px);
    margin-top: 0;
    flex-wrap: wrap;
}

.team-invite-page .cta-box {
    margin-top: 0;
}

.team-invite-page .team-invite-footnote {
    margin: 1rem 0 0 0;
    color: #5a6c7d;
    text-align: center;
}

.team-invite-page .form-message {
    display: none;
    width: 100%;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* ============================================
    RESPONSIVE
    ============================================ */

@media (max-width: 1200px) {
    .agency-dashboard {
        padding: 1.875rem 0.9375rem;
    }

    .agency-plans {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
    }

    .pricing-carousel-wrapper {
        margin-top: 1.875rem;
    }

    .pricing-carousel-wrapper .pricing-nav-arrow {
        display: flex;
    }

    .pricing-carousel-wrapper .pricing-grid-scrollable {
        overflow: hidden;
    }

    .pricing-carousel-wrapper .pricing-grid {
        width: 100%;
    }

    .pricing-carousel-wrapper .pricing-grid .pricing-card {
        flex: 0 0 calc((100% - 60px) / 3);
        max-width: calc((100% - 60px) / 3);
    }

    .benefits-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
    }

    .hero-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0;
        padding: 0rem;
    }

    .hero-stats .stat {
        min-height: 11.75rem;
        gap: 1rem;
    }

    .hero-stats .stat-label {
        font-size: 0.95rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 12px;
        margin-top: 1.5625rem;
        padding: 0 15px;
    }

    .hero-cta .btn {
        width: 100%;
        text-align: center;
    }

    .btn-large {
        padding: 0.875rem 1.875rem;
        font-size: 1rem;
    }

    .select-team-plan-btn {
        padding: 0.875rem 0;
    }

    .benefits-section {
        padding: 1.25rem 0;
    }

    .benefit-card {
        padding: 1.5625rem 1.25rem;
    }

    .benefit-card h3 {
        font-size: 1.15rem;
    }

    .benefit-card p {
        font-size: 0.95rem;
    }

    .pricing-section {
        padding: 1.25rem 0;
    }

    .pricing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 1.5625rem;
        gap: 30px;
    }

    .pricing-card {
        padding: 1.125rem;
    }

    .pricing-header h3 {
        font-size: 1.5rem;
    }

    .price-value {
        font-size: 2rem;
    }

    .pricing-features .feature {
        font-size: 0.9rem;
        padding: 0.625rem 0;
    }

    .pricing-nav-prev {
        left: -17px;
    }

    .pricing-nav-next {
        right: -17px;
    }

    .annual-comparison {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.875rem;
    }

    .annual-plan {
        padding: 1.125rem;
    }

    .annual-plan-price {
        font-size: 1.6rem;
    }

    .annual-plan-meta {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 0.9375rem;
    }

    .roles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .role-card {
        padding: 1.125rem;
    }

    .cancellation-rules {
        grid-template-columns: repeat(2, 1fr);
    }

    .faq-section {
        padding: 1.25rem 0;
    }

    .faq-question {
        padding: 1.25rem 1.5625rem;
        font-size: 1rem;
    }

    .annual-pricing-info h3 {
        font-size: 1.5rem;
    }

    .annual-pricing-info p {
        font-size: 1rem;
    }

    .annual-plan {
        padding: 1.125rem;
        font-size: 0.9rem;
    }

    .annual-plan-price {
        font-size: 1.6rem;
    }

    .annual-plan-meta {
        font-size: 0.9rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .access-guide {
        padding: 0.625rem 0.9375rem;
        font-size: 0.9rem;
    }

    .access-guide svg {
        width: 16px;
        height: 16px;
    }

    .api-specs {
        padding: 0.75rem;
    }

    .api-specs div {
        flex-direction: column;
        gap: 2px;
    }

    .team-header-card {
        padding: 1.25rem;
    }

    .team-org-name {
        font-size: 1.25rem;
    }

    .team-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .team-members-list .member-item {
        flex-wrap: wrap;
        gap: 12px;
    }

    .team-members-list .member-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .api-benefits-grid {
        grid-template-columns: 1fr;
    }

    .api-benefit-item .benefit-icon {
        width: 40px;
        height: 40px;
    }

    .api-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .api-keys-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .api-key-card .key-header {
        flex-direction: column;
        gap: 8px;
    }

    .api-key-card .key-actions {
        justify-content: flex-start;
    }

    .permissions-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .agency-hero {
        padding: 1.25rem 0;
    }


    .hero-stats .stat-label {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .annual-comparison {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.875rem;
    }

    .roles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .faq-question {
        padding: 1.25rem 1.5625rem;
        font-size: 1rem;
    }

    .annual-pricing-info h3 {
        font-size: 1.5rem;
    }

    .annual-pricing-info p {
        font-size: 1rem;
    }

    .annual-plan {
        padding: 1.125rem;
    }

    .annual-plan-price {
        font-size: 1.6rem;
    }

    .annual-plan-meta {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {

    .agency-hero .container,
    .benefits-section .container,
    .pricing-section .container,
    .faq-section .container,
    .cta-section .container {
        padding-left: 0.9375rem;
        padding-right: 0.9375rem;
    }

    .team-invite-page .team-invite-title {
        font-size: 1.75rem;
        margin-bottom: 1.25rem;
    }

    .hero-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.5;
    }

    .agency-hero {
        padding: 0.9375rem 0;
    }

    .hero-content {
        padding: 0 15px;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 0;
        margin: 1.875rem 0 0;
        border-radius: 10px;
    }

    .hero-stats .stat {
        min-height: auto;
        gap: 0.75rem;
        padding: 1.125rem;
    }

    .hero-stats .stat:not(:last-child)::after {
        top: auto;
        right: auto;
        bottom: 0;
        left: 10%;
        width: 80%;
        height: 1px;
    }

    .hero-stats .stat-value {
        font-size: 2rem;
    }

    .hero-stats .stat-label {
        font-size: 1em;
        max-width: none;
    }

    .hero-cta {
        flex-direction: column;
        gap: 12px;
        margin-top: 1.5625rem;
        padding: 0 15px;
    }

    .hero-cta .btn {
        width: 100%;
        text-align: center;
    }

    .btn-large {
        padding: 0.875rem 1.875rem;
        font-size: 1rem;
    }

    .select-team-plan-btn {
        padding: 0.875rem 0;
    }

    .benefits-section {
        padding: 1.25rem 0;
    }

    .benefit-card {
        padding: 1.5625rem 1.25rem;
    }

    .benefit-card h3 {
        font-size: 1.15rem;
    }

    .benefit-card p {
        font-size: 0.95rem;
    }

    .pricing-section {
        padding: 1.25rem 0;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        margin-top: 1.5625rem;
        gap: 40px;
    }

    .pricing-card {
        padding: 1rem;
    }

    .pricing-header h3 {
        font-size: 1.5rem;
    }

    .price-value {
        font-size: 2rem;
    }

    .pricing-features .feature {
        font-size: 0.9rem;
        padding: 0.625rem 0;
    }

    .pricing-nav-prev {
        left: -17px;
    }

    .pricing-nav-next {
        right: -17px;
    }

    .annual-comparison {
        grid-template-columns: 1fr;
    }

    .annual-pricing-info {
        padding: 0.9375rem;
        margin-top: 1.25rem;
    }

    .annual-pricing-info h3 {
        font-size: 1.25rem;
    }

    .annual-pricing-info p {
        font-size: 0.95rem;
        margin-bottom: 1.25rem;
    }

    .annual-plan {
        padding: 0.9375rem;
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 0.9375rem;
    }

    .roles-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .role-card {
        padding: 1.125rem;
    }

    .cancellation-rules {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .faq-section {
        padding: 1.25rem 0;
    }

    .faq-question {
        padding: 1.125rem 1.25rem;
        font-size: 0.95rem;
    }

    .faq-answer>div {
        padding: 0 20px 25px 20px;
    }

    .faq-answer p,
    .faq-answer li {
        font-size: 0.9rem;
    }

    .cta-section {
        padding: 1.875rem 0;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .cta-buttons .btn {
        width: 100%;
        text-align: center;
    }

    .cta-content h2 {
        font-size: 1.5rem;
        margin-bottom: 0.9375rem;
    }

    .cta-content p {
        font-size: 0.95rem;
        margin-bottom: 1.5625rem;
    }

    .comparison-table {
        font-size: 0.8rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.625rem 0.5rem;
    }

    .info-link {
        font-size: 0.9rem;
    }

    .agency-header {
        gap: 16px;
    }

    .agency-plans {
        grid-template-columns: 1fr;
    }

    .period-options {
        grid-template-columns: 1fr;
    }

    /* .stats-grid - responsywność w components.css */

    .member-item {
        flex-wrap: wrap;
    }

    .access-actions {
        flex-direction: column;
    }

    .access-actions .btn {
        width: 100%;
    }

    .access-code-display {
        flex-direction: column;
        text-align: center;
    }

    .access-code-display code {
        font-size: 18px;
    }

    .detail-row {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    /* .stat-card - responsywność w components.css */

    .plan-card {
        padding: 1.5rem 1rem;
    }

    .pricing-card {
        padding: 1rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .access-guide {
        padding: 0.625rem 0.9375rem;
        font-size: 0.9rem;
    }

    .access-guide svg {
        width: 16px;
        height: 16px;
    }

    .api-specs {
        padding: 0.75rem;
    }

    .api-specs div {
        flex-direction: column;
        gap: 2px;
    }

    .team-header-card {
        padding: 1.25rem;
    }

    .team-org-name {
        font-size: 1.25rem;
    }

    .team-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .team-members-list .member-item {
        flex-wrap: wrap;
        gap: 12px;
    }

    .team-members-list .member-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .api-benefits-grid {
        grid-template-columns: 1fr;
    }

    .api-benefit-item .benefit-icon {
        width: 40px;
        height: 40px;
    }

    .api-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .api-keys-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .api-key-card .key-header {
        flex-direction: column;
        gap: 8px;
    }

    .api-key-card .key-actions {
        justify-content: flex-start;
    }

    .permissions-grid {
        grid-template-columns: 1fr;
    }

    .team-join-container {
        margin: 1.25rem auto;
        padding: 0 15px;
    }

    .team-join-header {
        padding: 1.875rem 1.5rem;
    }

    .team-join-header .icon-wrapper {
        width: 64px;
        height: 64px;
    }

    .team-join-header .icon-wrapper svg {
        width: 32px;
        height: 32px;
    }

    .team-join-header h1 {
        font-size: 1.5rem;
    }

    .team-join-header p {
        font-size: 0.95rem;
    }

    .team-join-body {
        padding: 1.5rem 1.25rem;
    }

    .code-input-wrapper input {
        padding: 0.875rem 1rem;
        font-size: 1.1rem;
        letter-spacing: 2px;
    }

    .benefits-section {
        padding: 1.25rem;
    }

    .benefits-list li {
        font-size: 0.9rem;
    }

    .team-join-footer {
        padding: 1.25rem 1.5rem;
    }

    .info-box-highlight {
        padding: 0.875rem 1rem;
        border-radius: 6px;
    }

    .info-box-highlight p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .team-stat-card {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .team-stat-icon {
        width: 42px;
        height: 42px;
    }

    .team-stat-value {
        font-size: 1.15rem;
    }

    .team-stat-label {
        font-size: 13px;
    }

    .team-stats-secondary {
        flex-direction: column;
        gap: 12px;
    }

    .team-stat-secondary-label {
        font-size: 13px;
    }

    .team-quick-actions {
        gap: 12px;
    }

    .team-quick-actions .btn {
        font-size: 0.875rem;
        padding: 0.625rem 1rem;
        min-height: 44px;
    }

    .api-upgrade-notice {
        padding: 1.875rem 1rem;
    }

    .api-upgrade-notice h3 {
        font-size: 1.1rem;
    }

    .api-upgrade-notice p {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {

    .agency-hero .container,
    .benefits-section .container,
    .pricing-section .container,
    .faq-section .container,
    .cta-section .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .team-invite-page .team-invite-team-info {
        padding: 1rem 0.75rem 0.75rem;
    }

    .team-invite-page .team-invite-name {
        font-size: 1.15rem;
    }

    .team-invite-page .team-invite-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .team-invite-page .team-invite-actions .btn,
    .team-invite-page .team-invite-actions .hm-btn {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        justify-content: center;
    }

    .team-invite-page .form-message {
        width: 100%;
    }

    .api-modal .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .api-modal .form-actions .btn {
        width: 100%;
        min-width: 0;
    }

    .api-modal .form-actions .btn.btn-primary {
        order: -1;
    }

    .pricing-carousel-wrapper .pricing-nav-arrow {
        width: 42px;
        height: 42px;
    }

    .pricing-carousel-wrapper .pricing-grid .pricing-card {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .pricing-nav-prev {
        left: -14px;
    }

    .pricing-nav-next {
        right: -14px;
    }

    .agency-hero {
        padding: 0.625rem 0;
    }

    .hero-content {
        padding: 0 12px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-stats {
        margin: 1.25rem 0.75rem 0 12px;
        border-radius: 8px;
    }

    .hero-stats .stat-value {
        font-size: 1.75rem;
    }

    .hero-stats .stat-label {
        font-size: 0.95rem;
    }

    .hero-cta {
        margin-top: 1.25rem;
        gap: 10px;
        padding: 0 12px;
    }

    .btn-large {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    .select-team-plan-btn {
        padding: 0.75rem 0;
    }

    .benefits-section {
        padding: 0.625rem 0;
    }

    .benefit-card {
        padding: 1.375rem 1.125rem;
    }

    .benefit-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 0.9375rem;
    }

    .benefit-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    .benefit-card p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .section-title {
        font-size: 1.35rem;
        margin-bottom: 0.75rem;
    }

    .section-subtitle {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .agency-dashboard {
        padding: 1.25rem 0.625rem;
    }

    .agency-info h1 {
        font-size: 1.5rem;
    }

    .member-avatar {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .member-name {
        font-size: 0.95rem;
    }

    .member-meta {
        font-size: 13px;
        flex-direction: column;
        gap: 4px;
    }

    .member-name {
        flex-wrap: wrap;
        row-gap: 6px;
    }

    .pricing-section {
        padding: 0.625rem 0;
    }

    .annual-pricing-info {
        margin-top: 0.625rem;
        padding: 0.625rem;
    }

    .annual-pricing-info h3 {
        font-size: 1.2rem;
    }

    .annual-pricing-info p {
        font-size: 0.9rem;
    }

    .annual-plan {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .annual-plan small {
        display: block;
        margin-top: 0.3125rem;
    }

    .faq-section {
        padding: 0.625rem 0;
    }

    .role-card {
        padding: 0.9375rem;
    }

    .role-card h4 {
        font-size: 1rem;
    }

    .role-card ul {
        font-size: 0.9rem;
    }

    .stats-preview {
        padding: 0.9375rem;
    }

    .stats-preview h4 {
        font-size: 1rem;
    }

    .stats-preview ul {
        font-size: 0.9rem;
    }

    .cta-section {
        padding: 1.5625rem 0;
    }

    .access-guide {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .billing-modal-content {
        padding: 1.5rem 0.75rem;
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }

    .billing-modal-content h2 {
        font-size: 1.25rem;
    }

    .billing-option-content {
        padding: 0.875rem 1rem;
    }

    .billing-option-title {
        font-size: 0.95rem;
    }

    .billing-option-price {
        font-size: 1.1rem;
    }

    .billing-option-desc {
        font-size: 0.85rem;
    }

    .billing-option-badge {
        font-size: 0.7rem;
        padding: 0.1875rem 0.625rem;
        top: -14px;
    }

    .info-box-highlight {
        padding: 0.75rem 0.875rem;
    }

    .team-stat-card {
        padding: 0.75rem;
        gap: 8px;
    }

    .team-stat-icon {
        width: 38px;
        height: 38px;
        border-radius: 8px;
    }

    .team-stat-value {
        font-size: 1.1rem;
    }

    .team-stats-secondary {
        gap: 10px;
    }

    .team-quick-actions {
        flex-direction: column;
        gap: 10px;
    }

    .team-quick-actions .btn {
        width: 100%;
        text-align: center;
    }

    .api-upgrade-notice {
        padding: 1.5rem 0.875rem;
    }

    .api-upgrade-notice h3 {
        font-size: 1rem;
    }

    .api-upgrade-notice p {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {

    .agency-hero .container,
    .benefits-section .container,
    .pricing-section .container,
    .faq-section .container,
    .cta-section .container {
        padding-left: 0.625rem;
        padding-right: 0.625rem;
    }

    .hero-content {
        padding: 0 10px;
    }

    .hero-title {
        font-size: 1.35rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-stats {
        gap: 12px;
        margin: 1.125rem 0.625rem 0 10px;
    }

    .hero-stats .stat-value {
        font-size: 1.5rem;
    }

    .hero-stats .stat-label {
        font-size: 0.9rem;
    }

    .hero-cta {
        margin-top: 1.125rem;
        padding: 0 10px;
    }

    .btn-large {
        padding: 0.6875rem 1.25rem;
        font-size: 0.9rem;
    }

    .select-team-plan-btn {
        padding: 0.6875rem 0;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .section-subtitle {
        font-size: 0.85rem;
    }

    .agency-create-card,
    .agency-join-card {
        margin: 1.25rem auto;
    }

    .plan-card,
    .plan-group {
        padding: 1rem;
    }

    .plan-header h3,
    .plan-group-title {
        font-size: 1.15rem;
    }

    .agency-info h1 {
        font-size: 1.25rem;
    }

    .access-code-display code {
        font-size: 16px;
        padding: 0.625rem 1rem;
    }

    .pricing-header h3 {
        font-size: 1.25rem;
    }

    .price-value {
        font-size: 1.5rem;
    }

    .pricing-features .feature {
        font-size: 0.85rem;
    }

    .benefit-card,
    .pricing-card {
        padding: 0.875rem;
    }

    .faq-question {
        padding: 1rem 1.125rem;
        font-size: 0.9rem;
    }

    .faq-answer>div {
        padding: 0 18px 20px 18px;
    }

    .cta-content h2 {
        font-size: 1.75rem;
    }

    .cta-content p {
        font-size: 1rem;
        margin-bottom: 1.875rem;
    }

    .comparison-table {
        font-size: 0.75rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.5rem 0.375rem;
    }

    .period-option {
        padding: 1rem;
    }

    .period-price {
        font-size: 20px;
    }

    .summary-row {
        font-size: 0.9rem;
    }

    .summary-row.total {
        font-size: 1rem;
    }

    .summary-row.total strong {
        font-size: 1.5rem;
    }

    .faq-answer h4 {
        font-size: 0.95rem;
    }

    .faq-answer ol,
    .faq-answer ul {
        padding-left: 1.125rem;
    }

    .faq-answer li {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .cta-content h2 {
        font-size: 1.25rem;
    }

    .cta-content p {
        font-size: 0.9rem;
        margin-bottom: 1.25rem;
    }

    .annual-pricing-info h3 {
        font-size: 1.1rem;
    }

    .annual-pricing-info p {
        font-size: 0.85rem;
        margin-bottom: 0.9375rem;
    }

    .annual-plan {
        font-size: 0.8rem;
    }

    .annual-plan small {
        margin-top: 0.25rem;
        font-size: 0.75rem;
    }

    .role-card {
        padding: 0.875rem;
    }

    .role-card h4 {
        font-size: 0.95rem;
    }

    .role-card ul {
        font-size: 0.85rem;
        padding-left: 1rem;
    }

    .stats-preview {
        padding: 0.875rem;
    }

    .stats-preview h4 {
        font-size: 0.95rem;
    }

    .stats-preview ul {
        font-size: 0.85rem;
    }

    .cancellation-rules .rule {
        padding: 0.875rem;
    }

    .alert {
        padding: 0.875rem;
        font-size: 0.85rem;
    }

    .code-example {
        padding: 0.875rem;
    }

    .code-example pre {
        font-size: 0.8rem;
    }

    /* Tabela porównawcza - scroll na małych ekranach */
    .comparison-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .comparison-table th,
    .comparison-table td {
        white-space: nowrap;
        min-width: 80px;
    }

    .comparison-table th:first-child,
    .comparison-table td:first-child {
        min-width: 100px;
        white-space: normal;
    }

    .api-quick-links {
        flex-direction: column;
    }

    .team-stats-grid {
        grid-template-columns: 1fr;
    }

    .team-header-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .team-members-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .api-stats-grid {
        grid-template-columns: 1fr;
    }

    .api-key-card .key-stats {
        flex-direction: column;
        gap: 8px;
    }

    .billing-modal-content {
        padding: 1.25rem 0.3125rem;
    }

    .billing-modal-close {
        top: 12px;
        right: 12px;
        font-size: 24px;
    }

    .billing-option-content {
        padding: 0.75rem 0.875rem;
    }

    .billing-option-price {
        font-size: 1rem;
    }

    .info-box-highlight {
        padding: 0.625rem 0.75rem;
    }

    .info-box-highlight p {
        font-size: 0.85rem;
    }

    .team-stat-card {
        padding: 0.625rem;
        border-radius: 8px;
    }

    .team-stat-icon {
        width: 34px;
        height: 34px;
    }

    .team-stat-icon svg {
        width: 16px;
        height: 16px;
    }

    .team-stat-value {
        font-size: 1rem;
    }

    .team-stats-secondary {
        gap: 8px;
    }

    .team-stat-secondary-value {
        font-size: 13px;
    }

    .team-quick-actions .btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.875rem;
    }

    .api-upgrade-notice {
        padding: 1.25rem 0.75rem;
    }

    .api-upgrade-notice h3 {
        font-size: 0.95rem;
    }

    .api-upgrade-notice .api-features-list {
        margin: 0.875rem 0;
    }

    .api-upgrade-notice .api-features-list li {
        font-size: 0.85rem;
        padding: 0.375rem 0;
    }

    .benefit-card h3 {
        font-size: 1.15rem;
    }
}