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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #1e293b;
    background-color: #f8fafc;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
}

input, select, textarea {
    font-family: inherit;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: #2563eb;
}

.logo i {
    font-size: 24px;
}

.sidebar-toggle, .mobile-toggle {
    display: none;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 4px;
    transition: all 0.2s;
}

.nav-item:hover {
    background: #f1f5f9;
    color: #334155;
}

.nav-item.active {
    background: #dbeafe;
    color: #2563eb;
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid #e2e8f0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: #2563eb;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: #64748b;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    color: #64748b;
    font-weight: 500;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

.main-content {
    flex: 1;
    margin-left: 260px;
}

.top-header {
    height: 64px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 100;
}

.header-time {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 20px;
    color: #64748b;
    padding: 8px;
    border-radius: 8px;
}

.notification-btn:hover {
    background: #f1f5f9;
}

.notification-btn:focus {
    outline: none;
    background: #f1f5f9;
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #dc2626;
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.notification-dropdown.show {
    display: block;
}

.notification-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.btn-link {
    background: none;
    border: none;
    color: #2563eb;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}

.btn-link:hover {
    text-decoration: underline;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 14px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: background 0.2s;
    cursor: pointer;
}

.notification-item:hover {
    background: #f8fafc;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {
    background: #eff6ff;
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon.sms {
    background: #dbeafe;
    color: #2563eb;
}

.notification-icon.low-stock {
    background: #fef3c7;
    color: #f59e0b;
}

.notification-icon.expiring {
    background: #fce7f3;
    color: #db2777;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-content strong {
    font-size: 13px;
    display: block;
    margin-bottom: 2px;
}

.notification-content p {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.notification-time {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: #94a3b8;
}

.notification-empty i {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.notification-empty p {
    font-size: 13px;
    margin: 0;
}

.notification-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.notification-actions .btn {
    padding: 4px 10px;
    font-size: 11px;
}

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

.notification-detail-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin: 0 auto 16px;
}

.notification-detail-icon.sms {
    background: #dbeafe;
    color: #2563eb;
}

.notification-detail-icon.low-stock {
    background: #fef3c7;
    color: #f59e0b;
}

.notification-detail-icon.expiring {
    background: #fce7f3;
    color: #db2777;
}

.notification-detail-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #0f172a;
}

.notification-detail-message {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 16px;
}

.notification-detail-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.notification-detail-meta .notification-time {
    margin-top: 0;
}

.content-area {
    flex: 1;
    padding: 24px;
}

.dashboard {
    max-width: 1400px;
    margin: 0 auto;
}

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

.stat-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-card.stat-warning {
    border: 2px solid #f59e0b;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
}

.stat-label {
    font-size: 13px;
    color: #64748b;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.dashboard-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h3 i {
    color: #94a3b8;
}

.card-body {
    padding: 20px;
}

.consultation-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.consultation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
}

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

.patient-name {
    font-weight: 600;
}

.student-id {
    font-size: 12px;
    color: #64748b;
}

.consultation-details {
    text-align: right;
    display: flex;
    flex-direction: column;
}

.diagnosis {
    font-size: 13px;
    color: #475569;
}

.datetime {
    font-size: 12px;
    color: #94a3b8;
}

.alert-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
}

.alert-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.alert-icon.warning {
    background: #fef3c7;
    color: #f59e0b;
}

.alert-icon.danger {
    background: #fee2e2;
    color: #dc2626;
}

.alert-icon.success {
    background: #d1fae5;
    color: #059669;
}

.alert-content {
    display: flex;
    flex-direction: column;
}

.alert-title {
    font-weight: 600;
    font-size: 14px;
}

.alert-text {
    font-size: 12px;
    color: #64748b;
}

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

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    flex: 1;
}

.action-btn:hover {
    background: #dbeafe;
    color: #2563eb;
}

.action-btn i {
    font-size: 20px;
}

.quick-actions .card-body {
    padding: 12px;
}

.quick-actions .action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.page-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.search-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-input-wrapper {
    position: relative;
}

.search-input-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.search-input-wrapper input {
    padding-left: 40px;
    padding-right: 36px;
    width: 400px;
    height: 42px;
    font-size: 15px;
}

.search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #94a3b8;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.search-clear:hover {
    background: #f1f5f9;
    color: #64748b;
}

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

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

.search-loading {
    position: absolute;
    right: 50px;
    color: #64748b;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #2563eb;
    color: #ffffff;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-outline {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.btn-danger {
    background: #dc2626;
    color: #ffffff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: none;
    border: none;
    color: #64748b;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #f1f5f9;
    color: #334155;
}

.btn-icon.danger:hover {
    background: #fee2e2;
    color: #dc2626;
}

.btn-icon.success:hover {
    background: #d1fae5;
    color: #059669;
}

.form-panel {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: none;
}

.form-panel.show {
    display: block;
}

.form-panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-panel-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.btn-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #64748b;
    padding: 4px;
}

.btn-close:hover {
    color: #334155;
}

.patient-form, .consultation-form {
    padding: 20px;
}

.form-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #334155;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

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

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: #334155;
}

.required {
    color: #dc2626;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px #dbeafe;
}

.form-group textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.form-hint {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.patient-alert-box {
    margin-top: 16px;
}

.prescriptions-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.prescription-item {
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.prescription-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.stock-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 13px;
    color: #b45309;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 8px 12px;
}

.stock-warning.error {
    color: #b91c1c;
    background: #fee2e2;
    border-color: #fecaca;
}

.prescription-row select,
.prescription-row input {
    flex: 1 1 140px;
    min-width: 0;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
}

.medicine-select {
    flex: 1.5 1 220px !important;
    min-width: 0 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.prescription-row .btn-icon {
    flex: none;
}

.qty-input {
    width: 80px !important;
    flex: none !important;
}

.patient-search {
    position: relative;
}

.patient-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 13px;
}

.patient-search input[type="text"] {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
}

.patient-search input[type="text"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px #dbeafe;
}

.patient-search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.15);
    max-height: 260px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.patient-search-results.show {
    display: block;
}

.patient-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.patient-search-item:hover {
    background: #f1f5f9;
}

.ps-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
}

.ps-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ps-name {
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
}

.ps-id {
    font-size: 12px;
    color: #64748b;
}

.patient-search-empty {
    padding: 12px;
    font-size: 13px;
    color: #64748b;
    text-align: center;
}

.card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.card-body {
    padding: 20px;
}

.medicine-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.medicine-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.15);
}

.medicine-card-image {
    height: 160px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.medicine-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.medicine-card-image .medicine-placeholder {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.medicine-card-image .medicine-placeholder i {
    font-size: 36px;
    color: #ffffff;
}

.medicine-card-image .category-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(255,255,255,0.9);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.medicine-card-image .status-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
}

.medicine-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.medicine-card-body h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
    line-height: 1.3;
}

.medicine-card-body .medicine-unit {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 16px;
}

.medicine-stock-info {
    margin-bottom: 12px;
}

.medicine-stock-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.medicine-stock-label {
    font-size: 12px;
    color: #64748b;
}

.medicine-stock-value {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.medicine-stock-value.low {
    color: #dc2626;
}

.medicine-expiry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
}

.medicine-expiry-label {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.medicine-expiry-value {
    font-size: 13px;
    font-weight: 500;
    color: #475569;
}

.medicine-expiry-value.expiring {
    color: #f59e0b;
}

.medicine-expiry-value.expired {
    color: #dc2626;
}

.medicine-card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.medicine-card-actions .btn {
    flex: 1;
    padding: 10px 12px;
    font-size: 13px;
}

.medicine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.table-responsive {
    overflow-x: auto;
}

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

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.data-table tbody tr.inactive-row {
    opacity: 0.6;
}

.data-table tbody tr.warning-row {
    background: #fef3c7;
}

.patient-link {
    font-weight: 600;
    color: #2563eb;
}

.patient-link:hover {
    text-decoration: underline;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
}

.badge-outline {
    background: none;
    border: 1px solid #cbd5e1;
}

.badge-primary {
    background: #dbeafe;
    color: #2563eb;
}

.badge-secondary {
    background: #e2e8f0;
    color: #475569;
}

.allergy-badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
    background: #fee2e2;
    color: #dc2626;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
}

.status-badge.good {
    background: #d1fae5;
    color: #059669;
}

.status-badge.low {
    background: #fef3c7;
    color: #f59e0b;
}

.status-badge.expiring {
    background: #fef3c7;
    color: #f59e0b;
}

.status-badge.expired {
    background: #fee2e2;
    color: #dc2626;
}

.status-badge.inactive {
    background: #e2e8f0;
    color: #64748b;
}

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

.contact-info small {
    color: #64748b;
    font-size: 12px;
}

.medicine-name strong {
    display: block;
}

.stock-count {
    font-weight: 600;
}

.stock-count.low {
    color: #dc2626;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    background: #e2e8f0;
    color: #475569;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.inactive-row {
    opacity: 0.6;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #cbd5e1;
}

.empty-state.success i {
    color: #059669;
}

.empty-state p {
    font-size: 14px;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
}

.alert i {
    margin-top: 2px;
}

.alert-danger {
    background: #fee2e2;
    color: #dc2626;
}

.alert-success {
    background: #d1fae5;
    color: #059669;
}

.alert-info {
    background: #dbeafe;
    color: #2563eb;
}

.alert-warning {
    background: #fef3c7;
    color: #f59e0b;
}

.patient-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.back-btn {
    margin-right: auto;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.patient-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.patient-profile-card,
.patient-alerts-card,
.consultation-history-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 24px;
}

.consultation-history-card {
    grid-column: span 2;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    background: #2563eb;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
}

.profile-info h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-info .student-id {
    display: inline-block;
    padding: 2px 8px;
    background: #f1f5f9;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 8px;
}

.profile-info .grade-level {
    font-size: 13px;
    color: #64748b;
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-label {
    width: 140px;
    font-size: 13px;
    color: #64748b;
}

.detail-label i {
    width: 16px;
    margin-right: 8px;
}

.detail-value {
    font-weight: 500;
}

.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: #e2e8f0;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-marker {
    position: absolute;
    left: -18px;
    top: 4px;
    width: 12px;
    height: 12px;
    background: #2563eb;
    border-radius: 50%;
    border: 2px solid #ffffff;
}

.timeline-content {
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
}

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

.timeline-date {
    font-weight: 600;
    font-size: 13px;
}

.timeline-author {
    font-size: 12px;
    color: #64748b;
}

.diagnosis-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #dbeafe;
    color: #2563eb;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.prescriptions-list {
    margin-top: 12px;
    padding: 12px;
    background: #ffffff;
    border-radius: 8px;
    font-size: 13px;
}

.prescriptions-list ul {
    margin-top: 8px;
    padding-left: 20px;
}

.prescriptions-list li {
    margin-bottom: 4px;
    color: #475569;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: none;
}

.modal-overlay.show {
    display: block;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 201;
    display: none;
}

.modal.show {
    display: block;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.modal-body {
    padding: 20px;
}

.modal.consultation-modal {
    max-width: 700px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.detail-item {
    font-size: 14px;
}

.detail-item.full {
    grid-column: span 2;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    animation: slideIn 0.3s ease;
    min-width: 280px;
}

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

.toast.success {
    background: #059669;
    color: #ffffff;
}

.toast.error {
    background: #dc2626;
    color: #ffffff;
}

.toast.info {
    background: #2563eb;
    color: #ffffff;
}

.toast.warning {
    background: #f59e0b;
    color: #ffffff;
}

.reports-container {
    display: flex;
    gap: 24px;
}

.reports-sidebar {
    width: 240px;
    flex-shrink: 0;
}

.report-types {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 16px;
    margin-bottom: 20px;
}

.report-types h4 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 12px;
    padding: 0 12px;
}

.report-type-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    transition: all 0.2s;
}

.report-type-btn:hover {
    background: #f8fafc;
}

.report-type-btn.active {
    background: #dbeafe;
    color: #2563eb;
}

.report-filters {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 16px;
    margin-bottom: 20px;
}

.report-filters h4 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 12px;
}

.export-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reports-content {
    flex: 1;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 24px;
}

.report-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.report-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.report-header p {
    color: #64748b;
    font-size: 14px;
}

.report-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

.report-stats .stat-card {
    flex: 1;
}

.chart-section {
    margin-bottom: 24px;
}

.chart-section h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
}

.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bar-label {
    width: 150px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-container {
    flex: 1;
    height: 24px;
    background: #f1f5f9;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: #2563eb;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.bar-value {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 600;
    color: #334155;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.summary-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.summary-card i {
    font-size: 32px;
    color: #94a3b8;
    margin-bottom: 12px;
}

.summary-card.warning i {
    color: #f59e0b;
}

.summary-value {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.summary-label {
    font-size: 14px;
    color: #64748b;
}

.settings-container {
    max-width: 1000px;
    margin: 0 auto;
}

.settings-tabs {
    display: flex;
    gap: 4px;
    background: #ffffff;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 24px;
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #f8fafc;
}

.tab-btn.active {
    background: #2563eb;
    color: #ffffff;
}

.settings-content {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tab-content {
    display: none;
    padding: 24px;
}

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

.illnesses-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.illness-item {
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.illness-header {
    margin-bottom: 8px;
}

.illness-details p {
    font-size: 13px;
    margin-bottom: 4px;
}

.logs-list {
    max-height: 500px;
    overflow-y: auto;
}

.log-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.log-item:last-child {
    border-bottom: none;
}

.log-icon {
    margin-top: 4px;
}

.log-icon i {
    font-size: 8px;
    color: #94a3b8;
}

.log-content {
    flex: 1;
}

.log-action {
    font-weight: 500;
    display: block;
}

.log-details {
    font-size: 13px;
    color: #475569;
    display: block;
    margin-top: 2px;
}

.log-meta {
    font-size: 12px;
    color: #94a3b8;
    display: block;
    margin-top: 4px;
}

.current-stock {
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.login-bg-slide {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: loginBgFade 15s infinite;
    z-index: 0;
}

.login-bg-slide.slide-2 { animation-delay: 5s; }
.login-bg-slide.slide-3 { animation-delay: 10s; }

@keyframes loginBgFade {
    0%, 3%    { opacity: 0; }
    8%, 30%   { opacity: 1; }
    35%, 100% { opacity: 0; }
}

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

.login-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 64px;
    height: 64px;
    background: #2563eb;
    color: #ffffff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 16px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.login-header p {
    color: #64748b;
    font-size: 14px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper > i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px #dbeafe;
}

.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    z-index: 1;
}

.toggle-password:hover {
    color: #475569;
}

.login-form .input-wrapper:has(.toggle-password) input {
    padding-right: 44px;
}

.login-footer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.demo-credentials {
    font-size: 12px;
    color: #64748b;
    text-align: center;
    line-height: 1.8;
}

.text-muted {
    color: #94a3b8;
}

.text-danger {
    color: #dc2626;
}

.text-warning {
    color: #f59e0b;
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .consultation-history-card {
        grid-column: span 1;
    }
    
    .patient-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .reports-container {
        flex-direction: column;
    }
    
    .reports-sidebar {
        width: 100%;
        display: flex;
        gap: 16px;
        flex-wrap: wrap;
    }
    
    .report-types {
        flex: 1;
        min-width: 200px;
        margin-bottom: 0;
    }
    
    .report-filters {
        flex: 1;
        min-width: 200px;
        margin-bottom: 0;
    }
    
    .export-section {
        flex: 1;
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .content-area {
        padding: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group.full-width {
        grid-column: span 1;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1 1 45%;
    }
    
    .login-card {
        padding: 24px;
    }
}
