:root{--brand:#b07b2c;--brand-dark:#8c6223;--accent:#0d6efd;--soft:#f5f7fa;--muted:#6c757d;--border:#e6e8eb}
body{background:var(--soft);color:#212529;font-family:"Cairo",system-ui,-apple-system,"Segoe UI","Tahoma","Arial",sans-serif;overflow-x:hidden}
.navbar{box-shadow:0 1px 0 rgba(0,0,0,.06)}
.navbar-brand{color:var(--brand);letter-spacing:.2px}
.nav-link{color:#495057}
.nav-link:hover{color:var(--brand)}
.nav-link.active{color:var(--brand);font-weight:600}
.page-title{font-size:1.25rem;font-weight:600;color:#0f172a;margin-bottom:1rem}
.card{border-radius:.75rem;border:1px solid var(--border);box-shadow:0 .25rem .5rem rgba(0,0,0,.04);background:#fff}
.card:hover{box-shadow:0 .5rem 1rem rgba(0,0,0,.06)}
.card-stat .stat-label{color:var(--muted);font-size:.95rem}
.card-stat .stat-value{font-size:1.6rem;font-weight:700;color:#0f172a}
.stat-card{border:0;background:#fff;box-shadow:0 .35rem .8rem rgba(16,24,40,.06)}
.stat-card .card-body{padding:1rem 1.25rem}
.stat-card .stat-label{color:#64748b;font-size:.95rem}
.stat-card .stat-value{font-size:1.8rem;font-weight:800;color:#0f172a}
.stat-card .stat-icon{width:48px;height:48px;border-radius:.75rem;display:flex;align-items:center;justify-content:center;color:#fff}
.stat-primary{background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%)}
.stat-success{background:linear-gradient(180deg,#ffffff 0%,#f7fffb 100%)}
.stat-warning{background:linear-gradient(180deg,#ffffff 0%,#fffaf4 100%)}
.stat-info{background:linear-gradient(180deg,#ffffff 0%,#f0f9ff 100%)}
.icon-primary{background:var(--brand)}
.icon-success{background:#22c55e}
.icon-warning{background:#f59e0b}
.icon-info{background:#0ea5e9}
.actions-card .card-body{padding:1rem}
.actions-card .btn{min-width:180px}
.actions-card{border:1px solid var(--border);box-shadow:0 .5rem 1rem rgba(0,0,0,.06);background:linear-gradient(180deg,#ffffff 0%,#f7f9fc 100%);border-radius:.75rem}
.btn .icon{width:20px;height:20px;margin-left:.5rem;vertical-align:middle}
.site-layout{min-height:100vh;display:flex;flex-direction:column}
.site-layout main{flex:1 0 auto}
.site-footer{background:linear-gradient(180deg,#f8fafc 0%,#eef2ff 100%);border-top:1px solid #e5e7eb;box-shadow:0 -6px 12px rgba(16,24,40,.04)}
.site-footer .footer-content{padding:.5rem 0;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.75rem}
.site-footer .footer-left{display:flex;align-items:center;gap:.5rem}
.site-footer .footer-right{color:#64748b;font-size:.9rem}
.site-footer .footer-brand{color:#0f172a;font-weight:600;display:flex;align-items:center;gap:.5rem}
.site-footer .footer-icon{width:18px;height:18px;color:#3b82f6}
.site-footer .pill-link{background:#e0f2fe;color:#0369a1;border:1px solid #bae6fd;border-radius:999px;padding:.2rem .6rem;font-size:.85rem;text-decoration:none}
.site-footer .pill-link:hover{background:#dbeafe}
@media print {.no-print{display:none !important}}
.steps-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1rem;
}

.step-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.5rem;
  width: 140px;
  height: 140px;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.step-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border-color: var(--brand);
  color: var(--brand);
}

.step-number {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 32px;
  height: 32px;
  background-color: var(--brand);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  border: 3px solid #f8fafc;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.step-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 0.75rem;
  color: var(--brand);
}

.step-icon svg {
  width: 100%;
  height: 100%;
}

.step-title {
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
}

.step-arrow {
  color: #cbd5e1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* RTL Arrow Support */
[dir="rtl"] .step-arrow svg {
  transform: scaleX(-1);
}

@media (max-width: 768px) {
  .steps-container {
    flex-direction: row; /* Allow horizontal */
    flex-wrap: wrap;     /* Allow wrapping */
    gap: 0.75rem;        /* Slightly reduced gap */
    padding: 0.5rem;
  }
  .step-card {
    width: calc(50% - 0.5rem); /* Should fit 2 items with 0.75rem gap (approx 12px) */
    /* If gap is 0.75rem (12px). 2 items = 2W.
       2W + 12px <= ContainerWidth
       W <= (ContainerWidth - 12px)/2 = 50% - 6px.
       0.5rem is 8px. So 50% - 8px fits safely. */
    height: auto;
    aspect-ratio: 1;
    padding: 0.75rem;
    box-sizing: border-box; /* Ensure padding/border is inside width */
  }
  .step-arrow {
    display: none;
  }
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.action-tile{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:.5rem;padding:2rem 1.2rem;min-height:140px;border:1px solid var(--border);border-radius:.9rem;background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);box-shadow:0 .3rem .6rem rgba(0,0,0,.05);text-decoration:none;color:inherit;text-align:center}
.action-tile:hover{transform:translateY(-2px);box-shadow:0 .6rem 1.2rem rgba(0,0,0,.08)}
.action-tile .tile-icon{width:36px;height:36px;color:#3b82f6}
.action-tile .tile-label{font-weight:700;font-size:1.05rem}
.step-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background-color: var(--brand);
  color: #fff;
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  z-index: 10;
}
.btn{border-radius:.6rem}
.btn-square{border-radius:0!important}
/* Unified Button Colors (Brand Theme) */
.btn-primary, .btn-success, .btn-info {
  background-color: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
}

.btn-primary:hover, .btn-success:hover, .btn-info:hover {
  background-color: var(--brand-dark) !important;
  border-color: var(--brand-dark) !important;
}

.btn-outline-primary, .btn-outline-success, .btn-outline-info {
  color: var(--brand) !important;
  border-color: var(--brand) !important;
}

.btn-outline-primary:hover, .btn-outline-success:hover, .btn-outline-info:hover {
  background-color: var(--brand) !important;
  color: #fff !important;
}

/* Focus Ring Override */
.btn:focus, .btn.focus, 
.btn-check:focus + .btn, 
.form-control:focus, 
.form-select:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 0.25rem rgba(176, 123, 44, 0.25) !important;
}
.form-label{font-weight:500}
.form-control{border-radius:.6rem}
.form-control:focus{border-color:var(--brand);box-shadow:0 0 0 .2rem rgba(176,123,44,.15)}
.table{background:#fff}
.table thead th{border-bottom:2px solid var(--border)}
.table tbody tr{border-bottom:1px solid var(--border)}
.text-muted{color:var(--muted)!important}
.pagination .page-item .page-link{border-radius:0!important}
.pagination .page-item:first-child .page-link{border-radius:0!important}
.pagination .page-item:last-child .page-link{border-radius:0!important}
.pagination{gap:.25rem}
.pagination .page-link{border:1px solid var(--brand)!important;color:var(--brand)!important;background:#fff!important;padding:.4rem .9rem!important;min-width:90px!important;text-align:center!important;font-weight:600!important}
.pagination .page-link:hover{background:var(--brand)!important;color:#fff!important}
.pagination .page-item.active .page-link{background:var(--brand)!important;color:#fff!important;border-color:var(--brand)!important}
.pagination .page-item.disabled .page-link{background:#f1f3f5!important;color:#adb5bd!important;border-color:#dee2e6!important;cursor:default!important}
.pagination.pagination-sm .page-link{padding:.3rem .7rem!important;min-width:80px!important;font-weight:500!important}
@media print{
  @page{size:A4;margin:0}
  body{background:#fff;margin:0;padding:0}
  nav,footer,.no-print{display:none!important}
  .print-a4{
    width:100%!important;
    min-height:auto!important;
    margin:0!important;
    padding:10mm 15mm!important; /* Top/Bottom 10mm, Left/Right 15mm */
    box-shadow:none!important;
    border:none!important;
  }
  .table-responsive{overflow:visible!important}
  tr{page-break-inside:avoid;break-inside:avoid}
  thead{display:table-header-group}
  tfoot{display:table-footer-group}
  /* Ensure backgrounds render if needed */
  *{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
}

/* Stepper CSS */
.stepper-wrapper {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}
.stepper-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.stepper-item::before {
  position: absolute;
  content: "";
  border-bottom: 2px solid #ccc;
  width: 100%;
  top: 20px;
  right: -50%;
  z-index: 2;
}

.stepper-item::after {
  position: absolute;
  content: "";
  border-bottom: 2px solid #ccc;
  width: 100%;
  top: 20px;
  left: -50%;
  z-index: 2;
}

.stepper-item .step-counter {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ccc;
  margin-bottom: 6px;
  color: white;
  font-weight: bold;
}

.stepper-item.active {
  font-weight: bold;
}

.stepper-item.completed .step-counter {
  background-color: #4bb543;
}
.stepper-item.completed::after, .stepper-item.completed::before {
  border-color: #4bb543;
}

.stepper-item.active .step-counter {
  background-color: var(--brand);
}

/* Direction-aware stepper lines */
[dir="rtl"] .stepper-item:first-child::before,
[dir="ltr"] .stepper-item:first-child::after {
  content: none;
}

[dir="rtl"] .stepper-item:last-child::after,
[dir="ltr"] .stepper-item:last-child::before {
  content: none;
}

.step-content {
  display: none;
}
.step-content.active {
  display: block;
  animation: fadeIn 0.5s;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 768px) {
  .stepper-item .step-counter {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
  }
  .stepper-item::before, .stepper-item::after {
    top: 15px;
  }
  .step-name {
    font-size: 0.8rem;
  }
}

@media (max-width: 576px) {
  .stepper-item::before, .stepper-item::after {
    display: none;
  }
  .stepper-wrapper {
    gap: 10px;
  }
}

/* Custom Input Group Styling for Login/Forms */
.input-group-formal {
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background-color: #fff;
  overflow: hidden;
  transition: all 0.2s ease-in-out;
  align-items: center;
}

.input-group-formal:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 .2rem rgba(76,134,175,.15);
}

.input-group-formal .input-group-text {
  background-color: transparent;
  border: none;
  color: var(--muted);
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.input-group-formal .form-control {
  border: none;
  box-shadow: none !important;
  background-color: transparent;
}

/* Modern Dashboard Improvements */
.dashboard-header { margin-bottom: 2rem; }

.stat-card { transition: transform 0.3s ease, box-shadow 0.3s ease; border: none; overflow: hidden; border-radius: 1rem; }
.stat-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.stat-card .stat-icon { width: 60px; height: 60px; border-radius: 1rem; font-size: 1.5rem; }

/* Service Cards (Step Cards) Overhaul */
.step-card { width: 100%; height: auto; min-height: 160px; background: #fff; border: 1px solid rgba(0,0,0,0.05); border-radius: 1.2rem; box-shadow: 0 4px 6px rgba(0,0,0,0.02); justify-content: center; gap: 0.8rem; padding: 1.5rem; display: flex; flex-direction: column; align-items: center; text-decoration: none; color: inherit; }
.step-card:hover { border-color: var(--brand); background: linear-gradient(145deg, #ffffff, #f0f7ff); transform: translateY(-5px) scale(1.02); box-shadow: 0 15px 30px rgba(76, 134, 175, 0.15); }
.step-card .step-icon { width: 64px; height: 64px; background: rgba(76, 134, 175, 0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 0.5rem; transition: all 0.3s ease; color: var(--brand); }
.step-card:hover .step-icon { background: var(--brand); color: #fff; transform: scale(1.1) rotate(5deg); }
.step-card .step-title { font-size: 1.1rem; font-weight: 700; color: #334155; transition: color 0.3s; text-align: center; }
.step-card:hover .step-title { color: var(--brand-dark); }

/* Subscription Card Special Styling */
.subscription-card { background: linear-gradient(135deg, #b07b2c 0%, #8c6223 100%); color: #fff !important; }
.subscription-card .stat-label { color: rgba(255,255,255,0.9) !important; }
.subscription-card .stat-value { color: #fff !important; }
.subscription-card .btn-renew { background: #fff; color: var(--brand); border: none; font-weight: 700; box-shadow: 0 4px 6px rgba(0,0,0,0.1); padding: 0.5rem 1rem; border-radius: 0.5rem; text-decoration: none; display: inline-block; transition: all 0.2s; }
.subscription-card .btn-renew:hover { background: #f8fafc; transform: scale(1.05); }
.subscription-card .stat-icon { background: rgba(255,255,255,0.2); color: #fff; }

/* Pulse Animation for urgent renewal */
@keyframes pulse-red { 0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); } 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); } }
.btn-pulse-urgent { animation: pulse-red 2s infinite; background: #dc2626 !important; color: white !important; }

/* Responsive Grid for Steps */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.5rem; padding: 1rem 0; }
@media (max-width: 576px) { .steps-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; } .step-card { min-height: 140px; padding: 1rem; } .step-card .step-icon { width: 48px; height: 48px; } .step-card .step-title { font-size: 0.9rem; } }

/* Payment Methods on Login */
.payment-methods-container { margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px dashed #e2e8f0; text-align: center; }
.payment-icons { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.payment-badge { height: 36px; border: 1px solid #e2e8f0; border-radius: 6px; background: #fff; display: flex; align-items: center; justify-content: center; padding: 0 8px; transition: all 0.2s; color: #475569; font-weight: 700; font-size: 0.75rem; box-shadow: 0 1px 2px rgba(0,0,0,0.02); }
.payment-badge:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 4px 6px rgba(0,0,0,0.05); color: var(--brand); }
.payment-badge img, .payment-badge svg { height: 20px; width: auto; display: block; }

/* cPanel Style Dashboard */
.cpanel-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}
.cpanel-main {
    flex: 1;
    min-width: 0;
}
.cpanel-sidebar {
    width: 320px;
    flex-shrink: 0;
}
@media (max-width: 991px) {
    .cpanel-sidebar { width: 100%; order: -1; margin-bottom: 20px; }
}

/* Search Bar */
.cpanel-search {
    margin-bottom: 25px;
    position: relative;
}
.cpanel-search input {
    width: 100%;
    padding: 12px 20px;
    padding-left: 45px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s;
}
.cpanel-search input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(176,123,44,0.1);
    outline: none;
}
.cpanel-search .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}
[dir='rtl'] .cpanel-search input { padding-left: 20px; padding-right: 45px; }
[dir='rtl'] .cpanel-search .search-icon { left: auto; right: 15px; }

/* Sections */
.cpanel-section {
    margin-bottom: 30px;
    background: #fff;
    border: 1px solid #d4d4d4;
    border-top: 3px solid var(--brand);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.cpanel-section-header {
    padding: 12px 15px;
    background: #f5f5f5;
    border-bottom: 1px solid #d4d4d4;
    font-weight: 700;
    color: #444;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.cpanel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    padding: 20px;
}

/* Items */
.cpanel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: #555;
    padding: 15px 10px;
    border-radius: 4px;
    transition: all 0.2s;
}
.cpanel-item:hover {
    background: #eef4ff;
    color: var(--brand);
    text-decoration: none;
    transform: translateY(-2px);
}
.cpanel-icon {
    width: 54px;
    height: 54px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: color 0.2s;
}
.cpanel-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 1.5;
}
.cpanel-item:hover .cpanel-icon {
    color: var(--brand);
}
.cpanel-label {
    font-size: 0.9rem;
    line-height: 1.3;
    font-weight: 600;
}

/* Sidebar Stats */
.cpanel-stats-box {
    background: #fff;
    border: 1px solid #d4d4d4;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}
.cpanel-stats-header {
    background: #444;
    color: #fff;
    padding: 12px 15px;
    font-weight: 700;
    font-size: 1rem;
}
.cpanel-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}
.cpanel-stat-row:last-child { border-bottom: none; }
.cpanel-stat-label { color: #666; }
.cpanel-stat-value { font-weight: 600; color: #333; }
.cpanel-stat-icon { color: #888; margin-right: 8px; font-size: 1.1em; vertical-align: middle; }
[dir='rtl'] .cpanel-stat-icon { margin-right: 0; margin-left: 8px; }

