/* Stylesheet for Nước Mắm Affiliate Frontend Dashboard */
.nm-aff-dashboard-wrapper, .nm-aff-auth-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #2c3e50;
    max-width: 1150px;
    margin: 0 auto;
    padding: 10px;
}

/* 2-Column Auth Layout (50% - 50%) */
.nm-aff-auth-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

@media (max-width: 850px) {
    .nm-aff-auth-grid-2col {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

.nm-aff-auth-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.nm-aff-card-header {
    border-bottom: 2px solid #0984e3;
    padding-bottom: 12px;
    margin-bottom: 22px;
}

.nm-aff-card-header h3 {
    margin: 0 0 4px 0 !important;
    font-size: 22px;
    color: #0d233a;
}

.nm-aff-card-header p {
    margin: 0 !important;
    font-size: 13px;
    color: #718096;
}

.nm-aff-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #0984e3;
    margin-bottom: 14px;
    padding-bottom: 6px;
    border-bottom: 1px dashed #cbd5e0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nm-aff-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .nm-aff-form-grid-2 {
        grid-template-columns: 1fr;
    }
}

.nm-aff-header {
    background: linear-gradient(135deg, #0984e3, #6c5ce7);
    color: #ffffff;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.2);
}

.nm-aff-header h2 {
    color: #ffffff !important;
    margin: 0 0 8px 0 !important;
    font-size: 24px;
}

.nm-aff-badge {
    background: #fdcb6e;
    color: #2d3436;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

/* Metric Cards */
.nm-aff-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.nm-aff-metric-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease;
}

.nm-aff-metric-card:hover {
    transform: translateY(-3px);
}

.nm-aff-metric-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #718096;
    font-weight: 600;
    margin-bottom: 8px;
}

.nm-aff-metric-value {
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 4px;
}

.nm-aff-metric-sub {
    font-size: 12px;
    color: #a0aec0;
}

.text-success { color: #27ae60 !important; }
.text-warning { color: #d35400 !important; }
.text-primary { color: #2980b9 !important; }

/* Tabs */
.nm-aff-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid #edf2f7;
    margin-bottom: 20px;
    overflow-x: auto;
}

.nm-aff-tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nm-aff-tab-btn:hover {
    color: #0984e3;
}

.nm-aff-tab-btn.active {
    color: #0984e3;
    border-bottom-color: #0984e3;
}

.nm-aff-tab-content {
    display: none;
}

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

/* Cards & Forms */
.nm-aff-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
}

.nm-aff-card h3 {
    margin-top: 0 !important;
    margin-bottom: 12px !important;
    font-size: 18px;
    color: #2d3748;
}

.nm-aff-copy-group {
    display: flex;
    gap: 10px;
}

.nm-aff-copy-group input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 14px;
    background: #f7fafc;
}

.nm-aff-btn {
    padding: 12px 18px;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nm-aff-btn-primary { background: #0d233a; color: #fff; }
.nm-aff-btn-primary:hover { background: #071524; }

.nm-aff-btn-success { background: #27ae60; color: #fff; }
.nm-aff-btn-success:hover { background: #1e8449; }

.nm-aff-btn-info { background: #17a2b8; color: #fff; }
.nm-aff-btn-info:hover { background: #117a8b; }

.nm-aff-form-group {
    margin-bottom: 16px;
}

.nm-aff-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
    color: #4a5568;
}

.nm-aff-form-group input {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 14px;
}

.nm-aff-form-group input:focus {
    border-color: #0984e3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(9, 132, 227, 0.15);
}

/* Tables */
.nm-aff-table-responsive {
    overflow-x: auto;
}

.nm-aff-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.nm-aff-table th, .nm-aff-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #edf2f7;
    font-size: 14px;
}

.nm-aff-table th {
    background: #f7fafc;
    font-weight: 600;
    color: #4a5568;
}

.nm-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.nm-badge-success { background: #c6f6d5; color: #22543d; }
.nm-badge-warning { background: #feebc8; color: #744210; }
.nm-badge-danger { background: #fed7d7; color: #742a2a; }

/* Alerts */
.nm-aff-alert {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.nm-aff-alert-warning { background: #fffaf0; border: 1px solid #fbd38d; color: #744210; }
.nm-aff-alert-danger { background: #fff5f5; border: 1px solid #feb2b2; color: #9b2c2c; }
