/* =========================================
   1. FONTS & RESET
   ========================================= */
@font-face {
    font-family: 'Jameel Noori';
    src: url('http://almarkazulislami.com/wp-content/fonts/jameel-noori.ttf');
    font-weight: normal;
    font-style: normal;
}

.dif-wrapper, .dif-wrapper * {
    font-family: 'Jameel Noori', serif !important;
    box-sizing: border-box;
}

:root {
    --dif-brand: #2c3e50;    /* Dark Blue */
    --dif-accent: #f1c40f;   /* Gold/Yellow */
    --dif-bg: #f4f6f8;       /* Light Grey */
    --dif-border: #e1e4e8;
    --dif-success: #27ae60;
    --dif-danger: #c0392b;
    --dif-text: #333;
}

/* =========================================
   2. LAYOUT GRID (SIDEBAR + CONTENT)
   ========================================= */
.dif-wrapper {
    display: flex;
    direction: rtl;
    width: 100%;
    min-height: 800px;
    background: var(--dif-bg);
    border: 1px solid #ddd;
}

.dif-sidebar {
    width: 260px;
    background: var(--dif-brand);
    color: white;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.dif-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background: var(--dif-bg);
}

/* =========================================
   3. SIDEBAR MENU
   ========================================= */
.dif-sb-header {
    padding: 25px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.1);
}

.dif-menu-item {
    display: block;
    padding: 15px 25px;
    color: #ecf0f1;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 18px;
    transition: all 0.2s ease;
}

.dif-menu-item:hover {
    background: rgba(255,255,255,0.1);
    padding-right: 35px; /* Slide effect */
}

.dif-menu-item.active {
    background: var(--dif-accent);
    color: #2c3e50;
    font-weight: bold;
    border-right: 5px solid white;
}

/* =========================================
   4. PANELS & CARDS
   ========================================= */
.dif-panel {
    display: none; /* Hidden by default */
    animation: difFadeIn 0.3s ease;
}

.dif-panel.active {
    display: block; /* Visible when active */
}

.dif-card {
    background: white;
    border: 1px solid var(--dif-border);
    border-radius: 6px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    margin-bottom: 20px;
}

@keyframes difFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   5. FORMS & INPUTS
   ========================================= */
.dif-form-group { margin-bottom: 15px; }

.dif-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
    font-size: 16px;
}

.dif-input, .dif-select, .dif-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    background: #fff;
}

.dif-textarea { min-height: 150px; }

.dif-input:focus {
    border-color: var(--dif-brand);
    outline: none;
}

/* =========================================
   6. BUTTONS
   ========================================= */
.dif-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    color: white;
    background: var(--dif-brand);
    display: inline-block;
    text-align: center;
    text-decoration: none;
}
.dif-btn:hover { opacity: 0.9; }
.btn-green { background: var(--dif-success); }
.btn-red { background: var(--dif-danger); }
.btn-gold { background: var(--dif-accent); color: #333; }
.btn-sm { padding: 5px 10px; font-size: 14px; }
.btn-block { width: 100%; }

/* =========================================
   7. TABLES & TREES
   ========================================= */
.dif-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
}
.dif-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: right;
    border-bottom: 2px solid var(--dif-border);
    font-weight: bold;
}
.dif-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

/* Tree View Visuals */
.tree-l1 { font-weight: bold; color: #000; }
.tree-l2 { padding-right: 30px; position: relative; color: #555; }
.tree-l2::before { content: "—"; position: absolute; right: 10px; color: #ccc; }
.tree-l3 { padding-right: 60px; position: relative; color: #777; }
.tree-l3::before { content: "——"; position: absolute; right: 10px; color: #ccc; }

/* =========================================
   8. PUBLIC FRONTEND GRID
   ========================================= */
.dif-pub-grid {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 0;
    border: 1px solid var(--dif-border);
    background: white;
}
.dif-col {
    padding: 25px;
    border-left: 1px solid var(--dif-border);
}
.dif-col:last-child { border-left: none; }

.dif-section-head {
    color: var(--dif-brand);
    border-bottom: 2px solid var(--dif-brand);
    font-size: 20px;
    font-weight: bold;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.dif-link-item {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
    text-decoration: none;
    font-size: 17px;
}
.dif-link-item:hover { color: var(--dif-success); padding-right: 5px; transition:0.2s; }

/* =========================================
   9. MOBILE RESPONSIVE
   ========================================= */
@media (max-width: 850px) {
    .dif-wrapper { flex-direction: column; }
    .dif-sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto; /* Horizontal Scroll */
        white-space: nowrap;
    }
    .dif-sb-header { display: none; }
    .dif-menu-item { border-bottom: none; border-left: 1px solid rgba(255,255,255,0.1); }
    
    .dif-pub-grid { display: flex; flex-direction: column; }
    .dif-col { border-left: none; border-bottom: 1px solid var(--dif-border); }
}