/* إعدادات عامة */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    direction: rtl;
}

/* صفحة تسجيل الدخول */
.login-page {
    background: linear-gradient(135deg, #5fa8d3 0%, #4a90e2 50%, #357abd 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.login-container {
    position: relative;
    z-index: 100;
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-box {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    animation: slideUp 0.6s ease-out;
    position: relative;
    z-index: 100;
}

.login-box * {
    position: relative;
    z-index: 101;
}

.login-form {
    position: relative;
    z-index: 101;
}

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

.login-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 101;
}

.logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 20px;
    animation: fadeIn 0.8s ease-out;
    position: relative;
    z-index: 101;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.login-header h1 {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 700;
}

.login-header p {
    color: #7f8c8d;
    font-size: 16px;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-right: 4px solid #c33;
    animation: shake 0.5s ease-out;
    position: relative;
    z-index: 101;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.form-group {
    margin-bottom: 20px;
    position: relative;
    z-index: 101;
}

.form-group label {
    display: block;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    position: relative;
    z-index: 101;
}

.form-group label i {
    margin-left: 8px;
    color: #4a90e2;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    position: relative;
    z-index: 101;
    font-family: 'Cairo', sans-serif;
}

.form-group input:focus {
    outline: none;
    border-color: #4a90e2;
    background: white;
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
}

.password-input {
    position: relative;
    z-index: 101;
}

.password-input input {
    padding-left: 50px;
}

.toggle-password {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s ease;
    z-index: 102;
}

.toggle-password:hover {
    color: #4a90e2;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
    position: relative;
    z-index: 101;
    font-family: 'Cairo', sans-serif;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.5);
}

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

.login-btn i {
    margin-left: 8px;
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    position: relative;
    z-index: 101;
}

.login-footer p {
    color: #7f8c8d;
    font-size: 14px;
}

.login-footer i {
    color: #4a90e2;
    margin-left: 5px;
}

/* خلفية متحركة */
.background-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite ease-in-out;
    pointer-events: none;
    z-index: 0;
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: -50px;
    animation-delay: 5s;
}

.circle-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* صفحة Dashboard */
.dashboard-page {
    background: #f5f7fa;
    min-height: 100vh;
}

.navbar {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.navbar-title h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 2px;
}

.navbar-title p {
    font-size: 13px;
    opacity: 0.9;
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 15px;
    border-radius: 25px;
}

.user-avatar {
    width: 35px;
    height: 35px;
    background: white;
    color: #4a90e2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 8px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
}

.logout-btn i {
    margin-left: 8px;
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 30px;
}

.welcome-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.welcome-section h2 {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 10px;
}

.welcome-section p {
    color: #7f8c8d;
    font-size: 16px;
}

.panels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.panel {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #4a90e2, #357abd);
}

.panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.panel-title h3 {
    color: #2c3e50;
    font-size: 22px;
    font-weight: 700;
}

.panel-count {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    padding: 10px 22px;
    border-radius: 25px;
    font-size: 24px;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.3);
    min-width: 80px;
    text-align: center;
}

.panel-outgoing .panel-count {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.3);
}

.panel-incoming .panel-count {
    background: linear-gradient(135deg, #28a745 0%, #20893a 100%);
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
}

.panel-content {
    margin-bottom: 20px;
}

.panel-content p {
    color: #7f8c8d;
    line-height: 1.8;
    margin-bottom: 15px;
}

.panel-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.stat-item {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 16px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: #4a90e2;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.15);
    transform: translateY(-2px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon i {
    color: white;
    font-size: 22px;
}

.stat-info {
    flex: 1;
    text-align: right;
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 4px;
    line-height: 1;
}

.stat-label {
    color: #6c757d;
    font-size: 13px;
    font-weight: 600;
}

.panel-actions {
    display: flex;
    gap: 10px;
}

.btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Cairo', sans-serif;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.btn-secondary {
    background: white;
    color: #4a90e2;
    border: 2px solid #4a90e2;
}

.btn-secondary:hover {
    background: #4a90e2;
    color: white;
}

/* قسم الإحصائيات */
.stats-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stats-section h3 {
    color: #2c3e50;
    font-size: 22px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-section h3 i {
    color: #4a90e2;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 14px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-card:hover {
    border-color: #4a90e2;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.2);
}

.stat-card-icon {
    width: 65px;
    height: 65px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-card-icon i {
    font-size: 28px;
    color: white;
}

.stat-card-content {
    flex: 1;
    text-align: right;
}

.stat-card-blue .stat-card-icon {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
}

.stat-card-green .stat-card-icon {
    background: linear-gradient(135deg, #28a745 0%, #20893a 100%);
}

.stat-card-orange .stat-card-icon {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.stat-card-purple .stat-card-icon {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
}

.stat-card .value {
    font-size: 32px;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 5px;
    line-height: 1;
}

.stat-card .label {
    font-size: 14px;
    color: #6c757d;
    font-weight: 600;
}

/* تأثيرات للبانلات */
.panel-outgoing .panel-header {
    border-top: 4px solid #4a90e2;
}

.panel-incoming .panel-header {
    border-top: 4px solid #28a745;
}

.panel-outgoing .panel-icon {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
}

.panel-incoming .panel-icon {
    background: linear-gradient(135deg, #28a745 0%, #20893a 100%);
}

.panel-outgoing .stat-icon {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
}

.panel-incoming .stat-icon {
    background: linear-gradient(135deg, #28a745 0%, #20893a 100%);
}

/* التنسيقات الخاصة بصفحات النماذج والجداول موجودة في forms.css و tables.css */

/* رسائل التنبيه */
.alert {
    padding: 18px 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideDown 0.5s ease-out;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
    font-size: 16px;
    font-weight: 500;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-right: 5px solid #28a745;
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.15);
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-right: 5px solid #dc3545;
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.15);
}

.alert i {
    font-size: 22px;
}

/* التنسيقات الخاصة بالنماذج موجودة في forms.css */

.form-actions .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.5);
}

/* تخصيص SweetAlert2 */
.swal2-popup {
    font-family: 'Cairo', sans-serif !important;
    border-radius: 15px !important;
}

.swal2-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #2c3e50 !important;
}

.swal2-html-container {
    font-size: 16px !important;
    color: #5a6c7d !important;
}

.swal2-confirm {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 600 !important;
    padding: 12px 30px !important;
    border-radius: 10px !important;
}

.swal2-cancel {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 600 !important;
    padding: 12px 30px !important;
    border-radius: 10px !important;
}

.swal2-icon {
    border-width: 3px !important;
}

/* صفحات العرض */
.view-controls {
    background: white;
    padding: 25px 30px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 300px;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
}

.search-btn {
    padding: 14px 25px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

.clear-btn {
    padding: 14px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.clear-btn:hover {
    background: #5a6268;
}

.view-stats {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    color: #2c3e50;
    font-size: 15px;
}

.stat-badge i {
    color: #4a90e2;
    font-size: 18px;
}

.add-employee-btn {
    background: linear-gradient(135deg, #28a745 0%, #20893a 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Cairo', sans-serif;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    text-decoration: none;
}

.add-employee-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    background: linear-gradient(135deg, #20893a 0%, #197c32 100%);
}

.logout-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Cairo', sans-serif;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

/* التنسيقات الخاصة بالجداول موجودة في tables.css */

/* تنسيقات Pagination والتفاصيل موجودة في tables.css */

/* تنسيقات صفحة التفاصيل موجودة في tables.css */

.detail-value {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.6;
}

.subject-content {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-right: 4px solid #4a90e2;
    font-weight: 500;
}

/* بطاقة المرفقات */
.attachments-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.attachments-header {
    background: linear-gradient(135deg, #28a745 0%, #20893a 100%);
    padding: 20px 30px;
}

.attachments-header h3 {
    color: white;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.count-badge {
    background: white;
    color: #28a745;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
}

.attachments-body {
    padding: 30px;
}

.attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.attachment-item {
    background: #f8fafc;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.attachment-item:hover {
    border-color: #4a90e2;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.15);
    transform: translateY(-3px);
}

.attachment-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.attachment-icon i {
    font-size: 24px;
    color: white;
}

.attachment-info {
    flex: 1;
    min-width: 0;
}

.attachment-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #6c757d;
}

.attachment-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.attachment-meta i {
    font-size: 12px;
}

.attachment-download {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #28a745 0%, #20893a 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.attachment-download:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.attachment-download i {
    font-size: 18px;
}

.no-attachments {
    text-align: center;
    padding: 60px 40px;
    color: #6c757d;
}

.no-attachments i {
    font-size: 60px;
    color: #dee2e6;
    margin-bottom: 15px;
}

.no-attachments p {
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .panels-grid {
        grid-template-columns: 1fr;
    }
    
    .navbar-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .panel-stats {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .document-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-container {
        padding: 30px 25px;
    }
    
    .page-header {
        padding: 20px 25px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        min-width: 100%;
    }
    
    .dashboard-container {
        padding: 30px 20px;
    }
    
    .view-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        min-width: 100%;
    }
    
    .view-stats {
        flex-direction: column;
        align-items: stretch;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 800px;
    }
    
    .detail-row {
        grid-template-columns: 1fr;
    }
    
    .attachments-grid {
        grid-template-columns: 1fr;
    }
    
    .details-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        flex-wrap: wrap;
    }
    
    .back-btn {
        min-width: 100px;
        font-size: 14px;
        padding: 0 15px;
        height: 45px;
    }
    
    .page-title h2 {
        font-size: 20px;
    }
}
