/* Main App Styles */
:root {
    --background-color: #ffffff;
    --default-color: #3d4348;
    --heading-color: #3e5055;
    --accent-color: #dc3545;
    --contrast-color: #ffffff;
    --primary-color: #dc3545;
    --primary-dark: #c82333;
    --secondary-color: #3d4348;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #3d4348;
    --border-color: #dee2e6;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--default-color);
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
}

/* App Container */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--contrast-color) !important;
}

.navbar-brand i {
    margin-right: 0.5rem;
}

.navbar-brand img {
    height: 32px;
    margin-right: 0.5rem;
}

/* Main Content */
.app-main {
    flex: 1;
    padding: 2rem 0;
}

/* Screens */
.screen {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Welcome Screen */
.welcome-card {
    background: var(--background-color);
    border-radius: 1rem;
    padding: 3rem 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.welcome-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 0.5rem;
}

.welcome-subtitle {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.welcome-description {
    font-size: 1.1rem;
    color: var(--default-color);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.welcome-actions {
    margin-bottom: 1rem;
}

.welcome-info {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

/* Survey Card */
.survey-card {
    background: var(--background-color);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.survey-header {
    background: var(--accent-color);
    color: var(--contrast-color);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-container {
    flex: 1;
    margin-right: 1rem;
}

.progress {
    height: 0.5rem;
    border-radius: 0.25rem;
    background-color: rgba(255, 255, 255, 0.3);
    margin-bottom: 0.5rem;
}

.progress-bar {
    background-color: var(--contrast-color);
    transition: width 0.3s ease;
}

.progress-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
}

.survey-content {
    padding: 2rem;
    min-height: 400px;
}

.survey-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.survey-footer .row {
    width: 100%;
    margin: 0;
}

.survey-footer .col-6 {
    padding: 0;
}

.survey-footer .col-6:first-child {
    text-align: left;
}

.survey-footer .col-6:last-child {
    text-align: right;
}

.survey-footer .btn {
    min-width: 120px;
}

/* Feedback Card */
.feedback-card {
    background: var(--background-color);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.feedback-header {
    background: var(--accent-color);
    color: var(--contrast-color);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.feedback-header h3 {
    margin: 0;
    font-weight: 600;
}

.feedback-content {
    padding: 2rem;
}

/* About TEMA Card */
.about-card {
    background: var(--background-color);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.about-header {
    text-align: center;
    margin-bottom: 2rem;
}

.about-logo {
    max-width: 200px;
    margin-bottom: 1rem;
}

.about-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 0.5rem;
}

.about-subtitle {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.about-content {
    color: var(--default-color);
    line-height: 1.7;
}

.about-content h4 {
    color: var(--heading-color);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.about-content p {
    margin-bottom: 1rem;
}

.about-content ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.about-content li {
    margin-bottom: 0.5rem;
}

/* Success Card */
.success-card {
    background: var(--background-color);
    border-radius: 1rem;
    padding: 3rem 2rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--success-color);
}

.success-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.success-message {
    font-size: 1.1rem;
    color: var(--default-color);
    margin-bottom: 2rem;
}

.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Footer */
.app-footer {
    background: var(--background-color);
    border-top: 1px solid var(--border-color);
    padding: 1rem 0;
    margin-top: auto;
}

/* Buttons */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-outline-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Form Controls */
.form-control {
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--heading-color);
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-main {
        padding: 1rem 0;
    }
    
    .welcome-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .welcome-title {
        font-size: 2rem;
    }
    
    .welcome-subtitle {
        font-size: 1.25rem;
    }
    
    .survey-content,
    .feedback-content {
        padding: 1.5rem;
    }
    
    .success-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .success-actions {
        flex-direction: column;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .welcome-card {
        padding: 1.5rem 1rem;
        margin: 0.5rem;
    }
    
    .survey-header,
    .feedback-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .progress-container {
        margin-right: 0;
        width: 100%;
    }
    
    .survey-content,
    .feedback-content {
        padding: 1rem;
    }
    
    .survey-footer {
        padding: 1rem;
    }
    
    .survey-footer .btn {
        min-width: 100px;
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
}

/* Utility Classes */
.text-primary {
    color: var(--accent-color) !important;
}

.bg-primary {
    background-color: var(--accent-color) !important;
}

.border-primary {
    border-color: var(--accent-color) !important;
}

.shadow {
    box-shadow: var(--shadow) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

.slide-up {
    animation: slideUp 0.3s ease-in-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dashboard Styles */
.dashboard-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.dashboard-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0;
}

.dashboard-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0.5rem 0 0 0;
}

.summary-card {
    border: none;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.summary-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.summary-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--heading-color);
}

.summary-label {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin: 0.5rem 0 0 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feedback-list, .surveys-list {
    max-height: 400px;
    overflow-y: auto;
}

.feedback-item, .survey-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.feedback-item:hover, .survey-item:hover {
    background-color: var(--light-color);
}

.feedback-item:last-child, .survey-item:last-child {
    border-bottom: none;
}

.feedback-header, .survey-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.feedback-type {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.feedback-text {
    color: var(--secondary-color);
    line-height: 1.5;
}

.survey-name {
    font-weight: 600;
    color: var(--heading-color);
}

.satisfaction-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.survey-details {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Data Tables */
.table-responsive {
    border-radius: 10px;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table th {
    background-color: var(--light-color);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--heading-color);
    padding: 1rem 0.75rem;
}

.table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.table-hover tbody tr:hover {
    background-color: var(--light-color);
}

/* Card Styles */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    background-color: var(--light-color);
    border-bottom: 1px solid var(--border-color);
    border-radius: 15px 15px 0 0 !important;
    padding: 1rem 1.5rem;
}

.card-title {
    margin: 0;
    font-weight: 600;
    color: var(--heading-color);
}

.card-body {
    padding: 1.5rem;
}

/* Navigation Tabs */
.nav-tabs {
    border-bottom: 2px solid var(--border-color);
}

.nav-tabs .nav-link {
    border: none;
    border-radius: 0;
    color: var(--secondary-color);
    font-weight: 500;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: var(--primary-color);
    background-color: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    background-color: transparent;
    border-bottom: 3px solid var(--primary-color);
}

/* Badge Styles */
.badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Dashboard Mobile Styles */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .dashboard-title {
        font-size: 2rem;
    }
    
    .summary-card {
        margin-bottom: 1rem;
    }
    
    .summary-number {
        font-size: 2rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .nav-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* Survey Details Modal Styles */
.survey-header-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.info-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    height: 100%;
    transition: all 0.3s ease;
}

.info-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.info-card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-radius: 12px 12px 0 0;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-card-header i {
    color: #dc3545;
    font-size: 1.1rem;
}

.info-card-header h6 {
    margin: 0;
    font-weight: 600;
    color: #2c3e50;
}

.info-card-body {
    padding: 1.5rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item label {
    font-weight: 500;
    color: #6c757d;
    margin: 0;
    font-size: 0.875rem;
}

.info-item span {
    color: #2c3e50;
    font-weight: 500;
    text-align: right;
    max-width: 60%;
    word-wrap: break-word;
}

.satisfaction-rating {
    font-size: 1rem;
    font-weight: 600;
}

.yes-no {
    font-size: 0.875rem;
    font-weight: 600;
}

.assessment-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.assessment-item label {
    display: block;
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.assessment-item span {
    display: block;
    font-size: 1rem;
    font-weight: 600;
}

.comments-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    font-style: italic;
    color: #495057;
    line-height: 1.6;
}

.survey-metadata {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

/* Modal Enhancements */
.modal-xl {
    max-width: 1200px;
}

.modal-header.bg-primary {
    border-bottom: none;
}

.modal-header .modal-title {
    font-weight: 600;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

/* Responsive Survey Modal */
@media (max-width: 768px) {
    .modal-xl {
        max-width: 95%;
        margin: 0.5rem;
    }
    
    .info-card-body {
        padding: 1rem;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .info-item span {
        max-width: 100%;
        text-align: left;
    }
    
    .assessment-item {
        margin-bottom: 0.75rem;
    }
    
    .survey-header-card {
        padding: 1rem;
    }
}

/* Patient Rights Styles */
.patient-rights-card {
    background: var(--background-color);
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-bottom: 2rem;
}

.patient-rights-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--contrast-color);
    padding: 2rem;
    text-align: center;
    position: relative;
}

.patient-rights-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
}

.patient-rights-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.patient-rights-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.patient-rights-header .btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--contrast-color);
    backdrop-filter: blur(10px);
}

.patient-rights-header .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--contrast-color);
}

.patient-rights-content {
    padding: 2rem;
}

.rights-list {
    margin-top: 1.5rem;
}

.right-item {
    background: var(--light-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.right-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.right-item h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.right-item h5 i {
    font-size: 1.2rem;
}

.right-item ul {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

.right-item li {
    margin-bottom: 0.5rem;
    color: var(--default-color);
}

.contact-info {
    background: var(--light-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.contact-info h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-info p {
    margin-bottom: 1rem;
}

.contact-info strong {
    color: var(--heading-color);
}

.social-links {
    margin-top: 1rem;
}

/* Responsive adjustments for patient rights */
@media (max-width: 768px) {
    .patient-rights-header {
        padding: 1.5rem 1rem;
    }
    
    .patient-rights-title {
        font-size: 1.5rem;
    }
    
    .patient-rights-content {
        padding: 1.5rem 1rem;
    }
    
    .right-item {
        padding: 1rem;
    }
    
    .patient-rights-header .btn {
        position: static;
        margin-top: 1rem;
    }
} 