/* Facebook-like Theme - Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    color: #050505;
}

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

/* Facebook-style Header */
header {
    background: #ffffff;
    color: #050505;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo img {
    height: 40px;
    width: auto;
}

.logo h1 {
    font-size: 1.5em;
    font-weight: 700;
    color: #1877f2;
    margin: 0;
}

.subtitle {
    font-size: 0.85em;
    color: #65676b;
    font-weight: 400;
}

/* Navigation */
nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-link {
    color: #050505;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.2s;
    font-weight: 500;
}

.nav-link:hover {
    background: #f0f2f5;
}

.nav-btn {
    background: #e4e6eb;
    color: #050505;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.nav-btn:hover {
    background: #d8dadf;
}

/* Main Content */
main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px;
    width: 100%;
}

.welcome-card {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.welcome-card h2 {
    font-size: 1.75em;
    margin-bottom: 8px;
    color: #050505;
    font-weight: 700;
}

.welcome-card p {
    color: #65676b;
    font-size: 1em;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    border: 1px solid #e4e6eb;
}

.card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-icon {
    font-size: 2.5em;
    margin-bottom: 12px;
}

.card h3 {
    margin-bottom: 8px;
    color: #050505;
    font-weight: 600;
    font-size: 1.1em;
}

.card p {
    color: #65676b;
    margin-bottom: 16px;
    font-size: 0.9em;
    line-height: 1.4;
}

/* Facebook-style Buttons */
.btn {
    display: inline-block;
    padding: 10px 16px;
    background: #1877f2;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    text-align: center;
}

.btn:hover {
    background: #166fe5;
}

.btn-secondary {
    background: #e4e6eb;
    color: #050505;
}

.btn-secondary:hover {
    background: #d8dadf;
}

/* Status Section */
.status-section {
    margin-top: 16px;
}

.status-section h3 {
    margin-bottom: 12px;
    color: #050505;
    font-weight: 600;
    font-size: 1.2em;
}

.status-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.status-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e4e6eb;
}

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

.status-label {
    font-weight: 600;
    color: #050505;
}

.status-indicator {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
}

.status-online {
    background: #d3f3df;
    color: #00a400;
}

.status-offline {
    background: #ffebe9;
    color: #d93025;
}

.status-loading {
    background: #fff3cd;
    color: #856404;
}

/* Dashboard Specific Styles */
.dashboard-header {
    margin-bottom: 20px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.dashboard-header h2 {
    font-size: 1.75em;
    color: #050505;
    margin-bottom: 4px;
    font-weight: 700;
}

.text-muted {
    color: #65676b;
    font-size: 0.9em;
}

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

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #1877f2;
}

.stat-icon {
    font-size: 2.5em;
}

.stat-content h3 {
    font-size: 1.75em;
    margin-bottom: 4px;
    color: #050505;
    font-weight: 700;
}

.stat-content p {
    color: #65676b;
    font-size: 0.9em;
}

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

.dashboard-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.dashboard-card h3 {
    margin-bottom: 16px;
    color: #050505;
    font-weight: 600;
    font-size: 1.2em;
    padding-bottom: 12px;
    border-bottom: 1px solid #e4e6eb;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #f0f2f5;
    border-radius: 8px;
    transition: background 0.2s;
}

.activity-item:hover {
    background: #e4e6eb;
}

.activity-time {
    font-weight: 600;
    color: #1877f2;
    min-width: 70px;
    font-size: 0.85em;
}

.activity-text {
    color: #050505;
    font-size: 0.9em;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-btn {
    padding: 12px 16px;
    background: #f0f2f5;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
    font-size: 0.95em;
    font-weight: 500;
    color: #050505;
}

.action-btn:hover {
    background: #e4e6eb;
}

/* Schedule List */
.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.schedule-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 12px;
    padding: 16px;
    background: #f0f2f5;
    border-radius: 8px;
    align-items: center;
}

.schedule-time {
    font-weight: 600;
    color: #050505;
    font-size: 0.9em;
}

.schedule-patient {
    color: #050505;
    font-size: 0.95em;
}

.schedule-status {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 600;
    white-space: nowrap;
}

.status-completed {
    background: #d3f3df;
    color: #00a400;
}

.status-in-progress {
    background: #fff3cd;
    color: #856404;
}

.status-pending {
    background: #d3e4fd;
    color: #1877f2;
}

/* Info Box */
.info-box {
    background: #e7f3ff;
    border-left: 4px solid #1877f2;
    padding: 16px 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.info-box p {
    color: #050505;
    margin: 0;
    font-size: 0.9em;
}

/* Footer */
footer {
    background: white;
    padding: 20px;
    text-align: center;
    color: #65676b;
    border-top: 1px solid #e4e6eb;
    margin-top: auto;
    font-size: 0.9em;
}

/* User Profile Section (Facebook-style) */
.user-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e4e6eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        padding: 8px 12px;
    }

    .logo h1 {
        font-size: 1.2em;
    }

    .subtitle {
        display: none;
    }

    main {
        padding: 12px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .schedule-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .schedule-status {
        justify-self: start;
    }

    nav {
        gap: 4px;
    }

    .nav-link, .nav-btn {
        padding: 6px 12px;
        font-size: 0.9em;
    }
}

/* Loading Spinner (Facebook-style) */
.spinner {
    border: 3px solid #f0f2f5;
    border-top: 3px solid #1877f2;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
