/**
 * Dashboard Styles - رنگ‌های اصلی سایت نقل حمل
 * Dark Navy: #1c2d4f
 * Light Navy: #0d2149
 * Yellow: #e6b02c
 * Gray: #f5f4ef
 */

:root {
    /* رنگ‌های اصلی سایت */
    --primary-dark: #1c2d4f;
    --primary-navy: #0d2149;
    --primary-yellow: #e6b02c;
    --bg-gray: #f5f4ef;
    
    /* رنگ‌های وضعیت */
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    
    /* رنگ‌های متن */
    --text-dark: #1c2d4f;
    --text-light: #6c757d;
    --text-white: #ffffff;
    --border-color: #e1e8ed;
    
    /* سایه‌ها */
    --shadow-sm: 0 2px 8px rgba(28, 45, 79, 0.08);
    --shadow-md: 0 4px 15px rgba(28, 45, 79, 0.1);
    --shadow-lg: 0 8px 25px rgba(28, 45, 79, 0.12);
    
    /* شعاع گوشه */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* ========================================
   Main Container
======================================== */
.nh-dashboard-container {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    margin-top: 20px;
    background-color: var(--bg-gray);
    padding: 20px;
    border-radius: var(--radius-lg);
    max-width: 1400px;
    margin: 20px auto;
}

/* ========================================
   Sidebar - طراحی اصلی با رنگ‌های سایت
======================================== */
.nh-sidebar,
.nh-dashboard-sidebar {
    width: 280px;
    flex-shrink: 0;
    background-color: var(--primary-dark);
    color: var(--text-white);
    padding: 30px 20px;
    border-radius: var(--radius-lg);
    max-height: calc(100vh - 120px);
    position: sticky;
    top: 40px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.nh-sidebar-header {
    text-align: center;
    margin-bottom: 30px;
    flex-shrink: 0;
}

/* فریم لوگو با poly.svg */
.nh-logo-frame,
.nh-business-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    background-image: url('https://naghlehaml.ir/wp-content/uploads/2024/09/poly.svg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.nh-logo-frame img,
.nh-logo-frame .nh-logo-img,
.nh-business-logo img {
    width: 72%;
    height: 72%;
    object-fit: contain;
    z-index: 1;
}

.nh-business-name,
.nh-business-title {
    color: var(--text-white);
    font-size: 20px;
    margin: 10px 0 5px;
    font-weight: 700;
}

.nh-welcome-message,
.nh-business-status {
    font-size: 14px;
    color: var(--bg-gray);
    opacity: 0.8;
    margin-top: 5px;
}

/* Navigation */
.nh-sidebar-nav {
    flex-grow: 1;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nh-sidebar-nav::-webkit-scrollbar {
    width: 0 !important;
}

.nh-sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nh-sidebar-nav li {
    margin-bottom: 5px;
}

.nh-sidebar-nav li a {
    display: block;
    color: var(--text-white);
    text-decoration: none;
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nh-sidebar-nav li a:hover {
    background-color: var(--primary-navy);
}

.nh-sidebar-nav li.nh-active a,
.nh-sidebar-nav a.active {
    background-color: var(--primary-yellow);
    color: var(--primary-dark);
    font-weight: 700;
}

.nh-sidebar-footer {
    margin-top: 20px;
    flex-shrink: 0;
}

.nh-logout-button {
    display: block;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    padding: 10px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.3s ease;
}

.nh-logout-button:hover {
    background-color: var(--primary-yellow);
    color: var(--primary-dark);
}

/* ========================================
   Main Content
======================================== */
.nh-main-content,
.nh-dashboard-content {
    flex-grow: 1;
    width: 100%;
    background-color: transparent;
}

.nh-dashboard-section {
    background-color: #ffffff;
    padding: 25px 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}

/* Two-column layout for ACF profile form */
.nh-profile-two-col .acf-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
}
.nh-profile-two-col .acf-field { margin: 0; }
.nh-profile-two-col .acf-field-post-title,
.nh-profile-two-col .acf-field-image,
.nh-profile-two-col .acf-field-message { grid-column: 1 / -1; }

.nh-section-title {
    font-size: 24px;
    color: var(--primary-dark);
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-gray);
    font-weight: 700;
}

/* ========================================
   Stats Grid
======================================== */
.nh-grid-container,
.nh-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.nh-stat-card,
.nh-stat-box {
    background-color: #ffffff;
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.nh-stat-card:hover,
.nh-stat-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-yellow);
}

.nh-card-header,
.nh-stat-box h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.nh-card-body,
.nh-stat-box .nh-stat-number,
.nh-stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0;
}

/* ========================================
   Chart Container
======================================== */
.nh-chart-container {
    position: relative;
    height: 400px;
    margin-top: 20px;
    background: #ffffff;
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.nh-chart-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-dark);
    font-weight: 700;
}

/* ========================================
   Tables
======================================== */
.nh-dashboard-table,
.wp-list-table.widefat,
table.wp-list-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.nh-dashboard-table th,
.nh-dashboard-table td,
.wp-list-table th,
.wp-list-table td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid var(--bg-gray);
}

.nh-dashboard-table th,
.wp-list-table thead th {
    background-color: var(--primary-dark);
    color: var(--text-white);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
}

.nh-dashboard-table tbody tr:hover,
.wp-list-table tbody tr:hover {
    background-color: var(--bg-gray);
}

/* ========================================
   Messages
======================================== */
.nh-message {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: var(--radius-sm);
    border-right: 4px solid;
    font-weight: 500;
}

.nh-message.success {
    background-color: #d4edda;
    color: #155724;
    border-right-color: var(--success-color);
}

.nh-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border-right-color: var(--danger-color);
}

.nh-message.warning {
    background-color: #fff3cd;
    color: #856404;
    border-right-color: var(--warning-color);
}

.nh-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-right-color: var(--info-color);
}

/* ========================================
   Buttons
======================================== */
.button,
.button-primary,
.button-secondary {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
}

.button-primary {
    background-color: var(--primary-yellow);
    color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
}

.button-primary:hover {
    background-color: #d4a029;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.button-secondary {
    background-color: #ffffff;
    color: var(--primary-dark);
    border: 2px solid var(--primary-dark);
}

.button-secondary:hover {
    background-color: var(--primary-dark);
    color: var(--text-white);
}

/* ========================================
   Membership Banner
======================================== */
.nh-membership-banner {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-navy) 100%);
    padding: 25px;
    border-radius: var(--radius-md);
    color: var(--text-white);
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
}

.nh-membership-banner h3 {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 700;
}

.nh-membership-banner p {
    margin: 0;
    opacity: 0.9;
}

/* ========================================
   Wallet Balance Box
======================================== */
.nh-wallet-balance-box {
    background-color: #ffffff;
    padding: 30px;
    border-radius: var(--radius-md);
    border: 2px solid var(--primary-yellow);
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}

.nh-quick-amounts {
    margin-top: 20px;
}

.nh-quick-amounts p {
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--primary-dark);
}

.nh-quick-amount-btn {
    padding: 10px 20px;
    font-size: 13px;
    border-radius: var(--radius-sm);
    background: #ffffff;
    border: 2px solid var(--primary-dark);
    color: var(--primary-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    margin-right: 8px;
    margin-bottom: 8px;
}

.nh-quick-amount-btn:hover {
    background: var(--primary-yellow);
    border-color: var(--primary-yellow);
    color: var(--primary-dark);
}

/* ========================================
   Form Elements
======================================== */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
textarea,
select,
.regular-text {
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-yellow);
    box-shadow: 0 0 0 3px rgba(230, 176, 44, 0.1);
}

.description {
    font-size: 13px;
    color: #666;
    margin-top: 6px;
    font-style: italic;
}

/* ========================================
   Membership Levels Table
======================================== */
.nh-levels-container {
    margin-top: 24px;
}

.nh-levels-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.nh-levels-table th {
    background-color: var(--primary-dark);
    color: var(--text-white);
    padding: 20px;
    font-weight: 700;
    text-align: center;
}

.nh-levels-table th.current {
    background-color: var(--primary-yellow);
    color: var(--primary-dark);
}

.nh-levels-table td {
    padding: 18px 20px;
    border-bottom: 1px solid var(--bg-gray);
    text-align: center;
}

.nh-levels-table tbody tr:hover {
    background-color: var(--bg-gray);
}

/* ========================================
   Order Cards
======================================== */
.nh-order-cards-container {
    display: grid;
    gap: 15px;
}

.nh-order-card-item {
    background: #ffffff;
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid #e0e0e0;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.nh-order-card-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-yellow);
}

.nh-order-card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.nh-order-id {
    font-weight: 700;
    color: var(--primary-dark);
}

/* Progress Bar */
.nh-progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.nh-progress-bar-fill {
    height: 100%;
    transition: width 0.3s;
}

.progress-low {
    background: var(--danger-color);
}

.progress-mid {
    background: var(--warning-color);
}

.progress-high {
    background: var(--success-color);
}

/* ========================================
   List Headers
======================================== */
.nh-list-header,
.nh-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.nh-list-header h3,
.nh-form-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--primary-dark);
}

/* ========================================
   Loading State
======================================== */
.nh-loading,
.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(230, 176, 44, 0.3);
    border-top-color: var(--primary-yellow);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 960px) {
    .nh-dashboard-container {
        flex-direction: column;
        padding: 15px;
    }
    
    .nh-sidebar,
    .nh-dashboard-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
    }
    
    .nh-grid-container,
    .nh-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .nh-grid-container,
    .nh-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .nh-dashboard-section {
        padding: 20px;
    }
    
    .nh-section-title {
        font-size: 20px;
    }
}
