
:root {
    --primary: #4361ee;
    --primary-light: #eef2ff;
    --primary-dark: #3a56d4;
    --secondary: #2b2d42;
    --accent: #ef476f;
    --success: #06d6a0;
    --warning: #ffd166;
    --danger: #ef476f;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Vazirmatn, Tahoma, Arial, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: var(--gray-800);
    direction: rtl;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Add these navbar styles to the main stylesheet */
.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--gray-200);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-icon img {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 5px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.navbar-logo {
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 20px;
}

.navbar-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--secondary);
}

.navbar-menu {
    display: flex;
    gap: 5px;
}

.navbar-link {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-link:hover {
    background-color: var(--gray-100);
    color: var(--gray-800);
}

.navbar-link.active {
    background-color: var(--primary-light);
    color: var(--primary);
}

.navbar-link.logout {
    color: var(--danger);
}

.navbar-link.logout:hover {
    background-color: rgba(239, 71, 111, 0.1);
}

.navbar-icon {
    font-size: 18px;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

.user-info {
    display: none;
}

.user-name {
    font-weight: 500;
    color: var(--gray-800);
    font-size: 14px;
}

.user-role {
    color: var(--gray-500);
    font-size: 12px;
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--gray-600);
    font-size: 24px;
}

/* Show user info on larger screens */
@media (min-width: 768px) {
    .user-info {
        display: block;
    }
}

/* Mobile navbar styles */
@media (max-width: 768px) {
    .navbar-container {
        height: 60px;
    }

    .navbar-toggle {
        display: block;
    }

    .navbar-menu {
        position: fixed;
        top: 60px;
        right: -100%;
        width: 250px;
        height: calc(100vh - 60px);
        background-color: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 100;
    }

    .navbar-menu.active {
        right: 0;
    }

    .navbar-link {
        padding: 12px 16px;
    }

    .navbar-user {
        margin-top: auto;
        padding: 15px;
        border-top: 1px solid var(--gray-200);
        width: 100%;
    }

    .user-info {
        display: block;
    }
}

/* Adjust header styles to work with navbar */
header {
    margin-top: 20px;
    margin-bottom: 20px;
}

header h1 {
    border-bottom: none;
    padding-bottom: 0;
}

header h1:after {
    display: none;
}

.page-title {
    color: var(--secondary);
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
}

.panel {
    background-color: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 25px;
    margin-bottom: 30px;
}

.section {
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--gray-200);
    position: relative;
}

.section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

h2 {
    color: var(--secondary);
    font-size: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

h2:before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 18px;
    background-color: var(--primary);
    margin-left: 10px;
    border-radius: var(--radius-sm);
}

h3 {
    color: var(--gray-700);
    font-size: 16px;
    margin-bottom: 12px;
}

.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--gray-200);
    gap: 5px;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-600);
    transition: all 0.3s;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    position: relative;
    font-weight: 500;
}

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

.tab-btn.active {
    color: var(--primary);
    background-color: var(--primary-light);
}

.tab-btn.active:after {
    content: "";
    position: absolute;
    bottom: -1px;
    right: 0;
    left: 0;
    height: 2px;
    background-color: var(--primary);
}

.tab-content {
    display: none;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-box {
    margin-bottom: 15px;
    position: relative;
}

.search-box:before {
    content: "🔍";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    font-size: 14px;
}

.search-box input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

.selection-list {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    background-color: white;
}

.list-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
}

.list-item:hover {
    background-color: var(--gray-100);
}

.list-item:last-child {
    border-bottom: none;
}

.list-item input[type="checkbox"] {
    margin-left: 12px;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-400);
    border-radius: var(--radius-sm);
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}

.list-item input[type="checkbox"]:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.list-item input[type="checkbox"]:checked:after {
    content: "✓";
    position: absolute;
    color: white;
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.list-item label {
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-700);
}

.selected-recipients {
    margin-top: 25px;
    background-color: var(--gray-100);
    padding: 15px;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

#selected-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.selected-tag {
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 13px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.selected-tag:hover {
    background-color: rgba(67, 97, 238, 0.2);
}

.remove-tag {
    margin-right: 8px;
    cursor: pointer;
    color: var(--primary);
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    transition: all 0.2s;
}

.remove-tag:hover {
    background-color: rgba(67, 97, 238, 0.3);
    color: white;
}

.message-type {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: var(--gray-100);
    border-radius: var(--radius-md);
}

.radio-group {
    display: flex;
    align-items: center;
}

.radio-group input[type="radio"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-400);
    border-radius: 50%;
    margin-left: 10px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}

.radio-group input[type="radio"]:checked {
    border-color: var(--primary);
}

.radio-group input[type="radio"]:checked:after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--primary);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.radio-group label {
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: var(--gray-700);
}

select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 15px center;
    padding-left: 40px;
}

textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.6;
}

.variables {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.variable-btn {
    background-color: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(67, 97, 238, 0.3);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.variable-btn:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.preview-box {
    background-color: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: 20px;
    min-height: 120px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

#message-preview {
    white-space: pre-line;
    line-height: 1.8;
    color: var(--gray-800);
}

.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

.primary-btn,
.secondary-btn {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.primary-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    box-shadow: var(--shadow-sm);
}

.primary-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.primary-btn:active {
    transform: translateY(0);
}

.primary-btn:disabled {
    background-color: var(--gray-400);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.secondary-btn {
    background-color: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.secondary-btn:hover {
    background-color: var(--gray-100);
    border-color: var(--gray-400);
}

.notification {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--success);
    color: white;
    padding: 15px 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    transition: bottom 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 1000;
    min-width: 300px;
    text-align: center;
    font-weight: 500;
}

.notification.show {
    bottom: 30px;
}

/* Custom scrollbar */
.selection-list::-webkit-scrollbar {
    width: 8px;
}

.selection-list::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 10px;
}

.selection-list::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 10px;
}

.selection-list::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Responsive styles */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .panel {
        padding: 20px 15px;
    }

    .tabs {
        flex-direction: column;
        gap: 0;
    }

    .tab-btn {
        width: 100%;
        text-align: right;
        border-radius: 0;
    }

    .tab-btn.active:after {
        height: 100%;
        width: 3px;
        top: 0;
        bottom: 0;
        left: auto;
    }

    .message-type {
        flex-direction: column;
        gap: 15px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
    }

    .variables {
        gap: 8px;
    }

    .variable-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 22px;
    }

    h2 {
        font-size: 18px;
    }

    .section {
        margin-bottom: 25px;
        padding-bottom: 20px;
    }

    .notification {
        min-width: 90%;
        padding: 12px 15px;
    }
}
