/* Etquan  Dashboard - Main Stylesheet */

/* CSS Variables */
:root {
    --sidebar-width: 260px;
    --header-height: 60px;
    --sidebar-bg: #063A31;
    --body-bg:  #f5f7fa;
    --border-color: #FAECCF;
    --text-muted: #6b7280;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --transition-speed: 0.3s;
    --border-radius: 8px;
}

/* Base Styles */
body {
    background: var(--body-bg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ========================================
   SIDEBAR STYLES
======================================== */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    z-index: 1040;
    transition: width var(--transition-speed) ease, transform var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
    overflow: auto;
}

.sidebar.collapsed {
    width: 70px !important;
}

/* Hide text and submenus when collapsed */
.sidebar.collapsed .sidebar-nav .nav-link span,
.sidebar.collapsed .menu-section-title,
.sidebar.collapsed .submenu {
    display: none !important;
}

.sidebar.collapsed .sidebar-brand h5 {
    justify-content: center !important;
    font-size: 0 !important; /* Hide text */
}

.sidebar.collapsed .sidebar-brand h5 i {
    font-size: 1.5rem !important; /* Restore icon size */
}

.sidebar.collapsed .sidebar-brand span {
    display: none;
}

.sidebar.collapsed .nav-link {
    justify-content: center !important;
    padding: 0.625rem !important;
}

.sidebar.collapsed .nav-link i {
    margin-right: 0 !important;
}

/* Hide dropdown arrows when collapsed */
.sidebar.collapsed .nav-link.has-submenu::after {
    display: none !important;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand img{
width: 100px;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    text-decoration: none;
    flex-direction: row;
    justify-content: center;
}

.sidebar-brand h5 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    font-size: 1.25rem;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.sidebar-nav .nav-link {
    color: rgba(255,255,255,0.6);
    padding: 0.625rem 0.75rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
    position: relative;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

.sidebar-nav .nav-link.active {
      background: #FAECCF;
    color: #063A31;
}
.btn-outline-primary{
    background-color: #063A31 !important;
    border: #063A31 !important;
    color:#FAECCF !important;
}
/* Submenu Toggle Arrow */
.sidebar-nav .nav-link.has-submenu::after {
    content: '\F282';
    font-family: 'bootstrap-icons';
    position: absolute;
    right: 1rem;
    transition: transform 0.3s ease;
    font-size: 0.75rem;
    transform: rotate(-90deg);
}

.sidebar-nav .nav-link.has-submenu[aria-expanded="true"]::after {
    transform: rotate(0);
}

/* Submenu Styles */
.submenu {
    padding-left: 0;
    margin-top: 0.25rem;
}

.submenu.collapsing {
    transition: height 0.3s ease;
}

.submenu .nav-link {
    padding-left: 3rem;
    font-size: 0.875rem;
    color: rgb(255 255 255 / 75%);
}

.submenu .nav-link:hover {
    color: white;
    background: rgba(255,255,255,0.03);
}

.submenu .nav-link.active {
    /* color: white;
    background: rgba(99,102,241,0.2); */
        background: #FAECCF;
    color: #063A31;
}

.btn-primary{
background: #063A31 !important;
border: none !important;
}
.btn-success{
    background: #063A31 !important;
border: none !important;
}
.submenu .nav-link::before {
    content: '';
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
}

.menu-section {
    margin-bottom: 1.5rem;
}

.menu-section-title {
    color: rgba(255,255,255,0.4);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1039;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-speed) ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   MAIN WRAPPER
======================================== */

.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
}

.main-wrapper.full-width {
    margin-left: 70px;
}

@media (max-width: 768px) {
    .main-wrapper.full-width {
        margin-left: 0;
    }
}

/* ========================================
   HEADER STYLES
======================================== */

.top-navbar {
    background: white;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    height: var(--header-height);
    padding: 0 1rem;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.hamburger-menu {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #495057;
    cursor: pointer;
    padding: 0.375rem 0.625rem;
    border-radius: 6px;
    margin-right: 1rem;
}

.hamburger-menu:hover {
    background: #f8f9fa;
}

/* ========================================
   SEARCH STYLES
======================================== */

.search-container {
    position: relative;
}

.search-form {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    overflow: hidden;
    transition: width var(--transition-speed) ease;
    display: flex;
    align-items: center;
}

.search-form.active {
    width: 300px;
}

.search-form input {
    width: 100%;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 0.375rem 2.25rem;
    height: 36px;
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

.search-form.active input {
    opacity: 1;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.close-search {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

.search-form.active .close-search {
    opacity: 1;
}

.search-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-speed) ease;
    z-index: 999;
    pointer-events: none;
}

.search-backdrop.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ========================================
   BUTTON STYLES
======================================== */

.btn-icon {
    padding: 0.375rem 0.625rem;
    font-size: 1.125rem;
    border-radius: 6px;
}

/* ========================================
   USER & AVATAR STYLES
======================================== */

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

/* ========================================
   NOTIFICATION STYLES
======================================== */

.notification-dot {
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
    position: absolute;
    top: 6px;
    right: 6px;
    border: 2px solid white;
}

.notification-item {
    display: flex;
    gap: 0.625rem;
    padding: 0.625rem;
    border-radius: 8px;
    transition: background 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 0.875rem;
}

/* ========================================
   DROPDOWN STYLES
======================================== */

.dropdown-menu {
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    min-width: 280px;
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.dropdown-item:hover {
    background: #f3f4f6;
}

/* ========================================
   MOBILE RESPONSIVE
======================================== */

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0;
    }

    .search-form.active {
        width: 200px;
    }

    .hide-mobile {
        display: none !important;
    }

    .sidebar-close {
        display: block !important;
    }
}

@media (min-width: 769px) {
    .sidebar-close {
        display: none;
    }

    /* Desktop-only collapsed sidebar behavior */
    .sidebar.collapsed {
        width: 70px;
    }

    .main-wrapper.full-width {
        margin-left: 70px;
    }
}

/* ========================================
   DASHBOARD LAYOUT & COMPONENTS
======================================== */

/* Dashboard Content Area */
.dashboard-content {
    padding: 24px;
    flex: 1; /* Grow to fill available space */
}

/* Section Spacing */
.dashboard-row {
    margin-bottom: 24px;
}

/* Dashboard Cards */
.dashboard-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.06);
    transition: box-shadow 0.3s ease;
}

/* Direct content in dashboard-card without body wrapper */
.dashboard-card > *:not(.dashboard-card-header):not(.dashboard-card-body) {
    padding: 1.25rem;
}

.dashboard-card:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.06);
}

.dashboard-card-header {
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.dashboard-card-body {
    padding: 1.25rem;
}

.dashboard-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

/* Stats Cards */
.stats-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    padding: 20px;
}

.stats-card-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.stats-card-value {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.stats-card-change {
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
}

.stats-card-change.positive {
    background: #d1fae5;
    color: #065f46;
}

.stats-card-change.negative {
    background: #fee2e2;
    color: #991b1b;
}

/* Progress Bars */
.progress-custom {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-bar-custom {
    height: 100%;
    transition: width 0.6s ease;
}

/* Chart Containers */
.chart-wrapper {
    position: relative;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    padding: 20px;
}

.chart-container-main {
    position: relative;
    height: 350px;
    width: 100%;
}

.chart-container-small {
    position: relative;
    height: 60px;
    width: 100%;
}

/* Social Cards */
.social-stats-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    padding: 20px;
    display: flex;
    align-items: center;
}

.social-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 16px;
}

.social-icon-box.facebook {
    background: rgba(24, 119, 242, 0.1);
    color: #1877f2;
}

.social-icon-box.twitter,
.social-icon-box.x {
    background: rgba(0, 0, 0, 0.1);
    color: #000000;
}

.social-icon-box.linkedin {
    background: rgba(0, 119, 181, 0.1);
    color: #0077b5;
}

.social-icon-box.youtube {
    background: rgba(255, 0, 0, 0.1);
    color: #ff0000;
}

/* Table Styles */
.simple-table {
    width: 100%;
}

.simple-table-row {
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.simple-table-row:last-child {
    border-bottom: none;
}

/* Responsive Grid System */
.dashboard-grid {
    display: grid;
    gap: 20px;  /* Consistent spacing both vertical and horizontal */
}

.grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-content {
        padding: 16px;
    }

    .dashboard-row {
        margin-bottom: 16px;
    }

    .grid-cols-4,
    .grid-cols-3,
    .grid-cols-2 {
        grid-template-columns: repeat(1, 1fr);
    }

    .stats-card {
        padding: 16px;
    }

    .stats-card-value {
        font-size: 24px;
    }
}

/* Remove Bootstrap Conflicts - but allow gutters to work */
.row {
    margin: 0;
}

/* Removed column padding override to allow Bootstrap gutters to work */

.card-body {
    padding: 0;
}

.card {
    border: none;
    margin-bottom: 0;
}

/* Footer */
.dashboard-footer {
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 20px 0;
    margin-top: auto;
    font-size: 14px;
    color: #6b7280;
}

/* ========================================
   UTILITY CLASSES
======================================== */

.hide-mobile {
    display: none;
}

@media (min-width: 769px) {
    .hide-mobile {
        display: initial;
    }
}

/* Margin Utilities */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* Text Color Utilities */
.text-muted { color: #6b7280; }
.text-success { color: #10b981; }
.text-danger { color: #ef4444; }
.text-info { color: #3b82f6; }
.text-warning { color: #f59e0b; }

/* Text Size Utilities */
.text-sm { font-size: 14px; }
.text-xs { font-size: 12px; }

/* Font Weight Utilities */
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Flexbox Utilities */
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.fade:not(.show) {
    opacity: 1 !important;
}
.nav-link{
    color: #063A31 ;
}
.nav-pills .nav-link {
    border-radius: 10px;
    text-align: left;
    font-weight: 500;
}

.nav-pills .nav-link.active {
    background-color: #198754;
}

.nav-pills .nav-link:hover {
    background-color: #e9f7ef;
}
.nav-pills .nav-link.active {
    background-color: #063a31 !important;
}
.nav-tabs .nav-link.active{
    color: #faeccf !important;
    background-color: #063a31 !important;

}
.new-color{
    color: #063a31 !important;
}
.new-color:hover{
    color: #063a31 !important;
}
.mailbox-layout{
--main:#063a31;
}

.compose-btn{
background:#063a31;
color:white;
border:none;
}

.compose-btn:hover{
background:#042c26;
}

.mailbox-nav .nav-link{
display:flex;
align-items:center;
padding:12px 15px;
border-radius:8px;
color:#333;
margin-bottom:6px;
font-weight:500;
}

.mailbox-nav .nav-link.active{
background:#063a31;
color:white !important;
}

.mailbox-nav .badge{
background:#063a31;
}

.mailbox-main{
border-radius:10px;
overflow:hidden;
}

.mailbox-toolbar{
background:#f9fafb;
}

.icon-btn{
border:1px solid #e5e7eb;
background:white;
}

.icon-btn:hover{
background:#f3f4f6;
}

.mail-item{
display:flex;
gap:15px;
padding:16px;
border-bottom:1px solid #eee;
cursor:pointer;
transition:.2s;
}

.mail-item:hover{
background:#f9fafb;
}

.mail-item img{
width:40px;
height:40px;
border-radius:50%;
}

.mail-header{
display:flex;
gap:10px;
align-items:center;
}

.mail-time{
margin-left:auto;
font-size:13px;
color:#777;
}

.mail-subject{
font-weight:600;
}

.mail-preview{
font-size:13px;
color:#777;
}

.unread{
background:#f3f7f6;
}

.mail-label-title{
font-size:12px;
color:#888;
text-transform:uppercase;
margin-bottom:10px;
}

.mail-label{
display:flex;
align-items:center;
gap:8px;
font-size:14px;
margin-bottom:8px;
}

.dot{
width:10px;
height:10px;
border-radius:50%;
display:inline-block;
}

.label-academic{
background:#10b981;
}

.label-admin{
background:#f59e0b;
}

.label-urgent{
background:#ef4444;
}

@media (max-width:991px){

.mailbox-sidebar-col{
order:2;
}

.mailbox-main{
order:1;
}

}
.nav-pills .nav-link.active{
    color:white !important;
}
