
:root {
            --primary: #4E86D4;
            --secondary: #1BBAFF;
            --accent: #F1B501;
            --success: #62C516;
            --danger: #FF6A6A;
            --purple: #4B3FC5;
            --white: #FFFFFF;
            --dark: #222D5D;
            --blue-dark: #3E6791;
            --blue-light: #4DACD9;
            --gray-light: #A8B0CE;
            --shadow: 0 4px 6px rgba(34, 45, 93, 0.1);
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        body {
            background-color: #f5f7fb;
            color: var(--dark);
        }
        
        .container {
            max-width: 1280px;
            margin: 0 auto;
            padding: 1rem;
        }
        
        /* Header styles */
        header {
            background-color: var(--primary);
            color: var(--white);
            padding: 1rem 2rem;
            box-shadow: var(--shadow);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .header-left h1 {
            font-size: 1.5rem;
            font-weight: 600;
        }
        
        .header-left p {
            font-size: 0.9rem;
            opacity: 0.9;
        }
        
        .header-right {
            text-align: right;
        }
        
        /* Info card styles */
        .info-card {
            background-color: var(--white);
            border-radius: 10px;
            box-shadow: var(--shadow);
            padding: 1rem;
            margin: 1.5rem 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .info-item {
            display: flex;
            flex-direction: column;
            padding: 0 1rem;
            flex: 1;
        }
        
        .info-item:not(:last-child) {
            border-right: 1px solid var(--gray-light);
        }
        
        .info-label {
            font-size: 0.8rem;
            color: var(--blue-dark);
            margin-bottom: 0.3rem;
        }
        
        .info-value {
            font-weight: 600;
            color: var(--dark);
        }
        
        /* Tab navigation */
        .tab-nav {
            display: flex;
            gap: 0.2rem;
            margin-bottom: 1rem;
        }
        
        .tab-button {
            padding: 0.8rem 1.2rem;
            background-color: var(--gray-light);
            border: none;
            border-radius: 8px 8px 0 0;
            color: var(--dark);
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .tab-button.active {
            background-color: var(--white);
            color: var(--primary);
            box-shadow: 0 -2px 6px rgba(34, 45, 93, 0.1);
            position: relative;
        }
        
        .tab-button.active::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 3px;
            background-color: var(--primary);
            border-radius: 3px 3px 0 0;
        }
        
        /* Content panel */
        .content-panel {
            background-color: var(--white);
            border-radius: 0 10px 10px 10px;
            box-shadow: var(--shadow);
            padding: 1.5rem;
        }
        
        /* Status indicators */
        .status-indicators {
            display: flex;
            gap: 1.5rem;
            margin-bottom: 1.5rem;
        }
        
        .status-item {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .status-color {
            width: 16px;
            height: 16px;
            border-radius: 4px;
        }
        
        .released {
            border: 2px solid var(--dark);
        }
        
        .under-authority {
            background-color: var(--success);
        }
        
        .awaiting-authorization {
            background-color: var(--accent);
        }
        
        .awaiting-confirmation {
            background-color: var(--accent);
            opacity: 0.6;
        }
        
        .status-label {
            font-size: 0.85rem;
            color: var(--dark);
        }
        
        /* Controls */
        .controls {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px;
            background-color: #f5f5f5;
            border-radius: 5px;
            margin-bottom: 20px;
        }
        
        .page-control {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .records-select {
            padding: 5px 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
            margin: 0 8px;
        }
        
        .search-box {
            position: relative;
            display: flex;
            align-items: center;
        }
        
        .search-box i {
            position: absolute;
            left: 10px;
            color: #666;
        }
        
        .search-box input {
            padding: 8px 10px 8px 35px;
            border: 1px solid #ddd;
            border-radius: 4px;
            width: 250px;
        }
        
        .search-box input:focus {
            outline: none;
            border-color: #4a90e2;
            box-shadow: 0 0 5px rgba(74, 144, 226, 0.2);
        }
        
        .search-box::before {
            content: "🔍";
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            opacity: 0.5;
        }
        
        /* Table styles */
        .data-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 1rem;
        }
        
        .data-table th {
            background-color: var(--primary);
            color: var(--white);
            padding: 1rem;
            text-align: left;
            font-weight: 500;
        }
        
        .data-table th:first-child {
            border-radius: 8px 0 0 0;
        }
        
        .data-table th:last-child {
            border-radius: 0 8px 0 0;
        }
        
        .data-table td {
            padding: 1rem;
            border-bottom: 1px solid rgba(168, 176, 206, 0.3);
        }
        
        .data-table tr:hover {
            background-color: rgba(78, 134, 212, 0.05);
        }
        
        .data-table tr:nth-child(odd) {
            background-color: rgba(168, 176, 206, 0.1);
        }
        
        .data-table tr:nth-child(odd):hover {
            background-color: rgba(78, 134, 212, 0.1);
        }
        
        /* Specialty styling */
        .specialty-pill {
            display: inline-block;
            padding: 0.3rem 0.6rem;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 500;
            color: var(--white);
            background-color: var(--blue-dark);
            text-align: center;
        }
        
        /* Row highlighting */
        .highlight-row {
            background-color: rgba(98, 197, 22, 0.15) !important;
        }
        
        /* Footer button */
        .footer {
            margin-top: 2rem;
            display: flex;
            justify-content: center;
            padding-bottom: 20px;
        }
        
        .finish-button {
            background-color: var(--success);
            color: var(--white);
            padding: 0.8rem 1.5rem;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            box-shadow: 0 2px 4px rgba(98, 197, 22, 0.2);
            transition: all 0.2s ease;
            min-width: 250px;
            justify-content: center;
        }
        
        .finish-button:hover {
            background-color: #56b10e;
            box-shadow: 0 4px 8px rgba(98, 197, 22, 0.3);
        }
        
        .finish-button svg {
            width: 18px;
            height: 18px;
        }

        /* Modern Patient Info Styling */
        .patient-info.modern {
            background: linear-gradient(to right, #f8f9fa, #ffffff);
            border-radius: 12px;
            box-shadow: 0 8px 20px rgba(0,0,0,0.05);
            padding: 0;
            overflow: hidden;
        }
        
        .patient-header {
            display: flex;
            align-items: center;
            padding: 20px 25px;
            background: linear-gradient(135deg, var(--primary), var(--blue-light));
            color: white;
            border-radius: 12px 12px 0 0;
        }
        
        .patient-avatar {
            font-size: 3.5rem;
            margin-right: 20px;
            color: rgba(255,255,255,0.9);
        }
        
        .patient-name {
            flex: 1;
        }
        
        .patient-name h2 {
            margin: 0;
            font-size: 1.8rem;
            font-weight: 600;
        }
        
        .patient-id {
            font-size: 0.9rem;
            opacity: 0.8;
        }
        
        .patient-status {
            margin-left: 20px;
        }
        
        .status-badge {
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 600;
            text-transform: uppercase;
        }
        
        .status-badge.active {
            background-color: var(--success);
        }
        
        .info-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
            gap: 15px;
            padding: 25px;
        }
        
        .info-card {
            display: flex;
            align-items: center;
            background-color: var(--white);
            border-radius: 10px;
            padding: 15px;
            transition: all 0.3s ease;
            box-shadow: var(--shadow);
            margin: 1rem 0;
        }
        
        .info-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 16px rgba(34, 45, 93, 0.12);
        }
        
        .card-icon {
            font-size: 1.5rem;
            color: var(--primary);
            margin-right: 15px;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: rgba(78, 134, 212, 0.1);
            border-radius: 8px;
        }
        
        .card-content {
            flex: 1;
        }
        
        .card-content label {
            display: block;
            font-size: 0.8rem;
            color: var(--blue-dark);
            margin-bottom: 0.3rem;
        }
        
        .card-content span {
            font-weight: 600;
            color: var(--dark);
        }
        
        .section-header {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
            padding: 0 25px;
            color: var(--dark);
        }
        
        .section-header i {
            font-size: 1.2rem;
            margin-right: 10px;
            color: var(--primary);
        }
        
        .section-header h3 {
            font-size: 1.1rem;
            font-weight: 600;
            margin: 0;
        }
        
        .contact-section, .address-section {
            padding: 15px 0;
            border-top: 1px solid rgba(0,0,0,0.05);
        }
        
        .phone-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            padding: 0 25px;
        }
        
        .phone-chip {
            display: flex;
            align-items: center;
            background-color: rgba(78, 134, 212, 0.08);
            border-radius: 20px;
            padding: 8px 15px;
        }
        
        .phone-chip i {
            color: var(--primary);
            margin-right: 8px;
        }
        
        .address-content {
            padding: 0 25px;
        }
        
        .address-main {
            font-weight: 600;
            font-size: 1.1rem;
            margin-bottom: 10px;
        }
        
        .address-details {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
        }
        
        .address-item {
            display: flex;
            align-items: center;
        }
        
        .address-item label {
            color: #666;
            margin-right: 5px;
        }
        
        .address-item span {
            font-weight: 500;
        }
        
        @media screen and (max-width: 768px) {
            .info-grid {
                grid-template-columns: 1fr;
            }
            
            .patient-header {
                flex-direction: column;
                text-align: center;
            }
            
            .patient-avatar {
                margin-right: 0;
                margin-bottom: 15px;
            }
            
            .patient-status {
                margin-left: 0;
                margin-top: 15px;
            }
            
            .address-details {
                flex-direction: column;
                gap: 10px;
            }
        }

        .info-row {
            display: flex;
            gap: 20px;
            margin-bottom: 15px;
        }

        .info-group {
            flex: 1;
        }

        .info-group.full-width {
            flex: 0 0 100%;
        }

        .info-group label {
            display: block;
            color: #666;
            font-size: 0.9em;
            margin-bottom: 4px;
        }

        .info-group span {
            display: block;
            font-size: 1em;
            color: #333;
        }

        .phone-list {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .phone-list span {
            color: #333;
        }

        .tab-content {
            display: none;
        }

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

        .attendance-form {
            padding: 20px;
        }

        .form-section {
            margin-bottom: 30px;
        }

        .form-section h3 {
            color: #2c3e50;
            font-size: 14px;
            margin-bottom: 10px;
            background-color: #e8f0fe;
            padding: 8px;
            border-radius: 4px;
        }

        .text-area-container {
            width: 100%;
        }

        .text-area-container textarea {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
            resize: vertical;
            font-family: inherit;
        }

        .prescription-container {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .prescription-form {
            padding: 20px;
        }

        .exam-request, .prescription-fields, .attestation-fields {
            background-color: #f8f9fa;
            padding: 15px;
            border-radius: 4px;
            margin-bottom: 15px;
        }

        .exam-row, .prescription-row {
            display: flex;
            gap: 15px;
            margin-bottom: 15px;
        }

        .exam-field, .field-group {
            display: flex;
            flex-direction: column;
            flex: 1;
        }

        .exam-field label, .field-group label {
            font-size: 0.9em;
            color: #495057;
            margin-bottom: 5px;
        }

        .exam-field.small {
            flex: 0 0 100px;
        }

        .exam-input, .full-width {
            padding: 8px;
            border: 1px solid #ced4da;
            border-radius: 4px;
            width: 100%;
        }

        .quantity {
            width: 80px !important;
        }

        .button-group {
            display: flex;
            gap: 10px;
            margin-top: 15px;
            justify-content: center;
        }

        .blue-button {
            background-color: #4a90e2;
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 4px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 5px;
        }

       

        .black-button {
            background-color: #212529;
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 4px;
            cursor: pointer;
            margin-top: 10px;
            align-self: flex-end;
        }

        .black-button:hover {
            background-color: #343a40;
        }

        .attestation-fields {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .attestation-fields .field-group {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 10px;
        }

        .attestation-fields label {
            white-space: nowrap;
        }

        .attestation-fields span {
            margin-left: 10px;
        }

        .form-section h3 {
            color: #2c3e50;
            font-size: 14px;
            margin-bottom: 10px;
            background-color: #e8f0fe;
            padding: 8px;
            border-radius: 4px;
        }

        .text-area-container {
            width: 100%;
        }

        .text-area-container textarea {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
            resize: vertical;
            font-family: inherit;
        }

        .prescription-container {
            background-color: #f8f9fa;
            padding: 15px;
            border-radius: 4px;
        }

        .prescription-field {
            margin-bottom: 15px;
        }

        .prescription-field label {
            display: block;
            color: #495057;
            font-size: 0.9em;
            margin-bottom: 5px;
        }

        .prescription-input {
            width: 100%;
            padding: 8px;
            border: 1px solid #ced4da;
            border-radius: 4px;
            background-color: white;
        }

        .black-button {
            background-color: #212529;
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 0.9em;
            margin-top: 10px;
        }

        .black-button:hover {
            background-color: #343a40;
        }

        .prescription-input {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .prescription-input input {
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 4px;
            width: 100px;
        }

        .add-medication-btn {
            background-color: #4a90e2;
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 4px;
            cursor: pointer;
        }

        .form-actions {
            display: flex;
            justify-content: flex-end;
            margin-top: 20px;
        }

        .save-btn {
            background-color: #4CAF50;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 4px;
            cursor: pointer;
        }

        .save-btn:hover {
            background-color: #45a049;
        }

        /* Attachment Tab Styles */
        .attachment-form {
            padding: 20px;
        }

        .attachment-container {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .attachment-header {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 20px;
        }

        .attachment-icon {
            background-color: var(--primary);
            color: white;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
        }

        .attachment-header h2 {
            margin: 0;
            flex-grow: 1;
            font-size: 1.8rem;
            color: var(--dark);
        }

        .attachment-content-panel {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .attachment-card {
            background-color: white;
            border-radius: 10px;
            box-shadow: var(--shadow);
            overflow: hidden;
        }

        /* File Upload Styles */
        .file-upload-container {
            margin-top: 20px;
        }

        .file-upload-area {
            border: 2px dashed #ddd;
            border-radius: 8px;
            padding: 30px;
            text-align: center;
            transition: all 0.3s;
            background-color: #f9f9f9;
        }

        .file-upload-area:hover {
            border-color: var(--primary);
            background-color: #f0f7ff;
        }

        .file-upload-area i {
            font-size: 3rem;
            color: #aaa;
            margin-bottom: 15px;
        }

        .file-upload-area p {
            margin: 5px 0;
            color: #666;
        }

        .file-upload-button {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 16px;
            background-color: var(--primary);
            color: white;
            border-radius: 6px;
            cursor: pointer;
            margin: 10px 0;
            transition: background-color 0.3s;
        }

        .file-upload-button:hover {
            background-color: var(--blue-dark);
        }

        .hidden-file-input {
            display: none;
        }

        .file-format-info {
            font-size: 0.8rem;
            color: #888;
        }

        .selected-files {
            margin-top: 20px;
        }

        .selected-file {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 12px 15px;
            border: 1px solid #eee;
            border-radius: 8px;
            margin-bottom: 10px;
            background-color: #f9f9f9;
        }

        .file-icon {
            width: 40px;
            height: 40px;
            border-radius: 6px;
            background-color: #e9f0f8;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            color: var(--primary);
        }

        .file-info {
            flex-grow: 1;
        }

        .file-name {
            font-weight: 500;
            color: #333;
            margin-bottom: 3px;
        }

        .file-size {
            font-size: 0.8rem;
            color: #888;
            margin-bottom: 5px;
        }

        .upload-progress {
            height: 4px;
            background-color: #eee;
            border-radius: 2px;
            overflow: hidden;
        }

        .progress-bar {
            height: 100%;
            background-color: var(--primary);
        }

        .file-remove {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            border: 1px solid #ddd;
            background-color: white;
            color: #666;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s;
        }

        .file-remove:hover {
            color: var(--danger);
            border-color: var(--danger);
        }

        /* Attachment List Styles */
        .attachment-filters {
            margin-bottom: 20px;
            padding-bottom: 20px;
            border-bottom: 1px solid #eee;
        }

        .date-range {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .date-separator {
            color: #666;
        }

        .attachment-list {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .attachment-item {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 15px;
            border: 1px solid #eee;
            border-radius: 8px;
            transition: all 0.3s;
        }

        .attachment-item:hover {
            background-color: #f9f9f9;
            border-color: #ddd;
        }

        .attachment-preview {
            width: 60px;
            height: 60px;
            border-radius: 8px;
            background-color: #e9f0f8;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            color: var(--primary);
        }

        .image-preview {
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
        }

        .attachment-details {
            flex-grow: 1;
        }

        .attachment-title {
            font-weight: 600;
            color: #333;
            margin-bottom: 5px;
        }

        .attachment-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            margin-bottom: 5px;
        }

        .attachment-meta span {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 0.85rem;
            color: #666;
        }

        .attachment-meta i {
            color: #888;
        }

        .attachment-description {
            color: #555;
            font-size: 0.9rem;
        }

        .attachment-actions {
            display: flex;
            gap: 8px;
        }

        .attachment-pagination {
            display: flex;
            justify-content: center;
            gap: 5px;
            margin-top: 20px;
        }

        .pagination-button {
            width: 36px;
            height: 36px;
            border-radius: 6px;
            border: 1px solid #ddd;
            background-color: white;
            color: #666;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s;
        }

        .pagination-button:hover {
            background-color: #f5f5f5;
        }

        .pagination-button.active {
            background-color: var(--primary);
            color: white;
            border-color: var(--primary);
        }

        .pagination-ellipsis {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            color: #666;
        }
            background-color: #f9f9f9;
            padding: 15px;
            border-radius: 5px;
            margin-bottom: 20px;
        }

        .attachment-row {
            display: flex;
            gap: 15px;
            margin-bottom: 15px;
        }

        .attachment-field {
            display: flex;
            flex-direction: column;
            flex: 1;
        }

        .attachment-field label {
            font-weight: bold;
            margin-bottom: 5px;
        }

        .attachment-input {
            padding: 8px;
            border: 1px solid #ccc;
            border-radius: 4px;
        }

        .file-input {
            padding: 5px;
        }

        .attachment-list {
            margin-top: 30px;
        }

        .attachment-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 15px;
        }

        .attachment-table th, 
        .attachment-table td {
            padding: 10px;
            text-align: left;
            border-bottom: 1px solid #ddd;
        }

        .attachment-table th {
            background-color: #f2f2f2;
            font-weight: bold;
        }

        .icon-button {
            background: none;
            border: none;
            cursor: pointer;
            padding: 5px;
            margin-right: 5px;
        }

        .view-btn {
            color: #4B3FC5;
        }

        .download-btn {
            color: #1BBAFF;
        }

        .delete-btn {
            color: #FF6A6A;
        }

        .blue-button:hover {
            background-color: #3a7bc8;
        }

        .action-buttons {
            display: flex;
            gap: 5px;
            justify-content: center;
        }

        .delete-action {
            background-color: var(--danger);
            color: white;
            border: none;
            border-radius: 4px;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: background-color 0.2s;
        }

        .delete-action:hover {
            background-color: #ff4747;
        }

        .delete-action i {
            font-size: 14px;
        }

        .black-button {
            background-color: #212529;
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 0.9em;
            margin-top: 10px;
        }

        .black-button:hover {
            background-color: #343a40;
        }

        .prescription-input {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .prescription-input input {
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 4px;
            width: 100px;
        }
/* Responsive styles */
        @media screen and (max-width: 1200px) {
            .container {
                max-width: 100%;
                padding: 0.5rem;
            }
        }

        @media screen and (max-width: 992px) {
            .info-card {
                flex-wrap: wrap;
            }
            
            .info-item {
                flex: 1 0 33%;
                padding: 0.5rem;
                border-right: none;
                margin-bottom: 0.5rem;
            }
            
            .tab-nav {
                flex-wrap: wrap;
            }
            
            .tab-button {
                flex: 1 0 auto;
                text-align: center;
                font-size: 0.9rem;
                padding: 0.6rem 0.8rem;
            }
            
            .data-table {
                display: block;
                overflow-x: auto;
                white-space: nowrap;
            }
        }

        @media screen and (max-width: 768px) {
            header {
                flex-direction: column;
                align-items: flex-start;
                padding: 1rem;
            }
            
            .header-right {
                text-align: left;
                margin-top: 0.5rem;
            }
            
            .info-item {
                flex: 1 0 50%;
            }
            
            .content-panel {
                padding: 1rem;
            }
            
            .status-indicators {
                flex-wrap: wrap;
                gap: 1rem;
            }
            
            .controls {
                flex-direction: column;
                gap: 1rem;
            }
            
            .search-box {
                width: 100%;
            }
            
            .search-box input {
                width: 100%;
            }
            
            .attachment-row, .exam-row, .prescription-row {
                flex-direction: column;
                gap: 10px;
            }
        }

        @media screen and (max-width: 576px) {
            .info-item {
                flex: 1 0 100%;
            }
            
            .info-row {
                flex-direction: column;
                gap: 10px;
            }
            
            .tab-button {
                flex: 1 0 100%;
                border-radius: 4px;
                margin-bottom: 0.2rem;
            }
            
            .content-panel {
                border-radius: 8px;
            }
            
            .finish-button {
                width: 100%;
            }
            
            .button-group {
                flex-direction: column;
            }
            
            .attachment-table {
                font-size: 0.8rem;
            }
            
            .icon-button {
                padding: 3px;
                margin-right: 2px;
            }
        }

        .text-center {
            text-align: center;
        }

        /* Modern Attendance Form Styling */
.attendance-form.modern {
    background: linear-gradient(to right, #f8f9fa, #ffffff);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    padding: 0;
    overflow: hidden;
}

.attendance-header {
    display: flex;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, var(--primary), var(--blue-light));
    color: white;
    border-radius: 12px 12px 0 0;
}

.attendance-icon {
    font-size: 2rem;
    margin-right: 15px;
    color: rgba(255,255,255,0.9);
}

.attendance-header h2 {
    flex: 1;
    margin: 0;
    font-size: 1.6rem;
    font-weight: 600;
}

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

.action-button {
    display: flex;
    align-items: center;
    background-color: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-button:hover {
    background-color: rgba(255,255,255,0.3);
}

.action-button i {
    margin-right: 5px;
}

.attendance-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 25px;
}

.attendance-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.attendance-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.card-header i {
    font-size: 1.2rem;
    margin-right: 10px;
    color: var(--primary);
}

.card-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
}

.card-body {
    padding: 20px;
}

.card-footer {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

/* Form Styles */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.form-group.small {
    flex: 0 0 150px;
    min-width: 150px;
}

.card-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
}

.edit-button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.edit-button:hover {
    background-color: var(--blue-light);
}

.edit-button i {
    margin-right: 5px;
}

.medication-list {
    margin-bottom: 20px;
}

.medication-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
}

.medication-info {
    display: flex;
    flex-direction: column;
}

.medication-name {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 3px;
}

.medication-details, .medication-route {
    font-size: 0.85rem;
    color: #666;
}

.medication-actions {
    display: flex;
    gap: 5px;
}

.icon-button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.icon-button:hover {
    background-color: rgba(0,0,0,0.05);
}

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

.delete-btn:hover {
    color: var(--danger);
}

.add-medication {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.prescription-field {
    margin-bottom: 15px;
}

.prescription-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--dark);
}

.prescription-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.prescription-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(78, 134, 212, 0.2);
    outline: none;
}

.add-button {
    background-color: var(--success);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

.add-button:hover {
    background-color: #2ca058;
}

.add-button i {
    margin-right: 5px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding: 0 25px 25px;
}

.save-btn, .print-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.save-btn {
    background-color: var(--primary);
    color: white;
}

.save-btn:hover {
    background-color: var(--blue-light);
}

.print-btn {
    background-color: #f8f9fa;
    color: var(--dark);
    border: 1px solid #ddd;
}

.print-btn:hover {
    background-color: #e9ecef;
}

.save-btn i, .print-btn i {
    margin-right: 5px;
}

@media screen and (max-width: 768px) {
    .attendance-header {
        flex-direction: column;
        text-align: center;
    }
    
    .attendance-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .attendance-actions {
        margin-top: 15px;
    }
    
    .medication-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .medication-actions {
        margin-top: 10px;
        align-self: flex-end;
    }
}

/* Modern History Tab Styling */
.history-container.modern {
    background: linear-gradient(to right, #f8f9fa, #ffffff);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    padding: 0;
    overflow: hidden;
}

.history-header {
    display: flex;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, var(--primary), var(--blue-light));
    color: white;
    border-radius: 12px 12px 0 0;
}

.history-icon {
    font-size: 2rem;
    margin-right: 15px;
    color: rgba(255,255,255,0.9);
}

.history-header h2 {
    flex: 1;
    margin: 0;
    font-size: 1.6rem;
    font-weight: 600;
}

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

.status-legend {
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 20px 25px 0;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.legend-title {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    color: var(--dark);
    font-weight: 600;
}

.legend-title i {
    color: var(--primary);
    margin-right: 8px;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.status-indicator.released {
    border: 2px solid var(--dark);
}

.status-indicator.under-authority {
    background-color: var(--success);
}

.status-indicator.awaiting-authorization {
    background-color: var(--accent);
}

.status-indicator.awaiting-confirmation {
    background-color: var(--accent);
    opacity: 0.6;
}

.history-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.search-container {
    flex: 1;
    max-width: 400px;
}

.search-input {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input i {
    position: absolute;
    left: 12px;
    color: #aaa;
}

.search-input input {
    width: 100%;
    padding: 10px 10px 10px 35px;
    border: 1px solid #ddd;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.search-input input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(78, 134, 212, 0.2);
    outline: none;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-controls select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
}

.history-table-container {
    padding: 0 25px;
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0;
}

.history-table thead tr {
    background: linear-gradient(to right, var(--primary), var(--blue-light));
    color: white;
}

.history-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 500;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}

.history-table th:first-child {
    border-top-left-radius: 10px;
}

.history-table th:last-child {
    border-top-right-radius: 10px;
}

.history-table th i {
    margin-right: 5px;
    font-size: 0.9rem;
    vertical-align: middle;
}

.history-table th span {
    vertical-align: middle;
}

.history-table tbody tr {
    transition: all 0.2s ease;
}

.history-table tbody tr:nth-child(odd) {
    background-color: rgba(248, 249, 250, 0.7);
}

.history-table tbody tr:hover {
    background-color: rgba(78, 134, 212, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.history-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.history-table tr.highlight-row {
    background-color: rgba(98, 197, 22, 0.15) !important;
}

.specialty-pill {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
    background-color: var(--blue-dark);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.history-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 20px 0 25px;
}

.pagination-button {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-button:hover {
    background-color: #f8f9fa;
    border-color: #aaa;
}

.pagination-button.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-ellipsis {
    margin: 0 5px;
}

@media screen and (max-width: 992px) {
    .legend-items {
        gap: 10px;
    }
    
    .history-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-container {
        max-width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .history-header {
        flex-direction: column;
        text-align: center;
    }
    
    .history-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .history-actions {
        margin-top: 15px;
    }
    
    .legend-items {
        flex-direction: column;
        gap: 8px;
    }
}
/* Modern Prescription Tab Styling */
.prescription-container.modern {
    background: linear-gradient(to right, #f8f9fa, #ffffff);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    padding: 0;
    overflow: hidden;
}

.prescription-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.prescription-icon {
    background-color: var(--primary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.prescription-header h2 {
    margin: 0;
    flex-grow: 1;
    font-size: 1.8rem;
    color: var(--dark);
}

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

.prescription-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.prescription-tab-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.prescription-tab-button i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.prescription-tab-button:hover {
    color: var(--primary);
    background-color: rgba(78, 134, 212, 0.05);
}

.prescription-tab-button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.prescription-content-panel {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.prescription-tab-content {
    display: none;
    padding: 0;
}

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

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

.prescription-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.card-header i {
    font-size: 1.2rem;
    margin-right: 10px;
    color: var(--primary);
}

.card-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
    flex: 1;
}

.card-header.controlled {
    background-color: #fff8f8;
}

.card-header.controlled i {
    color: #dc3545;
}

.control-badge {
    background-color: #dc3545;
    color: white;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.card-body {
    padding: 20px;
}

.card-footer {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

/* Form Styles */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.form-group.small {
    flex: 0 0 150px;
    min-width: 150px;
}

.card-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

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

.form-group.small {
    flex: 0.5;
}

.form-group.action {
    flex: 0.2;
    justify-content: flex-end;
}

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

.form-group label i {
    margin-right: 6px;
    color: var(--primary);
}

.form-control {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(78, 134, 212, 0.2);
    outline: none;
}

.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-right: 35px;
}

.input-with-icon i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    cursor: pointer;
}

.add-item-button {
    height: 38px;
    width: 38px;
    border-radius: 6px;
    background-color: var(--primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: flex-end;
}

.add-item-button:hover {
    background-color: var(--blue-dark);
    transform: translateY(-2px);
}

.requested-items, .medication-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.requested-item, .medication-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid var(--primary);
    transition: all 0.2s ease;
}

.medication-list.controlled .medication-item {
    border-left-color: #dc3545;
}

.requested-item:hover, .medication-item:hover {
    background-color: #f1f3f5;
    transform: translateX(2px);
}

.item-info, .medication-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.item-code {
    font-size: 0.8rem;
    color: #6c757d;
}

.item-name, .medication-name {
    font-weight: 600;
    color: var(--dark);
}

.item-quantity {
    font-size: 0.9rem;
    color: #495057;
}

.medication-details, .medication-route {
    font-size: 0.9rem;
    color: #495057;
}

.item-actions, .medication-actions {
    display: flex;
    gap: 8px;
}

.icon-button {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: none;
    background-color: white;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.delete-btn:hover {
    background-color: #ffebee;
    color: #dc3545;
}

.action-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background-color: white;
    color: #495057;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-button:hover {
    background-color: #f8f9fa;
    border-color: #ced4da;
}

.action-button.primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: rgb(255, 255, 255);
}

.action-button.primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: rgb(255, 255, 255);
}

.action-button.secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.action-button.secondary:hover {
    background-color: #5a6268;
    border-color: #5a6268;
}

.number-input-container {
    display: flex;
    align-items: center;
}

.number-input {
    text-align: center;
    width: 60px;
    border-radius: 0;
    border-left: none;
    border-right: none;
}

.number-control {
    width: 36px;
    height: 38px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.number-control.decrease {
    border-radius: 6px 0 0 6px;
}

.number-control.increase {
    border-radius: 0 6px 6px 0;
}

.number-control:hover {
    background-color: #e9ecef;
}

/* Prescription Styles */
.prescription-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.prescription-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.prescription-icon {
    background-color: var(--primary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.prescription-header h2 {
    margin: 0;
    flex-grow: 1;
    font-size: 1.8rem;
    color: var(--dark);
}

.prescription-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.prescription-tab-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.prescription-tab-button:hover {
    color: var(--primary);
    background-color: rgba(78, 134, 212, 0.05);
}

.prescription-tab-button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.prescription-tab-button i {
    font-size: 1.1rem;
}

.prescription-content-panel {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.prescription-tab-content {
    display: none;
    padding: 0;
}

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

/* Card Styles */
.prescription-card {
    border-radius: 10px;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.card-header i {
    font-size: 1.2rem;
    color: var(--primary);
}

.card-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--dark);
    flex-grow: 1;
}

.card-header.controlled {
    background-color: #fff0f0;
}

.card-header.controlled i {
    color: #ff6b6b;
}

.card-body {
    padding: 20px;
}

.card-footer {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

/* Form Elements */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.form-group.small {
    flex: 0 0 150px;
    min-width: 150px;
}

.form-group.action {
    flex: 0 0 auto;
    min-width: auto;
    align-self: flex-end;
    margin-bottom: 5px;
}

.form-group label {
    font-size: 0.9rem;
    color: #555;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-control {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
}

.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-right: 35px;
    width: 100%;
}

.input-with-icon i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.add-item-button {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: var(--primary);
    color: white;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-item-button:hover {
    background-color: var(--primary-dark);
}

/* Favorites Section */
.exam-favorites, .medication-favorites {
    margin-bottom: 20px;
}

.exam-favorites h4, .medication-favorites h4 {
    font-size: 1rem;
    color: #555;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.favorite-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.favorite-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background-color: #f0f4f8;
    border-radius: 20px;
    font-size: 0.9rem;
}

.add-favorite {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Item Lists */
.requested-items, .medication-list {
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.requested-item, .medication-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.requested-item:last-child, .medication-item:last-child {
    border-bottom: none;
}

.item-info, .medication-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.item-code, .medication-name {
    font-weight: 600;
    color: #333;
}

.item-name, .medication-details {
    color: #555;
}

.item-quantity, .medication-route, .medication-quantity {
    font-size: 0.9rem;
    color: #777;
}

.item-actions, .medication-actions {
    display: flex;
    gap: 8px;
}

.icon-button {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background-color: white;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.icon-button:hover {
    background-color: #f5f5f5;
}

.edit-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
}
    background-color: rgba(78, 134, 212, 0.05);
}

.prescription-tab-button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.prescription-tab-button i {
    font-size: 1.1rem;
}

.prescription-content-panel {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.prescription-tab-content {
    display: none;
    padding: 0;
}

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

/* Card Styles */
.prescription-card {
    border-radius: 10px;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.card-header i {
    font-size: 1.2rem;
    color: var(--primary);
}

.card-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--dark);
    flex-grow: 1;
}

.card-header.controlled {
    background-color: #fff0f0;
}

.card-header.controlled i {
    color: #ff6b6b;
}

.control-type-selector {
    display: flex;
    gap: 5px;
}

.control-type-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ddd;
    background-color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-type-btn.active {
    background-color: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.control-badge {
    background-color: #ff6b6b;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.card-footer {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

/* Form Styles */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.form-group.small {
    flex: 0 0 150px;
    min-width: 150px;
}

.card-footer {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

/* Form Styles */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.form-group.small {
    flex: 0 0 150px;
    min-width: 150px;
}

/* Form Elements */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.form-group.small {
    flex: 0 0 150px;
    min-width: 150px;
}

.form-group.action {
    flex: 0 0 auto;
    min-width: auto;
    align-self: flex-end;
    margin-bottom: 5px;
}

.form-group label {
    font-size: 0.9rem;
    color: #555;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-control {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
}

.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-right: 35px;
    width: 100%;
}

.input-with-icon i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.add-item-button {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: var(--primary);
    color: white;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-item-button:hover {
    background-color: var(--primary-dark);
}

/* Favorites Section */
.exam-favorites, .medication-favorites {
    margin-bottom: 20px;
}

.exam-favorites h4, .medication-favorites h4 {
    font-size: 1rem;
    color: #555;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.favorite-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.favorite-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background-color: #f0f4f8;
    border-radius: 20px;
    font-size: 0.9rem;
}

.add-favorite {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Item Lists */
.requested-items, .medication-list {
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.requested-item, .medication-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.requested-item:last-child, .medication-item:last-child {
    border-bottom: none;
}

.item-info, .medication-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.item-code, .medication-name {
    font-weight: 600;
    color: #333;
}

.item-name, .medication-details {
    color: #555;
}

.item-quantity, .medication-route, .medication-quantity {
    font-size: 0.9rem;
    color: #777;
}

.item-actions, .medication-actions {
    display: flex;
    gap: 8px;
}

.icon-button {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background-color: white;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.icon-button:hover {
    background-color: #f5f5f5;
}

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

.delete-btn:hover {
    color: #dc3545;
    border-color: #dc3545;
    background-color: #fff5f5;
}

/* Prescription Tab Styles */
.prescription-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.prescription-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.prescription-icon {
    background-color: var(--primary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.prescription-header h2 {
    margin: 0;
    flex-grow: 1;
    font-size: 1.8rem;
    color: var(--dark);
}

.prescription-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.prescription-tab-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.prescription-tab-button:hover {
    color: var(--primary);
    background-color: rgba(78, 134, 212, 0.05);
}

.prescription-tab-button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.prescription-tab-button i {
    font-size: 1.1rem;
}

.prescription-content-panel {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.prescription-tab-content {
    display: none;
    padding: 0;
}

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

/* Card Styles */
.prescription-card {
    border-radius: 10px;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.card-header i {
    font-size: 1.2rem;
    color: var(--primary);
}

.card-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--dark);
    flex-grow: 1;
}

.card-header.controlled {
    background-color: #fff0f0;
}

.card-header.controlled i {
    color: #ff6b6b;
}

.card-body {
    padding: 20px;
}

.card-footer {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

/* Form Elements */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.form-group.small {
    flex: 0 0 150px;
    min-width: 150px;
}

.form-group.action {
    flex: 0 0 auto;
    min-width: auto;
    align-self: flex-end;
    margin-bottom: 5px;
}

.form-group label {
    font-size: 0.9rem;
    color: #555;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-control {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
}

.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-right: 35px;
    width: 100%;
}

.input-with-icon i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.add-item-button {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: var(--primary);
    color: white;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-item-button:hover {
    background-color: var(--primary-dark);
}

/* Favorites Section */
.exam-favorites, .medication-favorites {
    margin-bottom: 20px;
}

.exam-favorites h4, .medication-favorites h4 {
    font-size: 1rem;
    color: #555;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.favorite-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.favorite-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background-color: #f0f4f8;
    border-radius: 20px;
    font-size: 0.9rem;
}

.add-favorite {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Item Lists */
.requested-items, .medication-list {
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.requested-item, .medication-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.requested-item:last-child, .medication-item:last-child {
    border-bottom: none;
}

.item-info, .medication-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.item-code, .medication-name {
    font-weight: 600;
    color: #333;
}

.item-name, .medication-details {
    color: #555;
}

.item-quantity, .medication-route, .medication-quantity {
    font-size: 0.9rem;
    color: #777;
}

.item-actions, .medication-actions {
    display: flex;
    gap: 8px;
}

.icon-button {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background-color: white;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.icon-button:hover {
    background-color: #f5f5f5;
}

.icon-button.edit-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.icon-button.delete-btn:hover {
    color: #ff6b6b;
    border-color: #ff6b6b;
}

/* Notes Section */
.exam-notes, .prescription-notes {
    margin-bottom: 20px;
}

.exam-notes h4, .prescription-notes h4 {
    font-size: 1rem;
    color: #555;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Action Buttons */
.action-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background-color: white;
    color: #555;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.action-button:hover {
    background-color: #f5f5f5;
}

.action-button.primary {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.action-button.primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: rgb(255, 255, 255);
}

.action-button.secondary {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

.action-button.secondary:hover {
    background-color: #5a6268;
}

/* Controlled Prescription Specific */
.control-type-selector {
    display: flex;
    gap: 5px;
}

.control-type-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ddd;
    background-color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-type-btn.active {
    background-color: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.controlled-warning {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background-color: #fff8f8;
    border: 1px solid #ffdddd;
    border-radius: 6px;
    margin-bottom: 20px;
}

.controlled-warning i {
    color: #ff6b6b;
    font-size: 1.2rem;
}

.controlled-warning p {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
}

/* Patient Data */
.patient-data {
    margin-bottom: 20px;
}

.patient-data h4 {
    font-size: 1rem;
    color: #555;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Number Input Container */
.number-input-container {
    display: flex;
    align-items: center;
}

.number-control {
    width: 30px;
    height: 38px;
    border: 1px solid #ddd;
    background-color: #f5f5f5;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.number-control.decrease {
    border-radius: 6px 0 0 6px;
}

.number-control.increase {
    border-radius: 0 6px 6px 0;
}

.number-input {
    width: 60px;
    text-align: center;
    border-radius: 0;
    border-left: none;
    border-right: none;
}

/* Certificate Specific */
.certificate-type-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.certificate-type-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background-color: white;
    color: #555;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.certificate-type-btn:hover {
    background-color: #f5f5f5;
}

.certificate-type-btn.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.certificate-options {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Preview Styles */
.prescription-preview, .certificate-preview {
    margin-top: 30px;
}

.prescription-preview h4, .certificate-preview h4 {
    font-size: 1rem;
    color: #555;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
}

.preview-header, .preview-controlled-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    text-align: center;
    position: relative;
}

.preview-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.preview-logo i {
    font-size: 1.5rem;
    color: var(--primary);
}

.preview-logo span {
    font-weight: 600;
    color: var(--primary);
}

.preview-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.preview-subtitle {
    font-size: 0.9rem;
    color: #666;
}

.preview-type {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #ff6b6b;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.preview-content {
    padding: 20px;
    min-height: 200px;
}

.preview-patient {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.preview-patient-name, .preview-patient-doc, .preview-patient-address {
    margin-bottom: 5px;
    color: #333;
}

.preview-medications {
    margin-bottom: 20px;
}

.preview-medication {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
}

.preview-medication:last-child {
    border-bottom: none;
}

.preview-med-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.preview-med-details, .preview-med-route, .preview-med-quantity {
    color: #555;
    margin-bottom: 3px;
}

.preview-notes {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.preview-notes p {
    color: #555;
    margin: 0;
}

.preview-cid {
    margin-top: 15px;
    font-weight: 500;
    color: #555;
}

.preview-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.preview-date {
    margin-bottom: 15px;
    color: #555;
}

.preview-signature {
    height: 40px;
    border-bottom: 1px solid #333;
    margin: 0 auto 15px;
    width: 200px;
}

.preview-doctor {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.preview-crm {
    color: #555;
}

.back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    position: absolute;
    right: 20px;
    top: 10px;
    background-color: #3498db;
    color: #ffffff;
    line-height: 1.2;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    z-index: 100;
    }

    .back-button i {
    margin-right: 5px; /* Add some space between the icon and text */
    }