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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f7;
    color: #1d1d1f;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, #007AFF 0%, #0051D5 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 16px;
    opacity: 0.9;
}

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

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #007AFF;
    color: white;
}

.btn-primary:hover {
    background-color: #0051D5;
}

.btn-success {
    background-color: #34C759;
    color: white;
    padding: 6px 12px;
    font-size: 12px;
}

.btn-warning {
    background-color: #FF9500;
    color: white;
    padding: 6px 12px;
    font-size: 12px;
}

.btn-danger {
    background-color: #FF3B30;
    color: white;
    padding: 6px 12px;
    font-size: 12px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 500;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
}

.loading, .error, .no-data {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #86868b;
}

.error {
    color: #FF3B30;
    background-color: #FFEBEE;
    border-radius: 8px;
    margin-bottom: 20px;
}

#appointmentsContainer {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

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

thead {
    background-color: #f5f5f7;
}

th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: #1d1d1f;
    border-bottom: 2px solid #d2d2d7;
}

td {
    padding: 16px;
    border-bottom: 1px solid #f5f5f7;
    font-size: 14px;
}

tbody tr:hover {
    background-color: #f9f9f9;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending {
    background-color: #FFEB3B;
    color: #F57F17;
}

.status-confirmed {
    background-color: #4CAF50;
    color: white;
}

.status-completed {
    background-color: #2196F3;
    color: white;
}

.status-cancelled {
    background-color: #9E9E9E;
    color: white;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.details-row {
    display: none;
}

.details-row.expanded {
    display: table-row;
}

.details-content {
    padding: 20px;
    background-color: #f9f9f9;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.detail-item {
    padding: 12px;
    background: white;
    border-radius: 8px;
}

.detail-label {
    font-size: 12px;
    color: #86868b;
    margin-bottom: 4px;
}

.detail-value {
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    table {
        font-size: 12px;
    }

    th, td {
        padding: 8px;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select {
        flex: 1;
    }
}

