﻿/* Reset Styles */
.dash-reset {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Yekan', 'B Nazanin', Tahoma, sans-serif;
}

.dash-body {
    background-color: #f8fafc;
    color: #1e293b;
}

/* Layout */
.dash-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Navigation */
.dash-navbar {
    width: 100%;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.dash-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    height: 4.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.dash-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dash-logo {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
}

.dash-brand-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.dash-user-area {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.dash-notification {
    position: relative;
    cursor: pointer;
}

.dash-badge {
    position: absolute;
    top: -0.5rem;
    left: -0.5rem;
    background-color: #ef4444;
    color: white;
    border-radius: 50%;
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e3a8a;
    font-weight: bold;
}

.dash-menu-toggle {
    cursor: pointer;
    font-size: 1.5rem;
    display: none;
}

/* Main Menu */
.dash-menu-wrapper {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-out;
}

    .dash-menu-wrapper.active {
        max-height: 500px;
    }

.dash-menu {
    display: flex;
    flex-direction: column;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.dash-menu-item {
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    border-right: 4px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #e2e8f0;
}

    .dash-menu-item:hover, .dash-menu-item.active {
        background-color: rgba(255, 255, 255, 0.1);
        border-right-color: #f59e0b;
        color: white;
    }

/* Main Content */
.dash-main {
    flex: 1;
    padding: 1.5rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.dash-header {
    background-color: white;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dash-title {
    font-size: 1.5rem;
    color: #1e3a8a;
    font-weight: 700;
}

/* Cards */
.dash-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.dash-card-header {
    padding: 1.25rem 1.5rem;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .dash-card-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.dash-card-title {
    font-size: 1.125rem;
    color: #1e3a8a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dash-card-body {
    padding: 1.5rem;
}

/* Messages */
.dash-message-list {
    list-style: none;
}

.dash-message-item {
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

    .dash-message-item:last-child {
        border-bottom: none;
    }

.dash-message-icon {
    width: 2.5rem;
    height: 2.5rem;
    background-color: #eff6ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d4ed8;
    flex-shrink: 0;
    font-size: 1.25rem;
}

.dash-message-content {
    flex: 1;
    overflow: hidden;
}

.dash-message-title {
    font-weight: 100;
    font-size : 20px;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.dash-message-text {
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.dash-message-date {
    color: #94a3b8;
    font-size: 0.75rem;
}

/* Orders Table */
.dash-table-container {
    overflow-x: auto;
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    min-width: 600px;
}

    .dash-table th {
        background-color: #f8fafc;
        padding: 0.75rem 1rem;
        text-align: right;
        font-weight: 600;
        color: #475569;
        border-bottom: 1px solid #e2e8f0;
    }

    .dash-table td {
        padding: 1rem;
        text-align: right;
        border-bottom: 1px solid #e2e8f0;
        color: #334155;
    }

.dash-status {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
}

.dash-status-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.dash-status-success {
    background-color: #dcfce7;
    color: #166534;
}

.dash-status-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Articles */
.dash-article {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
}

@media (min-width: 768px) {
    .dash-article {
        flex-direction: row;
    }
}

.dash-article-image {
    width: 100%;
    height: 10rem;
    background-color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

@media (min-width: 768px) {
    .dash-article-image {
        width: 12rem;
        height: auto;
    }
}

.dash-article-content {
    flex: 1;
    padding: 1.25rem;
}

.dash-article-title {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1e3a8a;
    font-size: 1.125rem;
}

.dash-article-text {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.dash-article-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.75rem;
}

@media (min-width: 768px) {
    .dash-article-meta {
        flex-direction: row;
    }
}

/* Buttons */
.dash-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
}

.dash-btn-primary {
    background-color: #1d4ed8;
    color: white;
}

    .dash-btn-primary:hover {
        background-color: #1e40af;
    }

.dash-btn-outline {
    background-color: transparent;
    border: 1px solid #1d4ed8;
    color: #1d4ed8;
}

    .dash-btn-outline:hover {
        background-color: #eff6ff;
    }

/* Responsive */
@media (max-width: 767px) {
    .dash-menu-toggle {
        display: block;
    }

    .dash-menu {
        padding: 0.5rem 0;
    }

    .dash-menu-item {
        padding: 0.875rem 1.25rem;
    }
}

@media (min-width: 768px) {
    .dash-menu-wrapper {
        max-height: none !important;
    }

    .dash-menu {
        flex-direction: row;
        padding: 0 1.5rem;
    }

    .dash-menu-item {
        border-right: none;
        border-bottom: 4px solid transparent;
    }

        .dash-menu-item:hover, .dash-menu-item.active {
            border-right: none;
            border-bottom-color: #f59e0b;
        }

    .dash-main {
        padding: 2rem;
    }
}

/* استایل‌های پایه */
.messages-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

/* کارت پیام */
.msg-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

    .msg-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    }

/* انواع کارت‌ها */
.msg-card-unread {
    border-right: 4px solid #3b82f6;
}

.msg-card-important {
    border-right: 4px solid #f59e0b;
}

.msg-card-system {
    border-right: 4px solid #10b981;
}

/* هدر کارت */
.msg-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.msg-card-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    color: #1e293b;
}

.msg-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.msg-card-icon-unread {
    background-color: gray;
}

.msg-card-icon-important {
    background-color: #f59e0b;
}

.msg-card-icon-system {
    background-color: #10b981;
}

.msg-card-time {
    font-size: 0.85rem;
    color: #64748b;
}

/* بدنه کارت */
.msg-card-body {
    padding: 1.5rem;
}

.msg-card-sender {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.msg-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
}

    .msg-card-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.msg-card-sender-info h4 {
    font-size: 1rem;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.msg-card-sender-info p {
    font-size: 0.85rem;
    color: #64748b;
}

.msg-card-content h3 {
    font-size: 1.1rem;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.msg-card-content p {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

/* فوتر کارت */
.msg-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    background-color: #f8fafc;
}

.msg-card-tags {
    display: flex;
    gap: 0.5rem;
}

.msg-card-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    background-color: #e2e8f0;
    color: #475569;
}

.msg-card-actions {
    display: flex;
    gap: 0.5rem;
}

.msg-card-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e2e8f0;
    color: #475569;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

    .msg-card-btn:hover {
        background-color: #cbd5e1;
    }

/* رسپانسیو */
@media (max-width: 768px) {
    .messages-container {
        grid-template-columns: 1fr;
    }

    .msg-card {
        max-width: 100%;
    }
}