/* a.css - Clinic Management System Styles */

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #333;
}
.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    height: 100%;
    padding: 5px 0;
}

.logo:hover {
    transform: translateY(-1px);
}

.logo-img {
    height: 50px;
    width: 50px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.3);
    background: #ffffff;
    transition: all 0.3s ease;
}

.logo:hover .logo-img {
    transform: rotate(5deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
}

.logo span {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 1.5px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.logo:hover span {
    color: #e6f7f7;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

/* Responsive logo only */
@media (max-width: 1200px) {
    .logo {
        gap: 12px;
    }
    
    .logo-img {
        height: 45px;
        width: 45px;
    }
    
    .logo span {
        font-size: 22px;
        letter-spacing: 1.2px;
    }
}

@media (max-width: 768px) {
    .logo {
        gap: 10px;
    }
    
    .logo-img {
        height: 40px;
        width: 40px;
        border-width: 2.5px;
    }
    
    .logo span {
        font-size: 20px;
        letter-spacing: 1px;
    }
}

@media (max-width: 480px) {
    .logo {
        gap: 8px;
        justify-content: center;
        width: 100%;
    }
    
    .logo-img {
        height: 35px;
        width: 35px;
        border-width: 2px;
    }
    
    .logo span {
        font-size: 18px;
        letter-spacing: 0.8px;
    }
}

/* ===== HEADER STYLES ===== */
.clinic-header {
    background: linear-gradient(135deg, #2c3e50 0%, #4a6491 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
/* ===== HEADER STYLES WITH LOGOS ===== */
.clinic-header {
    background: linear-gradient(135deg, #2c3e50 0%, #4a6491 100%);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.clinic-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.1;
    pointer-events: none;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-left .logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 1rem;
}

.header-left .logo i {
    font-size: 2.5rem;
    color: #4fc3f7;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-radius: 10px;
    margin-bottom: 0.3rem;
}

.header-left .logo span {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: #b0bec5;
}

.clinic-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    text-align: center;
}

.main-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.logo-circle {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #2196F3, #21CBF3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.logo-circle i {
    font-size: 1.8rem;
    color: white;
}

.clinic-info h1 {
    font-size: 2.2rem;
    margin-bottom: 0;
    letter-spacing: 1px;
    background: linear-gradient(45deg, #ffffff, #e3f2fd);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.clinic-details {
    display: flex;
    gap: 2rem;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.clinic-details p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clinic-details i {
    color: #4fc3f7;
    font-size: 1rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.alert-count {
    background: #ff5722;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    margin-left: 5px;
}

/* ===== RESPONSIVE HEADER ===== */
@media (max-width: 1024px) {
    .clinic-header {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1rem;
    }
    
    .header-left {
        order: 1;
        width: 100%;
        justify-content: center;
    }
    
    .clinic-info {
        order: 2;
    }
    
    .header-actions {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .clinic-details {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .clinic-info h1 {
        font-size: 1.8rem;
    }
    
    .main-logo {
        gap: 0.8rem;
    }
    
    .logo-circle {
        width: 50px;
        height: 50px;
    }
    
    .logo-circle i {
        font-size: 1.5rem;
    }
    
    .header-left .logo i {
        font-size: 2rem;
    }
    
    .clinic-details {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .clinic-info h1 {
        font-size: 1.5rem;
    }
    
    .main-logo {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .header-actions button {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
}

.clinic-info h1 {
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
    letter-spacing: 1px;
    background: linear-gradient(45deg, #00b4db, #0083b0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.clinic-details {
    display: flex;
    gap: 2rem;
    font-size: 0.95rem;
}

.clinic-details i {
    margin-right: 0.5rem;
    color: #4fc3f7;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* ===== BUTTON STYLES ===== */
.btn-primary, .btn-secondary, .btn-success, .btn-danger, .btn-warning {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(45deg, #2196F3, #21CBF3);
    color: white;
}

.btn-secondary {
    background: linear-gradient(45deg, #757575, #9e9e9e);
    color: white;
}

.btn-success {
    background: linear-gradient(45deg, #4CAF50, #8BC34A);
    color: white;
}

.btn-danger {
    background: linear-gradient(45deg, #f44336, #ff9800);
    color: white;
}

.btn-warning {
    background: linear-gradient(45deg, #ff9800, #ff5722);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(117, 117, 117, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.4);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.4);
}

/* ===== NAVIGATION STYLES ===== */
.main-nav {
    background: white;
    padding: 0.5rem 2rem;
    display: flex;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    background: #f5f5f5;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    color: #555;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.nav-btn:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

.nav-btn.active {
    background: linear-gradient(45deg, #2196F3, #21CBF3);
    color: white;
    box-shadow: 0 3px 8px rgba(33, 150, 243, 0.3);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.8rem;
}

.section h2 i {
    color: #2196F3;
}

/* ===== FORM STYLES ===== */
.form-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
}

.form-card h3 {
    margin-bottom: 1.2rem;
    color: #37474F;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.8rem;
    font-size: 1.3rem;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group.full-width {
    flex: 1 1 100%;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.search-input {
    flex: 1;
    padding: 0.9rem 1.2rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23757575' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") no-repeat 95% center;
    padding-right: 2.5rem;
}

.medicine-search {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* ===== TABLE STYLES ===== */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: white;
    margin-top: 1rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.data-table th {
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    font-size: 0.95rem;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    color: #555;
}

.data-table tbody tr {
    transition: background 0.3s ease;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.data-table tfoot td {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

/* ===== ACTION BUTTONS ===== */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.section-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filter-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-controls input,
.filter-controls select {
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
}

/* ===== MODAL STYLES ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: #2c3e50;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #666;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-modal:hover {
    background: #f0f0f0;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* ===== BILL PREVIEW ===== */
.bill-preview {
    max-width: 800px;
}

.bill-preview .modal-body {
    background: #f8f9fa;
}

/* ===== ALERT CONTAINER ===== */
.alert-container {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #ff9800;
}

/* ===== STATUS INDICATORS ===== */
.status-low {
    color: #ff9800;
    font-weight: 600;
}

.status-critical {
    color: #f44336;
    font-weight: 600;
}

.status-expired {
    color: #f44336;
    font-weight: 600;
}

.status-good {
    color: #4CAF50;
    font-weight: 600;
}

/* ===== CHECKBOX STYLES ===== */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .clinic-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .clinic-details {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .main-nav {
        overflow-x: auto;
        padding: 0.5rem 1rem;
    }
    
    .nav-btn {
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-group {
        min-width: 100%;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .header-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
    
    .medicine-search {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary, .btn-success, .btn-danger, .btn-warning {
        width: 100%;
        justify-content: center;
    }
    
    .section h2 {
        font-size: 1.5rem;
    }
    
    .clinic-info h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .clinic-header {
        padding: 1rem;
    }
    
    .modal-content {
        margin: 0.5rem;
    }
    
    .modal-body, .modal-header, .modal-footer {
        padding: 1rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.8rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .clinic-header,
    .main-nav,
    .action-buttons,
    .section-actions,
    .filter-controls {
        display: none;
    }
    
    .section {
        display: block !important;
    }
    
    .form-card {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ===== LOADING STATE ===== */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2196F3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===== UTILITY CLASSES ===== */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid #f5c6cb;
}