/* =======================
   RTL / LTR handling
   ======================= */

body.fa .admin-panel,
body.fa .admin-panel * {
    direction: rtl;
    text-align: right;
}

body.en .admin-panel,
body.en .admin-panel *,
body.tr .admin-panel,
body.tr .admin-panel * {
    direction: ltr;
    text-align: left;
}

/* =======================
   Admin Layout
   ======================= */

.admin-panel {
    display: flex;
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7eb;
    font-family: 'Vazir', sans-serif;
    overflow: hidden;
    
    height: 100% !important;
    overflow: hidden !important;
    min-height: 0 !important;
}

/* =======================
   Sidebar (LEFT PANEL)
   ======================= */






/* ============================================================================================
   Form Content
   ============================================================================================ */

.admin-form input,
.admin-form select,
.admin-form textarea,
.admin-table input,
.admin-table select,
.admin-form-select {
    width: 100%;
    max-width: 500px;
    padding: 12px;
    background: #111827;
    border: 1px solid #374151;
    border-radius: 8px;
    color: #e5e7eb;
    font-size: 16px;
    margin-bottom: 20px;
    outline: none;    
}

.admin-form .form-row{
    display: flex;
    flex-direction: row;
    gap: 12px;
}

.admin-form .form-row > * {
    flex: 1;
}

.admin-form .form-group{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.admin-form label {
    display: block;
    margin-bottom: 8px;
    color: #e5e7eb;
    font-weight: 500;
}

.admin-form-group {
    display: flex;
    flex-direction: column; 
}


/* =======================
   TABLE Content
   ======================= */
.admin-table-wrapper {
    width: 100%;
    overflow-x: auto;
}


.admin-table {
    width: 100%;
    min-width: 600px;  /* حداقل عرض جدول */
    border-collapse: collapse;
    background: #111827;
    border-radius: 8px;
}

.admin-table thead{
    background: #1c263c;
    opacity: 0.8;

}

.admin-table th {
    color: #fff;
    padding: 15px;
    text-align: center;
    font-weight: bold;

}

.admin-table td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #374151;
    color: #e5e7eb;
}




/* =======================
   Main Content
   ======================= */

.admin-content {
    flex: 1;
    /* height: 100vh; */
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 26px;


  position: relative !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 26px !important;

    
}

/* glass container */
.admin-card-section {
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.9);
    margin-bottom: 24px;
    background: linear-gradient(
        145deg,
        rgba(24, 32, 44, 0.92),
        rgba(31, 41, 55, 0.88)
    );
    backdrop-filter: blur(11px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06);
}



.admin-card-title {
    margin-bottom: 1rem;
}

/* =======================
   Tables
   ======================= */

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.admin-table th,
.admin-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    font-size: 0.9rem;
}

.admin-table th {
    font-weight: 600;
    color: #f9fafb;
    background: rgba(15, 23, 42, 0.6);
}

.admin-table tr:hover td {
    background: rgba(30, 41, 59, 0.55);
}

/* =======================
   Buttons
   ======================= */

.admin-btn {
    padding: 8px 16px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.18s ease;
}

.admin-btn.primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #0f172a;
}

.admin-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.35);
}

.admin-btn.danger {
    background: rgba(220, 38, 38, 0.9);
    color: #fff;
}

.admin-btn.danger:hover {
    background: rgba(239, 68, 68, 1);
}

/* =======================
   Scrollbar (match chat)
   ======================= */

.admin-content::-webkit-scrollbar {
    width: 6px;
}

.admin-content::-webkit-scrollbar-track {
    background: transparent;
}

.admin-content::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.5);
    border-radius: 999px;
}



/* =======================
   charts/
   ======================= */

.chart-container {
    max-height: 400px;  /* Adjust this value as needed */
    position: relative;
    
}

.chart-container canvas {
    max-height: 100%;
    width: 100% !important;
}

/* =======================
   Status boxes
   ======================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-box {
    background: #111827;
    color: white;
    padding: 20px;
    border-radius: 12px;
}

.stat-box span {
    font-size: 13px;
    opacity: 0.7;
}

.stat-box strong {
    display: block;
    font-size: 28px;
    margin-top: 8px;
}

.stat-box.highlight {
    background: #065f46;
}

/* =======================
   Mobile
   ======================= */





/*  */

.back-wrapper{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.back-wrapper a{
    text-decoration: none;
    color: #fff;
}