/* राशन वितरण प्रबंधन प्रणाली - CSS स्टाइल */

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2), 0 0 50px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: headerGlow 6s ease-in-out infinite alternate;
}

@keyframes headerGlow {
    0% { transform: rotate(0deg) scale(1); }
    100% { transform: rotate(180deg) scale(1.1); }
}

.header h1 {
    position: relative;
    z-index: 2;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.header h2 {
    position: relative;
    z-index: 2;
    font-size: 1.8rem;
    font-weight: 600;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
    margin: 15px 0;
    animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.header p {
    position: relative;
    z-index: 2;
    font-size: 1.1rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    margin-top: 10px;
}

.main-content {
    padding: 30px;
}

.controls {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    margin-bottom: 30px;
    align-items: end;
}

.search-filters {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #555;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(244, 67, 54, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-warning:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(255, 152, 0, 0.4);
}

.records-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.table tr:hover {
    background-color: #f8f9fa;
}

.table tr:nth-child(even) {
    background-color: #fafafa;
}

.table tr:nth-child(even):hover {
    background-color: #f0f0f0;
}

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

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    text-align: center;
    border-left: 4px solid #4CAF50;
}

.stat-card h3 {
    font-size: 2em;
    color: #4CAF50;
    margin-bottom: 5px;
}

.stat-card p {
    color: #666;
    font-weight: 500;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    animation: modalSlideIn 0.3s ease;
}

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

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #000;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-grid .form-group:last-child {
    grid-column: 1 / -1;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-records {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1em;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.badge {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    min-width: 20px;
    text-align: center;
}

.badge.high-count {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.badge.very-high-count {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 10px;
    }
    
    .header {
        padding: 30px 15px;
        border-radius: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .header h2 {
        font-size: 1.5rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .controls {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .search-filters {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .table {
        font-size: 14px;
    }
    
    .table th,
    .table td {
        padding: 10px 8px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
}