/**
 * Punesim.com - Shared Dashboard Styles
 */

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background-color: var(--gray-light);
}

/* Sidebar */
.dashboard-sidebar {
    width: 260px;
    background-color: var(--white);
    border-right: 1px solid var(--gray);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo {
    display: flex;
    align-items: center;
}

.sidebar-logo img {
    height: 40px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: var(--mobile-font-size-xl);
}

.sidebar-user {
    padding: 20px;
    border-bottom: 1px solid var(--gray);
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--primary-very-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: var(--mobile-font-size-xl);
    font-weight: 600;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: var(--mobile-font-size-base);
}

.user-role {
    color: var(--text-light);
    font-size: var(--mobile-font-size-sm);
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-section {
    margin-bottom: 20px;
}

.nav-section-title {
    padding: 0 20px;
    margin-bottom: 10px;
    color: var(--text-light);
    font-size: var(--mobile-font-size-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-size: var(--mobile-font-size-base);
}

.nav-link:hover {
    background-color: var(--primary-very-light);
    color: var(--primary-color);
}

.nav-link.active {
    background-color: var(--primary-very-light);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.nav-icon {
    margin-right: 15px;
    font-size: var(--mobile-font-size-lg);
    width: 20px;
    text-align: center;
}

.nav-badge {
    margin-left: auto;
    background-color: var(--primary-color);
    color: var(--white);
    font-size: var(--mobile-font-size-sm);
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--gray);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: var(--mobile-font-size-base);
}

.logout-btn:hover {
    color: var(--primary-color);
}

/* Main Content */
.dashboard-main {
    flex: 1;
    margin-left: 260px;
    transition: margin-left 0.3s ease;
}

/* Header */
.dashboard-header {
    background-color: var(--white);
    padding: 15px 30px;
    border-bottom: 1px solid var(--gray);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 99;
}

.header-title h1 {
    font-size: var(--mobile-font-size-xl);
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.header-title p {
    color: var(--text-light);
    margin: 5px 0 0;
    font-size: var(--mobile-font-size-sm);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: var(--mobile-font-size-xl);
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.action-btn:hover {
    color: var(--primary-color);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--primary-color);
    color: var(--white);
    font-size: var(--mobile-font-size-sm);
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.dropdown-toggle .user-avatar {
    width: 40px;
    height: 40px;
}

.dropdown-toggle .user-name {
    margin: 0;
    font-size: var(--mobile-font-size-base);
}

.dropdown-toggle .dropdown-icon {
    font-size: var(--mobile-font-size-sm);
    transition: transform 0.3s ease;
}

.dropdown-toggle.active .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    padding: 10px 0;
    margin-top: 10px;
    z-index: 100;
    display: none;
}

.dropdown-menu.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.3s ease;
    font-size: var(--mobile-font-size-base);
}

.dropdown-item:hover {
    background-color: var(--gray-light);
}

.dropdown-item i {
    font-size: var(--mobile-font-size-base);
    width: 20px;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--gray);
    margin: 10px 0;
}

/* Content */
.dashboard-content {
    padding: 30px;
}

/* Cards */
.card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    overflow: hidden;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: var(--mobile-font-size-lg);
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.card-actions {
    display: flex;
    gap: 10px;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--gray);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--mobile-font-size-xl);
    flex-shrink: 0;
}

.stat-icon.primary {
    background-color: var(--primary-very-light);
    color: var(--primary-color);
}

.stat-icon.success {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.stat-icon.warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.stat-icon.danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: var(--mobile-font-size-xl);
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 5px;
}

.stat-label {
    color: var(--text-light);
    margin: 0;
    font-size: var(--mobile-font-size-base);
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: var(--mobile-font-size-sm);
    margin-top: 5px;
}

.stat-change.positive {
    color: #28a745;
}

.stat-change.negative {
    color: #dc3545;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--gray);
    font-size: var(--mobile-font-size-base);
}

.dashboard-table th {
    font-weight: 600;
    color: var(--text-color);
    background-color: var(--gray-light);
}

.dashboard-table tr:last-child td {
    border-bottom: none;
}

.dashboard-table tbody tr {
    transition: background-color 0.3s ease;
}

.dashboard-table tbody tr:hover {
    background-color: var(--gray-light);
}

.table-actions {
    display: flex;
    gap: 10px;
}

.table-action {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    background-color: var(--gray-light);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: var(--mobile-font-size-base);
}

.table-action:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.table-action.view:hover {
    background-color: var(--primary-color);
}

.table-action.edit:hover {
    background-color: #28a745;
}

.table-action.delete:hover {
    background-color: #dc3545;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: var(--mobile-font-size-sm);
    font-weight: 600;
    text-align: center;
}

.status-badge.active {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.status-badge.pending {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.status-badge.rejected {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.status-badge.draft {
    background-color: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
    font-size: var(--mobile-font-size-base);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--gray);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: var(--mobile-font-size-base);
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.form-col {
    flex: 1;
    min-width: 200px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--gray);
    margin-bottom: 20px;
}

.tab {
    padding: 15px 20px;
    color: var(--text-color);
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    font-size: var(--mobile-font-size-base);
}

.tab:hover {
    color: var(--primary-color);
}

.tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 5px;
}

.pagination-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    background-color: var(--white);
    border: 1px solid var(--gray);
    color: var(--text-color);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: var(--mobile-font-size-base);
}

.pagination-item:hover {
    background-color: var(--primary-very-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    cursor: default;
}

.pagination-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive */
@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .header-title h1 {
        font-size: var(--desktop-font-size-xl);
    }

    .header-title p {
        font-size: var(--desktop-font-size-sm);
    }

    .action-btn {
        font-size: var(--desktop-font-size-xl);
    }

    .notification-badge {
        font-size: var(--desktop-font-size-sm);
    }

    .dropdown-toggle .user-name {
        font-size: var(--desktop-font-size-base);
    }

    .dropdown-toggle .dropdown-icon {
        font-size: var(--desktop-font-size-sm);
    }

    .dropdown-item {
        font-size: var(--desktop-font-size-base);
    }

    .dropdown-item i {
        font-size: var(--desktop-font-size-base);
    }

    .card-title {
        font-size: var(--desktop-font-size-lg);
    }

    .stat-icon {
        font-size: var(--desktop-font-size-xl);
    }

    .stat-value {
        font-size: var(--desktop-font-size-xl);
    }

    .stat-label {
        font-size: var(--desktop-font-size-base);
    }

    .stat-change {
        font-size: var(--desktop-font-size-sm);
    }

    .dashboard-table th,
    .dashboard-table td {
        font-size: var(--desktop-font-size-base);
    }

    .table-action {
        font-size: var(--desktop-font-size-base);
    }

    .status-badge {
        font-size: var(--desktop-font-size-sm);
    }

    .form-group label {
        font-size: var(--desktop-font-size-base);
    }

    .form-control {
        font-size: var(--desktop-font-size-base);
    }

    .tab {
        font-size: var(--desktop-font-size-base);
    }

    .pagination-item {
        font-size: var(--desktop-font-size-base);
    }
}

@media (min-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 991px) {
    .dashboard-sidebar {
        transform: translateX(-100%);
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1000;
    }

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

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

    .sidebar-toggle {
        display: block;
    }

    .mobile-sidebar-toggle {
        display: block;
    }
}

/* Mobile Menu Toggle */
.mobile-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: var(--mobile-font-size-xl);
    cursor: pointer;
    margin-right: 15px;
}

@media (max-width: 991px) {
    .mobile-sidebar-toggle {
        display: block;
    }
}

/* Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.sidebar-overlay.active {
    display: block;
}