/* assets/style.css */

:root {
    --primary: #1f4e79;
    --secondary: #2e75b6;
    --success: #28a745;
    --danger: #dc3545;
    --light: #f8f9fa;
    --border: #dee2e6;
}

* { box-sizing: border-box; font-family: 'Vazirmatn', sans-serif; }
body { background-color: #e9ecef; color: #333; margin: 0; padding: 20px; direction: rtl; }
.container { max-width: 1200px; margin: 0 auto; }
.header { background: var(--primary); color: white; padding: 15px 20px; border-radius: 8px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center;}
.card { background: white; border-radius: 8px; padding: 20px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); margin-bottom: 20px; }
.btn { padding: 8px 15px; border: none; border-radius: 5px; cursor: pointer; text-decoration: none; font-family: inherit; font-size: 0.9rem; color: white; display: inline-block;}
.btn-primary { background: var(--primary); }
.btn-success { background: var(--success); }
.btn-danger { background: var(--danger); }

table { width: 100%; border-collapse: collapse; margin-top: 15px; }
th, td { border: 1px solid var(--border); padding: 12px; text-align: center; }
th { background: var(--light); color: var(--primary); }

.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; color: var(--primary); }
.form-control { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 5px; font-family: inherit; }
textarea.form-control { min-height: 100px; resize: vertical; }

.grid-forms { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; }
.form-card { background: white; border: 1px solid var(--border); padding: 15px; text-align: center; border-radius: 8px; cursor: pointer; transition: 0.3s; text-decoration: none; color: #333; }
.form-card:hover { border-color: var(--secondary); box-shadow: 0 4px 10px rgba(0,0,0,0.1); transform: translateY(-2px); }

/* ============================================
   تقویم شمسی اختصاصی (بدون کتابخانه خارجی)
   ============================================ */
.pdate-picker {
    position: absolute;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
    padding: 10px;
    width: 280px;
    font-size: 0.9rem;
    direction: rtl;
    font-family: 'Vazirmatn', sans-serif;
}
.pdate-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 4px;
}
.pdate-title {
    font-weight: bold;
    color: var(--primary);
    flex: 1;
    text-align: center;
    white-space: nowrap;
}
.pdate-btn {
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-family: inherit;
    color: var(--primary);
    font-size: 0.9rem;
    line-height: 1;
}
.pdate-btn:hover {
    background: var(--primary);
    color: #fff;
}
.pdate-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: bold;
    color: #666;
    margin-bottom: 4px;
    font-size: 0.8rem;
}
.pdate-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.pdate-day {
    text-align: center;
    padding: 6px 0;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}
.pdate-day:hover {
    background: var(--light);
}
.pdate-day.pdate-empty {
    cursor: default;
    visibility: hidden;
}
.pdate-day.pdate-today {
    border: 1px solid var(--secondary);
    font-weight: bold;
}
.pdate-day.pdate-selected {
    background: var(--primary);
    color: #fff;
}
.pdate-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    gap: 6px;
}
.pdate-footer .pdate-btn {
    flex: 1;
}

/* فیلد تاریخ - نشانگر تقویم */
input.persian-date {
    cursor: pointer;
    background-color: #fff;
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 10px;
    width: 100%;
    font-family: inherit;
}
input.persian-date:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(31, 78, 121, 0.15);
}