:root {
    --primary-color: #40E0D0;
    --secondary-color: #00CED1;
    --accent-color: #20B2AA;
    --light-color: #E0FFFF;
    --dark-color: #008B8B;
    --danger-color: #FF0000;
    --warning-color: #e7ac0a;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    overflow-x: hidden;
}

.app-container {
    max-width: 414px;
    margin: 0 auto;
    background-color: white;
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Gambar latar belakang tuberculosis */
.app-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../brand/tuberculosis-concept-illustration_114360-10037.avif');
    background-size: cover;
    background-position: center;
    opacity: 0.08;
    z-index: 0;
}

.logo-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    position: relative;
    z-index: 2;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
    text-align: center;
}

.logo-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 20px rgba(64, 224, 208, 0.3);
    animation: float 5s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.logo-icon i {
    color: white;
    font-size: 3rem;
}

.logo-text {
    font-weight: 700;
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1rem;
    color: #555;
    max-width: 300px;
    line-height: 1.4;
}

.background-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--light-color);
    opacity: 0.3;
    z-index: 1;
}

.content-section {
    padding: 1.5rem;
    position: relative;
    z-index: 2;
    background-color: white;
    border-radius: 30px 30px 0 0;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.05);
}

.info-text {
    margin: 1rem 0 2rem;
    font-size: 0.95rem;
    color: #555;
    position: relative;
    z-index: 2;
    padding: 1rem;
    border-radius: 15px;
    background-color: rgba(224, 255, 255, 0.5);
    line-height: 1.6;
}

.button-container {
    display: flex;
    justify-content: space-around;
    margin-top: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.icon-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    width: 90px;
    transition: all 0.3s ease;
}

.icon-circle {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.icon-button:hover .icon-circle {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.login-icon {
    background-color: var(--primary-color);
    color: white;
}

.register-icon {
    background-color: white;
    color: var(--dark-color);
    border: 2px solid var(--primary-color);
}

.guide-icon {
    background-color: var(--accent-color);
    color: white;
}

.button-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark-color);
}

.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.wave-divider {
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 1;
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

.wave-divider .shape-fill {
    fill: white;
}

/* Header */
.app-header {
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    position: relative;
    z-index: 2;
}

.app-header .logo {
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0;
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 2rem 1.5rem;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.content-area-form {
    flex: 1;
    padding: 0.5rem;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

/* Form Styles */
.auth-form {
    background-color: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-top: 1rem;
}

.form-control {
    border-radius: 10px;
    padding: 12px 15px;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(64, 224, 208, 0.25);
}

.btn-primary {
    background-color: var(--primary-color);
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-weight: 600;
    width: 100%;
    margin-top: 1rem;
}

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

.btn-secondary {
    background-color: var(--accent-color);
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-weight: 600;
    width: 100%;
    margin-top: 1rem;
}

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

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.form-footer a {
    color: var(--dark-color);
    font-weight: 600;
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.menu-item {
    background-color: white;
    border-radius: 15px;
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--dark-color);
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.menu-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
}

.menu-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.menu-desc {
    font-size: 0.8rem;
    color: #666;
}

/* Logout Button */
.logout-btn {
    margin-top: auto;
    background-color: #f8f9fa;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-weight: 600;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 2rem;
}

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

/* 404 Styles */
.error-icon {
    font-size: 5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-30px);}
    60% {transform: translateY(-15px);}
}

.error-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1rem;
    color: #555;
    margin-bottom: 2rem;
    max-width: 300px;
}

.btn-home {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-home:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    color: white;
}

/* Copyright Footer */
.copyright-footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.75rem;
    color: #666;
    background-color: rgba(255,255,255,0.8);
    border-top: 1px solid #eee;
    z-index: 2;
}

/* Hide sections */
.section {
    display: none;
}

.section.active {
    display: flex;
    flex-direction: column;
    flex: 1;
    animation: fadeIn 0.5s ease;
}

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

/* Calendar Styles */
.calendar-container {
    background: white;
    border-radius: 2px;
    padding: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

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

.calendar-header h3 {
    margin: 0;
    color: var(--dark-color);
    font-size: 1.2rem;
}

.nav-arrow {
    color: var(--primary-color);
    font-size: 1.2rem;
    text-decoration: none;
    padding: 0.5rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.1rem;
}

.day-header {
    text-align: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--dark-color);
    padding: 0.5rem 0;
}

.day-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f8f9fa;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.day-cell:hover {
    background: #e9ecef;
    transform: scale(1.05);
}

.day-cell.today {
    background: var(--light-color);
    font-weight: bold;
}

.day-cell.highlight-primary {
    background: rgba(64, 224, 208, 0.2);
    border: 2px solid var(--primary-color);
}

.day-cell.highlight-secondary {
    background: rgba(0, 206, 209, 0.2);
    border: 2px solid var(--secondary-color);
}
.day-cell.highlight-danger {
    background: rgba(0, 206, 209, 0.2);
    border: 2px solid var(--danger-color);
}

.day-cell.highlight-accent {
    background: rgba(32, 178, 170, 0.2);
    border: 2px solid var(--accent-color);
}

.day-cell.highlight-warning {
    background: rgba(32, 178, 170, 0.2);
    border: 2px solid var(--warning-color);
}

.day-number {
    font-size: 1rem;
    font-weight: 500;
}

.day-event {
    position: absolute;
    bottom: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-color);
}

.day-cell.highlight-secondary .day-event {
    background: var(--secondary-color);
}

.day-cell.highlight-danger .day-event {
    background: var(--danger-color);
}

.day-cell.highlight-accent .day-event {
    background: var(--accent-color);
}

.day-cell.highlight-warning .day-event {
    background: var(--warning-color);
}

.day-cell.empty {
    background: transparent;
    cursor: default;
}

.day-cell.empty:hover {
    transform: none;
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 3px;
}

.legend-color.highlight-primary {
    background: var(--primary-color);
}

.legend-color.highlight-secondary {
    background: var(--secondary-color);
}

.legend-color.highlight-accent {
    background: var(--accent-color);
}

.legend-color.highlight-warning {
    background: var(--warning-color);
}

.legend-color.highlight-danger {
    background: var(--danger-color);
}

/* Chat Styles */
.chat-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 70vh;
    max-height: 600px;
}

.chat-header {
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4CAF50;
}

.status-indicator.online {
    background: #4CAF50;
}

.status-indicator.offline {
    background: #F44336;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.message {
    max-width: 80%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 15px;
    position: relative;
    word-wrap: break-word;
}

.message.sent {
    background-color: var(--light-color);
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.message.received {
    background-color: white;
    margin-right: auto;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.message-sender {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--dark-color);
    margin-bottom: 0.3rem;
}

.message-content {
    font-size: 0.95rem;
    line-height: 1.4;
}

.message-time {
    font-size: 0.7rem;
    color: #777;
    text-align: right;
    margin-top: 0.3rem;
}

.chat-input {
    display: flex;
    padding: 1rem;
    border-top: 1px solid #eee;
    background: white;
}

.chat-input .message-area {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 0.75rem;
    resize: none;
    font-family: inherit;
}

.chat-input .sent-btn {
    margin-left: 0.5rem;
    align-self: flex-end;
    background-color: var(--primary-color);
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-weight: 600;
    margin-top: 1rem;    
}

.admin-tools {
    padding: 0.5rem 1rem;
    background: #f5f5f5;
    border-top: 1px solid #eee;
}

.admin-tools .form-group {
    margin-bottom: 0;
}

.admin-tools label {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    display: block;
}

.message-loading {
    text-align: center;
    color: #666;
    padding: 2rem;
}

.list-card {
    background-color: var(--light-color);
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.list-card h5 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.list-card p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}
