/* پنل کاربری آهولرن - نسخه ۲.۲ - بهینه با AJAX navigation */
*{box-sizing:border-box;margin:0;padding:0;font-family:'IRANSans','IRANSansWeb',Vazirmatn,Tahoma,sans-serif!important;direction:rtl}
.ahudash-app{--bg:#f0f4f8;--card:#fff;--text:#000;--muted:#666;--border:#e2e8f0;--primary:#0F2C4C;--blue:#3B82F6;--radius:12px;min-height:100vh;background:var(--bg);color:var(--text);line-height:1.7}
.ahudash-app.ahudash-theme-dark{--bg:#0f172a;--card:#1e293b;--text:#f1f5f9;--muted:#94a3b8;--border:#334155;--primary:#60a5fa}
/* هدر */
.ahudash-header{background:var(--primary);color:#fff;padding:10px 20px;position:sticky;top:0;z-index:100;box-shadow:0 2px 8px rgba(0,0,0,.1)}
.ahudash-header-inner{max-width:1280px;margin:0 auto;display:flex;justify-content:space-between;align-items:center}
.ahudash-header-brand{display:flex;align-items:center;gap:10px}
.ahudash-brand-name{font-size:20px;font-weight:900;color:#fff}
.ahudash-brand-tag{font-size:12px;color:rgba(255,255,255,.8);background:rgba(255,255,255,.1);padding:4px 12px;border-radius:20px}
.ahudash-header-user{display:flex;align-items:center;gap:8px}
.ahudash-theme-toggle{background:rgba(255,255,255,.15);border:none;border-radius:8px;width:34px;height:34px;cursor:pointer;font-size:14px}
.ahudash-theme-dark .icon-l,.ahudash-app:not(.ahudash-theme-dark) .icon-d{display:none}
.ahudash-avatar{width:34px;height:34px;border-radius:50%;border:2px solid rgba(255,255,255,.3);object-fit:cover}
.ahudash-btn-logout{background:rgba(255,255,255,.15);color:#fff!important;text-decoration:none;padding:7px 12px;border-radius:8px;font-size:12px;font-weight:700;border:none;cursor:pointer}
/* چیدمان */
.ahudash-layout{max-width:1280px;margin:0 auto;padding:14px 20px;display:grid;grid-template-columns:200px 1fr;gap:14px;align-items:start}
.ahudash-sidebar{background:var(--card);border-radius:var(--radius);padding:6px;border:1px solid var(--border);position:sticky;top:60px;display:flex;flex-direction:column}
.ahudash-nav-item{display:flex;align-items:center;gap:8px;padding:9px 12px;color:var(--text);text-decoration:none;border-radius:9px;font-size:13px;font-weight:700;transition:background .12s;margin-bottom:1px}
.ahudash-nav-item:hover{background:rgba(59,130,246,.1)}
.ahudash-nav-item.active{background:var(--primary);color:#fff}
.ahudash-nav-logout{margin-top:auto;color:#dc2626!important}
.ahudash-nav-logout:hover{background:rgba(220,38,38,.08)}
.ahudash-nav-icon{width:20px;height:20px;flex-shrink:0}.ahudash-nav-icon svg{width:20px;height:20px}
.ahudash-main{min-width:0}
.ahudash-page{display:flex;flex-direction:column;gap:14px}
.ahudash-page-header{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px}
.ahudash-page-header h1{font-size:20px;font-weight:900;color:var(--text)}
/* کارت‌ها */
.ahudash-card{background:var(--card);border-radius:var(--radius);border:1px solid var(--border);overflow:hidden}
.ahudash-card-header{padding:12px 16px;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center}
.ahudash-card-header h2{font-size:15px;font-weight:800;color:var(--text)}
.ahudash-card-body{padding:16px}
.ahudash-card-cta{background:linear-gradient(135deg,var(--primary),#1e3a5f);color:#fff;display:flex;justify-content:space-between;align-items:center;padding:16px;border:none}
.ahudash-card-cta h2,.ahudash-card-cta p{color:#fff}
/* آمار */
.ahudash-stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.ahudash-stat-card{background:var(--card);border-radius:11px;padding:12px;border:1px solid var(--border);display:flex;align-items:center;gap:10px;transition:transform .12s}
.ahudash-stat-card:hover{transform:translateY(-1px)}
.ahudash-stat-icon{width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.ahudash-stat-blue .ahudash-stat-icon{background:#dbeafe}.ahudash-stat-sky .ahudash-stat-icon{background:#cffafe}
.ahudash-stat-navy .ahudash-stat-icon{background:#e0e7ff}.ahudash-stat-cyan .ahudash-stat-icon{background:#cffafe}
.ahudash-stat-green .ahudash-stat-icon{background:#d1fae5}.ahudash-stat-icon svg{width:20px;height:20px}
.ahudash-stat-info{display:flex;flex-direction:column}
.ahudash-stat-value{font-size:18px;font-weight:900;color:var(--text);line-height:1}
.ahudash-stat-label{font-size:10px;color:var(--muted);font-weight:600;margin-top:2px}
/* دکمه‌ها - همگی آبی با نوشته سفید */
.ahudash-btn{display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:8px 16px;border:none;border-radius:10px;font-size:13px;font-weight:700;cursor:pointer;text-decoration:none;transition:all .12s;background:var(--blue);color:#fff!important}
.ahudash-btn:hover{background:#2563eb;transform:translateY(-1px)}
.ahudash-btn:disabled{opacity:.6;cursor:not-allowed;transform:none}
.ahudash-btn-primary{background:var(--blue);color:#fff!important}
.ahudash-btn-primary:hover{background:#2563eb}
.ahudash-btn-secondary{background:var(--bg);color:var(--text)!important;border:1px solid var(--border)}
.ahudash-btn-secondary:hover{background:rgba(59,130,246,.08);border-color:var(--blue)}
.ahudash-btn-sm{padding:6px 12px!important;font-size:12px!important;border-radius:8px!important}
.ahudash-btn-block{width:100%}
.ahudash-btn-logout-big{display:inline-block;background:#dc2626;color:#fff!important;text-decoration:none;padding:12px 36px;border-radius:12px;font-size:15px;font-weight:800;border:none;cursor:pointer}
.ahudash-btn-logout-big:hover{background:#b91c1c}
/* جدول */
.ahudash-table-wrap{overflow-x:auto}
.ahudash-table{width:100%;border-collapse:collapse;font-size:13px}
.ahudash-table thead{background:var(--bg)}
.ahudash-table th{padding:9px 11px;text-align:right;font-weight:800;color:var(--text);border-bottom:2px solid var(--border);white-space:nowrap}
.ahudash-table td{padding:9px 11px;border-bottom:1px solid var(--border);color:var(--text)}
.ahudash-table tr:last-child td{border:none}
.ahudash-badge{display:inline-block;padding:3px 9px;border-radius:20px;font-size:10px;font-weight:700}
.ahudash-badge-success{background:#d1fae5;color:#065f46}.ahudash-badge-warning{background:#fef3c7;color:#92400e}
.ahudash-badge-info{background:#dbeafe;color:#1e40af}.ahudash-badge-danger{background:#fee2e2;color:#991b1b}
/* پیشرفت */
.ahudash-progress-wrap{display:flex;align-items:center;gap:6px;margin-top:4px}
.ahudash-progress-bar{flex:1;height:5px;background:var(--border);border-radius:20px;overflow:hidden}
.ahudash-progress-fill{height:100%;background:linear-gradient(90deg,var(--blue),#60a5fa);border-radius:20px}
.ahudash-progress-mini{display:flex;align-items:center;gap:6px}.ahudash-progress-mini .ahudash-progress-bar{max-width:90px}
/* دوره‌ها */
.ahudash-course-list{display:flex;flex-direction:column;gap:10px}
.ahudash-course-item{display:flex;align-items:center;gap:10px;padding:8px;background:var(--bg);border-radius:9px;border:1px solid var(--border)}
.ahudash-course-thumb{width:60px;height:38px;border-radius:7px;object-fit:cover;flex-shrink:0}
.ahudash-course-info{flex:1;min-width:0}.ahudash-course-info h3{font-size:12px;font-weight:700;margin-bottom:3px}
.ahudash-course-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px}
.ahudash-course-card{background:var(--card);border-radius:9px;overflow:hidden;border:1px solid var(--border)}
.ahudash-course-card-thumb{width:100%;aspect-ratio:16/9;object-fit:cover}
.ahudash-course-card-body{padding:9px}.ahudash-course-card-body h3{font-size:12px;font-weight:700;margin-bottom:6px}
.ahudash-user-cell{display:flex;align-items:center;gap:7px}
.ahudash-avatar-sm{width:30px;height:30px;border-radius:50%;object-fit:cover}
/* پروفایل */
.ahudash-profile-grid{display:grid;grid-template-columns:240px 1fr;gap:14px;align-items:start}
.ahudash-profile-card{text-align:center}
.ahudash-profile-avatar{width:80px;height:80px;border-radius:50%;object-fit:cover;border:3px solid var(--blue);margin:0 auto}
/* فرم‌ها */
.ahudash-form{display:flex;flex-direction:column;gap:10px}
.ahudash-field{display:flex;flex-direction:column;gap:3px}
.ahudash-field label{font-size:12px;font-weight:700;color:var(--text)}
.ahudash-field input,.ahudash-field select,.ahudash-field textarea{width:100%;padding:9px 11px;border:1px solid var(--border);border-radius:9px;background:var(--card);color:var(--text);font-size:13px;outline:none;transition:border-color .12s}
.ahudash-field input:focus,.ahudash-field select:focus,.ahudash-field textarea:focus{border-color:var(--blue)}
.ahudash-field textarea{resize:vertical;min-height:70px}
.ahudash-field-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.ahudash-req{color:#dc2626}
.ahudash-form-actions{display:flex;gap:8px;flex-wrap:wrap}
.ahudash-form-message{padding:0;border-radius:9px;font-size:12px;font-weight:700;overflow:hidden;transition:all .2s;min-height:0}
.ahudash-form-message.show{padding:9px 12px}
.ahudash-form-message.success{background:#d1fae5;color:#065f46;border:1px solid #6ee7b7}
.ahudash-form-message.error{background:#fee2e2;color:#991b1b;border:1px solid #fca5a5}
.ahudash-notice{padding:10px 14px;background:var(--bg);color:var(--text);border-radius:9px;text-align:center;font-weight:600;border:1px solid var(--border)}
.ahudash-empty{text-align:center;padding:24px 16px;color:var(--muted)}
.ahudash-empty p{margin-bottom:10px;font-size:13px}
/* فیلتر دوره‌ها */
.ahudash-period-tabs{display:flex;gap:4px;background:var(--card);padding:5px;border-radius:10px;border:1px solid var(--border);margin-bottom:14px}
.ahudash-period-tab{flex:1;padding:8px;text-align:center;border:none;background:transparent;color:var(--text);font-size:13px;font-weight:700;border-radius:8px;cursor:pointer;text-decoration:none;transition:all .12s}
.ahudash-period-tab.active{background:var(--blue);color:#fff}
.ahudash-period-tab:hover:not(.active){background:rgba(59,130,246,.08)}
/* نمودار */
.ahudash-chart{display:flex;align-items:flex-end;gap:2px;height:160px;padding:8px 0;overflow-x:auto}
.ahudash-chart-bar-wrap{display:flex;flex-direction:column;align-items:center;flex:1;min-width:18px;height:100%;justify-content:flex-end}
.ahudash-chart-bar{width:100%;max-width:20px;background:linear-gradient(180deg,var(--blue),#60a5fa);border-radius:3px 3px 0 0;position:relative;min-height:3px;transition:height .3s}
.ahudash-chart-value{position:absolute;top:-14px;left:50%;transform:translateX(-50%);font-size:8px;font-weight:700;color:var(--text);white-space:nowrap}
.ahudash-chart-label{font-size:7px;color:var(--muted);margin-top:3px;white-space:nowrap}
/* تیکت */
.ahudash-ticket-meta{display:flex;gap:10px;flex-wrap:wrap;font-size:11px;color:var(--muted)}
.ahudash-msg{background:var(--bg);border-radius:9px;padding:10px;margin-bottom:7px;border:1px solid var(--border)}
.ahudash-msg-staff{background:rgba(59,130,246,.06);border-color:var(--blue)}
.ahudash-msg-header{display:flex;align-items:center;gap:7px;margin-bottom:5px}
.ahudash-msg-header strong{font-size:12px;color:var(--text)}
.ahudash-msg-date{margin-right:auto;font-size:10px;color:var(--muted)}
.ahudash-msg-body{font-size:12px;color:var(--text);line-height:1.6}
/* صفحه ورود */
.ahu-auth-page{width:100%;min-height:100vh;display:flex;align-items:center;justify-content:center;padding:40px 16px;background:#fff}
.ahu-auth-card{width:100%;max-width:480px;padding:28px;border:1px solid #e2e8f0;border-radius:22px;background:rgba(255,255,255,.95);box-shadow:0 16px 48px rgba(0,0,0,.06)}
.ahu-auth-brand-wrap{display:flex;justify-content:center;margin-bottom:16px}
.ahu-auth-brand{display:inline-flex;align-items:center;gap:10px;text-decoration:none}
.ahu-auth-brand-mark{width:64px;height:64px;border-radius:50%;overflow:hidden;border:2px solid #D4A017;background:#fff;display:flex;align-items:center;justify-content:center}
.ahu-auth-brand-mark-img{width:168%;height:168%;object-fit:cover;object-position:86% center}
.ahu-auth-brand-title{font-size:24px;font-weight:900;color:#0F2C4C}
.ahu-auth-head{text-align:center;margin-bottom:18px}
.ahu-auth-head h1{font-size:24px;font-weight:900;color:#0F2C4C;margin-bottom:5px}
.ahu-auth-head p{font-size:13px;color:#64748b}
.ahu-auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:16px;padding:5px;background:#f1f5f9;border-radius:12px}
.ahu-auth-tab{padding:11px;border:none;background:transparent;color:#64748b;font-size:14px;font-weight:800;border-radius:9px;cursor:pointer;transition:all .15s}
.ahu-auth-tab.active{background:linear-gradient(135deg,#0F2C4C,#1e3a5f);color:#fff;box-shadow:0 3px 10px rgba(15,44,76,.15)}
.ahu-auth-panel{display:none}.ahu-auth-panel.active{display:block}
.ahu-auth-form{display:flex;flex-direction:column;gap:10px}
.ahu-form-group{display:flex;flex-direction:column;gap:5px}
.ahu-form-group label{font-size:13px;font-weight:700;color:#0f172a}
.ahu-form-group input{width:100%;min-height:44px;padding:0 13px;border:1px solid rgba(15,44,89,.18);border-radius:11px;outline:none;background:rgba(255,255,255,.96);color:#17375e;font-size:14px;font-weight:600;transition:all .15s}
.ahu-form-group input:focus{border-color:#3B82F6;background:#fff;box-shadow:0 0 0 3px rgba(59,130,246,.1)}
.ahu-auth-row{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px}
.ahu-checkbox-wrap{display:inline-flex;align-items:center;gap:5px;font-size:13px;font-weight:700;color:#17375e;cursor:pointer}
.ahu-checkbox-wrap input{width:15px;height:15px;accent-color:#3B82F6}
.ahu-auth-link,.ahu-auth-switch{color:#3B82F6;font-size:13px;font-weight:800;text-decoration:none;cursor:pointer}
.ahu-auth-link:hover,.ahu-auth-switch:hover{color:#0F2C4C}
.ahu-auth-btn{width:100%;min-height:46px;border:none;border-radius:12px;color:#fff;background:linear-gradient(135deg,#0F2C4C,#3B82F6);font-size:15px;font-weight:800;cursor:pointer;transition:all .15s}
.ahu-auth-btn:hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(15,44,76,.15)}
.ahu-auth-btn:disabled{opacity:.6;cursor:not-allowed}
.ahu-auth-btn-secondary{white-space:nowrap;padding:0 14px;min-height:44px;border:none;border-radius:11px;color:#fff;background:linear-gradient(135deg,#0F2C4C,#3B82F6);font-size:12px;font-weight:800;cursor:pointer}
.ahu-auth-btn-secondary:disabled{opacity:.6}
.ahu-phone-row{display:flex;gap:6px}.ahu-phone-row input{flex:1}
.ahu-req{color:#dc2626}
.ahu-auth-footer{text-align:center;margin-top:14px;padding-top:12px;border-top:1px dashed #e2e8f0;font-size:13px;color:#64748b}
/* ریسپانسیو */
@media(max-width:768px){.ahudash-layout{grid-template-columns:1fr}.ahudash-sidebar{position:static;flex-direction:row;flex-wrap:wrap;gap:3px}.ahudash-nav-item{flex:1;min-width:90px;justify-content:center}.ahudash-nav-logout{flex:1}.ahudash-stats-grid{grid-template-columns:1fr 1fr}.ahudash-field-row{grid-template-columns:1fr}.ahudash-header-inner{flex-direction:column;gap:6px}.ahudash-profile-grid{grid-template-columns:1fr}}
