/* =====================================================
   MEMBERSHIP PORTAL - STYLES (GREEN THEME)
   ===================================================== */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #03a972;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* =====================================================
   LOGIN PAGE
   ===================================================== */

.login-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 420px;
    margin: 40px auto;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.logo h1 {
    color: #333;
    font-size: 24px;
    margin-bottom: 8px;
}

.logo p {
    color: #666;
    font-size: 14px;
}

/* Steps */
.step {
    display: none;
}

.step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #03a972;
    box-shadow: 0 0 0 3px rgba(17, 153, 142, 0.2);
}

.form-group input::placeholder {
    color: #aaa;
}

.help-text {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 6px;
}

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

.btn-primary {
    background: #03a972;
    color: white;
}

.btn-primary:hover {
    background: #0d7a70;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(17, 153, 142, 0.4);
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.btn-secondary:hover {
    background: #e8e8e8;
}

.btn-link {
    background: transparent;
    color: #03a972;
    padding: 10px;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-outline {
    background: transparent;
    color: #03a972;
    border: 2px solid #03a972;
    padding: 12px 24px;
}

.btn-outline:hover {
    background: #03a972;
    color: white;
}

.btn-success {
    background: #0d7a70;
    color: white;
}

.btn-success:hover {
    background: #0a5f58;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(13, 122, 112, 0.4);
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(231, 76, 60, 0.4);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
    width: auto;
    margin-bottom: 0;
}

/* Info Box */
.info-box {
    background: #e6f7f5;
    border: 1px solid #03a972;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.info-box p {
    color: #666;
    margin-bottom: 10px;
}

.masked-mobile {
    font-size: 28px;
    font-weight: 700;
    color: #03a972;
    letter-spacing: 3px;
}

/* Messages */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
    font-size: 14px;
}

.message.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

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

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.divider span {
    padding: 0 15px;
    color: #888;
    font-size: 14px;
}

/* Loading */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1000;
}

.loading.show {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top-color: #03a972;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Help Text */
.help-text-container {
    text-align: center;
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.9);
}

.help-text p {
    font-size: 13px;
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.9);
}

.help-link {
    color: white;
    text-decoration: underline;
}

.help-link:hover {
    color: #fff;
}

.back-link {
    color: #03a972;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 20px;
}

.back-link:hover {
    text-decoration: underline;
}

/* =====================================================
   NAVBAR
   ===================================================== */

.navbar {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 20px;
    font-weight: 700;
    color: #03a972;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    background: #e8f5e9;
    color: #03a972;
}

/* =====================================================
   DASHBOARD
   ===================================================== */

.dashboard {
    padding: 30px 0;
}

.welcome-section {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.welcome-section h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.welcome-section p {
    opacity: 0.9;
}

/* Cards */
.card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.card h2 {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

/* Status Card */
.status-card {
    background: #03a972;
    color: white;
}

.status-card h2 {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.status-header h2 {
    border: none;
    padding: 0;
    margin: 0;
}

.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background: #27ae60;
    color: white;
}

.status-expired {
    background: #e74c3c;
    color: white;
}

.status-pending {
    background: #f39c12;
    color: white;
}

.status-approved {
    background: #27ae60;
    color: white;
}

.status-rejected {
    background: #e74c3c;
    color: white;
}

.status-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.status-item {
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.status-item .label {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 4px;
}

.status-item .value {
    font-size: 16px;
    font-weight: 600;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-item {
    padding: 15px;
    background: #e8f5e9;
    border-radius: 10px;
}

.info-item .label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
}

.info-item .value {
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

.link-small {
    display: block;
    font-size: 12px;
    color: #03a972;
    margin-top: 6px;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background: #e8f5e9;
    font-weight: 600;
    color: #555;
    font-size: 12px;
    text-transform: uppercase;
}

.table td {
    font-size: 14px;
}

.text-muted {
    color: #888;
    font-size: 14px;
}

/* =====================================================
   UPDATE FORM
   ===================================================== */

.form-container {
    max-width: 600px;
    margin: 30px auto;
}

.form-container h1 {
    color: #333;
    font-size: 24px;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    margin-bottom: 25px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.form-actions .btn {
    flex: 1;
    margin: 0;
}

/* File Upload */
.file-upload {
    position: relative;
}

.file-upload input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    border: 2px dashed #ddd;
    border-radius: 10px;
    background: #fafafa;
    transition: all 0.3s ease;
}

.file-upload:hover .file-upload-label {
    border-color: #03a972;
    background: #e8f5e9;
}

.file-upload-label .icon {
    font-size: 30px;
    margin-bottom: 10px;
}

.file-upload-label .text {
    color: #555;
    font-weight: 500;
}

.file-upload-label .subtext {
    color: #888;
    font-size: 12px;
    margin-top: 5px;
}

.file-name {
    display: none;
    margin-top: 10px;
    padding: 10px;
    background: #e8f5e9;
    border-radius: 8px;
    color: #27ae60;
    font-size: 14px;
}

/* Info Card */
.info-card {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
}

.info-card h3 {
    color: #03a972;
    margin-bottom: 15px;
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    padding: 8px 0;
    color: #555;
    font-size: 14px;
    padding-left: 25px;
    position: relative;
}

.info-card li::before {
    content: "•";
    color: #03a972;
    position: absolute;
    left: 8px;
}

/* =====================================================
   ADMIN PANEL
   ===================================================== */

.admin-body {
    background: #f0f2f5;
}

.admin-navbar {
    background: #03a972;
    box-shadow: 0 4px 20px rgba(17, 153, 142, 0.3);
    flex-wrap: wrap;
    gap: 15px;
    padding: 10px 25px;
}

.admin-navbar .nav-brand {
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.admin-navbar .nav-brand .nav-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.admin-navbar .nav-brand .nav-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.admin-navbar .nav-brand .brand-title {
    font-family: 'InkBrush', cursive;
    font-size: 42px;
    font-weight: normal;
    color: white;
}

.admin-navbar .nav-brand .brand-subtitle {
    font-family: 'Baloo Bhaijaan 2', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.admin-navbar .nav-links {
    flex-wrap: wrap;
    gap: 5px;
}

.admin-navbar .nav-links a {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 18px;
    padding: 10px 16px;
}

.admin-navbar .nav-links a:hover,
.admin-navbar .nav-links a.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.admin-container {
    max-width: 1200px;
    padding-top: 30px;
}

.admin-info-bar {
    background: #e6f7f5;
    padding: 12px 30px;
    display: flex;
    justify-content: flex-end;
    gap: 30px;
    font-size: 14px;
    color: #0d7a70;
    border-bottom: 1px solid rgba(17, 153, 142, 0.2);
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.tab-header h2 {
    margin: 0;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.form-actions-inline {
    display: flex;
    gap: 10px;
}

.view-only-msg {
    color: #888;
    font-size: 12px;
    font-style: italic;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.status-super_admin {
    background: #9b59b6;
    color: white;
}

.status-admin {
    background: #3498db;
    color: white;
}

.status-viewer {
    background: #95a5a6;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    color: #03a972;
    margin-bottom: 20px;
    font-size: 26px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 3px solid #03a972;
    background: #f0fdfb;
    padding: 20px;
    border-radius: 12px;
    margin: -10px -10px 20px -10px;
}

.tab-description {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Requests Grid */
.bulk-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.bulk-select {
    display: flex;
    align-items: center;
}

.bulk-select label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.bulk-select input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.bulk-buttons {
    display: flex;
    gap: 10px;
}

.request-checkbox {
    margin-right: 10px;
}

.request-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.no-attachment {
    color: #999;
    font-size: 13px;
    font-style: italic;
}

.requests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.request-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #f39c12;
}

.request-card.approved {
    border-left-color: #27ae60;
}

.request-card.rejected {
    border-left-color: #e74c3c;
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
    gap: 10px;
}

.request-header strong {
    flex: 1;
}

.request-body p {
    font-size: 14px;
    margin-bottom: 8px;
    color: #555;
}

.request-body a {
    color: #03a972;
}

.attachment-links {
    display: flex;
    gap: 15px;
    margin: 10px 0;
}

.attachment-links a {
    color: #03a972;
    font-size: 14px;
}

.request-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.admin-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.empty-state {
    text-align: center;
    padding: 50px;
    color: #888;
    background: white;
    border-radius: 12px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #666;
}

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

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

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .status-details {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .login-card {
        margin: 20px;
        padding: 25px;
    }
    
    .requests-grid {
        grid-template-columns: 1fr;
    }
}
