/* ============================================================
   AtashNew v1.4 ROOT RTL FIX
   Purpose: real RTL layout, IRANSans everywhere, invoice/order/cart stability.
   This file is loaded last and intentionally overrides legacy WHMCS/orderform CSS.
   ============================================================ */
:root,
html[data-palette="neon"]{
  --atn-font:'IRANSans',Tahoma,Arial,sans-serif;
  --atn-green:#17d66b;
  --atn-green-2:#7df018;
  --atn-lime:#b7f511;
  --atn-text:#061f14;
  --atn-muted:#4d6d5e;
  --atn-border:rgba(0,190,110,.17);
  --atn-border-2:rgba(0,210,122,.28);
  --atn-card:#ffffff;
  --atn-card-soft:#f5fff9;
  --atn-shadow:0 22px 65px -42px rgba(0,90,45,.45);
  --atn-shadow-2:0 18px 45px -34px rgba(0,90,45,.38);
  --atn-radius:22px;
  --atn-radius-sm:15px;
}
html{direction:rtl!important;}
html,body,body.atashnew-body,body.aa-invoice-body{
  font-family:var(--atn-font)!important;
  direction:rtl!important;
  text-align:right!important;
  color:var(--atn-text)!important;
}
body.atashnew-body *,body.atashnew-body *:before,body.atashnew-body *:after,
body.aa-invoice-body *,body.aa-invoice-body *:before,body.aa-invoice-body *:after{
  box-sizing:border-box;
  font-family:var(--atn-font)!important;
}
button,input,select,textarea,.btn,.form-control,.dropdown-menu,.modal,.popover,.tooltip,.table,.card,.panel,.sidebar{
  font-family:var(--atn-font)!important;
}
/* keep code/english readable without leaking other webfonts */
code,pre,kbd,samp{font-family:Tahoma,Arial,sans-serif!important;}

/* ------------------ REAL MAIN LAYOUT ------------------ */
#main-body.atashnew-main-body{direction:rtl!important;text-align:right!important;padding-top:24px!important;}
#main-body .atashnew-main-row{direction:ltr!important;display:flex!important;flex-wrap:wrap!important;align-items:flex-start!important;}
#main-body .atashnew-main-row>.primary-content{direction:rtl!important;text-align:right!important;float:none!important;min-width:0!important;}
#main-body .atashnew-main-row>.atashnew-sidebar-col{direction:rtl!important;text-align:right!important;float:none!important;}
@media (min-width:992px){
  #main-body .atashnew-main-row.atashnew-has-sidebar{flex-direction:row!important;}
  #main-body .atashnew-main-row>.primary-content{order:1!important;}
  #main-body .atashnew-main-row>.atashnew-sidebar-col{order:2!important;}
  #main-body .atashnew-sidebar-col{padding-right:15px!important;padding-left:15px!important;}
  #main-body .primary-content{padding-right:15px!important;padding-left:15px!important;}
}
@media (max-width:991.98px){
  #main-body .atashnew-main-row{display:block!important;direction:rtl!important;}
  #main-body .atashnew-main-row>.primary-content,
  #main-body .atashnew-main-row>.atashnew-sidebar-col{width:100%!important;max-width:100%!important;display:block!important;}
}

/* ------------------ CLEAN CARDS / SIDE BARS ------------------ */
body.atashnew-body .panel,
body.atashnew-body .card,
body.atashnew-body .tile,
body.atashnew-body .sidebar .panel-sidebar,
body.atashnew-body .panel-sidebar,
body.atashnew-body .client-home-cards .card,
body.atashnew-body .table-container,
body.atashnew-body .list-group,
body.atashnew-body .domain-search-card,
body.atashnew-body .domain-pricing,
body.atashnew-body .domain-checker-container,
body.atashnew-body .logincontainer,
body.atashnew-body .ticket-reply,
body.atashnew-body .ticket-message,
body.atashnew-body .modal-content{
  background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(246,255,250,.96))!important;
  border:1px solid var(--atn-border)!important;
  border-radius:var(--atn-radius)!important;
  box-shadow:var(--atn-shadow)!important;
  color:var(--atn-text)!important;
  overflow:hidden;
}
body.atashnew-body .panel:before,body.atashnew-body .panel:after,
body.atashnew-body .card:before,body.atashnew-body .card:after,
body.atashnew-body .tile:before,body.atashnew-body .tile:after,
body.atashnew-body .panel-sidebar:before,body.atashnew-body .panel-sidebar:after,
body.atashnew-body .list-group:before,body.atashnew-body .list-group:after,
body.atashnew-body .panel-heading:before,body.atashnew-body .panel-heading:after,
body.atashnew-body .card-header:before,body.atashnew-body .card-header:after{
  display:none!important;content:none!important;background:none!important;box-shadow:none!important;
}
body.atashnew-body .panel-heading,
body.atashnew-body .card-header,
body.atashnew-body .panel-sidebar>.panel-heading,
body.atashnew-body .list-group-item:first-child{
  background:linear-gradient(180deg,#f7fffa,#fff)!important;
  border-bottom:1px solid rgba(0,190,110,.12)!important;
  color:#082416!important;
  text-align:right!important;
  box-shadow:none!important;
}
body.atashnew-body h1,body.atashnew-body h2,body.atashnew-body h3,body.atashnew-body h4,body.atashnew-body h5,body.atashnew-body h6,
body.atashnew-body .panel-title,body.atashnew-body .card-title{
  color:#082416!important;font-weight:950!important;text-align:right;line-height:1.65!important;
}
body.atashnew-body .sidebar{direction:rtl!important;text-align:right!important;margin-bottom:20px!important;}
body.atashnew-body .sidebar .panel-sidebar{margin:0 0 18px!important;}
body.atashnew-body .sidebar .panel-sidebar>.panel-heading{padding:14px 16px!important;}
body.atashnew-body .sidebar .panel-title,
body.atashnew-body .sidebar .panel-sidebar>.panel-heading .panel-title{
  display:flex!important;align-items:center!important;justify-content:space-between!important;margin:0!important;width:100%!important;font-size:1rem!important;
}
body.atashnew-body .sidebar .list-group-item,
body.atashnew-body .sidebar a.list-group-item{
  display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;
  width:100%!important;direction:rtl!important;text-align:right!important;
  background:transparent!important;border:0!important;border-bottom:1px solid rgba(0,150,85,.09)!important;
  padding:12px 16px!important;color:#143527!important;font-weight:850!important;line-height:1.75!important;
}
body.atashnew-body .sidebar .list-group-item:hover,
body.atashnew-body .sidebar .list-group-item.active{
  background:linear-gradient(135deg,rgba(0,210,122,.13),rgba(183,245,17,.08))!important;color:#007d4c!important;
}

/* ------------------ FORMS / TABLES ------------------ */
body.atashnew-body .form-control,body.atashnew-body .custom-select,body.atashnew-body select,body.atashnew-body textarea,
body.atashnew-body input[type="text"],body.atashnew-body input[type="email"],body.atashnew-body input[type="password"],body.atashnew-body input[type="tel"],body.atashnew-body input[type="number"]{
  background:linear-gradient(180deg,#fff,#fbfffd)!important;border:1px solid rgba(0,160,90,.18)!important;border-radius:15px!important;box-shadow:none!important;color:#0b2819!important;min-height:42px!important;direction:rtl!important;text-align:right!important;
}
body.atashnew-body .input-group{direction:ltr!important;display:flex!important;align-items:stretch!important;}
body.atashnew-body .input-group>.form-control{direction:rtl!important;text-align:right!important;}
body.atashnew-body table,body.atashnew-body .table{direction:rtl!important;text-align:right!important;color:#0d2a1b!important;}
body.atashnew-body table th,body.atashnew-body table td,body.atashnew-body .table th,body.atashnew-body .table td{text-align:right!important;vertical-align:middle!important;border-color:rgba(0,150,85,.1)!important;}
body.atashnew-body .table thead th{background:linear-gradient(180deg,rgba(0,210,122,.12),rgba(255,255,255,.94))!important;color:#082416!important;font-weight:950!important;}
body.atashnew-body .text-left{text-align:right!important;}body.atashnew-body .text-right{text-align:left!important;}
body.atashnew-body .float-left{float:right!important;}body.atashnew-body .float-right{float:left!important;}
body.atashnew-body .mr-auto{margin-right:0!important;margin-left:auto!important;}body.atashnew-body .ml-auto{margin-left:0!important;margin-right:auto!important;}

/* Buttons */
body.atashnew-body .btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;border-radius:14px!important;font-weight:900!important;line-height:1.45!important;}
body.atashnew-body .btn-primary,body.atashnew-body .btn-success{background:linear-gradient(135deg,var(--atn-green),var(--atn-green-2),var(--atn-lime))!important;border:0!important;color:#fff!important;box-shadow:0 15px 35px -20px rgba(0,185,100,.8)!important;}
body.atashnew-body .btn-default,body.atashnew-body .btn-secondary,body.atashnew-body .btn-light{background:#fff!important;border:1px solid rgba(0,210,122,.18)!important;color:#143527!important;box-shadow:0 12px 30px -26px rgba(0,0,0,.35)!important;}

/* Ticket / invoice / services */
body.atashnew-body .invoice-container,body.atashnew-body .view-invoice,body.atashnew-body .clientarea-detail,
body.atashnew-body .product-status,body.atashnew-body .service-details,body.atashnew-body .domain-details,
body.atashnew-body .tab-content,body.atashnew-body .ticket-reply,body.atashnew-body .ticket-message{direction:rtl!important;text-align:right!important;}

/* Desktop hover dropdowns */
@media (min-width:992px){
  body.atashnew-body .navbar .dropdown:hover>.dropdown-menu,
  body.atashnew-body .aa-nav .dropdown:hover>.dropdown-menu,
  body.atashnew-body .aa-hdr-nav .dropdown:hover>.dropdown-menu{display:block!important;opacity:1!important;visibility:visible!important;margin-top:0!important;}
}

/* FontAwesome/SVG safety: keep icons visible but do not break text */
body.atashnew-body i.fas,body.atashnew-body i.far,body.atashnew-body i.fa{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:1.1em;min-height:1.1em;line-height:1!important;}

/* Standalone invoice page */
body.aa-invoice-body{font-family:var(--atn-font)!important;direction:rtl!important;text-align:right!important;background:linear-gradient(180deg,#f9fffb 0%,#f3fbf6 100%)!important;}
body.aa-invoice-body .aa-inv-wrap,body.aa-invoice-body .aa-inv-card,body.aa-invoice-body .aa-inv-card *{font-family:var(--atn-font)!important;direction:rtl;text-align:right;}
body.aa-invoice-body .aa-inv-header-grid{direction:rtl!important;}
body.aa-invoice-body .aa-pay-btn-wrap,body.aa-invoice-body .aa-inv-status{text-align:center!important;}
body.aa-invoice-body table,body.aa-invoice-body .table{direction:rtl!important;text-align:right!important;}

/* Responsive: keep mobile readable */
@media (max-width:767.98px){
  body.atashnew-body .panel,body.atashnew-body .card,body.atashnew-body .tile,body.atashnew-body .panel-sidebar{border-radius:18px!important;}
  #main-body.atashnew-main-body{padding-top:16px!important;}
}
