/* responsive.css */

html, body {
    touch-action: pan-y pinch-zoom;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

input, textarea, select {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

a, button, .btn, .sidebar-link, .page-link {
    touch-action: manipulation;
}

.app-main {
    padding: 0.75rem;
}

.card {
    padding: 0.9rem;
    margin-bottom: 0.75rem;
}

.header-title {
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 0.8rem;
}

.form-control {
    font-size: 1rem;
}

.table {
    font-size: 0.9rem;
}

.table th, .table td {
    padding: 0.5rem 0.6rem;
}

.btn {
    font-size: 0.9rem;
    padding: 0.5rem 0.8rem;
}

.btn-sm {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

.list-group-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.list-item-actions {
    width: 100%;
    justify-content: flex-end;
}

.app-modal-dialog {
    width: 95%;
    margin: 2vh auto;
    max-height: 96vh;
}

.app-modal-body {
    max-height: 70vh;
}

/* سایدبار */
.sidebar-panel {
    top: 0;
    bottom: 0;
    right: -100%;
    width: 280px;
    max-width: 85%;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    z-index: 2001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-overlay.active .sidebar-panel {
    right: 0;
}

.sidebar-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: auto;
}

.sidebar-link {
    padding: 0.7rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.25rem;
}

.sidebar-footer {
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .app-main { padding: 1.5rem; }
    .card { padding: 1.25rem; margin-bottom: 1rem; }
    .header-title { font-size: 1.3rem; }
    .list-group-item { flex-direction: row; align-items: center; justify-content: space-between; }
    .list-item-actions { width: auto; justify-content: flex-end; }
    .app-modal-dialog { width: 80%; margin: 5vh auto; }
    .sidebar-panel { width: 280px; right: -280px; }
}

@media (min-width: 992px) {
    .app-main { padding: 2rem; max-width: 1200px; margin: 0 auto; }
    .header-title { font-size: 1.4rem; }
    .table th, .table td { padding: 0.75rem; }
    .app-modal-dialog { width: 600px; max-width: 90%; }
    .sidebar-panel { width: 300px; right: -300px; }
}

@media (min-width: 1200px) {
    .app-main { padding: 2.5rem; }
}

@media (max-width: 480px) {
    .header-title { font-size: 1rem; }
    .header-back, .header-menu-toggle, .header-placeholder, .header-spacer { width: 32px; height: 32px; }
    .header-container { padding: 0 0.5rem; }
    .btn-lg { padding: 0.6rem 1.2rem; font-size: 1rem; }
    .app-modal-dialog { width: 98%; }
    .pagination .page-link { padding: 0.3rem 0.5rem; }
}