/* Global Styles */
:root {
    --primary-color: #0066cc;
    --secondary-color: #00b4d8;
    --accent-color: #ff6b6b;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --error-color: #f44336;
    --dark-bg: #1a1a2e;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --border-color: #e0e0e0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background-color: var(--light-bg);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.8rem;
    font-weight: bold;
}

.logo i {
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 1rem 0 1.5rem 0;
    text-align: center;
}

.hero-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.rem;
    max-width: 500px;
    margin: 0 auto;
}

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
}

.form-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.form-section.active {
    display: block;
}

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

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Form Container */
.form-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 1200px) {
    .form-container {
        grid-template-columns: 1fr;
    }
}

.form-wrapper {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
}

/* Form Tabs */
.form-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label i {
    color: var(--primary-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-group small {
    margin-top: 0.25rem;
    color: var(--text-light);
    font-size: 0.85rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Discount & Beneficiary Sections */
.discount-section,
.beneficiary-section {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.discount-section h3,
.beneficiary-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.discount-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.discount-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    background: var(--white);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.info-text {
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 1rem;
}

/* Buttons */
.form-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.9rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--light-bg);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-sm {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

/* Response Container */
.response-container {
    background: var(--dark-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    max-height: 800px;
    display: flex;
    flex-direction: column;
}

.response-header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: var(--white);
    padding: 1.5rem;
}

.response-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.response-tabs {
    display: flex;
    background: #16213e;
    padding: 0 1rem;
}

.response-tab {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.response-tab:hover {
    color: var(--white);
}

.response-tab.active {
    color: var(--white);
    border-bottom-color: var(--secondary-color);
}

.response-content {
    flex: 1;
    overflow-y: auto;
    min-height: 400px;
    max-height: 600px;
}

.response-panel {
    display: none;
    padding: 1.5rem;
}

.response-panel.active {
    display: block;
}

.response-panel pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.response-panel code {
    color: #a6e22e;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.footer-section i {
    margin-right: 0.5rem;
    color: var(--secondary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
}

.loading-spinner.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner p {
    color: var(--white);
    margin-top: 1rem;
    font-size: 1.1rem;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.active {
    display: block;
}

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left: 4px solid var(--error-color);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast.success i {
    color: var(--success-color);
    font-size: 1.5rem;
}

.toast.error i {
    color: var(--error-color);
    font-size: 1.5rem;
}

/* Location Selector Styles */
.location-selector {
    position: relative;
}

.location-search-input {
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s ease;
}

.location-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.location-select {
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--white);
    cursor: pointer;
}

.location-select option {
    padding: 0.5rem;
    cursor: pointer;
}

.location-select option:hover {
    background: var(--light-bg);
}

.location-info {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    animation: slideDown 0.3s ease;
}

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

.location-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.location-details .info-item {
    font-size: 0.9rem;
}

.location-details .info-item strong {
    color: var(--text-dark);
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.location-details code {
    background: rgba(255, 255, 255, 0.5);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--primary-color);
    word-break: break-all;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.active {
    background: var(--success-color);
    color: var(--white);
}

.status-badge.inactive {
    background: var(--text-light);
    color: var(--white);
}

.type-badge {
    padding: 0.2rem 0.5rem;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 0.5rem;
}

.btn-copy {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.btn-copy:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.btn-copy i {
    margin: 0;
}

.location-details .info-item {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.location-details .info-item small {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    display: block;
    width: 100%;
}

/* Auto-filled input animation */
.auto-filled {
    animation: autoFillHighlight 2s ease;
    border-color: var(--success-color) !important;
}

@keyframes autoFillHighlight {
    0% {
        background-color: rgba(40, 167, 69, 0.1);
        box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
    }
    50% {
        background-color: rgba(40, 167, 69, 0.2);
        box-shadow: 0 0 0 5px rgba(40, 167, 69, 0.3);
    }
    100% {
        background-color: transparent;
        box-shadow: none;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .form-wrapper {
        padding: 1.5rem;
    }

    .discount-item {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .location-details {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* JSON Syntax Highlighting */
.response-panel code {
    display: block;
}

.json-key {
    color: #66d9ef;
}

.json-string {
    color: #a6e22e;
}

.json-number {
    color: #ae81ff;
}

.json-boolean {
    color: #fd971f;
}

.json-null {
    color: #f92672;
}

/* Search Section Styles */
.search-form {
    margin-bottom: 2rem;
}

.search-input-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.search-group {
    margin-bottom: 0;
}

.input-with-button {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

.input-with-button input {
    flex: 1;
}

.btn-search {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

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

.search-results {
    animation: fadeInUp 0.5s ease;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eef2ff;
}

.results-header h3 {
    margin: 0;
    color: #1e293b;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.results-header h3 i {
    color: #10b981;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: #fecaca;
    transform: scale(1.1);
}

.patient-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.patient-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.patient-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    backdrop-filter: blur(10px);
}

.patient-identity {
    flex: 1;
}

.patient-identity h4 {
    margin: 0 0 0.5rem 0;
    color: white;
    font-size: 1.75rem;
    font-weight: 700;
}

.patient-code {
    margin: 0 0 0.75rem 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 500;
}

.patient-badge {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.info-section {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.info-section.full-width {
    grid-column: 1 / -1;
}

.info-section h5 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}

.info-section h5 i {
    color: #667eea;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #64748b;
    flex-shrink: 0;
    min-width: 140px;
}

.info-value {
    color: #1e293b;
    font-weight: 500;
    word-break: break-all;
    text-align: right;
    flex: 1;
}

.json-display-section {
    padding: 2rem;
    background: #1e1e1e;
    border-top: 1px solid #e2e8f0;
}

.json-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.json-header h5 {
    margin: 0;
    color: white;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-copy {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.2);
}

.search-error {
    padding: 2rem;
    background: #fef2f2;
    border: 2px solid #fecaca;
    border-radius: 12px;
    text-align: center;
    animation: shake 0.5s ease;
}

.search-error i {
    font-size: 3rem;
    color: #dc2626;
    margin-bottom: 1rem;
}

.search-error p {
    margin: 0;
    color: #991b1b;
    font-size: 1.1rem;
    font-weight: 500;
}

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

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

/* Search Tab Content */
.search-tab-content {
    display: none;
}

.search-tab-content.active {
    display: block;
}

/* Patients List (for phone search) */
.patients-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.patient-list-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.patient-list-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.patient-list-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 1.5rem;
    color: white;
}

.patient-list-name {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.patient-list-name i {
    font-size: 1rem;
}

.patient-list-code {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.9;
    font-weight: 500;
}

.patient-list-body {
    padding: 1.25rem;
}

.patient-list-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.patient-list-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.patient-list-label {
    color: #64748b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.patient-list-label i {
    width: 16px;
    text-align: center;
    color: #667eea;
}

.patient-list-value {
    color: #1e293b;
    font-weight: 500;
}

.patient-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.patient-type-badge.primary {
    background: #dbeafe;
    color: #1e40af;
}

.patient-type-badge.dependent {
    background: #fef3c7;
    color: #92400e;
}

.btn-view-details {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-view-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
}

.btn-pagination {
    padding: 0.75rem 1.5rem;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-pagination:hover:not(:disabled) {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.btn-pagination:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-info {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid #e2e8f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px 16px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-close-modal {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.btn-close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Responsive adjustments for search */
@media (max-width: 768px) {
    .input-with-button {
        flex-direction: column;
    }
    
    .btn-search {
        width: 100%;
        justify-content: center;
    }
    
    .patient-header {
        flex-direction: column;
        text-align: center;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .info-label,
    .info-value {
        text-align: left;
    }
    
    .patients-list {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-direction: column;
        gap: 1rem;
    }
    
    .modal {
        padding: 1rem;
    }
    
    .modal-content {
        max-height: 95vh;
    }
}
