/* admin/assets/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tahoma', 'IRANSans', sans-serif;
    background: #f5f6fa;
    color: #2c3e50;
    direction: rtl;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.header h1 {
    font-size: 1.5rem;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logout-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 5px 15px;
    border-radius: 8px;
    text-decoration: none;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.nav-tabs a {
    background: white;
    color: #2c3e50;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s;
}

.nav-tabs a:hover {
    background: #e0e0e0;
}

.nav-tabs a.active {
    background: #667eea;
    color: white;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    color: #7f8c8d;
    margin-top: 5px;
}

/* Two Columns */
.two-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 20px;
}

/* Cards */
.card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.card h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
    color: #2c3e50;
}

/* Message List */
.message-list {
    max-height: 500px;
    overflow-y: auto;
}

.message-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.message-item:hover {
    background: #f8f9fa;
}

.message-user {
    font-weight: bold;
    margin-bottom: 5px;
}

.message-user span {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-right: 10px;
}

.message-text {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.message-time {
    font-size: 0.75rem;
    color: #999;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reply-link {
    color: #27ae60;
    text-decoration: none;
}

/* Broadcast List */
.broadcast-list {
    max-height: 500px;
    overflow-y: auto;
}

.broadcast-item-link {
    text-decoration: none;
    color: inherit;
}

.broadcast-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
    transition: all 0.3s;
}

.broadcast-item:hover {
    background: #f8f9fa;
}

.broadcast-item.selected {
    background: #e8eaf6;
    border-right: 3px solid #667eea;
}

.broadcast-id {
    font-weight: bold;
    margin-bottom: 5px;
}

.broadcast-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    margin-bottom: 8px;
}

.broadcast-status.pending {
    background: #f39c12;
    color: white;
}

.broadcast-status.sending {
    background: #3498db;
    color: white;
}

.broadcast-status.completed {
    background: #27ae60;
    color: white;
}

.broadcast-status.cancelled {
    background: #e74c3c;
    color: white;
}

.broadcast-stats {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.broadcast-time {
    font-size: 0.7rem;
    color: #999;
    display: flex;
    justify-content: space-between;
}

/* Users Table */
.users-table {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #eee;
}

th {
    background: #f8f9fa;
    font-weight: bold;
}

tr.blocked {
    background: #ffebee;
    color: #c62828;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-small {
    padding: 4px 10px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.75rem;
}

.btn-small.reply {
    background: #27ae60;
    color: white;
}

.btn-small.block {
    background: #e74c3c;
    color: white;
}

.btn-small.unblock {
    background: #f39c12;
    color: white;
}

/* Form */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
}

.or-divider {
    text-align: center;
    margin: 10px 0;
    color: #999;
}

.help-text {
    font-size: 0.75rem;
    color: #999;
    margin-top: 5px;
}

/* Buttons */
.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
}

/* Alert */
.alert {
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.empty {
    text-align: center;
    padding: 30px;
    color: #999;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination a {
    padding: 5px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #2c3e50;
}

.pagination a.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Search Box */
.search-box {
    margin-bottom: 20px;
}

.search-box form {
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.search-box button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* Progress Bar */
.progress-bar {
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    height: 20px;
}

.progress-fill {
    background: #27ae60;
    height: 100%;
    transition: width 0.3s;
}

.progress-text {
    text-align: center;
    margin-top: 5px;
    font-size: 0.8rem;
}

/* Stats Bars */
.stats-bars {
    margin-top: 10px;
}

.stat-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.bar-label {
    font-weight: normal;
}

.bar-value {
    font-weight: bold;
}

/* User List */
.user-list {
    max-height: 400px;
    overflow-y: auto;
}

.user-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.user-name {
    font-weight: bold;
}

.user-info {
    font-size: 0.75rem;
    color: #7f8c8d;
}

.seen-time, .sent-time {
    font-size: 0.7rem;
    color: #999;
    margin-top: 3px;
}

/* Help List */
.help-list {
    list-style: none;
    padding: 0;
}

.help-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

/* Info List */
.info-list {
    margin-top: 10px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.info-label {
    font-weight: bold;
}

.info-value {
    color: #555;
}

/* Stats Preview */
.stats-preview {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 10px;
    margin: 15px 0;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.login-box h1 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.login-input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .two-columns {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-tabs {
        justify-content: center;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}