/**
 * ImpelHub Affiliate Frontend Styles
 * Matching Sunrise Employee Portal Design
 * 
 * @package ImpelHub_Affiliate
 * @since 1.8.0
 */

/* ============================================
   LOGIN WRAPPER STYLES
   ============================================ */
.ihub-login-wrapper {
    max-width: 500px;
    margin: 40px auto;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.ihub-login-wrapper h2 {
    margin-bottom: 10px;
    text-align: center;
    font-size: 28px;
    color: #333;
}

.ihub-login-wrapper > p {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

#ihub-login-form p { 
    margin-bottom: 20px; 
}

#ihub-login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

#ihub-login-form input[type="text"],
#ihub-login-form input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

#ihub-login-form input[type="text"]:focus,
#ihub-login-form input[type="password"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.login-remember label {
    display: flex !important;
    align-items: center;
    font-weight: normal !important;
    font-size: 14px;
    color: #666;
}

.login-remember input[type="checkbox"] { 
    margin-right: 8px; 
}

.login-submit { 
    margin-top: 25px; 
}

.ihub-login-links {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.ihub-login-links a {
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
}

.ihub-login-links a:hover { 
    text-decoration: underline; 
}

/* ============================================
   NOTICE STYLES
   ============================================ */
.ihub-notice {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 14px;
    border-left: 4px solid;
}

.ihub-notice.ihub-error {
    background: #f8d7da;
    color: #721c24;
    border-color: #dc3545;
}

.ihub-notice.ihub-success {
    background: #d4edda;
    color: #155724;
    border-color: #28a745;
}

.ihub-notice.ihub-info {
    background: #e7f3ff;
    border-color: #0073aa;
    color: #004085;
}

.ihub-notice h3 { 
    margin: 0 0 10px; 
}

.ihub-notice p { 
    margin: 0; 
}

/* ============================================
   DASHBOARD WRAPPER
   ============================================ */
.ihub-dashboard-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ============================================
   HEADER STYLES
   ============================================ */
.ihub-dashboard-header {
    background: rgba(213, 230, 255, 1);
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 20px;
}

.ihub-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.ihub-dashboard-header h1 {
    margin: 0;
    color: #333;
    font-size: 28px;
}

.ihub-header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ihub-status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

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

.ihub-status-inactive { 
    background: #f0f0f1; 
    color: #666; 
}

.ihub-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: #dc3545;
    color: white !important;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.3s;
}

.ihub-logout-btn:hover { 
    background: #c82333; 
    color: white; 
}

/* ============================================
   NAVIGATION TABS
   ============================================ */
.ihub-dashboard-nav { 
    margin-bottom: 20px; 
}

.ihub-nav-tabs {
    list-style: none;
    padding: 10px;
    margin: 0;
    display: flex;
    background: rgba(213, 230, 255, 1);
    border-radius: 20px;
    gap: 5px;
    flex-wrap: wrap;
}

.ihub-nav-tabs li {
    margin: 0;
    flex: 1;
    min-width: 120px;
}

.ihub-nav-tabs li a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    border-radius: 15px;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
    background: transparent;
}

.ihub-nav-tabs li.active a {
    background: white;
    color: #0073aa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ihub-nav-tabs li a:hover {
    background: rgba(255, 255, 255, 0.5);
    color: #0073aa;
}

/* ============================================
   DASHBOARD CONTENT
   ============================================ */
.ihub-dashboard-content {
    background: rgba(213, 230, 255, 1);
    padding: 30px;
    border-radius: 20px;
}

/* ============================================
   STATS GRID
   ============================================ */
.ihub-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.ihub-stat-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.ihub-stat-box h3 {
    margin: 0 0 10px;
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ihub-stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #0073aa;
    margin: 10px 0;
    line-height: 1;
}

.ihub-stat-label {
    font-size: 12px;
    color: #999;
    margin: 0;
}

/* ============================================
   SECTIONS
   ============================================ */
.ihub-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.ihub-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.ihub-section-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.ihub-view-all {
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.ihub-view-all:hover { 
    text-decoration: underline; 
}

.ihub-coupon-count {
    font-weight: normal;
    color: #666;
    font-size: 14px;
}

/* ============================================
   LINK BOX
   ============================================ */
.ihub-link-box {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.ihub-link-box-small { 
    margin-bottom: 0; 
}

.ihub-link-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #f9f9f9;
    box-sizing: border-box;
}

.ihub-help-text {
    font-size: 13px;
    color: #666;
    margin: 0;
}

/* ============================================
   BUTTONS
   ============================================ */
.ihub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
}

.ihub-btn-primary {
    background: #FFB400;
    color: #000;
}

.ihub-btn-primary:hover {
    background: #C08A00;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 180, 0, 0.3);
}

.ihub-btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.ihub-copy-btn { 
    white-space: nowrap; 
}

/* ============================================
   COUPONS GRID (Overview)
   ============================================ */
.ihub-coupons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.ihub-coupon-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s;
}

.ihub-coupon-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.ihub-coupon-initial {
    background: #fffbeb;
    border-color: #f0ad4e;
}

.ihub-coupon-inactive { 
    opacity: 0.7; 
    background: #f5f5f5; 
}

.ihub-coupon-code {
    font-family: monospace;
    font-size: 16px;
    font-weight: 700;
    color: #0073aa;
    background: #e7f3ff;
    padding: 6px 12px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 10px;
}

.ihub-coupon-code-large {
    font-family: monospace;
    font-size: 18px;
    font-weight: 700;
    color: #0073aa;
    background: #e7f3ff;
    padding: 6px 12px;
    border-radius: 4px;
}

.ihub-strikethrough { 
    text-decoration: line-through; 
    color: #999 !important; 
    background: #f0f0f1 !important; 
}

.ihub-coupon-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.ihub-coupon-usage {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.ihub-coupon-usage strong { 
    color: #0073aa; 
}

.ihub-coupon-link-mini {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.ihub-link-input-small {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 11px;
    background: #f9f9f9;
    box-sizing: border-box;
}

.ihub-btn-mini {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    background: #FFB400;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s;
}

.ihub-btn-mini:hover {
    background: #C08A00;
}

/* ============================================
   BADGES
   ============================================ */
.ihub-badge {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.ihub-badge-initial { 
    background: #fff3cd; 
    color: #856404; 
}

.ihub-badge-active { 
    background: #d4edda; 
    color: #155724; 
}

.ihub-badge-inactive { 
    background: #f0f0f1; 
    color: #666; 
}

/* ============================================
   COUPONS LIST (Full View)
   ============================================ */
.ihub-coupons-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ihub-coupon-row {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.ihub-coupon-row.ihub-coupon-initial {
    background: #fffbeb;
    border-color: #f0ad4e;
}

.ihub-coupon-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.ihub-coupon-details {
    margin-bottom: 8px;
}

.ihub-coupon-details strong { 
    font-size: 15px; 
    color: #333; 
}

.ihub-event-tag {
    display: inline-block;
    margin-left: 10px;
    font-size: 12px;
    color: #666;
}

.ihub-coupon-desc {
    margin: 8px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.ihub-coupon-stats-row {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.ihub-coupon-stats-row strong { 
    color: #0073aa; 
}

.ihub-coupon-actions { 
    margin-top: 10px; 
}

/* ============================================
   TABLES
   ============================================ */
.ihub-detail-table {
    width: 100%;
    border-collapse: collapse;
}

.ihub-detail-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.ihub-detail-table td.ihub-label {
    font-weight: 600;
    color: #666;
    width: 180px;
}

.ihub-detail-table code {
    background: #e7f3ff;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    color: #0073aa;
}

.ihub-data-table {
    width: 100%;
    border-collapse: collapse;
}

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

.ihub-data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.ihub-data-table td strong { 
    color: #0073aa; 
}

/* ============================================
   EMPTY STATES
   ============================================ */
.ihub-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.ihub-empty-message {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .ihub-dashboard-wrapper { 
        padding: 10px; 
    }
    
    .ihub-dashboard-header { 
        padding: 20px; 
    }
    
    .ihub-header-content { 
        flex-direction: column; 
        align-items: flex-start; 
    }
    
    .ihub-dashboard-header h1 { 
        font-size: 24px; 
    }
    
    .ihub-nav-tabs { 
        flex-direction: column; 
    }
    
    .ihub-nav-tabs li { 
        min-width: unset; 
    }
    
    .ihub-dashboard-content { 
        padding: 20px 15px; 
    }
    
    .ihub-stats-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
    
    .ihub-link-box { 
        flex-direction: column; 
    }
    
    .ihub-coupons-grid { 
        grid-template-columns: 1fr; 
    }
    
    .ihub-coupon-header { 
        flex-direction: column; 
        align-items: flex-start; 
    }
    
    .ihub-login-wrapper {
        padding: 30px 20px;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .ihub-stats-grid { 
        grid-template-columns: 1fr; 
    }
    
    .ihub-header-actions {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
}
