/**
 * Mobil Responsive Üye Portal CSS
 */

/* Mobil First Approach */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0d3b66;
    --secondary: #c4a747;
    --accent: #1e8449;
    --highlight: #2874a6;
    --danger: #e74c3c;
    --light-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --text-color: #333;
    --text-light: #666;
}

/* Layout */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-color);
    background: var(--light-bg);
    line-height: 1.6;
}

.member-portal-container {
    max-width: 100%;
    background: white;
    min-height: 100vh;
}

/* Header */
.portal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--highlight) 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.portal-header h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.portal-header p {
    font-size: 14px;
    opacity: 0.9;
}

/* Navigation Tabs */
.portal-nav {
    display: flex;
    overflow-x: auto;
    background: white;
    border-bottom: 2px solid var(--border-color);
    padding: 0;
    margin: 0;
}

.portal-nav button {
    flex: 1;
    min-width: 100px;
    padding: 16px 12px;
    border: none;
    background: white;
    color: var(--text-light);
    font-size: 14px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.portal-nav button.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.portal-nav button:hover {
    background: var(--light-bg);
}

/* Content Sections */
.portal-section {
    display: none;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.portal-section.active {
    display: block;
}

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

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.dashboard-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dashboard-card.highlight {
    background: linear-gradient(135deg, #f0f8ff 0%, #e8f5e9 100%);
    border-left: 4px solid var(--accent);
}

.card-label {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 600;
}

.card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.card-sublabel {
    font-size: 12px;
    color: var(--text-light);
}

/* Lists */
.portal-list {
    list-style: none;
}

.portal-list-item {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.portal-list-item:last-child {
    border-bottom: none;
}

.list-item-left {
    flex: 1;
}

.list-item-title {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
}

.list-item-subtitle {
    font-size: 12px;
    color: var(--text-light);
}

.list-item-right {
    text-align: right;
}

.list-item-amount {
    font-weight: 700;
    font-size: 16px;
    color: var(--primary);
}

.list-item-date {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 5px;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

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

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

.status-overdue {
    background: #f8d7da;
    color: #721c24;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
}

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

.btn-primary:active {
    background: #15623f;
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--light-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

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

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

/* Profile Section */
.profile-group {
    margin-bottom: 20px;
}

.profile-label {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 600;
}

.profile-value {
    font-size: 16px;
    color: var(--text-color);
    padding: 12px;
    background: var(--light-bg);
    border-radius: 6px;
}

.profile-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

/* Modal */
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.modal-backdrop.active {
    display: flex;
    align-items: flex-end;
}

.modal-content {
    background: white;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 12px 12px 0 0;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: white;
}

.modal-header h2 {
    font-size: 18px;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
}

.modal-body {
    padding: 20px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

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

.empty-state-text {
    color: var(--text-light);
    font-size: 14px;
}

/* Footer */
.portal-footer {
    padding: 20px;
    text-align: center;
    color: var(--text-light);
    font-size: 12px;
    border-top: 1px solid var(--border-color);
}

/* Tablet (≥768px) */
@media (min-width: 768px) {
    .member-portal-container {
        max-width: 800px;
        margin: 0 auto;
    }

    .dashboard-cards {
        grid-template-columns: 1fr 1fr;
    }

    .portal-nav {
        padding: 0 20px;
    }

    .portal-nav button {
        flex: initial;
        min-width: auto;
        padding: 16px 24px;
    }

    .portal-section {
        padding: 30px;
    }

    .modal-backdrop.active {
        align-items: center;
        justify-content: center;
    }

    .modal-content {
        width: 90%;
        max-width: 500px;
        border-radius: 12px;
        max-height: 90vh;
    }

    .btn {
        width: auto;
        display: inline-block;
    }
}

/* Desktop (≥1024px) */
@media (min-width: 1024px) {
    .member-portal-container {
        max-width: 1000px;
    }

    .dashboard-cards {
        grid-template-columns: repeat(3, 1fr);
    }

    .portal-header {
        padding: 30px;
    }

    .portal-header h1 {
        font-size: 32px;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a;
        color: #e0e0e0;
    }

    .portal-section,
    .dashboard-card,
    .modal-content {
        background: #2a2a2a;
        color: #e0e0e0;
    }

    .portal-nav {
        background: #2a2a2a;
    }

    .portal-nav button {
        color: #999;
    }

    .profile-input,
    .profile-value {
        background: #333;
        border-color: #444;
        color: #e0e0e0;
    }
}

/* Print Styles */
@media print {
    .portal-nav,
    .portal-footer,
    .btn {
        display: none;
    }

    .portal-section {
        page-break-inside: avoid;
    }
}
