.admin-subpage-content{padding-top:18px}
.section-title>strong#userCountText{font-size:12.5px;color:var(--purple);font-weight:800}

/* User cards: mirror the main Kharjeto user manager */
.user-card{background:#fff;border:1px solid #ecebf2;border-radius:17px;padding:11px;display:grid;grid-template-columns:43px minmax(0,1fr) auto;align-items:center;gap:10px;box-shadow:none}
.user-avatar{width:42px;height:42px;border-radius:13px;background:#ece9ff;color:#6653df;display:grid;place-items:center;align-self:center}
.user-avatar svg{width:20px;height:20px;stroke-width:1.8}
.user-card-info{display:flex;flex-direction:column;gap:5px;min-width:0}
.user-card-info>span{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:6px;min-width:0}
.user-card-info em{font-size:10px;font-weight:650;color:#858291;font-style:normal;white-space:nowrap}
.user-card-info strong,.user-card-info small{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.user-card-info strong{font-size:12.5px;font-weight:800;color:#252432}
.user-card-info small{font-size:12.5px;font-weight:700;color:#252432;text-align:right}
.user-card-badges{grid-column:2;display:flex;align-items:center;gap:6px;min-width:0;white-space:nowrap}.user-admin-badge{grid-column:auto;font-style:normal;width:max-content;white-space:nowrap;color:#b24d3d;background:#fff0ec;border:1px solid #f2c8bf;border-radius:9px;padding:5px 9px;font-size:9px;font-weight:800;display:inline-flex;gap:3px;align-items:center}
.user-admin-badge svg{width:12px;height:12px;stroke-width:1.8}.user-card-badges .user-sub-badge{flex:none}
.user-details-button{min-height:38px;border:0;background:#eeeaff;color:#5b49ca;border-radius:11px;padding:9px 12px;font-size:11px;font-weight:800;align-self:center}.user-card>.user-details-button{grid-column:3;grid-row:1/3}

/* Details form: mirror the form opened from user management in the main app */
.user-manager-modal{width:min(560px,100%);max-height:92dvh;background:#f8f8fb;border-radius:28px 28px 0 0;padding:20px 18px max(22px,env(safe-area-inset-bottom));overflow-y:auto;box-shadow:0 -20px 60px #15121f40}
.user-manager-modal .settings-head{margin-bottom:0}
.manager-title-icon{width:38px;height:38px;border-radius:13px;background:#ece9ff;color:#6653df;display:grid;place-items:center;flex:none}
.manager-title-icon svg{width:21px!important;height:21px!important;stroke-width:1.8}
.user-manager-modal .settings-head h2{font-size:17px}
.user-manager-modal .settings-head p{font-size:12px}
.user-details{display:grid;gap:12px;margin-top:14px}
.admin-user-head{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid #ebe9f1;border-radius:17px;padding:12px}
.admin-user-head>span{width:44px;height:44px;border-radius:14px;background:#ece9ff;color:#6653df;display:grid;place-items:center;flex:none}
.admin-user-head>span svg{width:21px;height:21px;stroke-width:1.8}
.admin-user-head>div{display:flex;flex-direction:column;min-width:0}
.admin-user-head strong{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.admin-user-head small{font-size:11.5px;color:#92909e;font-weight:650}
.user-activity-panel{display:grid;grid-template-columns:1fr 1fr;gap:8px;background:linear-gradient(135deg,#f0edff,#f8f7ff);border:1px solid #e4e0fa;border-radius:17px;padding:10px}
.user-activity-panel>div{min-width:0;background:#ffffffc7;border:1px solid #ebe8f8;border-radius:13px;padding:10px;display:flex;align-items:flex-start;gap:8px}
.user-activity-panel>div>span{width:30px;height:30px;flex:0 0 30px;border-radius:10px;background:#e9e5ff;color:#6250d2;display:grid;place-items:center}
.user-activity-panel svg{width:15px;height:15px;stroke-width:1.8}
.user-activity-panel p{min-width:0;margin:0;display:flex;flex-direction:column;gap:4px}
.user-activity-panel small{font-size:10.5px;color:#777486}
.user-activity-panel strong{font-size:12.5px;line-height:1.7;color:#312f3d;direction:ltr;text-align:right;white-space:nowrap}
.user-details label>span{display:block;font-size:12px;color:#706e7d;margin:0 4px 5px}
.user-details input{width:100%;height:46px;border:1px solid #dedce8;border-radius:13px;background:#fafafd;padding:0 12px;outline:0;font-size:13px}
.user-details input:focus{border-color:var(--purple);background:#fff}
.user-details label>small{display:block;font-size:10.5px;color:#8d8a99;margin:5px 4px;line-height:1.8}
.admin-form-actions{display:grid;grid-template-columns:1.3fr .7fr;gap:8px;direction:rtl;margin-top:3px}
.admin-save{height:44px;border:0;border-radius:13px;background:#6956e8;color:#fff;display:flex;align-items:center;justify-content:center;gap:7px;font-size:12.5px;font-weight:800}
.admin-save svg{width:17px;height:17px;stroke-width:1.9}
.admin-save:disabled{opacity:.42}
.admin-cancel{height:44px;border:0;border-radius:13px;background:#e5e4ea;color:#64616e;font-size:11.5px;font-weight:750}
.user-detail-message{display:none;font-size:11.5px;color:#4b4570;background:#ece9ff;border-radius:11px;padding:9px 11px;margin:0;line-height:1.8}
.user-detail-message.show{display:block}
.user-detail-message.error{display:block;background:#fff0f1;color:#a8404b;border:1px solid #f0cbd0}

@media(min-width:700px){.user-manager-modal{border-radius:28px;max-height:88vh}}
@media(max-width:390px){.user-card{grid-template-columns:40px minmax(0,1fr) auto}.user-avatar{width:40px;height:40px}.user-activity-panel{grid-template-columns:1fr}.user-manager-modal{padding:17px 14px max(20px,env(safe-area-inset-bottom))}}

.user-plan-badge,.subscription-badge{white-space:nowrap!important;display:inline-flex!important;align-items:center;gap:4px;background:#eaf4ff!important;color:#3c6d9b!important;border:1px solid #d5e8fb}
.subscription-section,.purchase-section{gap:14px!important;line-height:1.9}
.wallet-user-dialog{padding-bottom:42px!important}
.wallet-user-dialog .wallet-history-dialog-body{padding-bottom:22px}

.wallet-history-button{background:#5740c7!important;color:#fff!important;border:1px solid #4932b0!important;box-shadow:0 6px 15px #5740c745!important}
.wallet-history-grid-head,.wallet-history-grid-row{direction:rtl;display:grid;justify-items:stretch;grid-template-columns:1.15fr .62fr .55fr 1fr .9fr;gap:8px;align-items:center}
.wallet-history-grid-head{text-align:right;padding:10px 0;color:#777186;font-size:10px;font-weight:800;border-bottom:1px solid #e7e4f0}
.wallet-history-grid-row{text-align:right;padding:12px 0;border-bottom:1px solid #efedf5;font-size:10px;line-height:1.7}
.wallet-history-grid-row span,.wallet-history-grid-row b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wallet-history-grid-row b{text-align:right}
.wallet-user-dialog{padding-bottom:52px!important}
@media(max-width:560px){.wallet-history-grid-head,.wallet-history-grid-row{grid-template-columns:1.15fr .62fr .55fr 1fr .9fr;gap:5px;font-size:9px}}

/* subscription summary spacing */
.subscription-card,.user-subscription-card,.subscription-summary{line-height:1.9}
.subscription-card .plan-type,.user-subscription-card .plan-type,.subscription-summary .plan-type{margin-inline-start:10px}
.subscription-card .remaining-days,.user-subscription-card .remaining-days,.subscription-summary .remaining-days{margin-inline-start:8px}
.subscription-card .plan-name,.user-subscription-card .plan-name,.subscription-summary .plan-name{margin-inline-start:10px}
.subscription-card .purchase-status,.user-subscription-card .purchase-status,.subscription-summary .purchase-status{margin-inline-start:8px}

.wallet-history-grid-row>div{min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:right}
.wallet-history-grid-row>div>small{font-size:10.5px;color:#8b849b;font-weight:800;white-space:nowrap}
.wallet-history-grid-row>div>span,.wallet-history-grid-row>div>b{font-size:12px;color:#302d3d;text-align:right}
.wallet-history-grid-row>div>b{font-weight:850}

.gift-package-trigger{display:block;width:100%;min-height:46px;grid-column:1/-1;margin:4px 0 0;border:1px solid #d9d2fa;border-radius:13px;background:#eeebff;color:#5947bb;font:800 12.5px Vazirmatn;text-align:center}.gift-package-dialog{max-width:500px}.gift-package-form{padding:8px 18px 20px}.gift-package-form>label{display:block;margin:14px 0}.gift-package-form>label>span{display:block;font-size:12px;font-weight:800;color:#515064;margin-bottom:7px}.gift-package-form select,.gift-package-form textarea{width:100%;border:1px solid #dad7e5;border-radius:13px;background:#faf9fd;padding:12px;font:13px Vazirmatn;color:#353244;box-sizing:border-box}.gift-package-form textarea{min-height:76px;resize:vertical}.gift-package-preview{display:grid;gap:6px;padding:12px;border-radius:14px;background:#f0f4ff;color:#3d4463;font-size:11px;line-height:1.8}.gift-package-preview strong{font-size:13px}.gift-package-preview small{font-size:10px;color:#666b86}.gift-sms-note{font-size:11px;line-height:1.9;color:#655f73}.gift-sms-note a{color:#5f4dcc;font-weight:800}

/* Keep action buttons inside their own panels without creating implicit grid columns. */
.user-details{grid-template-columns:minmax(0,1fr)}.user-details>.admin-user-head,.user-details>.user-activity-panel,.user-details>.user-sub-panel,.user-details>label,.user-details>.gift-package-trigger,.user-details>.user-detail-message,.user-details>.admin-form-actions{min-width:0;grid-column:1/-1}.user-details .user-activity-panel strong{white-space:normal;overflow-wrap:anywhere}.wallet-user-panel{display:flex;align-items:center;gap:10px}.wallet-user-panel>div{flex:1;min-width:0}.wallet-user-panel .wallet-history-button{flex:none;max-width:44%;grid-column:auto;grid-row:auto;white-space:normal;line-height:1.5}@media(max-width:390px){.user-details .user-activity-panel:not(.wallet-user-panel){grid-template-columns:1fr}.wallet-user-panel{flex-wrap:wrap}.wallet-user-panel .wallet-history-button{max-width:none;width:100%}}

/* Gift package selector uses the app's bottom sheet pattern and the loaded variable font. */
.gift-package-trigger,.gift-package-dialog,.gift-package-dialog *,.gift-plan-backdrop,.gift-plan-backdrop *{font-family:"Vazirmatn Variable",Vazirmatn,Vazir,Tahoma,sans-serif!important}
.gift-package-dialog .gift-package-form{padding:8px 0 2px}
.gift-package-dialog .gift-package-form textarea{font-family:"Vazirmatn Variable",Vazirmatn,Vazir,Tahoma,sans-serif!important;font-size:13px;font-weight:500;line-height:1.8}
.gift-plan-trigger{width:100%;min-height:48px;border:1px solid #dedce8;border-radius:13px;background:#fafafd;color:#302d43;padding:0 13px;display:flex;align-items:center;justify-content:space-between;gap:8px;text-align:right;font-size:13px;font-weight:700}
.gift-plan-trigger svg{width:18px;height:18px;flex:none;fill:none;stroke:#928da7;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transform:rotate(-90deg)}
.gift-plan-backdrop{position:fixed;inset:0;z-index:120;background:#1d1b2a75;display:flex;align-items:flex-end;justify-content:center;backdrop-filter:blur(3px)}
.gift-plan-sheet{width:min(560px,100%);max-height:min(78dvh,620px);overflow:hidden;background:#fff;border-radius:25px 25px 0 0;padding:17px 17px max(20px,env(safe-area-inset-bottom));box-shadow:0 -16px 42px #1d1b2a30;display:flex;flex-direction:column}
.gift-plan-sheet header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.gift-plan-sheet h3{font-size:17px;font-weight:850;color:#272536;margin:0}
.gift-plan-sheet header button{height:36px;width:36px;border:0;border-radius:11px;background:#f2f1f6;color:#686476;font-size:22px}
.gift-plan-options{overflow-y:auto;min-height:0;display:grid;gap:8px;overscroll-behavior:contain}
.gift-plan-option{width:100%;min-height:64px;border:1px solid #e6e3ee;border-radius:14px;background:#fff;color:#373248;padding:10px 13px;display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:right}
.gift-plan-option.selected{border-color:#9f90ef;background:#f7f5ff}
.gift-plan-option span{display:flex;flex-direction:column;gap:2px}
.gift-plan-option strong{font-size:13px;font-weight:800}
.gift-plan-option small{font-size:11px;color:#8a8498}
.gift-plan-option b{color:#6350d5;font-size:18px}
.gift-plan-empty{font-size:12px;color:#888398;text-align:center}
.gift-plan-cancel{height:46px;flex:none;margin-top:14px;border:0;border-radius:13px;background:#f2f1f6;color:#605c70;font-size:12.5px;font-weight:800}
