/* BlackCode Membership Pro - Premium Dashboard Styles */
:root {
    --bcmp-primary: #2962ff;
    --bcmp-primary-dark: #0039cb;
    --bcmp-secondary: #00c853;
    --bcmp-danger: #d50000;
    --bcmp-warning: #ffd600;
    --bcmp-dark-bg: #1e1e2d;
    --bcmp-card-bg: #ffffff;
    --bcmp-text-main: #2b2b2b;
    --bcmp-text-muted: #6c757d;
    --bcmp-border-radius: 12px;
    --bcmp-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --bcmp-shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.1);
    --bcmp-font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.bcmp-dashboard-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    align-items: start;
    gap: 30px;
    font-family: var(--bcmp-font-family);
    color: var(--bcmp-text-main);
    max-width: 1200px;
    margin: 40px auto;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Sidebar */
.bcmp-dash-sidebar {
    background: #fff;
    padding: 30px 15px;
    border-radius: var(--bcmp-border-radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    height: auto;
    width: 100%;
    /* Full width of grid cell */
}

.bcmp-mini-profile {
    text-align: center;
    margin-bottom: 30px;
    padding: 0 10px 25px 10px;
    border-bottom: 1px solid #f3f4f6;
}

.bcmp-mini-avatar img {
    border-radius: 50%;
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-bottom: 12px;
    border: 3px solid #fff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.bcmp-user-name {
    font-weight: 700;
    font-size: 17px;
    margin-bottom: 4px;
    color: #111827;
}

.bcmp-user-email {
    font-size: 13px;
    color: #6b7280;
}

.bcmp-dash-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bcmp-nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #4b5563;
    text-decoration: none !important;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 14px;
}

.bcmp-nav-item:hover {
    background: #f9fafb;
    color: var(--bcmp-primary);
    transform: translateX(4px);
}

.bcmp-nav-item.active {
    background: #eef2ff;
    color: var(--bcmp-primary);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(41, 98, 255, 0.1);
}

.bcmp-nav-item .dashicons {
    margin-right: 12px;
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: inherit;
    transition: color 0.2s;
}

.bcmp-nav-item:hover .dashicons {
    color: var(--bcmp-primary);
}

/* Content Area */
.bcmp-dash-content {
    flex-grow: 1;
    background: var(--bcmp-card-bg);
    padding: 40px;
    border-radius: var(--bcmp-border-radius);
    box-shadow: var(--bcmp-shadow);
    min-height: 500px;
}

/* Digital Member Card */
.bcmp-digital-card {
    background: linear-gradient(135deg, #2962ff 0%, #1565c0 100%);
    color: white;
    padding: 30px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 15px 35px rgba(41, 98, 255, 0.25);
}

.bcmp-card-pattern {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image: radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 20%);
    opacity: 0.6;
}

.bcmp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

.bcmp-card-logo {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.bcmp-card-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    backdrop-filter: blur(5px);
}

.bcmp-card-body {
    position: relative;
    z-index: 2;
}

.bcmp-member-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bcmp-member-id {
    font-family: monospace;
    letter-spacing: 2px;
    opacity: 0.9;
    font-size: 14px;
}

.bcmp-card-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    font-size: 12px;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

/* Stats Grid */
.bcmp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Form Grid System (Backend Match) */
.bcmp-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 30px;
}

@media (max-width: 768px) {
    .bcmp-form-grid {
        grid-template-columns: 1fr;
    }
}

.bcmp-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--bcmp-primary);
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-top: 10px;
}

/* Compact Field Rows for Minimal Look */
.bcmp-form-row {
    margin-bottom: 15px;
    position: relative;
}

.bcmp-form-row label {
    font-size: 13px;
    font-weight: 500;
    color: #646970;
    /* Muted text like backend */
    margin-bottom: 6px;
    display: block;
}


.bcmp-stat-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #eee;
    transition: transform 0.2s;
}

.bcmp-stat-box:hover {
    transform: translateY(-3px);
}

.bcmp-stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    display: block;
    margin-bottom: 8px;
}

.bcmp-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.bcmp-stat-value.active {
    color: var(--bcmp-secondary);
}

.bcmp-stat-value.expired {
    color: var(--bcmp-danger);
}

/* Tables */
.bcmp-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.bcmp-table th {
    text-align: left;
    padding: 10px 15px;
    color: #888;
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bcmp-table td {
    background: #fff;
    padding: 15px;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.bcmp-table tr td:first-child {
    border-left: 1px solid #f0f0f0;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.bcmp-table tr td:last-child {
    border-right: 1px solid #f0f0f0;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Status Badges */
.bcmp-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.bcmp-badge.active {
    background: #e8f5e9;
    color: #2e7d32;
}

.bcmp-badge.pending {
    background: #fff3e0;
    color: #ef6c00;
}

.bcmp-badge.expired {
    background: #ffebee;
    color: #c62828;
}

/* Form Elements */
/* CSS Cleanup: Removed duplicate .bcmp-form-row block */

.bcmp-field-input,
input.regular-text,
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    font-size: 15px;
    color: #111827;
    background: #f9fafb;
    box-shadow: none;
    box-sizing: border-box;
    height: 48px;
    /* Consistent height */
    line-height: normal;
}

/* Textarea height exception */
textarea.bcmp-field-input,
textarea {
    height: auto;
    min-height: 120px;
    resize: vertical;
}

.bcmp-field-input:focus,
input.regular-text:focus,
select:focus,
textarea:focus {
    border-color: var(--bcmp-primary);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(41, 98, 255, 0.1);
}

/* Phone Input (intl-tel-input overrides) */
.iti {
    width: 100%;
    display: block;
}

.iti input {
    width: 100% !important;
    height: 48px !important;
    border-radius: 8px !important;
    border: 1px solid #e5e7eb !important;
    background: #f9fafb !important;
    padding-left: 52px !important;
    /* Make room for flag */
}

.iti input:focus {
    border-color: var(--bcmp-primary) !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(41, 98, 255, 0.1) !important;
}

.iti__flag-container {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

/* Buttons */
.button.bcmp-btn-primary {
    background: linear-gradient(135deg, var(--bcmp-primary) 0%, var(--bcmp-primary-dark) 100%);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 50px;
    /* Pill shape for modern look */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(41, 98, 255, 0.3);
    min-width: 160px;
    text-align: center;
}

.button.bcmp-btn-primary:hover {
    background: var(--bcmp-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(41, 98, 255, 0.3);
}

/* Warnings */
.bcmp-alert {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.bcmp-alert.warning {
    border-color: var(--bcmp-warning);
    background: #fffbf0;
}

.bcmp-alert h3 {
    margin-top: 0;
    font-size: 16px;
    margin-bottom: 5px;
}

.bcmp-alert p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* Responsive */
@media (max-width: 900px) {
    .bcmp-dashboard-container {
        grid-template-columns: 1fr;
    }

    .bcmp-dash-sidebar {
        width: 100%;
        margin-bottom: 20px;
    }
}

/* Redesigned Applications Tab */
.bcmp-tab-header {
    margin-bottom: 30px;
}

.bcmp-tab-title {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.bcmp-tab-desc {
    margin: 0;
    color: var(--bcmp-text-muted);
    font-size: 14px;
}

.bcmp-applications-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bcmp-app-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bcmp-app-card:hover {
    border-color: var(--bcmp-primary);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

.bcmp-app-card-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.bcmp-app-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.bcmp-app-id {
    background: #f3f4f6;
    color: #4b5563;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: monospace;
}

.bcmp-app-level {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.bcmp-app-date {
    font-size: 13px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 5px;
}

.bcmp-app-date .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
    color: #9ca3af;
}

.bcmp-status-pill {
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bcmp-status-pill.pending_review {
    background: #fff7ed;
    color: #c2410c;
}

.bcmp-status-pill.approved {
    background: #f0fdf4;
    color: #15803d;
}

.bcmp-status-pill.rejected {
    background: #fef2f2;
    color: #b91c1c;
}

.bcmp-status-pill.warning {
    background: #fefce8;
    color: #854d0e;
}

.bcmp-app-card-actions {
    display: flex;
    gap: 12px;
    padding-top: 15px;
    border-top: 1px solid #f3f4f6;
}

.bcmp-btn-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.bcmp-btn-action.primary {
    background: #f5365c;
    color: white !important;
}

.bcmp-btn-action.primary:hover {
    background: #d92d4c;
}

.bcmp-btn-action.secondary {
    background: #f9fafb;
    color: #374151 !important;
    border: 1px solid #e5e7eb;
}

.bcmp-btn-action.secondary:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.bcmp-btn-action .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(245, 54, 92, 0.4);
    }

    70% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(245, 54, 92, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(245, 54, 92, 0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Empty State */
.bcmp-empty-state {
    text-align: center;
    padding: 60px 40px;
    background: #f9fafb;
    border-radius: 16px;
    border: 2px dashed #e5e7eb;
}

.bcmp-empty-icon {
    font-size: 48px;
    color: #d1d5db;
    margin-bottom: 20px;
}

.bcmp-empty-icon .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
}

.bcmp-empty-state h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #374151;
}

.bcmp-empty-state p {
    margin: 0 0 30px 0;
    color: #6b7280;
}

@media (max-width: 640px) {
    .bcmp-app-card-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .bcmp-app-info {
        width: 100%;
    }

    .bcmp-btn-action {
        flex: 1;
        justify-content: center;
    }
}

/* Application Details View */
.bcmp-details-header {
    margin-bottom: 40px;
}

.bcmp-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--bcmp-text-muted);
    text-decoration: none !important;
    font-size: 14px;
    margin-bottom: 20px;
    transition: color 0.2s;
}

.bcmp-back-link:hover {
    color: var(--bcmp-primary);
}

.bcmp-details-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.bcmp-details-meta {
    display: flex;
    gap: 30px;
    background: #f9fafb;
    padding: 15px 25px;
    border-radius: 12px;
}

.bcmp-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4b5563;
}

.bcmp-meta-item .dashicons {
    color: #9ca3af;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.bcmp-data-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
}

.bcmp-data-grid {
    display: flex;
    flex-direction: column;
}

.bcmp-data-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}

.bcmp-data-row:last-child {
    border-bottom: none;
}

.bcmp-data-label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.bcmp-data-value {
    color: #4b5563;
    font-size: 15px;
}

.bcmp-file-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f3f4f6;
    padding: 6px 16px;
    border-radius: 8px;
    color: var(--bcmp-primary);
    text-decoration: none !important;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s ease;
}

.bcmp-file-link:hover {
    background: #eef2ff;
    transform: translateY(-1px);
}

.bcmp-attachments-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bcmp-attachment-preview {
    display: block;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    transition: all 0.2s ease;
}

.bcmp-attachment-preview:hover {
    border-color: var(--bcmp-primary);
    transform: scale(1.05);
}

.bcmp-attachment-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bcmp-details-actions {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (max-width: 640px) {
    .bcmp-details-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .bcmp-details-meta {
        flex-direction: column;
        gap: 10px;
    }

    .bcmp-data-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}