/* Main Styling for Physiotherapy Patient Management System */

:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2ecc71;
    --secondary-dark: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --light-color: #f8f9fa;
    --dark-color: #AFD0CD;
    --gray-color: #6c757d;
    --border-color: #dee2e6;
    --font-main: 'Roboto', sans-serif;
}

/* General Styles */
body {
    font-family: var(--font-main);
    color: #333;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.content-wrapper {
    flex: 1;
    padding: 20px 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-warning { color: var(--warning-color) !important; }

/* Login Page */
.login-container {
    max-width: 700px;
    margin: 100px auto;
    padding: 40px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.captcha-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.captcha-image {
    border: 1px solid #dee2e6;
    border-radius: 5px;
    max-width: 250px;
    height: 80px;
    width: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-image img {
    max-width: 100%;
    height: auto;
}

.spin {
    animation: spin 1s linear infinite;
}

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

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo img {
    background: transparent !important;
    border: none;
    box-shadow: none;
    mix-blend-mode: multiply;
}

.login-title {
    text-align: center;
    font-weight: 300;
    margin-bottom: 30px;
    color: #000000 !important;
}

.login-container .form-label {
    color: #000000 !important;
}

.login-container .input-group-text {
    color: #000000 !important;
}

.login-container .input-group-text i {
    color: #000000 !important;
}

.login-container .form-control {
    color: #000000 !important;
}

.login-container .form-control::placeholder {
    color: #6c757d !important;
}

/* Global text color fixes - make all text black */
.form-label,
label,
.card-title,
.table th,
.navbar-text,
.sidebar-header h3,
.sidebar-header h4,
.sidebar-header h5,
.sidebar .nav-link,
.sidebar .nav-link i,
.stats-card .content h3,
.stats-card .content p,
.alert,
.btn,
.dropdown-item,
.modal-title,
.modal-body label,
.modal-body .form-label,
.table td,
.badge,
.text-muted {
    color: #000000 !important;
}

/* Specific overrides for better contrast */
.stats-card .content h3 {
    color: #000000 !important;
}

.stats-card .content p {
    color: #000000 !important;
}

/* Form elements */
.form-control,
.form-select,
.input-group-text {
    color: #000000 !important;
}

/* Table headers and data */
.table thead th {
    color: #000000 !important;
    font-weight: bold;
}

.table tbody td {
    color: #000000 !important;
}

/* Modal and form labels */
.modal .form-label,
.modal label {
    color: #000000 !important;
    font-weight: bold;
}

/* Card titles and headers */
.card-header .card-title,
.card-title {
    color: #000000 !important;
    font-weight: bold;
}

/* Buttons text */
.btn {
    color: #000000 !important;
}

.btn-primary,
.btn-success,
.btn-info {
    color: #ffffff !important;
}

/* Alert text */
.alert {
    color: #000000 !important;
}

.alert-success {
    color: #000000 !important;
}

.alert-danger {
    color: #000000 !important;
}

.alert-warning {
    color: #000000 !important;
}

.alert-info {
    color: #000000 !important;
}

/* Navigation */
.sidebar {
    width: 250px;
    background-color: var(--dark-color);
    color: white;
    height: 100%;
    position: fixed;
    left: 0;
    top: 0;
    padding-top: 70px;
    transition: all 0.3s ease;
    z-index: 100;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 20px;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: var(--primary-color);
}

.sidebar .nav-link i {
    margin-right: 10px;
}

.sidebar-header img {
    background: transparent !important;
    border: none;
    box-shadow: none;
    mix-blend-mode: multiply;
}

.sidebar-header h3,
.sidebar-header h4 {
    color: #000000 !important;
    font-weight: bold;
}

.sidebar .nav-link {
    color: #000000 !important;
    padding: 12px 20px;
    transition: all 0.2s ease;
    font-weight: bold;
}

.sidebar .nav-link:hover {
    color: #000000 !important;
    background-color: rgba(0, 0, 0, 0.1);
}

.sidebar .nav-link.active {
    color: #ffffff !important;
    background-color: var(--primary-color);
    font-weight: bold;
}

.sidebar .nav-link i {
    margin-right: 10px;
    color: #000000 !important;
}

.sidebar .nav-link.active i {
    color: #ffffff !important;
}

.navbar-brand {
    font-weight: 700;
}

.main-content {
    margin-left: 250px;
    transition: all 0.3s ease;
}

.navbar {
    padding: 15px 20px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.navbar-text {
    font-weight: bold !important;
    color: #000000 !important;
}

/* For mobile: collapse sidebar */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-250px);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .sidebar-toggle {
        display: block !important;
    }
}

.sidebar-toggle {
    display: none;
    cursor: pointer;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
}

.card-title {
    margin-bottom: 0;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* Dashboard Statistics */
.stats-card {
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    background-color: #fff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    height: 120px;
    min-height: 120px;
}

.stats-card .icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 20px;
}

.stats-card .icon.patients {
    background-color: rgba(16, 16, 17, 0.2);
    color: var(--primary-color);
}

.stats-card .icon.appointments {
    background-color: rgba(46, 204, 113, 0.2);
    color: var(--secondary-color);
}

.stats-card .icon.appointments-week {
    background-color: rgba(52, 152, 219, 0.2);
    color: var(--primary-color);
}

.stats-card .icon.invoices {
    background-color: rgba(243, 156, 18, 0.2);
    color: var(--warning-color);
}

.stats-card .icon.uninvoiced {
    background-color: rgba(231, 76, 60, 0.2);
    color: var(--danger-color);
}

.stats-card .content h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.stats-card .content p {
    margin: 5px 0 0;
    color: var(--gray-color);
}

/* Clickable Cards */
.clickable-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.clickable-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

/* Welcome Card */
.welcome-card {
    background: white;
    border-radius: 10px;
    padding: 25px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.welcome-content {
    color: #333;
}

.welcome-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #333;
}

.welcome-subtitle {
    font-size: 16px;
    margin: 0;
    color: #666;
}

.welcome-subtitle i {
    color: var(--primary-color);
}



/* Forms */
.form-control {
    border-radius: 5px;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    font-size: 14px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.btn {
    border-radius: 5px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.2s ease;
}

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

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

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

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

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

.btn-outline-primary:hover {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Tables */
.table {
    color: #333;
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
    width: 100%;
    margin-bottom: 20px;
    border-collapse: collapse;
}

.table thead th {
    background-color: #f8f9fa;
    border-top: none;
    border-bottom: 2px solid var(--border-color);
    color: var(--gray-color);
    font-weight: 600;
    vertical-align: bottom;
    padding: 12px;
}

.table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.table td {
    padding: 12px;
    vertical-align: middle;
    border-top: 1px solid var(--border-color);
}

/* Patient View */
.patient-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.patient-header .patient-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-right: 20px;
}

.patient-details {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.patient-details dt {
    font-weight: 600;
    color: var(--gray-color);
}

.patient-details dd {
    margin-bottom: 10px;
}

.patient-tabs .nav-link {
    font-weight: 600;
    color: var(--gray-color);
    padding: 12px 20px;
    border: none;
    border-bottom: 2px solid transparent;
}

.patient-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: transparent;
}

/* Calendar */
.calendar {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.calendar .header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 20px;
    text-align: center;
    font-weight: 600;
}

.calendar .days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    padding: 10px;
}

.calendar .day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar .day:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.calendar .day.active {
    background-color: var(--primary-color);
    color: white;
}

.calendar .day.today {
    border: 2px solid var(--primary-color);
    font-weight: 600;
}

.appointment {
    background-color: #fff;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.appointment .time {
    font-weight: 600;
    margin-bottom: 5px;
}

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

.appointment .type {
    color: var(--gray-color);
    font-size: 12px;
}

/* Invoices */
.invoice-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.invoice-card .header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.invoice-card .body {
    padding: 20px;
}

.invoice-status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-paid {
    background-color: rgba(46, 204, 113, 0.2);
    color: var(--secondary-color);
}

.status-unpaid {
    background-color: rgba(243, 156, 18, 0.2);
    color: var(--warning-color);
}

.status-cancelled {
    background-color: rgba(231, 76, 60, 0.2);
    color: var(--danger-color);
}

/* Alerts and Notifications */
.alert {
    border: none;
    border-radius: 5px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.2);
    color: var(--secondary-dark);
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.2);
    color: var(--danger-color);
}

.alert-warning {
    background-color: rgba(243, 156, 18, 0.2);
    color: var(--warning-color);
}

.alert-info {
    background-color: rgba(52, 152, 219, 0.2);
    color: var(--primary-dark);
}

/* Footer */
footer {
    background-color: #fff;
    padding: 20px 0;
    text-align: center;
    color: var(--gray-color);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

/* Print Styles */
@media print {
    .sidebar, .navbar, .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    body {
        background-color: #fff;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Responsive Utilities */
@media (max-width: 992px) {
    .container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .patient-header {
        flex-direction: column;
        text-align: center;
    }
    
    .patient-header .patient-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .btn {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .d-sm-inline-block {
        display: block !important;
    }
}

/* Accessibility */
:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 15px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Patient Notes Styles */
#patient-notes-list .card {
    border-left: 4px solid #0d6efd;
    transition: all 0.3s ease;
}

#patient-notes-list .card:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

#patient-notes-list .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

#patient-notes-list .card-header h6 {
    color: #495057;
    font-weight: 600;
}

#patient-notes-list .card-text {
    white-space: pre-wrap;
    margin-bottom: 0.5rem;
}

#patient-notes-list .text-muted {
    font-size: 0.875rem;
}

#patient-notes-list .badge {
    font-weight: 500;
}

/* Form styles */
.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-text {
    color: #6c757d;
    font-size: 0.875rem;
}

/* Date input styles */
input[type="date"] {
    padding: 0.375rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input[type="date"]:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    outline: 0;
}

/* Timeline styles for patient log */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}

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

.timeline-marker {
    position: absolute;
    left: -22px;
    top: 0;
    width: 30px;
    height: 30px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.timeline-marker i {
    font-size: 12px;
}

.timeline-content {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-left: 10px;
}

.timeline-header {
    margin-bottom: 10px;
}

.timeline-header h6 {
    margin: 0;
    color: #495057;
}

.timeline-body {
    font-size: 14px;
}

.timeline-body .row {
    margin: 0;
}

.timeline-body .col-md-6 {
    padding: 0 10px;
}

/* Document upload styles */
.document-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.document-upload-area:hover {
    border-color: #007bff;
    background: #e3f2fd;
}

.document-upload-area.dragover {
    border-color: #28a745;
    background: #d4edda;
}

/* Force all text color to black for patient details and sidebar cards */
.patient-header, .patient-header *,
.card, .card *,
.patient-details, .patient-details *,
.text-muted, .text-primary, .text-success, .text-info, .text-warning, .text-danger,
dt, dd, label, .form-label, .form-control, .form-select, .nav-link, .badge, .alert, .timeline, .timeline *, .table, .table * {
    color: #000 !important;
}

/* Optionally, make links black unless hovered */
a, a:visited {
    color: #000 !important;
}
a:hover, a:active {
    color: #007bff !important;
}
