@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --secondary: #3b82f6;
    --accent: #38bdf8;
    --surface: #ffffff;
    --background: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
    --radius: 0.75rem;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.portal-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    font-weight: 500;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--background);
    border-color: var(--secondary);
    color: var(--secondary);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--background) 0%, #e0f2fe 100%);
}

.login-card {
    width: 100%;
    max-width: 360px;
    padding: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 1rem;
    background: var(--background);
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.member-card {
    position: relative;
    overflow: hidden;
}

.member-card.expired {
    border-left: 4px solid var(--danger);
}

.member-card.active {
    border-left: 4px solid var(--success);
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.checkout-summary {
    background: var(--background);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 1rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
}

.credit-card-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.full-width {
    grid-column: span 2;
}

/* Checkbox fancy */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.custom-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

input[type="checkbox"]:checked + .custom-checkbox {
    background: var(--secondary);
    border-color: var(--secondary);
    color: white;
}

input[type="checkbox"] {
    display: none;
}

/* Message Toast Styles */
.messages-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    width: 90%;
    pointer-events: none;
}

.message-card {
    pointer-events: auto;
    background-color: white;
    color: #1f2937;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    font-weight: 500;
    border-left-width: 6px;
    border-left-style: solid;
}

.msg-error {
    border-left-color: #ef4444; 
}

.msg-success {
    border-left-color: #10b981; 
}

.expired-card {
    filter: grayscale(100%);
    position: relative;
}

.watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 3rem;
    font-weight: 800;
    color: rgba(220, 38, 38, 0.7);
    border: 4px solid rgba(220, 38, 38, 0.7);
    padding: 0.5rem 1rem;
    z-index: 10;
    white-space: nowrap;
    pointer-events: none;
}
