@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    min-height: 100vh;
    padding: 20px;
    direction: rtl;
    position: relative;
    background: #0a1628;
}

/* پس‌زمینه با تصویر بین‌الحرمین (1.jpg) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    opacity: 0.5;
    z-index: 0;
}

/* لایه نیمه شفاف روی تصویر */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 22, 40, 0.5);
    z-index: 0;
}

.container {
    max-width: 850px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 25px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 2px #0056b3, 0 0 0 5px #0a1628;
    overflow: hidden;
    padding: 40px 45px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(0, 86, 179, 0.15);
}

/* تزئینات بالای فرم */
/*.container::before {*/
/*    content: '🏥 سازمان نظام پرستاری';*/
/*    display: block;*/
/*    text-align: center;*/
/*    font-size: 14px;*/
/*    color: #0056b3;*/
/*    margin-bottom: 10px;*/
/*    font-weight: bold;*/
/*    letter-spacing: 1px;*/
/*}*/

.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0 25px;
    border-bottom: 3px solid #0056b3;
    position: relative;
}

.header::after {
    content: '✦';
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 0 15px;
    color: #0056b3;
    font-size: 22px;
}

.logo {
    max-width: 120px;
    margin-bottom: 15px;
    border-radius: 24%;
    border: 3px solid #0056b3;
    padding: 5px;
    background: white;
    box-shadow: 0 0 30px rgba(0, 86, 179, 0.15);
}

.header h1 {
    color: #0a1628;
    font-size: 28px;
    margin: 10px 0 5px;
    text-shadow: 0 2px 4px rgba(0, 86, 179, 0.1);
}

.header .subtitle {
    color: #0056b3;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 1px;
}

.header .arbaeen-text {
    font-size: 18px;
    margin-top: 10px;
    color: #0a1628;
    font-weight: bold;
    font-style: italic;
}

/* نوار تزئینی */
.decorative-line {
    text-align: center;
    color: #0056b3;
    font-size: 14px;
    margin: 5px 0 15px;
    letter-spacing: 5px;
}

/* تاریخ نمایش داده شده */
.date-display {
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.08), rgba(0, 86, 179, 0.15));
    padding: 10px 15px;
    border-radius: 12px;
    margin: 10px 0 20px;
    border: 2px solid rgba(0, 86, 179, 0.2);
    font-size: 16px;
    color: #0a1628;
    font-weight: bold;
}

.date-display span {
    color: #0056b3;
    font-size: 18px;
}

/* ==================== */
/* پیام‌ها - اصلاح شده */
/* ==================== */
.message {
    padding: 18px 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: bold;
    border-right: 6px solid;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.5s ease;
    display: none !important; /* مخفی بودن پیش‌فرض */
}

.message.show {
    display: block !important; /* نمایش با کلاس show */
}

.message.success {
    background: linear-gradient(135deg, #d4edda, #b7e4c7);
    color: #155724;
    border-color: #28a745;
    animation: slideDown 0.6s ease-out;
}

.message.error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border-color: #cc0000;
    animation: slideDown 0.6s ease-out;
}

.message.info {
    background: linear-gradient(135deg, #d1ecf1, #b8d4de);
    color: #0c5460;
    border-color: #17a2b8;
    animation: slideDown 0.6s ease-out;
}

/* انیمیشن برای پیام */
@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    50% {
        transform: translateY(5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
/* ==================== */

/* المان‌های فرم */
.form-group {
    margin-bottom: 22px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #0a1628;
    font-size: 14px;
}

label .required {
    color: #cc0000;
    margin-right: 3px;
}

input, select, textarea {
    width: 100%;
    padding: 12px 18px;
    border: 2px solid #d4dce8;
    border-radius: 12px;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    color: #0a1628;
}

input:focus, select:focus {
    outline: none;
    border-color: #0056b3;
    box-shadow: 0 0 0 4px rgba(0, 86, 179, 0.12);
    background: white;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230056b3' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 18px center;
    padding-left: 45px;
    cursor: pointer;
}

input.error, select.error {
    border-color: #cc0000;
    box-shadow: 0 0 0 4px rgba(204, 0, 0, 0.1);
}

.error-message {
    color: #cc0000;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 15px;
    border-radius: 10px;
    border: 2px solid #d4dce8;
    transition: all 0.3s ease;
    cursor: pointer;
}

.checkbox-item:hover {
    border-color: #0056b3;
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.1);
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0056b3;
    margin: 0;
}

.checkbox-item label {
    margin: 0;
    cursor: pointer;
    font-weight: normal;
    color: #0a1628;
    font-size: 14px;
}

.btn {
    background: linear-gradient(135deg, #0056b3, #003d80);
    color: white;
    border: none;
    padding: 14px 35px;
    border-radius: 12px;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    border: 2px solid #0066cc;
    box-shadow: 0 4px 20px rgba(0, 86, 179, 0.3);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 86, 179, 0.4);
    background: linear-gradient(135deg, #0066cc, #004d99);
}

.btn-primary {
    width: 100%;
    font-size: 20px;
    padding: 16px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0066cc, #004d99);
}

/* استایل view.php */
.view-container {
    max-width: 1400px;
}

.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

th, td {
    padding: 14px 12px;
    text-align: right;
    border-bottom: 1px solid #e8edf5;
}

th {
    background: linear-gradient(135deg, #003d80, #0056b3);
    color: #ffffff;
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 0.5px;
}

tr:hover {
    background: rgba(0, 86, 179, 0.05);
}

.pagination {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: 10px 18px;
    background: #f0f4fa;
    color: #0a1628;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 2px solid #d4dce8;
    font-weight: bold;
}

.pagination a:hover {
    background: #0056b3;
    color: white;
    border-color: #0056b3;
    transform: translateY(-2px);
}

.pagination .active {
    background: linear-gradient(135deg, #0056b3, #003d80);
    color: white;
    border-color: #0056b3;
}

.btn-excel {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    text-decoration: none;
    display: inline-block;
    border-color: #28a745;
}

.btn-back {
    background: linear-gradient(135deg, #0056b3, #003d80);
    text-decoration: none;
    display: inline-block;
    border-color: #0066cc;
}

.btn-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 20px 0;
}

/* انیمیشن */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    animation: fadeInUp 0.8s ease-out;
}

.form-group {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.form-group:nth-child(1) { animation-delay: 0.05s; }
.form-group:nth-child(2) { animation-delay: 0.1s; }
.form-group:nth-child(3) { animation-delay: 0.15s; }
.form-group:nth-child(4) { animation-delay: 0.2s; }
.form-group:nth-child(5) { animation-delay: 0.25s; }
.form-group:nth-child(6) { animation-delay: 0.3s; }
.form-group:nth-child(7) { animation-delay: 0.35s; }
.form-group:nth-child(8) { animation-delay: 0.4s; }
.form-group:nth-child(9) { animation-delay: 0.45s; }
.form-group:nth-child(10) { animation-delay: 0.5s; }
.form-group:nth-child(11) { animation-delay: 0.55s; }

/* مدیا کوئری */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 20px 15px;
        margin: 5px;
        border-radius: 15px;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .header .subtitle {
        font-size: 16px;
    }
    
    .header .arbaeen-text {
        font-size: 14px;
    }
    
    th, td {
        padding: 6px 4px;
        font-size: 10px;
    }
    
    .checkbox-group {
        gap: 6px;
    }
    
    .checkbox-item {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .btn {
        font-size: 15px;
        padding: 12px 20px;
    }
    
    .btn-primary {
        font-size: 16px;
        padding: 14px;
    }
    
    .container::before {
        font-size: 11px;
    }
    
    table {
        font-size: 11px;
    }
    
    th, td {
        padding: 6px 4px;
        min-width: 60px;
    }
    
    .message {
        font-size: 14px;
        padding: 14px 18px;
    }
}

/* بهبود نمایش عکس در موبایل */
@media (max-width: 768px) {
    body::before {
        opacity: 0.35;
    }
    body::after {
        background: rgba(10, 22, 40, 0.6);
    }
}

/* بهبود نمایش عکس در تبلت */
@media (min-width: 769px) and (max-width: 1024px) {
    body::before {
        opacity: 0.45;
    }
}

/* افکت نور ملایم روی عکس */
@keyframes softGlow {
    0% { opacity: 0.5; }
    50% { opacity: 0.6; }
    100% { opacity: 0.5; }
}

body::before {
    animation: softGlow 8s ease-in-out infinite;
}