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

html, body {
    height: 100%;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
}

/* AUTH PAGES */
.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.auth-card h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 10px;
    font-size: 28px;
}

.auth-card .subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.error-message {
    background-color: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid #c33;
}

.success-message {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid #2e7d32;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

.auth-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* DASHBOARD */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar h1 {
    margin: 0;
    font-size: 24px;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-name {
    font-size: 14px;
    opacity: 0.9;
}

.btn-logout {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

.btn-logout:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.dashboard-container {
    max-width: 100%;
    margin: 0;
    padding: 40px 20px;
}

.menu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Tablet: 2 kolumny */
@media (min-width: 768px) {
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: 3 kolumny */
@media (min-width: 1024px) {
    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.menu-item {
    background: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid transparent;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.menu-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.menu-item h2 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 20px;
}

.menu-item p {
    color: #999;
    margin: 0;
    font-size: 14px;
}

.hidden {
    display: none !important;
}

/* PROFILE PAGE */
.page-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.page-header h2 {
    color: #333;
    font-size: 24px;
    margin: 0;
}

.btn-back {
    background: none;
    border: 1px solid #667eea;
    color: #667eea;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-back:hover {
    background-color: rgba(102, 126, 234, 0.08);
}

.profile-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-width: 600px;
    margin: 0 auto;
}

/* Payment info table */
.payment-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.payment-info__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.payment-info__key {
    color: #888;
    font-size: 14px;
}

.payment-info__val {
    font-weight: 500;
    font-size: 15px;
}

/* Payment tile */
.menu-item--payment {
    border-top: 3px solid #667eea;
}

.payment-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(102, 126, 234, 0.08);
    font-size: 13px;
    font-weight: 500;
}

.payment-status__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #aaa;
    flex-shrink: 0;
}

.payment-status--active .payment-status__dot  { background: #22c55e; }
.payment-status--active .payment-status__label { color: #15803d; }

.payment-status--expiring .payment-status__dot  { background: #f59e0b; }
.payment-status--expiring .payment-status__label { color: #b45309; }

.payment-status--expired .payment-status__dot  { background: #ef4444; }
.payment-status--expired .payment-status__label { color: #b91c1c; }

.payment-status--pending .payment-status__dot  { background: #aaa; }
.payment-status--pending .payment-status__label { color: #555; }

@media (max-width: 768px) {
    .profile-card {
        padding: 24px 16px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }

    .navbar-right {
        width: 100%;
        justify-content: space-between;
    }

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

    .auth-card {
        padding: 30px 20px;
    }
}
